/* Generated by Cython 3.2.5 */

#ifndef PY_SSIZE_T_CLEAN
#define PY_SSIZE_T_CLEAN
#endif /* PY_SSIZE_T_CLEAN */
/* InitLimitedAPI */
#if defined(Py_LIMITED_API)
  #if !defined(CYTHON_LIMITED_API)
  #define CYTHON_LIMITED_API 1
  #endif
#elif defined(CYTHON_LIMITED_API)
  #ifdef _MSC_VER
  #pragma message ("Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead.")
  #else
  #warning Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead.
  #endif
#endif

#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 < 0x03080000
    #error Cython requires Python 3.8+.
#else
#define __PYX_ABI_VERSION "3_2_5"
#define CYTHON_HEX_VERSION 0x030205F0
#define CYTHON_FUTURE_DIVISION 1
/* CModulePreamble */
#include <stddef.h>
#ifndef offsetof
  #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
#endif
#if !defined(_WIN32) && !defined(WIN32) && !defined(MS_WINDOWS)
  #ifndef __stdcall
    #define __stdcall
  #endif
  #ifndef __cdecl
    #define __cdecl
  #endif
  #ifndef __fastcall
    #define __fastcall
  #endif
#endif
#ifndef DL_IMPORT
  #define DL_IMPORT(t) t
#endif
#ifndef DL_EXPORT
  #define DL_EXPORT(t) t
#endif
#define __PYX_COMMA ,
#ifndef PY_LONG_LONG
  #define PY_LONG_LONG LONG_LONG
#endif
#ifndef Py_HUGE_VAL
  #define Py_HUGE_VAL HUGE_VAL
#endif
#define __PYX_LIMITED_VERSION_HEX PY_VERSION_HEX
#if defined(GRAALVM_PYTHON)
  /* For very preliminary testing purposes. Most variables are set the same as PyPy.
     The existence of this section does not imply that anything works or is even tested */
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #define CYTHON_COMPILING_IN_LIMITED_API 0
  #define CYTHON_COMPILING_IN_GRAAL 1
  #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0
  #undef CYTHON_USE_TYPE_SLOTS
  #define CYTHON_USE_TYPE_SLOTS 0
  #undef CYTHON_USE_TYPE_SPECS
  #define CYTHON_USE_TYPE_SPECS 0
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #undef CYTHON_USE_UNICODE_INTERNALS
  #define CYTHON_USE_UNICODE_INTERNALS 0
  #undef CYTHON_USE_UNICODE_WRITER
  #define CYTHON_USE_UNICODE_WRITER 0
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #undef CYTHON_AVOID_BORROWED_REFS
  #define CYTHON_AVOID_BORROWED_REFS 1
  #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
  #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0
  #undef CYTHON_ASSUME_SAFE_MACROS
  #define CYTHON_ASSUME_SAFE_MACROS 0
  #undef CYTHON_ASSUME_SAFE_SIZE
  #define CYTHON_ASSUME_SAFE_SIZE 0
  #undef CYTHON_UNPACK_METHODS
  #define CYTHON_UNPACK_METHODS 0
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_GIL
  #define CYTHON_FAST_GIL 0
  #undef CYTHON_METH_FASTCALL
  #define CYTHON_METH_FASTCALL 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #ifndef CYTHON_PEP487_INIT_SUBCLASS
    #define CYTHON_PEP487_INIT_SUBCLASS 1
  #endif
  #undef CYTHON_PEP489_MULTI_PHASE_INIT
  #define CYTHON_PEP489_MULTI_PHASE_INIT 1
  #undef CYTHON_USE_MODULE_STATE
  #define CYTHON_USE_MODULE_STATE 0
  #undef CYTHON_USE_SYS_MONITORING
  #define CYTHON_USE_SYS_MONITORING 0
  #undef CYTHON_USE_TP_FINALIZE
  #define CYTHON_USE_TP_FINALIZE 0
  #undef CYTHON_USE_AM_SEND
  #define CYTHON_USE_AM_SEND 0
  #undef CYTHON_USE_DICT_VERSIONS
  #define CYTHON_USE_DICT_VERSIONS 0
  #undef CYTHON_USE_EXC_INFO_STACK
  #define CYTHON_USE_EXC_INFO_STACK 1
  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
    #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
  #endif
  #undef CYTHON_USE_FREELISTS
  #define CYTHON_USE_FREELISTS 0
  #undef CYTHON_IMMORTAL_CONSTANTS
  #define CYTHON_IMMORTAL_CONSTANTS 0
#elif defined(PYPY_VERSION)
  #define CYTHON_COMPILING_IN_PYPY 1
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #define CYTHON_COMPILING_IN_LIMITED_API 0
  #define CYTHON_COMPILING_IN_GRAAL 0
  #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0
  #undef CYTHON_USE_TYPE_SLOTS
  #define CYTHON_USE_TYPE_SLOTS 1
  #ifndef CYTHON_USE_TYPE_SPECS
    #define CYTHON_USE_TYPE_SPECS 0
  #endif
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #undef CYTHON_USE_UNICODE_INTERNALS
  #define CYTHON_USE_UNICODE_INTERNALS 0
  #undef CYTHON_USE_UNICODE_WRITER
  #define CYTHON_USE_UNICODE_WRITER 0
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #undef CYTHON_AVOID_BORROWED_REFS
  #define CYTHON_AVOID_BORROWED_REFS 1
  #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
  #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1
  #undef CYTHON_ASSUME_SAFE_MACROS
  #define CYTHON_ASSUME_SAFE_MACROS 0
  #ifndef CYTHON_ASSUME_SAFE_SIZE
    #define CYTHON_ASSUME_SAFE_SIZE 1
  #endif
  #undef CYTHON_UNPACK_METHODS
  #define CYTHON_UNPACK_METHODS 0
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_GIL
  #define CYTHON_FAST_GIL 0
  #undef CYTHON_METH_FASTCALL
  #define CYTHON_METH_FASTCALL 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #ifndef CYTHON_PEP487_INIT_SUBCLASS
    #define CYTHON_PEP487_INIT_SUBCLASS 1
  #endif
  #if PY_VERSION_HEX < 0x03090000
    #undef CYTHON_PEP489_MULTI_PHASE_INIT
    #define CYTHON_PEP489_MULTI_PHASE_INIT 0
  #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT)
    #define CYTHON_PEP489_MULTI_PHASE_INIT 1
  #endif
  #undef CYTHON_USE_MODULE_STATE
  #define CYTHON_USE_MODULE_STATE 0
  #undef CYTHON_USE_SYS_MONITORING
  #define CYTHON_USE_SYS_MONITORING 0
  #ifndef CYTHON_USE_TP_FINALIZE
    #define CYTHON_USE_TP_FINALIZE (PYPY_VERSION_NUM >= 0x07030C00)
  #endif
  #undef CYTHON_USE_AM_SEND
  #define CYTHON_USE_AM_SEND 0
  #undef CYTHON_USE_DICT_VERSIONS
  #define CYTHON_USE_DICT_VERSIONS 0
  #undef CYTHON_USE_EXC_INFO_STACK
  #define CYTHON_USE_EXC_INFO_STACK 0
  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
    #define CYTHON_UPDATE_DESCRIPTOR_DOC (PYPY_VERSION_NUM >= 0x07031100)
  #endif
  #undef CYTHON_USE_FREELISTS
  #define CYTHON_USE_FREELISTS 0
  #undef CYTHON_IMMORTAL_CONSTANTS
  #define CYTHON_IMMORTAL_CONSTANTS 0
#elif defined(CYTHON_LIMITED_API)
  #ifdef Py_LIMITED_API
    #undef __PYX_LIMITED_VERSION_HEX
    #define __PYX_LIMITED_VERSION_HEX Py_LIMITED_API
  #endif
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #define CYTHON_COMPILING_IN_LIMITED_API 1
  #define CYTHON_COMPILING_IN_GRAAL 0
  #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0
  #undef CYTHON_USE_TYPE_SLOTS
  #define CYTHON_USE_TYPE_SLOTS 0
  #undef CYTHON_USE_TYPE_SPECS
  #define CYTHON_USE_TYPE_SPECS 1
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #undef CYTHON_USE_UNICODE_INTERNALS
  #define CYTHON_USE_UNICODE_INTERNALS 0
  #ifndef CYTHON_USE_UNICODE_WRITER
    #define CYTHON_USE_UNICODE_WRITER 0
  #endif
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #ifndef CYTHON_AVOID_BORROWED_REFS
    #define CYTHON_AVOID_BORROWED_REFS 0
  #endif
  #ifndef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
    #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0
  #endif
  #undef CYTHON_ASSUME_SAFE_MACROS
  #define CYTHON_ASSUME_SAFE_MACROS 0
  #undef CYTHON_ASSUME_SAFE_SIZE
  #define CYTHON_ASSUME_SAFE_SIZE 0
  #undef CYTHON_UNPACK_METHODS
  #define CYTHON_UNPACK_METHODS 0
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_GIL
  #define CYTHON_FAST_GIL 0
  #undef CYTHON_METH_FASTCALL
  #define CYTHON_METH_FASTCALL (__PYX_LIMITED_VERSION_HEX >= 0x030C0000)
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #ifndef CYTHON_PEP487_INIT_SUBCLASS
    #define CYTHON_PEP487_INIT_SUBCLASS 1
  #endif
  #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
    #define CYTHON_PEP489_MULTI_PHASE_INIT 1
  #endif
  #ifndef CYTHON_USE_MODULE_STATE
    #define CYTHON_USE_MODULE_STATE 0
  #endif
  #undef CYTHON_USE_SYS_MONITORING
  #define CYTHON_USE_SYS_MONITORING 0
  #ifndef CYTHON_USE_TP_FINALIZE
    #define CYTHON_USE_TP_FINALIZE 0
  #endif
  #ifndef CYTHON_USE_AM_SEND
    #define CYTHON_USE_AM_SEND (__PYX_LIMITED_VERSION_HEX >= 0x030A0000)
  #endif
  #undef CYTHON_USE_DICT_VERSIONS
  #define CYTHON_USE_DICT_VERSIONS 0
  #undef CYTHON_USE_EXC_INFO_STACK
  #define CYTHON_USE_EXC_INFO_STACK 0
  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
    #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
  #endif
  #ifndef CYTHON_USE_FREELISTS
  #define CYTHON_USE_FREELISTS 1
  #endif
  #undef CYTHON_IMMORTAL_CONSTANTS
  #define CYTHON_IMMORTAL_CONSTANTS 0
#else
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_CPYTHON 1
  #define CYTHON_COMPILING_IN_LIMITED_API 0
  #define CYTHON_COMPILING_IN_GRAAL 0
  #ifdef Py_GIL_DISABLED
    #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 1
  #else
    #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0
  #endif
  #if PY_VERSION_HEX < 0x030A0000
    #undef CYTHON_USE_TYPE_SLOTS
    #define CYTHON_USE_TYPE_SLOTS 1
  #elif !defined(CYTHON_USE_TYPE_SLOTS)
    #define CYTHON_USE_TYPE_SLOTS 1
  #endif
  #ifndef CYTHON_USE_TYPE_SPECS
    #define CYTHON_USE_TYPE_SPECS 0
  #endif
  #ifndef CYTHON_USE_PYTYPE_LOOKUP
    #define CYTHON_USE_PYTYPE_LOOKUP 1
  #endif
  #ifndef CYTHON_USE_PYLONG_INTERNALS
    #define CYTHON_USE_PYLONG_INTERNALS 1
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    #undef CYTHON_USE_PYLIST_INTERNALS
    #define CYTHON_USE_PYLIST_INTERNALS 0
  #elif !defined(CYTHON_USE_PYLIST_INTERNALS)
    #define CYTHON_USE_PYLIST_INTERNALS 1
  #endif
  #ifndef CYTHON_USE_UNICODE_INTERNALS
    #define CYTHON_USE_UNICODE_INTERNALS 1
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING || PY_VERSION_HEX >= 0x030B00A2
    #undef CYTHON_USE_UNICODE_WRITER
    #define CYTHON_USE_UNICODE_WRITER 0
  #elif !defined(CYTHON_USE_UNICODE_WRITER)
    #define CYTHON_USE_UNICODE_WRITER 1
  #endif
  #ifndef CYTHON_AVOID_BORROWED_REFS
    #define CYTHON_AVOID_BORROWED_REFS 0
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
    #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1
  #elif !defined(CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS)
    #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0
  #endif
  #ifndef CYTHON_ASSUME_SAFE_MACROS
    #define CYTHON_ASSUME_SAFE_MACROS 1
  #endif
  #ifndef CYTHON_ASSUME_SAFE_SIZE
    #define CYTHON_ASSUME_SAFE_SIZE 1
  #endif
  #ifndef CYTHON_UNPACK_METHODS
    #define CYTHON_UNPACK_METHODS 1
  #endif
  #ifndef CYTHON_FAST_THREAD_STATE
    #define CYTHON_FAST_THREAD_STATE 1
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    #undef CYTHON_FAST_GIL
    #define CYTHON_FAST_GIL 0
  #elif !defined(CYTHON_FAST_GIL)
    #define CYTHON_FAST_GIL (PY_VERSION_HEX < 0x030C00A6)
  #endif
  #ifndef CYTHON_METH_FASTCALL
    #define CYTHON_METH_FASTCALL 1
  #endif
  #ifndef CYTHON_FAST_PYCALL
    #define CYTHON_FAST_PYCALL 1
  #endif
  #ifndef CYTHON_PEP487_INIT_SUBCLASS
    #define CYTHON_PEP487_INIT_SUBCLASS 1
  #endif
  #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
    #define CYTHON_PEP489_MULTI_PHASE_INIT 1
  #endif
  #ifndef CYTHON_USE_MODULE_STATE
    #define CYTHON_USE_MODULE_STATE 0
  #endif
  #ifndef CYTHON_USE_SYS_MONITORING
    #define CYTHON_USE_SYS_MONITORING (PY_VERSION_HEX >= 0x030d00B1)
  #endif
  #ifndef CYTHON_USE_TP_FINALIZE
    #define CYTHON_USE_TP_FINALIZE 1
  #endif
  #ifndef CYTHON_USE_AM_SEND
    #define CYTHON_USE_AM_SEND 1
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    #undef CYTHON_USE_DICT_VERSIONS
    #define CYTHON_USE_DICT_VERSIONS 0
  #elif !defined(CYTHON_USE_DICT_VERSIONS)
    #define CYTHON_USE_DICT_VERSIONS  (PY_VERSION_HEX < 0x030C00A5 && !CYTHON_USE_MODULE_STATE)
  #endif
  #ifndef CYTHON_USE_EXC_INFO_STACK
    #define CYTHON_USE_EXC_INFO_STACK 1
  #endif
  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
    #define CYTHON_UPDATE_DESCRIPTOR_DOC 1
  #endif
  #ifndef CYTHON_USE_FREELISTS
    #define CYTHON_USE_FREELISTS (!CYTHON_COMPILING_IN_CPYTHON_FREETHREADING)
  #endif
  #if defined(CYTHON_IMMORTAL_CONSTANTS) && PY_VERSION_HEX < 0x030C0000
    #undef CYTHON_IMMORTAL_CONSTANTS
    #define CYTHON_IMMORTAL_CONSTANTS 0  // definitely won't work
  #elif !defined(CYTHON_IMMORTAL_CONSTANTS)
    #define CYTHON_IMMORTAL_CONSTANTS (PY_VERSION_HEX >= 0x030C0000 && !CYTHON_USE_MODULE_STATE && CYTHON_COMPILING_IN_CPYTHON_FREETHREADING)
  #endif
#endif
#ifndef CYTHON_COMPRESS_STRINGS
  #define CYTHON_COMPRESS_STRINGS 1
#endif
#ifndef CYTHON_FAST_PYCCALL
#define CYTHON_FAST_PYCCALL  CYTHON_FAST_PYCALL
#endif
#ifndef CYTHON_VECTORCALL
#if CYTHON_COMPILING_IN_LIMITED_API
#define CYTHON_VECTORCALL  (__PYX_LIMITED_VERSION_HEX >= 0x030C0000)
#else
#define CYTHON_VECTORCALL  (CYTHON_FAST_PYCCALL)
#endif
#endif
#if CYTHON_USE_PYLONG_INTERNALS
  #undef SHIFT
  #undef BASE
  #undef MASK
  #ifdef SIZEOF_VOID_P
    enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) };
  #endif
#endif
#ifndef __has_attribute
  #define __has_attribute(x) 0
#endif
#ifndef __has_cpp_attribute
  #define __has_cpp_attribute(x) 0
#endif
#ifndef CYTHON_RESTRICT
  #if defined(__GNUC__)
    #define CYTHON_RESTRICT __restrict__
  #elif defined(_MSC_VER) && _MSC_VER >= 1400
    #define CYTHON_RESTRICT __restrict
  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define CYTHON_RESTRICT restrict
  #else
    #define CYTHON_RESTRICT
  #endif
#endif
#ifndef CYTHON_UNUSED
  #if defined(__cplusplus)
    /* for clang __has_cpp_attribute(maybe_unused) is true even before C++17
     * but leads to warnings with -pedantic, since it is a C++17 feature */
    #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L)
      #if __has_cpp_attribute(maybe_unused)
        #define CYTHON_UNUSED [[maybe_unused]]
      #endif
    #endif
  #endif
#endif
#ifndef CYTHON_UNUSED
# if defined(__GNUC__)
#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
#     define CYTHON_UNUSED __attribute__ ((__unused__))
#   else
#     define CYTHON_UNUSED
#   endif
# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
#   define CYTHON_UNUSED __attribute__ ((__unused__))
# else
#   define CYTHON_UNUSED
# endif
#endif
#ifndef CYTHON_UNUSED_VAR
#  if defined(__cplusplus)
     template<class T> void CYTHON_UNUSED_VAR( const T& ) { }
#  else
#    define CYTHON_UNUSED_VAR(x) (void)(x)
#  endif
#endif
#ifndef CYTHON_MAYBE_UNUSED_VAR
  #define CYTHON_MAYBE_UNUSED_VAR(x) CYTHON_UNUSED_VAR(x)
#endif
#ifndef CYTHON_NCP_UNUSED
# if CYTHON_COMPILING_IN_CPYTHON && !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
#  define CYTHON_NCP_UNUSED
# else
#  define CYTHON_NCP_UNUSED CYTHON_UNUSED
# endif
#endif
#ifndef CYTHON_USE_CPP_STD_MOVE
  #if defined(__cplusplus) && (\
    __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600))
    #define CYTHON_USE_CPP_STD_MOVE 1
  #else
    #define CYTHON_USE_CPP_STD_MOVE 0
  #endif
#endif
#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
#include <stdint.h>
typedef uintptr_t  __pyx_uintptr_t;
#ifndef CYTHON_FALLTHROUGH
  #if defined(__cplusplus)
    /* for clang __has_cpp_attribute(fallthrough) is true even before C++17
     * but leads to warnings with -pedantic, since it is a C++17 feature */
    #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L)
      #if __has_cpp_attribute(fallthrough)
        #define CYTHON_FALLTHROUGH [[fallthrough]]
      #endif
    #endif
    #ifndef CYTHON_FALLTHROUGH
      #if __has_cpp_attribute(clang::fallthrough)
        #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
      #elif __has_cpp_attribute(gnu::fallthrough)
        #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
      #endif
    #endif
  #endif
  #ifndef CYTHON_FALLTHROUGH
    #if __has_attribute(fallthrough)
      #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
    #else
      #define CYTHON_FALLTHROUGH
    #endif
  #endif
  #if defined(__clang__) && defined(__apple_build_version__)
    #if __apple_build_version__ < 7000000
      #undef  CYTHON_FALLTHROUGH
      #define CYTHON_FALLTHROUGH
    #endif
  #endif
#endif
#ifndef Py_UNREACHABLE
  #define Py_UNREACHABLE()  assert(0); abort()
#endif
#ifdef __cplusplus
  template <typename T>
  struct __PYX_IS_UNSIGNED_IMPL {static const bool value = T(0) < T(-1);};
  #define __PYX_IS_UNSIGNED(type) (__PYX_IS_UNSIGNED_IMPL<type>::value)
#else
  #define __PYX_IS_UNSIGNED(type) (((type)-1) > 0)
#endif
#if CYTHON_COMPILING_IN_PYPY == 1
  #define __PYX_NEED_TP_PRINT_SLOT  (PY_VERSION_HEX < 0x030A0000)
#else
  #define __PYX_NEED_TP_PRINT_SLOT  (PY_VERSION_HEX < 0x03090000)
#endif
#define __PYX_REINTERPRET_FUNCION(func_pointer, other_pointer) ((func_pointer)(void(*)(void))(other_pointer))

/* CppInitCode */
#ifndef __cplusplus
  #error "Cython files generated with the C++ option must be compiled with a C++ compiler."
#endif
#ifndef CYTHON_INLINE
  #if defined(__clang__)
    #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
  #else
    #define CYTHON_INLINE inline
  #endif
#endif
template<typename T>
void __Pyx_call_destructor(T& x) {
    x.~T();
}
template<typename T>
class __Pyx_FakeReference {
  public:
    __Pyx_FakeReference() : ptr(NULL) { }
    __Pyx_FakeReference(const T& ref) : ptr(const_cast<T*>(&ref)) { }
    T *operator->() { return ptr; }
    T *operator&() { return ptr; }
    operator T&() { return *ptr; }
    template<typename U> bool operator ==(const U& other) const { return *ptr == other; }
    template<typename U> bool operator !=(const U& other) const { return *ptr != other; }
    template<typename U> bool operator==(const __Pyx_FakeReference<U>& other) const { return *ptr == *other.ptr; }
    template<typename U> bool operator!=(const __Pyx_FakeReference<U>& other) const { return *ptr != *other.ptr; }
  private:
    T *ptr;
};

/* PythonCompatibility */
#define __PYX_BUILD_PY_SSIZE_T "n"
#define CYTHON_FORMAT_SSIZE_T "z"
#define __Pyx_BUILTIN_MODULE_NAME "builtins"
#define __Pyx_DefaultClassType PyType_Type
#if CYTHON_COMPILING_IN_LIMITED_API
    #ifndef CO_OPTIMIZED
    static int CO_OPTIMIZED;
    #endif
    #ifndef CO_NEWLOCALS
    static int CO_NEWLOCALS;
    #endif
    #ifndef CO_VARARGS
    static int CO_VARARGS;
    #endif
    #ifndef CO_VARKEYWORDS
    static int CO_VARKEYWORDS;
    #endif
    #ifndef CO_ASYNC_GENERATOR
    static int CO_ASYNC_GENERATOR;
    #endif
    #ifndef CO_GENERATOR
    static int CO_GENERATOR;
    #endif
    #ifndef CO_COROUTINE
    static int CO_COROUTINE;
    #endif
#else
    #ifndef CO_COROUTINE
      #define CO_COROUTINE 0x80
    #endif
    #ifndef CO_ASYNC_GENERATOR
      #define CO_ASYNC_GENERATOR 0x200
    #endif
#endif
static int __Pyx_init_co_variables(void);
#if PY_VERSION_HEX >= 0x030900A4 || defined(Py_IS_TYPE)
  #define __Pyx_IS_TYPE(ob, type) Py_IS_TYPE(ob, type)
#else
  #define __Pyx_IS_TYPE(ob, type) (((const PyObject*)ob)->ob_type == (type))
#endif
#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_Is)
  #define __Pyx_Py_Is(x, y)  Py_Is(x, y)
#else
  #define __Pyx_Py_Is(x, y) ((x) == (y))
#endif
#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsNone)
  #define __Pyx_Py_IsNone(ob) Py_IsNone(ob)
#else
  #define __Pyx_Py_IsNone(ob) __Pyx_Py_Is((ob), Py_None)
#endif
#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsTrue)
  #define __Pyx_Py_IsTrue(ob) Py_IsTrue(ob)
#else
  #define __Pyx_Py_IsTrue(ob) __Pyx_Py_Is((ob), Py_True)
#endif
#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsFalse)
  #define __Pyx_Py_IsFalse(ob) Py_IsFalse(ob)
#else
  #define __Pyx_Py_IsFalse(ob) __Pyx_Py_Is((ob), Py_False)
#endif
#define __Pyx_NoneAsNull(obj)  (__Pyx_Py_IsNone(obj) ? NULL : (obj))
#if PY_VERSION_HEX >= 0x030900F0 && !CYTHON_COMPILING_IN_PYPY
  #define __Pyx_PyObject_GC_IsFinalized(o) PyObject_GC_IsFinalized(o)
#else
  #define __Pyx_PyObject_GC_IsFinalized(o) _PyGC_FINALIZED(o)
#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
#ifndef Py_TPFLAGS_SEQUENCE
  #define Py_TPFLAGS_SEQUENCE 0
#endif
#ifndef Py_TPFLAGS_MAPPING
  #define Py_TPFLAGS_MAPPING 0
#endif
#ifndef Py_TPFLAGS_IMMUTABLETYPE
  #define Py_TPFLAGS_IMMUTABLETYPE (1UL << 8)
#endif
#ifndef Py_TPFLAGS_DISALLOW_INSTANTIATION
  #define Py_TPFLAGS_DISALLOW_INSTANTIATION (1UL << 7)
#endif
#ifndef METH_STACKLESS
  #define METH_STACKLESS 0
#endif
#ifndef METH_FASTCALL
  #ifndef METH_FASTCALL
     #define METH_FASTCALL 0x80
  #endif
  typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
  typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
                                                          Py_ssize_t nargs, PyObject *kwnames);
#else
  #if PY_VERSION_HEX >= 0x030d00A4
  #  define __Pyx_PyCFunctionFast PyCFunctionFast
  #  define __Pyx_PyCFunctionFastWithKeywords PyCFunctionFastWithKeywords
  #else
  #  define __Pyx_PyCFunctionFast _PyCFunctionFast
  #  define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
  #endif
#endif
#if CYTHON_METH_FASTCALL
  #define __Pyx_METH_FASTCALL METH_FASTCALL
  #define __Pyx_PyCFunction_FastCall __Pyx_PyCFunctionFast
  #define __Pyx_PyCFunction_FastCallWithKeywords __Pyx_PyCFunctionFastWithKeywords
#else
  #define __Pyx_METH_FASTCALL METH_VARARGS
  #define __Pyx_PyCFunction_FastCall PyCFunction
  #define __Pyx_PyCFunction_FastCallWithKeywords PyCFunctionWithKeywords
#endif
#if CYTHON_VECTORCALL
  #define __pyx_vectorcallfunc vectorcallfunc
  #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET  PY_VECTORCALL_ARGUMENTS_OFFSET
  #define __Pyx_PyVectorcall_NARGS(n)  PyVectorcall_NARGS((size_t)(n))
#else
  #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET  0
  #define __Pyx_PyVectorcall_NARGS(n)  ((Py_ssize_t)(n))
#endif
#if PY_VERSION_HEX >= 0x030900B1
#define __Pyx_PyCFunction_CheckExact(func)  PyCFunction_CheckExact(func)
#else
#define __Pyx_PyCFunction_CheckExact(func)  PyCFunction_Check(func)
#endif
#define __Pyx_CyOrPyCFunction_Check(func)  PyCFunction_Check(func)
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func)  (((PyCFunctionObject*)(func))->m_ml->ml_meth)
#elif !CYTHON_COMPILING_IN_LIMITED_API
#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func)  PyCFunction_GET_FUNCTION(func)
#endif
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_CyOrPyCFunction_GET_FLAGS(func)  (((PyCFunctionObject*)(func))->m_ml->ml_flags)
static CYTHON_INLINE PyObject* __Pyx_CyOrPyCFunction_GET_SELF(PyObject *func) {
    return (__Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_STATIC) ? NULL : ((PyCFunctionObject*)func)->m_self;
}
#endif
static CYTHON_INLINE int __Pyx__IsSameCFunction(PyObject *func, void (*cfunc)(void)) {
#if CYTHON_COMPILING_IN_LIMITED_API
    return PyCFunction_Check(func) && PyCFunction_GetFunction(func) == (PyCFunction) cfunc;
#else
    return PyCFunction_Check(func) && PyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc;
#endif
}
#define __Pyx_IsSameCFunction(func, cfunc)   __Pyx__IsSameCFunction(func, cfunc)
#if PY_VERSION_HEX < 0x03090000 || (CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000)
  #define __Pyx_PyType_FromModuleAndSpec(m, s, b)  ((void)m, PyType_FromSpecWithBases(s, b))
  typedef PyObject *(*__Pyx_PyCMethod)(PyObject *, PyTypeObject *, PyObject *const *, size_t, PyObject *);
#else
  #define __Pyx_PyType_FromModuleAndSpec(m, s, b)  PyType_FromModuleAndSpec(m, s, b)
  #define __Pyx_PyCMethod  PyCMethod
#endif
#ifndef METH_METHOD
  #define METH_METHOD 0x200
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
  #define PyObject_Malloc(s)   PyMem_Malloc(s)
  #define PyObject_Free(p)     PyMem_Free(p)
  #define PyObject_Realloc(p)  PyMem_Realloc(p)
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno)
#elif CYTHON_COMPILING_IN_GRAAL && defined(GRAALPY_VERSION_NUM) && GRAALPY_VERSION_NUM > 0x19000000
  #define __Pyx_PyCode_HasFreeVars(co)  (PyCode_GetNumFree(co) > 0)
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) GraalPyFrame_SetLineNumber((frame), (lineno))
#elif CYTHON_COMPILING_IN_GRAAL
  #define __Pyx_PyCode_HasFreeVars(co)  (PyCode_GetNumFree(co) > 0)
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) _PyFrame_SetLineNumber((frame), (lineno))
#else
  #define __Pyx_PyCode_HasFreeVars(co)  (PyCode_GetNumFree(co) > 0)
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno)  (frame)->f_lineno = (lineno)
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
  #define __Pyx_PyThreadState_Current PyThreadState_Get()
#elif !CYTHON_FAST_THREAD_STATE
  #define __Pyx_PyThreadState_Current PyThreadState_GET()
#elif PY_VERSION_HEX >= 0x030d00A1
  #define __Pyx_PyThreadState_Current PyThreadState_GetUnchecked()
#else
  #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
#endif
#if CYTHON_USE_MODULE_STATE
static CYTHON_INLINE void *__Pyx__PyModule_GetState(PyObject *op)
{
    void *result;
    result = PyModule_GetState(op);
    if (!result)
        Py_FatalError("Couldn't find the module state");
    return result;
}
#define __Pyx_PyModule_GetState(o) (__pyx_mstatetype *)__Pyx__PyModule_GetState(o)
#else
#define __Pyx_PyModule_GetState(op) ((void)op,__pyx_mstate_global)
#endif
#define __Pyx_PyObject_GetSlot(obj, name, func_ctype)  __Pyx_PyType_GetSlot(Py_TYPE((PyObject *) obj), name, func_ctype)
#define __Pyx_PyObject_TryGetSlot(obj, name, func_ctype) __Pyx_PyType_TryGetSlot(Py_TYPE(obj), name, func_ctype)
#define __Pyx_PyObject_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(Py_TYPE(obj), sub, name, func_ctype)
#define __Pyx_PyObject_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSubSlot(Py_TYPE(obj), sub, name, func_ctype)
#if CYTHON_USE_TYPE_SLOTS
  #define __Pyx_PyType_GetSlot(type, name, func_ctype)  ((type)->name)
  #define __Pyx_PyType_TryGetSlot(type, name, func_ctype) __Pyx_PyType_GetSlot(type, name, func_ctype)
  #define __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype) (((type)->sub) ? ((type)->sub->name) : NULL)
  #define __Pyx_PyType_TryGetSubSlot(type, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype)
#else
  #define __Pyx_PyType_GetSlot(type, name, func_ctype)  ((func_ctype) PyType_GetSlot((type), Py_##name))
  #define __Pyx_PyType_TryGetSlot(type, name, func_ctype)\
    ((__PYX_LIMITED_VERSION_HEX >= 0x030A0000 ||\
     (PyType_GetFlags(type) & Py_TPFLAGS_HEAPTYPE) || __Pyx_get_runtime_version() >= 0x030A0000) ?\
     __Pyx_PyType_GetSlot(type, name, func_ctype) : NULL)
  #define __Pyx_PyType_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSlot(obj, name, func_ctype)
  #define __Pyx_PyType_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSlot(obj, name, func_ctype)
#endif
#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
#define __Pyx_PyDict_NewPresized(n)  ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
#else
#define __Pyx_PyDict_NewPresized(n)  PyDict_New()
#endif
#define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y)
#define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceTrueDivide(x,y)
#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_UNICODE_INTERNALS
#define __Pyx_PyDict_GetItemStrWithError(dict, name)  _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStr(PyObject *dict, PyObject *name) {
    PyObject *res = __Pyx_PyDict_GetItemStrWithError(dict, name);
    if (res == NULL) PyErr_Clear();
    return res;
}
#elif !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000
#define __Pyx_PyDict_GetItemStrWithError  PyDict_GetItemWithError
#define __Pyx_PyDict_GetItemStr           PyDict_GetItem
#else
static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, PyObject *name) {
#if CYTHON_COMPILING_IN_PYPY
    return PyDict_GetItem(dict, name);
#else
    PyDictEntry *ep;
    PyDictObject *mp = (PyDictObject*) dict;
    long hash = ((PyStringObject *) name)->ob_shash;
    assert(hash != -1);
    ep = (mp->ma_lookup)(mp, name, hash);
    if (ep == NULL) {
        return NULL;
    }
    return ep->me_value;
#endif
}
#define __Pyx_PyDict_GetItemStr           PyDict_GetItem
#endif
#if CYTHON_USE_TYPE_SLOTS
  #define __Pyx_PyType_GetFlags(tp)   (((PyTypeObject *)tp)->tp_flags)
  #define __Pyx_PyType_HasFeature(type, feature)  ((__Pyx_PyType_GetFlags(type) & (feature)) != 0)
#else
  #define __Pyx_PyType_GetFlags(tp)   (PyType_GetFlags((PyTypeObject *)tp))
  #define __Pyx_PyType_HasFeature(type, feature)  PyType_HasFeature(type, feature)
#endif
#define __Pyx_PyObject_GetIterNextFunc(iterator)  __Pyx_PyObject_GetSlot(iterator, tp_iternext, iternextfunc)
#if CYTHON_USE_TYPE_SPECS
#define __Pyx_PyHeapTypeObject_GC_Del(obj)  {\
    PyTypeObject *type = Py_TYPE((PyObject*)obj);\
    assert(__Pyx_PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE));\
    PyObject_GC_Del(obj);\
    Py_DECREF(type);\
}
#else
#define __Pyx_PyHeapTypeObject_GC_Del(obj)  PyObject_GC_Del(obj)
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
  #define __Pyx_PyUnicode_READY(op)       (0)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_ReadChar(u, i)
  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   ((void)u, 1114111U)
  #define __Pyx_PyUnicode_KIND(u)         ((void)u, (0))
  #define __Pyx_PyUnicode_DATA(u)         ((void*)u)
  #define __Pyx_PyUnicode_READ(k, d, i)   ((void)k, PyUnicode_ReadChar((PyObject*)(d), i))
  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GetLength(u))
#else
  #if PY_VERSION_HEX >= 0x030C0000
    #define __Pyx_PyUnicode_READY(op)       (0)
  #else
    #define __Pyx_PyUnicode_READY(op)       (likely(PyUnicode_IS_READY(op)) ?\
                                                0 : _PyUnicode_Ready((PyObject *)(op)))
  #endif
  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   PyUnicode_MAX_CHAR_VALUE(u)
  #define __Pyx_PyUnicode_KIND(u)         ((int)PyUnicode_KIND(u))
  #define __Pyx_PyUnicode_DATA(u)         PyUnicode_DATA(u)
  #define __Pyx_PyUnicode_READ(k, d, i)   PyUnicode_READ(k, d, i)
  #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  PyUnicode_WRITE(k, d, i, (Py_UCS4) ch)
  #if PY_VERSION_HEX >= 0x030C0000
    #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GET_LENGTH(u))
  #else
    #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000
    #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length))
    #else
    #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
    #endif
  #endif
#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
  #if !defined(PyUnicode_DecodeUnicodeEscape)
    #define PyUnicode_DecodeUnicodeEscape(s, size, errors)  PyUnicode_Decode(s, size, "unicode_escape", errors)
  #endif
  #if !defined(PyUnicode_Contains)
    #define PyUnicode_Contains(u, s)  PySequence_Contains(u, s)
  #endif
  #if !defined(PyByteArray_Check)
    #define PyByteArray_Check(obj)  PyObject_TypeCheck(obj, &PyByteArray_Type)
  #endif
  #if !defined(PyObject_Format)
    #define PyObject_Format(obj, fmt)  PyObject_CallMethod(obj, "__format__", "O", fmt)
  #endif
#endif
#define __Pyx_PyUnicode_FormatSafe(a, b)  ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  #define __Pyx_PySequence_ListKeepNew(obj)\
    (likely(PyList_CheckExact(obj) && PyUnstable_Object_IsUniquelyReferenced(obj)) ? __Pyx_NewRef(obj) : PySequence_List(obj))
#elif CYTHON_COMPILING_IN_CPYTHON
  #define __Pyx_PySequence_ListKeepNew(obj)\
    (likely(PyList_CheckExact(obj) && Py_REFCNT(obj) == 1) ? __Pyx_NewRef(obj) : PySequence_List(obj))
#else
  #define __Pyx_PySequence_ListKeepNew(obj)  PySequence_List(obj)
#endif
#ifndef PySet_CheckExact
  #define PySet_CheckExact(obj)        __Pyx_IS_TYPE(obj, &PySet_Type)
#endif
#if PY_VERSION_HEX >= 0x030900A4
  #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt)
  #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size)
#else
  #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt)
  #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size)
#endif
enum __Pyx_ReferenceSharing {
  __Pyx_ReferenceSharing_DefinitelyUnique, // We created it so we know it's unshared - no need to check
  __Pyx_ReferenceSharing_OwnStrongReference,
  __Pyx_ReferenceSharing_FunctionArgument,
  __Pyx_ReferenceSharing_SharedReference, // Never trust it to be unshared because it's a global or similar
};
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && PY_VERSION_HEX >= 0x030E0000
#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing)\
    (sharing == __Pyx_ReferenceSharing_DefinitelyUnique ? 1 :\
      (sharing == __Pyx_ReferenceSharing_FunctionArgument ? PyUnstable_Object_IsUniqueReferencedTemporary(o) :\
      (sharing == __Pyx_ReferenceSharing_OwnStrongReference ? PyUnstable_Object_IsUniquelyReferenced(o) : 0)))
#elif (CYTHON_COMPILING_IN_CPYTHON && !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) || CYTHON_COMPILING_IN_LIMITED_API
#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing) (((void)sharing), Py_REFCNT(o) == 1)
#else
#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing) (((void)o), ((void)sharing), 0)
#endif
#if CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
  #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
    #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i)
  #elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS
    #define __Pyx_PyList_GetItemRef(o, i) (likely((i) >= 0) ? PySequence_GetItem(o, i) : (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
  #else
    #define __Pyx_PyList_GetItemRef(o, i) PySequence_ITEM(o, i)
  #endif
#elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS
  #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
    #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i)
  #else
    #define __Pyx_PyList_GetItemRef(o, i) __Pyx_XNewRef(PyList_GetItem(o, i))
  #endif
#else
  #define __Pyx_PyList_GetItemRef(o, i) __Pyx_NewRef(PyList_GET_ITEM(o, i))
#endif
#if CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS && !CYTHON_COMPILING_IN_LIMITED_API && CYTHON_ASSUME_SAFE_MACROS
  #define __Pyx_PyList_GetItemRefFast(o, i, unsafe_shared) (__Pyx_IS_UNIQUELY_REFERENCED(o, unsafe_shared) ?\
    __Pyx_NewRef(PyList_GET_ITEM(o, i)) : __Pyx_PyList_GetItemRef(o, i))
#else
  #define __Pyx_PyList_GetItemRefFast(o, i, unsafe_shared) __Pyx_PyList_GetItemRef(o, i)
#endif
#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
#define __Pyx_PyDict_GetItemRef(dict, key, result) PyDict_GetItemRef(dict, key, result)
#elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) {
  *result = PyObject_GetItem(dict, key);
  if (*result == NULL) {
    if (PyErr_ExceptionMatches(PyExc_KeyError)) {
      PyErr_Clear();
      return 0;
    }
    return -1;
  }
  return 1;
}
#else
static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) {
  *result = PyDict_GetItemWithError(dict, key);
  if (*result == NULL) {
    return PyErr_Occurred() ? -1 : 0;
  }
  Py_INCREF(*result);
  return 1;
}
#endif
#if defined(CYTHON_DEBUG_VISIT_CONST) && CYTHON_DEBUG_VISIT_CONST
  #define __Pyx_VISIT_CONST(obj)  Py_VISIT(obj)
#else
  #define __Pyx_VISIT_CONST(obj)
#endif
#if CYTHON_ASSUME_SAFE_MACROS
  #define __Pyx_PySequence_ITEM(o, i) PySequence_ITEM(o, i)
  #define __Pyx_PySequence_SIZE(seq)  Py_SIZE(seq)
  #define __Pyx_PyTuple_SET_ITEM(o, i, v) (PyTuple_SET_ITEM(o, i, v), (0))
  #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GET_ITEM(o, i)
  #define __Pyx_PyList_SET_ITEM(o, i, v) (PyList_SET_ITEM(o, i, v), (0))
  #define __Pyx_PyList_GET_ITEM(o, i) PyList_GET_ITEM(o, i)
#else
  #define __Pyx_PySequence_ITEM(o, i) PySequence_GetItem(o, i)
  #define __Pyx_PySequence_SIZE(seq)  PySequence_Size(seq)
  #define __Pyx_PyTuple_SET_ITEM(o, i, v) PyTuple_SetItem(o, i, v)
  #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GetItem(o, i)
  #define __Pyx_PyList_SET_ITEM(o, i, v) PyList_SetItem(o, i, v)
  #define __Pyx_PyList_GET_ITEM(o, i) PyList_GetItem(o, i)
#endif
#if CYTHON_ASSUME_SAFE_SIZE
  #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_GET_SIZE(o)
  #define __Pyx_PyList_GET_SIZE(o) PyList_GET_SIZE(o)
  #define __Pyx_PySet_GET_SIZE(o) PySet_GET_SIZE(o)
  #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_GET_SIZE(o)
  #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_GET_SIZE(o)
  #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GET_LENGTH(o)
#else
  #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_Size(o)
  #define __Pyx_PyList_GET_SIZE(o) PyList_Size(o)
  #define __Pyx_PySet_GET_SIZE(o) PySet_Size(o)
  #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_Size(o)
  #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_Size(o)
  #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GetLength(o)
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_InternFromString)
  #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
#endif
#define __Pyx_PyLong_FromHash_t PyLong_FromSsize_t
#define __Pyx_PyLong_AsHash_t   __Pyx_PyIndex_AsSsize_t
#if __PYX_LIMITED_VERSION_HEX >= 0x030A0000
    #define __Pyx_PySendResult PySendResult
#else
    typedef enum {
        PYGEN_RETURN = 0,
        PYGEN_ERROR = -1,
        PYGEN_NEXT = 1,
    } __Pyx_PySendResult;
#endif
#if CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX < 0x030A00A3
  typedef __Pyx_PySendResult (*__Pyx_pyiter_sendfunc)(PyObject *iter, PyObject *value, PyObject **result);
#else
  #define __Pyx_pyiter_sendfunc sendfunc
#endif
#if !CYTHON_USE_AM_SEND
#define __PYX_HAS_PY_AM_SEND 0
#elif __PYX_LIMITED_VERSION_HEX >= 0x030A0000
#define __PYX_HAS_PY_AM_SEND 1
#else
#define __PYX_HAS_PY_AM_SEND 2  // our own backported implementation
#endif
#if __PYX_HAS_PY_AM_SEND < 2
    #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
#else
    typedef struct {
        unaryfunc am_await;
        unaryfunc am_aiter;
        unaryfunc am_anext;
        __Pyx_pyiter_sendfunc am_send;
    } __Pyx_PyAsyncMethodsStruct;
    #define __Pyx_SlotTpAsAsync(s) ((PyAsyncMethods*)(s))
#endif
#if CYTHON_USE_AM_SEND && PY_VERSION_HEX < 0x030A00F0
    #define __Pyx_TPFLAGS_HAVE_AM_SEND (1UL << 21)
#else
    #define __Pyx_TPFLAGS_HAVE_AM_SEND (0)
#endif
#if PY_VERSION_HEX >= 0x03090000
#define __Pyx_PyInterpreterState_Get() PyInterpreterState_Get()
#else
#define __Pyx_PyInterpreterState_Get() PyThreadState_Get()->interp
#endif
#if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030A0000
#ifdef __cplusplus
extern "C"
#endif
PyAPI_FUNC(void *) PyMem_Calloc(size_t nelem, size_t elsize);
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
static int __Pyx_init_co_variable(PyObject *inspect, const char* name, int *write_to) {
    int value;
    PyObject *py_value = PyObject_GetAttrString(inspect, name);
    if (!py_value) return 0;
    value = (int) PyLong_AsLong(py_value);
    Py_DECREF(py_value);
    *write_to = value;
    return value != -1 || !PyErr_Occurred();
}
static int __Pyx_init_co_variables(void) {
    PyObject *inspect;
    int result;
    inspect = PyImport_ImportModule("inspect");
    result =
#if !defined(CO_OPTIMIZED)
        __Pyx_init_co_variable(inspect, "CO_OPTIMIZED", &CO_OPTIMIZED) &&
#endif
#if !defined(CO_NEWLOCALS)
        __Pyx_init_co_variable(inspect, "CO_NEWLOCALS", &CO_NEWLOCALS) &&
#endif
#if !defined(CO_VARARGS)
        __Pyx_init_co_variable(inspect, "CO_VARARGS", &CO_VARARGS) &&
#endif
#if !defined(CO_VARKEYWORDS)
        __Pyx_init_co_variable(inspect, "CO_VARKEYWORDS", &CO_VARKEYWORDS) &&
#endif
#if !defined(CO_ASYNC_GENERATOR)
        __Pyx_init_co_variable(inspect, "CO_ASYNC_GENERATOR", &CO_ASYNC_GENERATOR) &&
#endif
#if !defined(CO_GENERATOR)
        __Pyx_init_co_variable(inspect, "CO_GENERATOR", &CO_GENERATOR) &&
#endif
#if !defined(CO_COROUTINE)
        __Pyx_init_co_variable(inspect, "CO_COROUTINE", &CO_COROUTINE) &&
#endif
        1;
    Py_DECREF(inspect);
    return result ? 0 : -1;
}
#else
static int __Pyx_init_co_variables(void) {
    return 0;  // It's a limited API-only feature
}
#endif

/* MathInitCode */
#if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)
  #ifndef _USE_MATH_DEFINES
    #define _USE_MATH_DEFINES
  #endif
#endif
#include <math.h>
#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
#define __Pyx_truncl trunc
#else
#define __Pyx_truncl truncl
#endif

#ifndef CYTHON_CLINE_IN_TRACEBACK_RUNTIME
#define CYTHON_CLINE_IN_TRACEBACK_RUNTIME 0
#endif
#ifndef CYTHON_CLINE_IN_TRACEBACK
#define CYTHON_CLINE_IN_TRACEBACK CYTHON_CLINE_IN_TRACEBACK_RUNTIME
#endif
#if CYTHON_CLINE_IN_TRACEBACK
#define __PYX_MARK_ERR_POS(f_index, lineno)  { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; __pyx_clineno = __LINE__; (void) __pyx_clineno; }
#else
#define __PYX_MARK_ERR_POS(f_index, lineno)  { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; (void) __pyx_clineno; }
#endif
#define __PYX_ERR(f_index, lineno, Ln_error) \
    { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; }

#ifdef CYTHON_EXTERN_C
    #undef __PYX_EXTERN_C
    #define __PYX_EXTERN_C CYTHON_EXTERN_C
#elif defined(__PYX_EXTERN_C)
    #ifdef _MSC_VER
    #pragma message ("Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.")
    #else
    #warning Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.
    #endif
#else
    #define __PYX_EXTERN_C extern "C++"
#endif

#define __PYX_HAVE__symengine__lib__symengine_wrapper
#define __PYX_HAVE_API__symengine__lib__symengine_wrapper
/* Early includes */
#include <string.h>
#include <string_view>
#include "ios"
#include "new"
#include "stdexcept"
#include "typeinfo"
#include <string>
#include <utility>

    #if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600)
    // move should be defined for these versions of MSVC, but __cplusplus isn't set usefully
    #include <type_traits>

    namespace cython_std {
    template <typename T> typename std::remove_reference<T>::type&& move(T& t) noexcept { return std::move(t); }
    template <typename T> typename std::remove_reference<T>::type&& move(T&& t) noexcept { return std::move(t); }
    }

    #endif
    
#include <map>
#include <vector>
#include <stdio.h>
#include <set>
#include <unordered_map>
#include "symengine/mp_class.h"
#include <symengine/symengine_rcp.h>
#include <symengine/basic.h>
#include <symengine/subs.h>
#include <symengine/derivative.h>
#include <symengine/symbol.h>
#include <symengine/number.h>
#include "pywrapper.h"
#include <symengine/integer.h>
#include <symengine/rational.h>
#include <symengine/complex.h>
#include <symengine/real_double.h>
#include <symengine/complex_double.h>
#include <symengine/constants.h>
#include <symengine/infinity.h>
#include <symengine/nan.h>
#include <symengine/add.h>
#include <symengine/mul.h>
#include <symengine/pow.h>
#include <symengine/functions.h>
#include <symengine/real_mpfr.h>
#include <symengine/complex_mpc.h>
#include <symengine/matrix.h>
#include <symengine/ntheory.h>
#include <symengine/prime_sieve.h>
#include <symengine/visitor.h>
#include <symengine/logic.h>
#include <symengine/eval.h>
#include <symengine/eval_double.h>
#include <symengine/lambda_double.h>
#include <symengine/llvm_double.h>
#include <symengine/series.h>
#include <symengine/eval_mpfr.h>
#include <symengine/eval_mpc.h>
#include <symengine/parser.h>
#include <symengine/sets.h>
#include <symengine/solve.h>
#include "symengine/tribool.h"
#include <symengine/printers.h>
#include <memory>

    #if __PYX_LIMITED_VERSION_HEX < 0x030d0000
    static CYTHON_INLINE PyObject *
    __Pyx_CAPI_PyList_GetItemRef(PyObject *list, Py_ssize_t index)
    {
        PyObject *item = PyList_GetItem(list, index);
        Py_XINCREF(item);
        return item;
    }
    #else
    #define __Pyx_CAPI_PyList_GetItemRef PyList_GetItemRef
    #endif

    #if CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX < 0x030d0000
    static CYTHON_INLINE int
    __Pyx_CAPI_PyList_Extend(PyObject *list, PyObject *iterable)
    {
        return PyList_SetSlice(list, PY_SSIZE_T_MAX, PY_SSIZE_T_MAX, iterable);
    }

    static CYTHON_INLINE int
    __Pyx_CAPI_PyList_Clear(PyObject *list)
    {
        return PyList_SetSlice(list, 0, PY_SSIZE_T_MAX, NULL);
    }
    #else
    #define __Pyx_CAPI_PyList_Extend PyList_Extend
    #define __Pyx_CAPI_PyList_Clear PyList_Clear
    #endif
    

    #if PY_MAJOR_VERSION >= 3
      #define __Pyx_PyFloat_FromString(obj)  PyFloat_FromString(obj)
    #else
      #define __Pyx_PyFloat_FromString(obj)  PyFloat_FromString(obj, NULL)
    #endif
    
#include <stddef.h>

    #if PY_MAJOR_VERSION <= 2
    #define PyDict_GetItemWithError _PyDict_GetItemWithError
    #endif

    #if __PYX_LIMITED_VERSION_HEX < 0x030d0000
    static CYTHON_INLINE int
    __Pyx_CAPI_PyDict_GetItemStringRef(PyObject *mp, const char *key, PyObject **result)
    {
        int res;
        PyObject *key_obj = PyUnicode_FromString(key);
        if (key_obj == NULL) {
            *result = NULL;
            return -1;
        }
        res = __Pyx_PyDict_GetItemRef(mp, key_obj, result);
        Py_DECREF(key_obj);
        return res;
    }
    #else
    #define __Pyx_CAPI_PyDict_GetItemStringRef PyDict_GetItemStringRef
    #endif
    #if PY_VERSION_HEX < 0x030d0000 || (CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030F0000)
    static CYTHON_INLINE int
    __Pyx_CAPI_PyDict_SetDefaultRef(PyObject *d, PyObject *key, PyObject *default_value,
                        PyObject **result)
    {
        PyObject *value;
        if (__Pyx_PyDict_GetItemRef(d, key, &value) < 0) {
            // get error
            if (result) {
                *result = NULL;
            }
            return -1;
        }
        if (value != NULL) {
            // present
            if (result) {
                *result = value;
            }
            else {
                Py_DECREF(value);
            }
            return 1;
        }

        // missing: set the item
        if (PyDict_SetItem(d, key, default_value) < 0) {
            // set error
            if (result) {
                *result = NULL;
            }
            return -1;
        }
        if (result) {
            Py_INCREF(default_value);
            *result = default_value;
        }
        return 0;
    }
    #else
    #define __Pyx_CAPI_PyDict_SetDefaultRef PyDict_SetDefaultRef
    #endif
    

    #if PY_VERSION_HEX < 0x030d0000
    static CYTHON_INLINE int __Pyx_PyWeakref_GetRef(PyObject *ref, PyObject **pobj)
    {
        PyObject *obj = PyWeakref_GetObject(ref);
        if (obj == NULL) {
            // SystemError if ref is NULL
            *pobj = NULL;
            return -1;
        }
        if (obj == Py_None) {
            *pobj = NULL;
            return 0;
        }
        Py_INCREF(obj);
        *pobj = obj;
        return 1;
    }
    #else
    #define __Pyx_PyWeakref_GetRef PyWeakref_GetRef
    #endif
    
#include "pythread.h"

    #if (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM < 0x07030600) && !defined(PyContextVar_Get)
    #define PyContextVar_Get(var, d, v)         ((d) ?             ((void)(var), Py_INCREF(d), (v)[0] = (d), 0) :             ((v)[0] = NULL, 0)         )
    #endif
    
#include <stdlib.h>
#ifdef _OPENMP
#include <omp.h>
#endif /* _OPENMP */

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

#ifdef CYTHON_FREETHREADING_COMPATIBLE
#if CYTHON_FREETHREADING_COMPATIBLE
#define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_NOT_USED
#else
#define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_USED
#endif
#else
#define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_USED
#endif
#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 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)))  )
static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
    return (size_t) i < (size_t) limit;
}
#if defined (__cplusplus) && __cplusplus >= 201103L
    #include <cstdlib>
    #define __Pyx_sst_abs(value) std::abs(value)
#elif SIZEOF_INT >= SIZEOF_SIZE_T
    #define __Pyx_sst_abs(value) abs(value)
#elif SIZEOF_LONG >= SIZEOF_SIZE_T
    #define __Pyx_sst_abs(value) labs(value)
#elif defined (_MSC_VER)
    #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define __Pyx_sst_abs(value) llabs(value)
#elif defined (__GNUC__)
    #define __Pyx_sst_abs(value) __builtin_llabs(value)
#else
    #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
#endif
static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s);
static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char*);
#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 CYTHON_ASSUME_SAFE_MACROS
    #define __Pyx_PyBytes_AsWritableString(s)     ((char*) PyBytes_AS_STRING(s))
    #define __Pyx_PyBytes_AsWritableSString(s)    ((signed char*) PyBytes_AS_STRING(s))
    #define __Pyx_PyBytes_AsWritableUString(s)    ((unsigned char*) PyBytes_AS_STRING(s))
    #define __Pyx_PyBytes_AsString(s)     ((const char*) PyBytes_AS_STRING(s))
    #define __Pyx_PyBytes_AsSString(s)    ((const signed char*) PyBytes_AS_STRING(s))
    #define __Pyx_PyBytes_AsUString(s)    ((const unsigned char*) PyBytes_AS_STRING(s))
    #define __Pyx_PyByteArray_AsString(s) PyByteArray_AS_STRING(s)
#else
    #define __Pyx_PyBytes_AsWritableString(s)     ((char*) PyBytes_AsString(s))
    #define __Pyx_PyBytes_AsWritableSString(s)    ((signed char*) PyBytes_AsString(s))
    #define __Pyx_PyBytes_AsWritableUString(s)    ((unsigned char*) PyBytes_AsString(s))
    #define __Pyx_PyBytes_AsString(s)     ((const char*) PyBytes_AsString(s))
    #define __Pyx_PyBytes_AsSString(s)    ((const signed char*) PyBytes_AsString(s))
    #define __Pyx_PyBytes_AsUString(s)    ((const unsigned char*) PyBytes_AsString(s))
    #define __Pyx_PyByteArray_AsString(s) PyByteArray_AsString(s)
#endif
#define __Pyx_PyObject_AsWritableString(s)    ((char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsWritableSString(s)    ((signed char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsWritableUString(s)    ((unsigned char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsSString(s)    ((const signed char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsUString(s)    ((const unsigned char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_FromCString(s)  __Pyx_PyObject_FromString((const char*)s)
#define __Pyx_PyBytes_FromCString(s)   __Pyx_PyBytes_FromString((const char*)s)
#define __Pyx_PyByteArray_FromCString(s)   __Pyx_PyByteArray_FromString((const char*)s)
#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
#define __Pyx_PyUnicode_FromOrdinal(o)       PyUnicode_FromOrdinal((int)o)
#define __Pyx_PyUnicode_AsUnicode            PyUnicode_AsUnicode
static CYTHON_INLINE PyObject *__Pyx_NewRef(PyObject *obj) {
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_NewRef)
    return Py_NewRef(obj);
#else
    Py_INCREF(obj);
    return obj;
#endif
}
static CYTHON_INLINE PyObject *__Pyx_XNewRef(PyObject *obj) {
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_XNewRef)
    return Py_XNewRef(obj);
#else
    Py_XINCREF(obj);
    return obj;
#endif
}
static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b);
static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x);
#define __Pyx_PySequence_Tuple(obj)\
    (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t);
static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*);
#if CYTHON_ASSUME_SAFE_MACROS
#define __Pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AS_DOUBLE(x)
#else
#define __Pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AsDouble(x)
#endif
#define __Pyx_PyFloat_AsFloat(x) ((float) __Pyx_PyFloat_AsDouble(x))
#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
#if CYTHON_USE_PYLONG_INTERNALS
  #if PY_VERSION_HEX >= 0x030C00A7
  #ifndef _PyLong_SIGN_MASK
    #define _PyLong_SIGN_MASK 3
  #endif
  #ifndef _PyLong_NON_SIZE_BITS
    #define _PyLong_NON_SIZE_BITS 3
  #endif
  #define __Pyx_PyLong_Sign(x)  (((PyLongObject*)x)->long_value.lv_tag & _PyLong_SIGN_MASK)
  #define __Pyx_PyLong_IsNeg(x)  ((__Pyx_PyLong_Sign(x) & 2) != 0)
  #define __Pyx_PyLong_IsNonNeg(x)  (!__Pyx_PyLong_IsNeg(x))
  #define __Pyx_PyLong_IsZero(x)  (__Pyx_PyLong_Sign(x) & 1)
  #define __Pyx_PyLong_IsPos(x)  (__Pyx_PyLong_Sign(x) == 0)
  #define __Pyx_PyLong_CompactValueUnsigned(x)  (__Pyx_PyLong_Digits(x)[0])
  #define __Pyx_PyLong_DigitCount(x)  ((Py_ssize_t) (((PyLongObject*)x)->long_value.lv_tag >> _PyLong_NON_SIZE_BITS))
  #define __Pyx_PyLong_SignedDigitCount(x)\
        ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * __Pyx_PyLong_DigitCount(x))
  #if defined(PyUnstable_Long_IsCompact) && defined(PyUnstable_Long_CompactValue)
    #define __Pyx_PyLong_IsCompact(x)     PyUnstable_Long_IsCompact((PyLongObject*) x)
    #define __Pyx_PyLong_CompactValue(x)  PyUnstable_Long_CompactValue((PyLongObject*) x)
  #else
    #define __Pyx_PyLong_IsCompact(x)     (((PyLongObject*)x)->long_value.lv_tag < (2 << _PyLong_NON_SIZE_BITS))
    #define __Pyx_PyLong_CompactValue(x)  ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * (Py_ssize_t) __Pyx_PyLong_Digits(x)[0])
  #endif
  typedef Py_ssize_t  __Pyx_compact_pylong;
  typedef size_t  __Pyx_compact_upylong;
  #else
  #define __Pyx_PyLong_IsNeg(x)  (Py_SIZE(x) < 0)
  #define __Pyx_PyLong_IsNonNeg(x)  (Py_SIZE(x) >= 0)
  #define __Pyx_PyLong_IsZero(x)  (Py_SIZE(x) == 0)
  #define __Pyx_PyLong_IsPos(x)  (Py_SIZE(x) > 0)
  #define __Pyx_PyLong_CompactValueUnsigned(x)  ((Py_SIZE(x) == 0) ? 0 : __Pyx_PyLong_Digits(x)[0])
  #define __Pyx_PyLong_DigitCount(x)  __Pyx_sst_abs(Py_SIZE(x))
  #define __Pyx_PyLong_SignedDigitCount(x)  Py_SIZE(x)
  #define __Pyx_PyLong_IsCompact(x)  (Py_SIZE(x) == 0 || Py_SIZE(x) == 1 || Py_SIZE(x) == -1)
  #define __Pyx_PyLong_CompactValue(x)\
        ((Py_SIZE(x) == 0) ? (sdigit) 0 : ((Py_SIZE(x) < 0) ? -(sdigit)__Pyx_PyLong_Digits(x)[0] : (sdigit)__Pyx_PyLong_Digits(x)[0]))
  typedef sdigit  __Pyx_compact_pylong;
  typedef digit  __Pyx_compact_upylong;
  #endif
  #if PY_VERSION_HEX >= 0x030C00A5
  #define __Pyx_PyLong_Digits(x)  (((PyLongObject*)x)->long_value.ob_digit)
  #else
  #define __Pyx_PyLong_Digits(x)  (((PyLongObject*)x)->ob_digit)
  #endif
#endif
#if __PYX_DEFAULT_STRING_ENCODING_IS_UTF8
  #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
#elif __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
  #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeASCII(c_str, size, NULL)
#else
  #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
#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__ */
/* PretendToInitialize */
#ifdef __cplusplus
#if __cplusplus > 201103L
#include <type_traits>
#endif
template <typename T>
static void __Pyx_pretend_to_initialize(T* ptr) {
#if __cplusplus > 201103L
    if ((std::is_trivially_default_constructible<T>::value))
#endif
        *ptr = T();
    (void)ptr;
}
#else
static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }
#endif


#if !CYTHON_USE_MODULE_STATE
static PyObject *__pyx_m = NULL;
#endif
static int __pyx_lineno;
static int __pyx_clineno = 0;
static const char * const __pyx_cfilenm = __FILE__;
static const char *__pyx_filename;

/* Header.proto */
#if !defined(CYTHON_CCOMPLEX)
  #if defined(__cplusplus)
    #define CYTHON_CCOMPLEX 1
  #elif (defined(_Complex_I) && !defined(_MSC_VER)) || ((defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) && !defined(__STDC_NO_COMPLEX__) && !defined(_MSC_VER))
    #define CYTHON_CCOMPLEX 1
  #else
    #define CYTHON_CCOMPLEX 0
  #endif
#endif
#if CYTHON_CCOMPLEX
  #ifdef __cplusplus
    #include <complex>
  #else
    #include <complex.h>
  #endif
#endif
#if CYTHON_CCOMPLEX && !defined(__cplusplus) && defined(__sun__) && defined(__GNUC__)
  #undef _Complex_I
  #define _Complex_I 1.0fj
#endif

/* #### Code section: filename_table ### */

static const char* const __pyx_f[] = {
  "symengine_wrapper.pyx",
  "vector.to_py",
  "cpython/contextvars.pxd",
  "symengine_wrapper.pxd",
  "cpython/type.pxd",
  "cpython/bool.pxd",
  "cpython/complex.pxd",
};
/* #### Code section: utility_code_proto_before_types ### */
/* Atomics.proto (used by UnpackUnboundCMethod) */
#include <pythread.h>
#ifndef CYTHON_ATOMICS
    #define CYTHON_ATOMICS 1
#endif
#define __PYX_CYTHON_ATOMICS_ENABLED() CYTHON_ATOMICS
#define __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING() CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
#define __pyx_atomic_int_type int
#define __pyx_nonatomic_int_type int
#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\
                        (__STDC_VERSION__ >= 201112L) &&\
                        !defined(__STDC_NO_ATOMICS__))
    #include <stdatomic.h>
#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\
                    (__cplusplus >= 201103L) ||\
                    (defined(_MSC_VER) && _MSC_VER >= 1700)))
    #include <atomic>
#endif
#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\
                        (__STDC_VERSION__ >= 201112L) &&\
                        !defined(__STDC_NO_ATOMICS__) &&\
                       ATOMIC_INT_LOCK_FREE == 2)
    #undef __pyx_atomic_int_type
    #define __pyx_atomic_int_type atomic_int
    #define __pyx_atomic_ptr_type atomic_uintptr_t
    #define __pyx_nonatomic_ptr_type uintptr_t
    #define __pyx_atomic_incr_relaxed(value) atomic_fetch_add_explicit(value, 1, memory_order_relaxed)
    #define __pyx_atomic_incr_acq_rel(value) atomic_fetch_add_explicit(value, 1, memory_order_acq_rel)
    #define __pyx_atomic_decr_acq_rel(value) atomic_fetch_sub_explicit(value, 1, memory_order_acq_rel)
    #define __pyx_atomic_sub(value, arg) atomic_fetch_sub(value, arg)
    #define __pyx_atomic_int_cmp_exchange(value, expected, desired) atomic_compare_exchange_strong(value, expected, desired)
    #define __pyx_atomic_load(value) atomic_load(value)
    #define __pyx_atomic_store(value, new_value) atomic_store(value, new_value)
    #define __pyx_atomic_pointer_load_relaxed(value) atomic_load_explicit(value, memory_order_relaxed)
    #define __pyx_atomic_pointer_load_acquire(value) atomic_load_explicit(value, memory_order_acquire)
    #define __pyx_atomic_pointer_exchange(value, new_value) atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value)
    #define __pyx_atomic_pointer_cmp_exchange(value, expected, desired) atomic_compare_exchange_strong(value, expected, desired)
    #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER)
        #pragma message ("Using standard C atomics")
    #elif defined(__PYX_DEBUG_ATOMICS)
        #warning "Using standard C atomics"
    #endif
#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\
                    (__cplusplus >= 201103L) ||\
\
                    (defined(_MSC_VER) && _MSC_VER >= 1700)) &&\
                    ATOMIC_INT_LOCK_FREE == 2)
    #undef __pyx_atomic_int_type
    #define __pyx_atomic_int_type std::atomic_int
    #define __pyx_atomic_ptr_type std::atomic_uintptr_t
    #define __pyx_nonatomic_ptr_type uintptr_t
    #define __pyx_atomic_incr_relaxed(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_relaxed)
    #define __pyx_atomic_incr_acq_rel(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_acq_rel)
    #define __pyx_atomic_decr_acq_rel(value) std::atomic_fetch_sub_explicit(value, 1, std::memory_order_acq_rel)
    #define __pyx_atomic_sub(value, arg) std::atomic_fetch_sub(value, arg)
    #define __pyx_atomic_int_cmp_exchange(value, expected, desired) std::atomic_compare_exchange_strong(value, expected, desired)
    #define __pyx_atomic_load(value) std::atomic_load(value)
    #define __pyx_atomic_store(value, new_value) std::atomic_store(value, new_value)
    #define __pyx_atomic_pointer_load_relaxed(value) std::atomic_load_explicit(value, std::memory_order_relaxed)
    #define __pyx_atomic_pointer_load_acquire(value) std::atomic_load_explicit(value, std::memory_order_acquire)
    #define __pyx_atomic_pointer_exchange(value, new_value) std::atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value)
    #define __pyx_atomic_pointer_cmp_exchange(value, expected, desired) std::atomic_compare_exchange_strong(value, expected, desired)
    #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER)
        #pragma message ("Using standard C++ atomics")
    #elif defined(__PYX_DEBUG_ATOMICS)
        #warning "Using standard C++ atomics"
    #endif
#elif CYTHON_ATOMICS && (__GNUC__ >= 5 || (__GNUC__ == 4 &&\
                    (__GNUC_MINOR__ > 1 ||\
                    (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ >= 2))))
    #define __pyx_atomic_ptr_type void*
    #define __pyx_nonatomic_ptr_type void*
    #define __pyx_atomic_incr_relaxed(value) __sync_fetch_and_add(value, 1)
    #define __pyx_atomic_incr_acq_rel(value) __sync_fetch_and_add(value, 1)
    #define __pyx_atomic_decr_acq_rel(value) __sync_fetch_and_sub(value, 1)
    #define __pyx_atomic_sub(value, arg) __sync_fetch_and_sub(value, arg)
    static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) {
        __pyx_nonatomic_int_type old = __sync_val_compare_and_swap(value, *expected, desired);
        int result = old == *expected;
        *expected = old;
        return result;
    }
    #define __pyx_atomic_load(value) __sync_fetch_and_add(value, 0)
    #define __pyx_atomic_store(value, new_value) __sync_lock_test_and_set(value, new_value)
    #define __pyx_atomic_pointer_load_relaxed(value) __sync_fetch_and_add(value, 0)
    #define __pyx_atomic_pointer_load_acquire(value) __sync_fetch_and_add(value, 0)
    #define __pyx_atomic_pointer_exchange(value, new_value) __sync_lock_test_and_set(value, (__pyx_atomic_ptr_type)new_value)
    static CYTHON_INLINE int __pyx_atomic_pointer_cmp_exchange(__pyx_atomic_ptr_type* value, __pyx_nonatomic_ptr_type* expected, __pyx_nonatomic_ptr_type desired) {
        __pyx_nonatomic_ptr_type old = __sync_val_compare_and_swap(value, *expected, desired);
        int result = old == *expected;
        *expected = old;
        return result;
    }
    #ifdef __PYX_DEBUG_ATOMICS
        #warning "Using GNU atomics"
    #endif
#elif CYTHON_ATOMICS && defined(_MSC_VER)
    #include <intrin.h>
    #undef __pyx_atomic_int_type
    #define __pyx_atomic_int_type long
    #define __pyx_atomic_ptr_type void*
    #undef __pyx_nonatomic_int_type
    #define __pyx_nonatomic_int_type long
    #define __pyx_nonatomic_ptr_type void*
    #pragma intrinsic (_InterlockedExchangeAdd, _InterlockedExchange, _InterlockedCompareExchange, _InterlockedCompareExchangePointer, _InterlockedExchangePointer)
    #define __pyx_atomic_incr_relaxed(value) _InterlockedExchangeAdd(value, 1)
    #define __pyx_atomic_incr_acq_rel(value) _InterlockedExchangeAdd(value, 1)
    #define __pyx_atomic_decr_acq_rel(value) _InterlockedExchangeAdd(value, -1)
    #define __pyx_atomic_sub(value, arg) _InterlockedExchangeAdd(value, -arg)
    static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) {
        __pyx_nonatomic_int_type old = _InterlockedCompareExchange(value, desired, *expected);
        int result = old == *expected;
        *expected = old;
        return result;
    }
    #define __pyx_atomic_load(value) _InterlockedExchangeAdd(value, 0)
    #define __pyx_atomic_store(value, new_value) _InterlockedExchange(value, new_value)
    #define __pyx_atomic_pointer_load_relaxed(value) *(void * volatile *)value
    #define __pyx_atomic_pointer_load_acquire(value) _InterlockedCompareExchangePointer(value, 0, 0)
    #define __pyx_atomic_pointer_exchange(value, new_value) _InterlockedExchangePointer(value, (__pyx_atomic_ptr_type)new_value)
    static CYTHON_INLINE int __pyx_atomic_pointer_cmp_exchange(__pyx_atomic_ptr_type* value, __pyx_nonatomic_ptr_type* expected, __pyx_nonatomic_ptr_type desired) {
        __pyx_atomic_ptr_type old = _InterlockedCompareExchangePointer(value, desired, *expected);
        int result = old == *expected;
        *expected = old;
        return result;
    }
    #ifdef __PYX_DEBUG_ATOMICS
        #pragma message ("Using MSVC atomics")
    #endif
#else
    #undef CYTHON_ATOMICS
    #define CYTHON_ATOMICS 0
    #ifdef __PYX_DEBUG_ATOMICS
        #warning "Not using atomics"
    #endif
#endif

/* CriticalSectionsDefinition.proto (used by CriticalSections) */
#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
#define __Pyx_PyCriticalSection void*
#define __Pyx_PyCriticalSection2 void*
#define __Pyx_PyCriticalSection_End(cs)
#define __Pyx_PyCriticalSection2_End(cs)
#else
#define __Pyx_PyCriticalSection PyCriticalSection
#define __Pyx_PyCriticalSection2 PyCriticalSection2
#define __Pyx_PyCriticalSection_End PyCriticalSection_End
#define __Pyx_PyCriticalSection2_End PyCriticalSection2_End
#endif

/* CriticalSections.proto (used by ParseKeywordsImpl) */
#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
#define __Pyx_PyCriticalSection_Begin(cs, arg) (void)(cs)
#define __Pyx_PyCriticalSection2_Begin(cs, arg1, arg2) (void)(cs)
#else
#define __Pyx_PyCriticalSection_Begin PyCriticalSection_Begin
#define __Pyx_PyCriticalSection2_Begin PyCriticalSection2_Begin
#endif
#if PY_VERSION_HEX < 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API
#define __Pyx_BEGIN_CRITICAL_SECTION(o) {
#define __Pyx_END_CRITICAL_SECTION() }
#else
#define __Pyx_BEGIN_CRITICAL_SECTION Py_BEGIN_CRITICAL_SECTION
#define __Pyx_END_CRITICAL_SECTION Py_END_CRITICAL_SECTION
#endif

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

/* NoFastGil.proto */
#define __Pyx_PyGILState_Ensure PyGILState_Ensure
#define __Pyx_PyGILState_Release PyGILState_Release
#define __Pyx_FastGIL_Remember()
#define __Pyx_FastGIL_Forget()
#define __Pyx_FastGilFuncInit()

/* IncludeStructmemberH.proto (used by FixUpExtensionType) */
#include <structmember.h>

/* BufferFormatStructs.proto */
struct __Pyx_StructField_;
#define __PYX_BUF_FLAGS_PACKED_STRUCT (1 << 0)
typedef struct {
  const char* name;
  const struct __Pyx_StructField_* fields;
  size_t size;
  size_t arraysize[8];
  int ndim;
  char typegroup;
  char is_unsigned;
  int flags;
} __Pyx_TypeInfo;
typedef struct __Pyx_StructField_ {
  const __Pyx_TypeInfo* type;
  const char* name;
  size_t offset;
} __Pyx_StructField;
typedef struct {
  const __Pyx_StructField* field;
  size_t parent_offset;
} __Pyx_BufFmt_StackElem;
typedef struct {
  __Pyx_StructField root;
  __Pyx_BufFmt_StackElem* head;
  size_t fmt_offset;
  size_t new_count, enc_count;
  size_t struct_alignment;
  int is_complex;
  char enc_type;
  char new_packmode;
  char enc_packmode;
  char is_valid_array;
} __Pyx_BufFmt_Context;

/* MemviewSliceStruct.proto */
struct __pyx_memoryview_obj;
typedef struct {
  struct __pyx_memoryview_obj *memview;
  char *data;
  Py_ssize_t shape[8];
  Py_ssize_t strides[8];
  Py_ssize_t suboffsets[8];
} __Pyx_memviewslice;
#define __Pyx_MemoryView_Len(m)  (m.shape[0])
#define __Pyx_MEMVIEW_DIRECT   1
#define __Pyx_MEMVIEW_PTR      2
#define __Pyx_MEMVIEW_FULL     4
#define __Pyx_MEMVIEW_CONTIG   8
#define __Pyx_MEMVIEW_STRIDED  16
#define __Pyx_MEMVIEW_FOLLOW   32
#define __Pyx_IS_C_CONTIG 1
#define __Pyx_IS_F_CONTIG 2
#define __Pyx_MEMSLICE_INIT  { 0, 0, { 0 }, { 0 }, { 0 } }
#if CYTHON_ATOMICS
    #define __pyx_add_acquisition_count(memview)\
             __pyx_atomic_incr_relaxed(__pyx_get_slice_count_pointer(memview))
    #define __pyx_sub_acquisition_count(memview)\
            __pyx_atomic_decr_acq_rel(__pyx_get_slice_count_pointer(memview))
#else
    #define __pyx_add_acquisition_count(memview)\
            __pyx_add_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock)
    #define __pyx_sub_acquisition_count(memview)\
            __pyx_sub_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock)
#endif

/* #### Code section: numeric_typedefs ### */
/* #### Code section: complex_type_declarations ### */
/* Declarations.proto */
#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
  #ifdef __cplusplus
    typedef ::std::complex< double > __pyx_t_double_complex;
  #else
    typedef double _Complex __pyx_t_double_complex;
  #endif
#else
    typedef struct { double real, imag; } __pyx_t_double_complex;
#endif
static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double);

/* #### Code section: type_declarations ### */

/*--- Type declarations ---*/
struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic;
struct __pyx_obj_9symengine_3lib_17symengine_wrapper_MatrixBase;
struct __pyx_obj_9symengine_3lib_17symengine_wrapper_PyFunctionClass;
struct __pyx_obj_9symengine_3lib_17symengine_wrapper_PyModule;
struct __pyx_obj_9symengine_3lib_17symengine_wrapper__DictBasic;
struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DictBasicIter;
struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify;
struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LambdaDouble;
struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LambdaComplexDouble;
struct __pyx_obj_9symengine_3lib_17symengine_wrapper__LLVMLambdify;
struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMDouble;
struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMFloat;
struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMLongDouble;
struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Expr;
struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Symbol;
struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Dummy;
struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Constant;
struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Pi;
struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Exp1;
struct __pyx_obj_9symengine_3lib_17symengine_wrapper_GoldenRatio;
struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Catalan;
struct __pyx_obj_9symengine_3lib_17symengine_wrapper_EulerGamma;
struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Boolean;
struct __pyx_obj_9symengine_3lib_17symengine_wrapper_BooleanAtom;
struct __pyx_obj_9symengine_3lib_17symengine_wrapper_BooleanTrue;
struct __pyx_obj_9symengine_3lib_17symengine_wrapper_BooleanFalse;
struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Number;
struct __pyx_obj_9symengine_3lib_17symengine_wrapper_ComplexBase;
struct __pyx_obj_9symengine_3lib_17symengine_wrapper_ComplexDouble;
struct __pyx_obj_9symengine_3lib_17symengine_wrapper_ComplexMPC;
struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Complex;
struct __pyx_obj_9symengine_3lib_17symengine_wrapper_ImaginaryUnit;
struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Infinity;
struct __pyx_obj_9symengine_3lib_17symengine_wrapper_NegativeInfinity;
struct __pyx_obj_9symengine_3lib_17symengine_wrapper_ComplexInfinity;
struct __pyx_obj_9symengine_3lib_17symengine_wrapper_NaN;
struct __pyx_obj_9symengine_3lib_17symengine_wrapper_PyNumber;
struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Set;
struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase;
struct __pyx_obj_9symengine_3lib_17symengine_wrapper_MutableDenseMatrix;
struct __pyx_obj_9symengine_3lib_17symengine_wrapper_ImmutableDenseMatrix;
struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Sieve;
struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Sieve_iterator;
struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct__msubs;
struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_1_subs;
struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_2_xreplace;
struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_3_simplify;
struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_4_expand;
struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_5_genexpr;
struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_6_create_low_level_callable;
struct __pyx_array_obj;
struct __pyx_MemviewEnum_obj;
struct __pyx_memoryview_obj;
struct __pyx_memoryviewslice_obj;
struct __pyx_opt_args_7cpython_11contextvars_get_value;
struct __pyx_opt_args_7cpython_11contextvars_get_value_no_default;

/* "cpython/contextvars.pxd":116
 * 
 * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API")
 * cdef inline object get_value(var, default_value=None):             # <<<<<<<<<<<<<<
 *     """Return a new reference to the value of the context variable,
 *     or the default value of the context variable,
*/
struct __pyx_opt_args_7cpython_11contextvars_get_value {
  int __pyx_n;
  PyObject *default_value;
};

/* "cpython/contextvars.pxd":134
 * 
 * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API")
 * cdef inline object get_value_no_default(var, default_value=None):             # <<<<<<<<<<<<<<
 *     """Return a new reference to the value of the context variable,
 *     or the provided default value if no such value was found.
*/
struct __pyx_opt_args_7cpython_11contextvars_get_value_no_default {
  int __pyx_n;
  PyObject *default_value;
};
struct __pyx_t_9symengine_CRCPBasic;

/* "symengine.pxd":954
 * 
 * ## Defined in 'symengine/cwrapper.cpp'
 * cdef struct CRCPBasic:             # <<<<<<<<<<<<<<
 *     rcp_const_basic m
*/
struct __pyx_t_9symengine_CRCPBasic {
  SymEngine::RCP<const SymEngine::Basic> m;
};
struct __pyx_opt_args_9symengine_3lib_17symengine_wrapper_9_Lambdify_unsafe_eval;
struct __pyx_opt_args_9symengine_3lib_17symengine_wrapper_12LambdaDouble_unsafe_real;
struct __pyx_opt_args_9symengine_3lib_17symengine_wrapper_19LambdaComplexDouble_unsafe_complex;
struct __pyx_opt_args_9symengine_3lib_17symengine_wrapper_10LLVMDouble_unsafe_real;
struct __pyx_opt_args_9symengine_3lib_17symengine_wrapper_9LLVMFloat_unsafe_real;
struct __pyx_opt_args_9symengine_3lib_17symengine_wrapper_14LLVMLongDouble_unsafe_real;
struct __pyx_opt_args_9symengine_3lib_17symengine_wrapper_12LambdaDouble_unsafe_eval;
struct __pyx_opt_args_9symengine_3lib_17symengine_wrapper_19LambdaComplexDouble_unsafe_eval;
struct __pyx_opt_args_9symengine_3lib_17symengine_wrapper_10LLVMDouble_unsafe_eval;
struct __pyx_opt_args_9symengine_3lib_17symengine_wrapper_9LLVMFloat_unsafe_eval;
struct __pyx_opt_args_9symengine_3lib_17symengine_wrapper_14LLVMLongDouble_unsafe_eval;
struct __pyx_ctuple_long;
typedef struct __pyx_ctuple_long __pyx_ctuple_long;

/* "symengine/lib/symengine_wrapper.pxd":45
 *     cpdef eval_real(self, inp, out)
 *     cpdef eval_complex(self, inp, out)
 *     cpdef unsafe_eval(sef, inp, out, unsigned nbroadcast=*)             # <<<<<<<<<<<<<<
 * 
 * cdef class LambdaDouble(_Lambdify):
*/
struct __pyx_opt_args_9symengine_3lib_17symengine_wrapper_9_Lambdify_unsafe_eval {
  int __pyx_n;
  unsigned int nbroadcast;
};

/* "symengine/lib/symengine_wrapper.pxd":50
 *     cdef unique_ptr[symengine.LambdaRealDoubleVisitor] lambda_visitor
 *     cdef _init(self, symengine.vec_basic& args_, symengine.vec_basic& outs_, cppbool cse)
 *     cpdef unsafe_real(self, double[::1] inp, double[::1] out, int inp_offset=*, int out_offset=*)             # <<<<<<<<<<<<<<
 *     cpdef as_scipy_low_level_callable(self)
 *     cpdef as_ctypes(self)
*/
struct __pyx_opt_args_9symengine_3lib_17symengine_wrapper_12LambdaDouble_unsafe_real {
  int __pyx_n;
  int inp_offset;
  int out_offset;
};

/* "symengine/lib/symengine_wrapper.pxd":60
 *     cdef unique_ptr[symengine.LambdaComplexDoubleVisitor] lambda_visitor
 *     cdef _init(self, symengine.vec_basic& args_, symengine.vec_basic& outs_, cppbool cse)
 *     cpdef unsafe_complex(self, double complex[::1] inp, double complex[::1] out, int inp_offset=*, int out_offset=*)             # <<<<<<<<<<<<<<
 * 
 * cdef class _LLVMLambdify(_Lambdify):
*/
struct __pyx_opt_args_9symengine_3lib_17symengine_wrapper_19LambdaComplexDouble_unsafe_complex {
  int __pyx_n;
  int inp_offset;
  int out_offset;
};

/* "symengine/lib/symengine_wrapper.pxd":69
 *     cdef _init(self, symengine.vec_basic& args_, symengine.vec_basic& outs_, cppbool cse)
 *     cdef _load(self, const string &s)
 *     cpdef unsafe_real(self, double[::1] inp, double[::1] out, int inp_offset=*, int out_offset=*)             # <<<<<<<<<<<<<<
 *     cpdef as_scipy_low_level_callable(self)
 *     cpdef as_ctypes(self)
*/
struct __pyx_opt_args_9symengine_3lib_17symengine_wrapper_10LLVMDouble_unsafe_real {
  int __pyx_n;
  int inp_offset;
  int out_offset;
};

/* "symengine/lib/symengine_wrapper.pxd":77
 *     cdef _init(self, symengine.vec_basic& args_, symengine.vec_basic& outs_, cppbool cse)
 *     cdef _load(self, const string &s)
 *     cpdef unsafe_real(self, float[::1] inp, float[::1] out, int inp_offset=*, int out_offset=*)             # <<<<<<<<<<<<<<
 * 
 * cdef class LLVMLongDouble(_LLVMLambdify):
*/
struct __pyx_opt_args_9symengine_3lib_17symengine_wrapper_9LLVMFloat_unsafe_real {
  int __pyx_n;
  int inp_offset;
  int out_offset;
};

/* "symengine/lib/symengine_wrapper.pxd":83
 *     cdef _init(self, symengine.vec_basic& args_, symengine.vec_basic& outs_, cppbool cse)
 *     cdef _load(self, const string &s)
 *     cpdef unsafe_real(self, long double[::1] inp, long double[::1] out, int inp_offset=*, int out_offset=*)             # <<<<<<<<<<<<<<
*/
struct __pyx_opt_args_9symengine_3lib_17symengine_wrapper_14LLVMLongDouble_unsafe_real {
  int __pyx_n;
  int inp_offset;
  int out_offset;
};

/* "symengine/lib/symengine_wrapper.pyx":5158
 *         deref(self.lambda_visitor).call(&out[out_offset], &inp[inp_offset])
 * 
 *     cpdef unsafe_eval(self, inp, out, unsigned nbroadcast=1):             # <<<<<<<<<<<<<<
 *         cdef double[::1] c_inp, c_out
 *         cdef unsigned idx
*/
struct __pyx_opt_args_9symengine_3lib_17symengine_wrapper_12LambdaDouble_unsafe_eval {
  int __pyx_n;
  unsigned int nbroadcast;
};

/* "symengine/lib/symengine_wrapper.pyx":5203
 *         deref(self.lambda_visitor).call(&out[out_offset], &inp[inp_offset])
 * 
 *     cpdef unsafe_eval(self, inp, out, unsigned nbroadcast=1):             # <<<<<<<<<<<<<<
 *         cdef double complex[::1] c_inp, c_out
 *         cdef unsigned idx
*/
struct __pyx_opt_args_9symengine_3lib_17symengine_wrapper_19LambdaComplexDouble_unsafe_eval {
  int __pyx_n;
  unsigned int nbroadcast;
};

/* "symengine/lib/symengine_wrapper.pyx":5235
 *         deref(self.lambda_visitor).call(&out[out_offset], &inp[inp_offset])
 * 
 *     cpdef unsafe_eval(self, inp, out, unsigned nbroadcast=1):             # <<<<<<<<<<<<<<
 *         cdef double[::1] c_inp, c_out
 *         cdef unsigned idx
*/
struct __pyx_opt_args_9symengine_3lib_17symengine_wrapper_10LLVMDouble_unsafe_eval {
  int __pyx_n;
  unsigned int nbroadcast;
};

/* "symengine/lib/symengine_wrapper.pyx":5294
 *         deref(self.lambda_visitor).call(&out[out_offset], &inp[inp_offset])
 * 
 *     cpdef unsafe_eval(self, inp, out, unsigned nbroadcast=1):             # <<<<<<<<<<<<<<
 *         cdef float[::1] c_inp, c_out
 *         cdef unsigned idx
*/
struct __pyx_opt_args_9symengine_3lib_17symengine_wrapper_9LLVMFloat_unsafe_eval {
  int __pyx_n;
  unsigned int nbroadcast;
};

/* "symengine/lib/symengine_wrapper.pyx":5325
 *         deref(self.lambda_visitor).call(&out[out_offset], &inp[inp_offset])
 * 
 *     cpdef unsafe_eval(self, inp, out, unsigned nbroadcast=1):             # <<<<<<<<<<<<<<
 *         cdef long double[::1] c_inp, c_out
 *         cdef unsigned idx
*/
struct __pyx_opt_args_9symengine_3lib_17symengine_wrapper_14LLVMLongDouble_unsafe_eval {
  int __pyx_n;
  unsigned int nbroadcast;
};

/* "symengine/lib/symengine_wrapper.pyx":2271
 *         cdef umap_basic_num_iterator iter, iterend
 *         d = collections.defaultdict(int)
 *         d[Integer(1)] = c2py(<rcp_const_basic>(deref(X).get_coef()))             # <<<<<<<<<<<<<<
 *         umap = deref(X).get_dict()
 *         iter = umap.begin()
*/
struct __pyx_ctuple_long {
  long f0;
};

/* "symengine/lib/symengine_wrapper.pxd":10
 * from libcpp cimport bool as cppbool
 * 
 * cdef class Basic(object):             # <<<<<<<<<<<<<<
 *     cdef rcp_const_basic thisptr
 * 
*/
struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic {
  PyObject_HEAD
  SymEngine::RCP<const SymEngine::Basic> thisptr;
};


/* "symengine/lib/symengine_wrapper.pxd":13
 *     cdef rcp_const_basic thisptr
 * 
 * cdef class MatrixBase(object):             # <<<<<<<<<<<<<<
 *     cdef symengine.MatrixBase* thisptr
 * 
*/
struct __pyx_obj_9symengine_3lib_17symengine_wrapper_MatrixBase {
  PyObject_HEAD
  SymEngine::MatrixBase *thisptr;
};


/* "symengine/lib/symengine_wrapper.pxd":16
 *     cdef symengine.MatrixBase* thisptr
 * 
 * cdef class PyFunctionClass(object):             # <<<<<<<<<<<<<<
 *     cdef RCP[const symengine.PyFunctionClass] thisptr
 * 
*/
struct __pyx_obj_9symengine_3lib_17symengine_wrapper_PyFunctionClass {
  PyObject_HEAD
  SymEngine::RCP<SymEngine::PyFunctionClass const >  thisptr;
};


/* "symengine/lib/symengine_wrapper.pxd":19
 *     cdef RCP[const symengine.PyFunctionClass] thisptr
 * 
 * cdef class PyModule(object):             # <<<<<<<<<<<<<<
 *     cdef RCP[const symengine.PyModule] thisptr
 * 
*/
struct __pyx_obj_9symengine_3lib_17symengine_wrapper_PyModule {
  PyObject_HEAD
  SymEngine::RCP<SymEngine::PyModule const >  thisptr;
};


/* "symengine/lib/symengine_wrapper.pxd":22
 *     cdef RCP[const symengine.PyModule] thisptr
 * 
 * cdef class _DictBasic(object):             # <<<<<<<<<<<<<<
 *     cdef map_basic_basic c
 * 
*/
struct __pyx_obj_9symengine_3lib_17symengine_wrapper__DictBasic {
  PyObject_HEAD
  SymEngine::map_basic_basic c;
};


/* "symengine/lib/symengine_wrapper.pxd":25
 *     cdef map_basic_basic c
 * 
 * cdef class DictBasicIter(object):             # <<<<<<<<<<<<<<
 *     cdef map_basic_basic.iterator begin
 *     cdef map_basic_basic.iterator end
*/
struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DictBasicIter {
  PyObject_HEAD
  struct __pyx_vtabstruct_9symengine_3lib_17symengine_wrapper_DictBasicIter *__pyx_vtab;
  SymEngine::map_basic_basic::iterator begin;
  SymEngine::map_basic_basic::iterator end;
};


/* "symengine/lib/symengine_wrapper.pxd":32
 * cdef object c2py(rcp_const_basic o)
 * 
 * cdef class _Lambdify(object):             # <<<<<<<<<<<<<<
 *     cdef size_t args_size, tot_out_size
 *     cdef list out_shapes
*/
struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify {
  PyObject_HEAD
  struct __pyx_vtabstruct_9symengine_3lib_17symengine_wrapper__Lambdify *__pyx_vtab;
  size_t args_size;
  size_t tot_out_size;
  PyObject *out_shapes;
  int real;
  size_t n_exprs;
  PyObject *order;
  std::vector<int>  accum_out_sizes;
  PyObject *numpy_dtype;
};


/* "symengine/lib/symengine_wrapper.pxd":47
 *     cpdef unsafe_eval(sef, inp, out, unsigned nbroadcast=*)
 * 
 * cdef class LambdaDouble(_Lambdify):             # <<<<<<<<<<<<<<
 *     cdef unique_ptr[symengine.LambdaRealDoubleVisitor] lambda_visitor
 *     cdef _init(self, symengine.vec_basic& args_, symengine.vec_basic& outs_, cppbool cse)
*/
struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LambdaDouble {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify __pyx_base;
  std::unique_ptr<SymEngine::LambdaRealDoubleVisitor>  lambda_visitor;
};


/* "symengine/lib/symengine_wrapper.pxd":57
 *                       int inp_offset=*, int out_offset=*)
 * 
 * cdef class LambdaComplexDouble(_Lambdify):             # <<<<<<<<<<<<<<
 *     cdef unique_ptr[symengine.LambdaComplexDoubleVisitor] lambda_visitor
 *     cdef _init(self, symengine.vec_basic& args_, symengine.vec_basic& outs_, cppbool cse)
*/
struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LambdaComplexDouble {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify __pyx_base;
  std::unique_ptr<SymEngine::LambdaComplexDoubleVisitor>  lambda_visitor;
};


/* "symengine/lib/symengine_wrapper.pxd":62
 *     cpdef unsafe_complex(self, double complex[::1] inp, double complex[::1] out, int inp_offset=*, int out_offset=*)
 * 
 * cdef class _LLVMLambdify(_Lambdify):             # <<<<<<<<<<<<<<
 *     cdef int opt_level
 * 
*/
struct __pyx_obj_9symengine_3lib_17symengine_wrapper__LLVMLambdify {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify __pyx_base;
  int opt_level;
};


/* "symengine/lib/symengine_wrapper.pxd":65
 *     cdef int opt_level
 * 
 * cdef class LLVMDouble(_LLVMLambdify):             # <<<<<<<<<<<<<<
 *     cdef unique_ptr[symengine.LLVMDoubleVisitor] lambda_visitor
 *     cdef _init(self, symengine.vec_basic& args_, symengine.vec_basic& outs_, cppbool cse)
*/
struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMDouble {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper__LLVMLambdify __pyx_base;
  std::unique_ptr<SymEngine::LLVMDoubleVisitor>  lambda_visitor;
};


/* "symengine/lib/symengine_wrapper.pxd":73
 *     cpdef as_ctypes(self)
 * 
 * cdef class LLVMFloat(_LLVMLambdify):             # <<<<<<<<<<<<<<
 *     cdef unique_ptr[symengine.LLVMFloatVisitor] lambda_visitor
 *     cdef _init(self, symengine.vec_basic& args_, symengine.vec_basic& outs_, cppbool cse)
*/
struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMFloat {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper__LLVMLambdify __pyx_base;
  std::unique_ptr<SymEngine::LLVMFloatVisitor>  lambda_visitor;
};


/* "symengine/lib/symengine_wrapper.pxd":79
 *     cpdef unsafe_real(self, float[::1] inp, float[::1] out, int inp_offset=*, int out_offset=*)
 * 
 * cdef class LLVMLongDouble(_LLVMLambdify):             # <<<<<<<<<<<<<<
 *     cdef unique_ptr[symengine.LLVMLongDoubleVisitor] lambda_visitor
 *     cdef _init(self, symengine.vec_basic& args_, symengine.vec_basic& outs_, cppbool cse)
*/
struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMLongDouble {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper__LLVMLambdify __pyx_base;
  std::unique_ptr<SymEngine::LLVMLongDoubleVisitor>  lambda_visitor;
};


/* "symengine/lib/symengine_wrapper.pyx":1270
 * 
 * 
 * cdef class Expr(Basic):             # <<<<<<<<<<<<<<
 *     pass
 * 
*/
struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Expr {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic __pyx_base;
};


/* "symengine/lib/symengine_wrapper.pyx":1274
 * 
 * 
 * cdef class Symbol(Expr):             # <<<<<<<<<<<<<<
 *     """
 *     Symbol is a class to store a symbolic variable with a given name.
*/
struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Symbol {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Expr __pyx_base;
};


/* "symengine/lib/symengine_wrapper.pyx":1335
 * 
 * 
 * cdef class Dummy(Symbol):             # <<<<<<<<<<<<<<
 * 
 *     def __init__(Basic self, name=None, *args, **kwargs):
*/
struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Dummy {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Symbol __pyx_base;
};


/* "symengine/lib/symengine_wrapper.pyx":1377
 * 
 * 
 * cdef class Constant(Expr):             # <<<<<<<<<<<<<<
 * 
 *     def __cinit__(self, name = None):
*/
struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Constant {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Expr __pyx_base;
};


/* "symengine/lib/symengine_wrapper.pyx":1408
 * 
 * 
 * cdef class Pi(Constant):             # <<<<<<<<<<<<<<
 * 
 *     def __cinit__(Basic self):
*/
struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Pi {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Constant __pyx_base;
};


/* "symengine/lib/symengine_wrapper.pyx":1424
 * 
 * 
 * cdef class Exp1(Constant):             # <<<<<<<<<<<<<<
 * 
 *     def __cinit__(Basic self):
*/
struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Exp1 {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Constant __pyx_base;
};


/* "symengine/lib/symengine_wrapper.pyx":1440
 * 
 * 
 * cdef class GoldenRatio(Constant):             # <<<<<<<<<<<<<<
 * 
 *     def __cinit__(Basic self):
*/
struct __pyx_obj_9symengine_3lib_17symengine_wrapper_GoldenRatio {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Constant __pyx_base;
};


/* "symengine/lib/symengine_wrapper.pyx":1456
 * 
 * 
 * cdef class Catalan(Constant):             # <<<<<<<<<<<<<<
 * 
 *     def __cinit__(Basic self):
*/
struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Catalan {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Constant __pyx_base;
};


/* "symengine/lib/symengine_wrapper.pyx":1472
 * 
 * 
 * cdef class EulerGamma(Constant):             # <<<<<<<<<<<<<<
 * 
 *     def __cinit__(Basic self):
*/
struct __pyx_obj_9symengine_3lib_17symengine_wrapper_EulerGamma {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Constant __pyx_base;
};


/* "symengine/lib/symengine_wrapper.pyx":1488
 * 
 * 
 * cdef class Boolean(Expr):             # <<<<<<<<<<<<<<
 * 
 *     def logical_not(self):
*/
struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Boolean {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Expr __pyx_base;
};


/* "symengine/lib/symengine_wrapper.pyx":1497
 * 
 * 
 * cdef class BooleanAtom(Boolean):             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
struct __pyx_obj_9symengine_3lib_17symengine_wrapper_BooleanAtom {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Boolean __pyx_base;
};


/* "symengine/lib/symengine_wrapper.pyx":1508
 * 
 * 
 * cdef class BooleanTrue(BooleanAtom):             # <<<<<<<<<<<<<<
 * 
 *     def __cinit__(Basic self):
*/
struct __pyx_obj_9symengine_3lib_17symengine_wrapper_BooleanTrue {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_BooleanAtom __pyx_base;
};


/* "symengine/lib/symengine_wrapper.pyx":1527
 * 
 * 
 * cdef class BooleanFalse(BooleanAtom):             # <<<<<<<<<<<<<<
 * 
 *     def __cinit__(Basic self):
*/
struct __pyx_obj_9symengine_3lib_17symengine_wrapper_BooleanFalse {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_BooleanAtom __pyx_base;
};


/* "symengine/lib/symengine_wrapper.pyx":1693
 * 
 * 
 * cdef class Number(Expr):             # <<<<<<<<<<<<<<
 *     @property
 *     def is_Atom(self):
*/
struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Number {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Expr __pyx_base;
};


/* "symengine/lib/symengine_wrapper.pyx":1989
 * 
 * 
 * cdef class ComplexBase(Number):             # <<<<<<<<<<<<<<
 * 
 *     def real_part(Basic self):
*/
struct __pyx_obj_9symengine_3lib_17symengine_wrapper_ComplexBase {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Number __pyx_base;
};


/* "symengine/lib/symengine_wrapper.pyx":2006
 * 
 * 
 * cdef class ComplexDouble(ComplexBase):             # <<<<<<<<<<<<<<
 * 
 *     def __cinit__(self, i = None):
*/
struct __pyx_obj_9symengine_3lib_17symengine_wrapper_ComplexDouble {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_ComplexBase __pyx_base;
};


/* "symengine/lib/symengine_wrapper.pyx":2054
 * 
 * 
 * cdef class ComplexMPC(ComplexBase):             # <<<<<<<<<<<<<<
 *     def __cinit__(self, i = None, j = 0, long prec = 53, unsigned base = 10):
 *         if i is None:
*/
struct __pyx_obj_9symengine_3lib_17symengine_wrapper_ComplexMPC {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_ComplexBase __pyx_base;
};


/* "symengine/lib/symengine_wrapper.pyx":2075
 * 
 * 
 * cdef class Complex(ComplexBase):             # <<<<<<<<<<<<<<
 * 
 *     def _sympy_(self):
*/
struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Complex {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_ComplexBase __pyx_base;
};


/* "symengine/lib/symengine_wrapper.pyx":1395
 * 
 * 
 * cdef class ImaginaryUnit(Complex):             # <<<<<<<<<<<<<<
 * 
 *     def __cinit__(Basic self):
*/
struct __pyx_obj_9symengine_3lib_17symengine_wrapper_ImaginaryUnit {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Complex __pyx_base;
};


/* "symengine/lib/symengine_wrapper.pyx":2086
 * 
 * 
 * cdef class Infinity(Number):             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Infinity {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Number __pyx_base;
};


/* "symengine/lib/symengine_wrapper.pyx":2106
 * 
 * 
 * cdef class NegativeInfinity(Number):             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
struct __pyx_obj_9symengine_3lib_17symengine_wrapper_NegativeInfinity {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Number __pyx_base;
};


/* "symengine/lib/symengine_wrapper.pyx":2133
 * 
 * 
 * cdef class ComplexInfinity(Number):             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
struct __pyx_obj_9symengine_3lib_17symengine_wrapper_ComplexInfinity {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Number __pyx_base;
};


/* "symengine/lib/symengine_wrapper.pyx":2153
 * 
 * 
 * cdef class NaN(Number):             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
struct __pyx_obj_9symengine_3lib_17symengine_wrapper_NaN {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Number __pyx_base;
};


/* "symengine/lib/symengine_wrapper.pyx":2909
 * sage_module = create_sage_module()
 * 
 * cdef class PyNumber(Number):             # <<<<<<<<<<<<<<
 *     def __cinit__(self, obj = None, PyModule module = None):
 *         if obj is None:
*/
struct __pyx_obj_9symengine_3lib_17symengine_wrapper_PyNumber {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Number __pyx_base;
};


/* "symengine/lib/symengine_wrapper.pyx":3114
 * 
 * 
 * cdef class Set(Expr):             # <<<<<<<<<<<<<<
 * 
 *     def intersection(self, a):
*/
struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Set {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Expr __pyx_base;
};


/* "symengine/lib/symengine_wrapper.pyx":3336
 *     pass
 * 
 * cdef class DenseMatrixBase(MatrixBase):             # <<<<<<<<<<<<<<
 *     """
 *     Represents a two-dimensional dense matrix.
*/
struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_MatrixBase __pyx_base;
};


/* "symengine/lib/symengine_wrapper.pyx":4160
 *     next = __next__
 * 
 * cdef class MutableDenseMatrix(DenseMatrixBase):             # <<<<<<<<<<<<<<
 * 
 *     def col_swap(self, i, j):
*/
struct __pyx_obj_9symengine_3lib_17symengine_wrapper_MutableDenseMatrix {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase __pyx_base;
};


/* "symengine/lib/symengine_wrapper.pyx":4203
 * Matrix = DenseMatrix = MutableDenseMatrix
 * 
 * cdef class ImmutableDenseMatrix(DenseMatrixBase):             # <<<<<<<<<<<<<<
 * 
 *     def __setitem__(self, key, value):
*/
struct __pyx_obj_9symengine_3lib_17symengine_wrapper_ImmutableDenseMatrix {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase __pyx_base;
};


/* "symengine/lib/symengine_wrapper.pyx":4263
 * 
 * 
 * cdef class Sieve:             # <<<<<<<<<<<<<<
 *     @staticmethod
 *     def generate_primes(n):
*/
struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Sieve {
  PyObject_HEAD
};


/* "symengine/lib/symengine_wrapper.pyx":4274
 * 
 * 
 * cdef class Sieve_iterator:             # <<<<<<<<<<<<<<
 *     cdef symengine.sieve_iterator *thisptr
 *     cdef unsigned limit
*/
struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Sieve_iterator {
  PyObject_HEAD
  SymEngine::Sieve::iterator *thisptr;
  unsigned int limit;
};


/* "symengine/lib/symengine_wrapper.pyx":3928
 *                 self._set(i, j, f(self._get(i, j)))
 * 
 *     def msubs(self, *args):             # <<<<<<<<<<<<<<
 *         cdef _DictBasic D = get_dict(*args)
 *         return self.applyfunc(lambda x: x.msubs(D))
*/
struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct__msubs {
  PyObject_HEAD
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper__DictBasic *__pyx_v_D;
};


/* "symengine/lib/symengine_wrapper.pyx":3942
 * 
 *     #TODO: implement this in C++
 *     def subs(self, *args):             # <<<<<<<<<<<<<<
 *         cdef _DictBasic D = get_dict(*args)
 *         return self.applyfunc(lambda x: x.subs(D))
*/
struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_1_subs {
  PyObject_HEAD
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper__DictBasic *__pyx_v_D;
};


/* "symengine/lib/symengine_wrapper.pyx":3946
 *         return self.applyfunc(lambda x: x.subs(D))
 * 
 *     def xreplace(self, *args):             # <<<<<<<<<<<<<<
 *         cdef _DictBasic D = get_dict(*args)
 *         return self.applyfunc(lambda x: x.xreplace(D))
*/
struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_2_xreplace {
  PyObject_HEAD
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper__DictBasic *__pyx_v_D;
};


/* "symengine/lib/symengine_wrapper.pyx":4135
 *            return self.free_symbols
 * 
 *     def simplify(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self._applyfunc(lambda x : x.simplify(*args, **kwargs))
 * 
*/
struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_3_simplify {
  PyObject_HEAD
  PyObject *__pyx_v_args;
  PyObject *__pyx_v_kwargs;
};


/* "symengine/lib/symengine_wrapper.pyx":4138
 *         return self._applyfunc(lambda x : x.simplify(*args, **kwargs))
 * 
 *     def expand(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.applyfunc(lambda x : x.expand(*args, **kwargs))
 * 
*/
struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_4_expand {
  PyObject_HEAD
  PyObject *__pyx_v_args;
  PyObject *__pyx_v_kwargs;
};


/* "symengine/lib/symengine_wrapper.pyx":4956
 *         args = np.asanyarray(args)
 *         self.args_size = args.size
 *         exprs = tuple(np.asanyarray(expr) for expr in exprs)             # <<<<<<<<<<<<<<
 *         self.out_shapes = [expr.shape for expr in exprs]
 *         self.n_exprs = len(exprs)
*/
struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_5_genexpr {
  PyObject_HEAD
  PyObject *__pyx_genexpr_arg_0;
  PyObject *__pyx_v_expr;
  PyObject *__pyx_t_0;
  Py_ssize_t __pyx_t_1;
};


/* "symengine/lib/symengine_wrapper.pyx":5136
 * 
 * 
 * def create_low_level_callable(lambdify, *args):             # <<<<<<<<<<<<<<
 *     from scipy import LowLevelCallable
 *     class LambdifyLowLevelCallable(LowLevelCallable):
*/
struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_6_create_low_level_callable {
  PyObject_HEAD
  PyObject *__pyx_v_LambdifyLowLevelCallable;
};


/* "View.MemoryView":118
 * 
 * 
 * @cython.collection_type("sequence")             # <<<<<<<<<<<<<<
 * @cname("__pyx_array")
 * cdef class array:
*/
struct __pyx_array_obj {
  PyObject_HEAD
  struct __pyx_vtabstruct_array *__pyx_vtab;
  char *data;
  Py_ssize_t len;
  char *format;
  int ndim;
  Py_ssize_t *_shape;
  Py_ssize_t *_strides;
  Py_ssize_t itemsize;
  PyObject *mode;
  PyObject *_format;
  void (*callback_free_data)(void *);
  int free_data;
  int dtype_is_object;
};


/* "View.MemoryView":307
 * 
 * 
 * @cname('__pyx_MemviewEnum')             # <<<<<<<<<<<<<<
 * cdef class Enum(object):
 *     cdef object name
*/
struct __pyx_MemviewEnum_obj {
  PyObject_HEAD
  PyObject *name;
};


/* "View.MemoryView":342
 * 
 * 
 * @cname('__pyx_memoryview')             # <<<<<<<<<<<<<<
 * cdef class memoryview:
 * 
*/
struct __pyx_memoryview_obj {
  PyObject_HEAD
  struct __pyx_vtabstruct_memoryview *__pyx_vtab;
  PyObject *obj;
  PyObject *_size;
  void *_unused;
  PyThread_type_lock lock;
  __pyx_atomic_int_type acquisition_count;
  Py_buffer view;
  int flags;
  int dtype_is_object;
  __Pyx_TypeInfo const *typeinfo;
};


/* "View.MemoryView":856
 * 
 * 
 * @cython.collection_type("sequence")             # <<<<<<<<<<<<<<
 * @cname('__pyx_memoryviewslice')
 * cdef class _memoryviewslice(memoryview):
*/
struct __pyx_memoryviewslice_obj {
  struct __pyx_memoryview_obj __pyx_base;
  __Pyx_memviewslice from_slice;
  PyObject *from_object;
  PyObject *(*to_object_func)(char *);
  int (*to_dtype_func)(char *, PyObject *);
};



/* "symengine/lib/symengine_wrapper.pyx":686
 * 
 * 
 * cdef class DictBasicIter(object):             # <<<<<<<<<<<<<<
 * 
 *     cdef init(self, map_basic_basic.iterator begin, map_basic_basic.iterator end):
*/

struct __pyx_vtabstruct_9symengine_3lib_17symengine_wrapper_DictBasicIter {
  PyObject *(*init)(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DictBasicIter *, SymEngine::map_basic_basic::iterator, SymEngine::map_basic_basic::iterator);
};
static struct __pyx_vtabstruct_9symengine_3lib_17symengine_wrapper_DictBasicIter *__pyx_vtabptr_9symengine_3lib_17symengine_wrapper_DictBasicIter;


/* "symengine/lib/symengine_wrapper.pyx":4937
 * 
 * 
 * cdef class _Lambdify(object):             # <<<<<<<<<<<<<<
 *     def __init__(self, args, *exprs, cppbool real=True, order='C', cppbool cse=False, cppbool _load=False, dtype=None, **kwargs):
 *         cdef:
*/

struct __pyx_vtabstruct_9symengine_3lib_17symengine_wrapper__Lambdify {
  PyObject *(*_init)(struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify *, SymEngine::vec_basic &, SymEngine::vec_basic &, bool);
  PyObject *(*_load)(struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify *, std::string const &);
  PyObject *(*eval_real)(struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify *, PyObject *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*eval_complex)(struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify *, PyObject *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*unsafe_eval)(struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify *, PyObject *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_9symengine_3lib_17symengine_wrapper_9_Lambdify_unsafe_eval *__pyx_optional_args);
};
static struct __pyx_vtabstruct_9symengine_3lib_17symengine_wrapper__Lambdify *__pyx_vtabptr_9symengine_3lib_17symengine_wrapper__Lambdify;


/* "symengine/lib/symengine_wrapper.pyx":5146
 * 
 * 
 * cdef class LambdaDouble(_Lambdify):             # <<<<<<<<<<<<<<
 *     def __cinit__(self, args, *exprs, cppbool real=True, order='C', cppbool cse=False, cppbool _load=False, dtype=None):
 *         # reject additional arguments
*/

struct __pyx_vtabstruct_9symengine_3lib_17symengine_wrapper_LambdaDouble {
  struct __pyx_vtabstruct_9symengine_3lib_17symengine_wrapper__Lambdify __pyx_base;
  PyObject *(*unsafe_real)(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LambdaDouble *, __Pyx_memviewslice, __Pyx_memviewslice, int __pyx_skip_dispatch, struct __pyx_opt_args_9symengine_3lib_17symengine_wrapper_12LambdaDouble_unsafe_real *__pyx_optional_args);
  PyObject *(*as_scipy_low_level_callable)(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LambdaDouble *, int __pyx_skip_dispatch);
  PyObject *(*as_ctypes)(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LambdaDouble *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_9symengine_3lib_17symengine_wrapper_LambdaDouble *__pyx_vtabptr_9symengine_3lib_17symengine_wrapper_LambdaDouble;


/* "symengine/lib/symengine_wrapper.pyx":5191
 * 
 * 
 * cdef class LambdaComplexDouble(_Lambdify):             # <<<<<<<<<<<<<<
 *     def __cinit__(self, args, *exprs, cppbool real=True, order='C', cppbool cse=False, cppbool _load=False, dtype=None):
 *         # reject additional arguments
*/

struct __pyx_vtabstruct_9symengine_3lib_17symengine_wrapper_LambdaComplexDouble {
  struct __pyx_vtabstruct_9symengine_3lib_17symengine_wrapper__Lambdify __pyx_base;
  PyObject *(*unsafe_complex)(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LambdaComplexDouble *, __Pyx_memviewslice, __Pyx_memviewslice, int __pyx_skip_dispatch, struct __pyx_opt_args_9symengine_3lib_17symengine_wrapper_19LambdaComplexDouble_unsafe_complex *__pyx_optional_args);
};
static struct __pyx_vtabstruct_9symengine_3lib_17symengine_wrapper_LambdaComplexDouble *__pyx_vtabptr_9symengine_3lib_17symengine_wrapper_LambdaComplexDouble;


/* "symengine/lib/symengine_wrapper.pxd":62
 *     cpdef unsafe_complex(self, double complex[::1] inp, double complex[::1] out, int inp_offset=*, int out_offset=*)
 * 
 * cdef class _LLVMLambdify(_Lambdify):             # <<<<<<<<<<<<<<
 *     cdef int opt_level
 * 
*/

struct __pyx_vtabstruct_9symengine_3lib_17symengine_wrapper__LLVMLambdify {
  struct __pyx_vtabstruct_9symengine_3lib_17symengine_wrapper__Lambdify __pyx_base;
};
static struct __pyx_vtabstruct_9symengine_3lib_17symengine_wrapper__LLVMLambdify *__pyx_vtabptr_9symengine_3lib_17symengine_wrapper__LLVMLambdify;


/* "symengine/lib/symengine_wrapper.pyx":5212
 * 
 * 
 * cdef class LLVMDouble(_LLVMLambdify):             # <<<<<<<<<<<<<<
 *     def __cinit__(self, args, *exprs, cppbool real=True, order='C', cppbool cse=False, cppbool _load=False, opt_level=3, dtype=None):
 *         self.opt_level = opt_level
*/

struct __pyx_vtabstruct_9symengine_3lib_17symengine_wrapper_LLVMDouble {
  struct __pyx_vtabstruct_9symengine_3lib_17symengine_wrapper__LLVMLambdify __pyx_base;
  PyObject *(*unsafe_real)(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMDouble *, __Pyx_memviewslice, __Pyx_memviewslice, int __pyx_skip_dispatch, struct __pyx_opt_args_9symengine_3lib_17symengine_wrapper_10LLVMDouble_unsafe_real *__pyx_optional_args);
  PyObject *(*as_scipy_low_level_callable)(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMDouble *, int __pyx_skip_dispatch);
  PyObject *(*as_ctypes)(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMDouble *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_9symengine_3lib_17symengine_wrapper_LLVMDouble *__pyx_vtabptr_9symengine_3lib_17symengine_wrapper_LLVMDouble;


/* "symengine/lib/symengine_wrapper.pyx":5271
 *         return addr1, addr2
 * 
 * cdef class LLVMFloat(_LLVMLambdify):             # <<<<<<<<<<<<<<
 *     def __cinit__(self, args, *exprs, cppbool real=True, order='C', cppbool cse=False, cppbool _load=False, opt_level=3, dtype=None):
 *         self.opt_level = opt_level
*/

struct __pyx_vtabstruct_9symengine_3lib_17symengine_wrapper_LLVMFloat {
  struct __pyx_vtabstruct_9symengine_3lib_17symengine_wrapper__LLVMLambdify __pyx_base;
  PyObject *(*unsafe_real)(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMFloat *, __Pyx_memviewslice, __Pyx_memviewslice, int __pyx_skip_dispatch, struct __pyx_opt_args_9symengine_3lib_17symengine_wrapper_9LLVMFloat_unsafe_real *__pyx_optional_args);
};
static struct __pyx_vtabstruct_9symengine_3lib_17symengine_wrapper_LLVMFloat *__pyx_vtabptr_9symengine_3lib_17symengine_wrapper_LLVMFloat;


/* "symengine/lib/symengine_wrapper.pyx":5302
 *             deref(self.lambda_visitor).call(&c_out[idx*self.tot_out_size], &c_inp[idx*self.args_size])
 * 
 * cdef class LLVMLongDouble(_LLVMLambdify):             # <<<<<<<<<<<<<<
 *     def __cinit__(self, args, *exprs, cppbool real=True, order='C', cppbool cse=False, cppbool _load=False, opt_level=3, dtype=None):
 *         self.opt_level = opt_level
*/

struct __pyx_vtabstruct_9symengine_3lib_17symengine_wrapper_LLVMLongDouble {
  struct __pyx_vtabstruct_9symengine_3lib_17symengine_wrapper__LLVMLambdify __pyx_base;
  PyObject *(*unsafe_real)(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMLongDouble *, __Pyx_memviewslice, __Pyx_memviewslice, int __pyx_skip_dispatch, struct __pyx_opt_args_9symengine_3lib_17symengine_wrapper_14LLVMLongDouble_unsafe_real *__pyx_optional_args);
};
static struct __pyx_vtabstruct_9symengine_3lib_17symengine_wrapper_LLVMLongDouble *__pyx_vtabptr_9symengine_3lib_17symengine_wrapper_LLVMLongDouble;


/* "View.MemoryView":118
 * 
 * 
 * @cython.collection_type("sequence")             # <<<<<<<<<<<<<<
 * @cname("__pyx_array")
 * cdef class array:
*/

struct __pyx_vtabstruct_array {
  PyObject *(*get_memview)(struct __pyx_array_obj *);
};
static struct __pyx_vtabstruct_array *__pyx_vtabptr_array;


/* "View.MemoryView":342
 * 
 * 
 * @cname('__pyx_memoryview')             # <<<<<<<<<<<<<<
 * cdef class memoryview:
 * 
*/

struct __pyx_vtabstruct_memoryview {
  char *(*get_item_pointer)(struct __pyx_memoryview_obj *, PyObject *);
  PyObject *(*is_slice)(struct __pyx_memoryview_obj *, PyObject *);
  PyObject *(*setitem_slice_assignment)(struct __pyx_memoryview_obj *, PyObject *, PyObject *);
  PyObject *(*setitem_slice_assign_scalar)(struct __pyx_memoryview_obj *, struct __pyx_memoryview_obj *, PyObject *);
  PyObject *(*setitem_indexed)(struct __pyx_memoryview_obj *, PyObject *, PyObject *);
  PyObject *(*convert_item_to_object)(struct __pyx_memoryview_obj *, char *);
  PyObject *(*assign_item_from_object)(struct __pyx_memoryview_obj *, char *, PyObject *);
  PyObject *(*_get_base)(struct __pyx_memoryview_obj *);
};
static struct __pyx_vtabstruct_memoryview *__pyx_vtabptr_memoryview;


/* "View.MemoryView":856
 * 
 * 
 * @cython.collection_type("sequence")             # <<<<<<<<<<<<<<
 * @cname('__pyx_memoryviewslice')
 * cdef class _memoryviewslice(memoryview):
*/

struct __pyx_vtabstruct__memoryviewslice {
  struct __pyx_vtabstruct_memoryview __pyx_base;
};
static struct __pyx_vtabstruct__memoryviewslice *__pyx_vtabptr__memoryviewslice;
/* #### Code section: utility_code_proto ### */

/* --- Runtime support code (head) --- */
/* Refnanny.proto */
#ifndef CYTHON_REFNANNY
  #define CYTHON_REFNANNY 0
#endif
#if CYTHON_REFNANNY
  typedef struct {
    void (*INCREF)(void*, PyObject*, Py_ssize_t);
    void (*DECREF)(void*, PyObject*, Py_ssize_t);
    void (*GOTREF)(void*, PyObject*, Py_ssize_t);
    void (*GIVEREF)(void*, PyObject*, Py_ssize_t);
    void* (*SetupContext)(const char*, Py_ssize_t, 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;
  #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__));\
          }
  #define __Pyx_RefNannyFinishContextNogil() {\
              PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
              __Pyx_RefNannyFinishContext();\
              PyGILState_Release(__pyx_gilstate_save);\
          }
  #define __Pyx_RefNannyFinishContextNogil() {\
              PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
              __Pyx_RefNannyFinishContext();\
              PyGILState_Release(__pyx_gilstate_save);\
          }
  #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); else {__Pyx_INCREF(r); }} while(0)
  #define __Pyx_XDECREF(r)  do { if((r) == NULL); else {__Pyx_DECREF(r); }} while(0)
  #define __Pyx_XGOTREF(r)  do { if((r) == NULL); else {__Pyx_GOTREF(r); }} while(0)
  #define __Pyx_XGIVEREF(r) do { if((r) == NULL); else {__Pyx_GIVEREF(r);}} while(0)
#else
  #define __Pyx_RefNannyDeclarations
  #define __Pyx_RefNannySetupContext(name, acquire_gil)
  #define __Pyx_RefNannyFinishContextNogil()
  #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_Py_XDECREF_SET(r, v) do {\
        PyObject *tmp = (PyObject *) r;\
        r = v; Py_XDECREF(tmp);\
    } while (0)
#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)

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

/* PyThreadStateGet.proto (used by PyErrFetchRestore) */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyThreadState_declare  PyThreadState *__pyx_tstate;
#define __Pyx_PyThreadState_assign  __pyx_tstate = __Pyx_PyThreadState_Current;
#if PY_VERSION_HEX >= 0x030C00A6
#define __Pyx_PyErr_Occurred()  (__pyx_tstate->current_exception != NULL)
#define __Pyx_PyErr_CurrentExceptionType()  (__pyx_tstate->current_exception ? (PyObject*) Py_TYPE(__pyx_tstate->current_exception) : (PyObject*) NULL)
#else
#define __Pyx_PyErr_Occurred()  (__pyx_tstate->curexc_type != NULL)
#define __Pyx_PyErr_CurrentExceptionType()  (__pyx_tstate->curexc_type)
#endif
#else
#define __Pyx_PyThreadState_declare
#define __Pyx_PyThreadState_assign
#define __Pyx_PyErr_Occurred()  (PyErr_Occurred() != NULL)
#define __Pyx_PyErr_CurrentExceptionType()  PyErr_Occurred()
#endif

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

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

/* PyObjectGetAttrStrNoError.proto (used by GetBuiltinName) */
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name);

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

/* TupleAndListFromArray.proto (used by fastcall) */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n);
#endif
#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_METH_FASTCALL
static CYTHON_INLINE PyObject* __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n);
#endif

/* IncludeStringH.proto (used by BytesEquals) */
#include <string.h>

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

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

/* fastcall.proto */
#if CYTHON_AVOID_BORROWED_REFS
    #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_PySequence_ITEM(args, i)
#elif CYTHON_ASSUME_SAFE_MACROS
    #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_NewRef(__Pyx_PyTuple_GET_ITEM(args, i))
#else
    #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_XNewRef(PyTuple_GetItem(args, i))
#endif
#define __Pyx_NumKwargs_VARARGS(kwds) PyDict_Size(kwds)
#define __Pyx_KwValues_VARARGS(args, nargs) NULL
#define __Pyx_GetKwValue_VARARGS(kw, kwvalues, s) __Pyx_PyDict_GetItemStrWithError(kw, s)
#define __Pyx_KwargsAsDict_VARARGS(kw, kwvalues) PyDict_Copy(kw)
#if CYTHON_METH_FASTCALL
    #define __Pyx_ArgRef_FASTCALL(args, i) __Pyx_NewRef(args[i])
    #define __Pyx_NumKwargs_FASTCALL(kwds) __Pyx_PyTuple_GET_SIZE(kwds)
    #define __Pyx_KwValues_FASTCALL(args, nargs) ((args) + (nargs))
    static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API
    CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues);
  #else
    #define __Pyx_KwargsAsDict_FASTCALL(kw, kwvalues) _PyStack_AsDict(kwvalues, kw)
  #endif
#else
    #define __Pyx_ArgRef_FASTCALL __Pyx_ArgRef_VARARGS
    #define __Pyx_NumKwargs_FASTCALL __Pyx_NumKwargs_VARARGS
    #define __Pyx_KwValues_FASTCALL __Pyx_KwValues_VARARGS
    #define __Pyx_GetKwValue_FASTCALL __Pyx_GetKwValue_VARARGS
    #define __Pyx_KwargsAsDict_FASTCALL __Pyx_KwargsAsDict_VARARGS
#endif
#define __Pyx_ArgsSlice_VARARGS(args, start, stop) PyTuple_GetSlice(args, start, stop)
#if CYTHON_METH_FASTCALL || (CYTHON_COMPILING_IN_CPYTHON && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) __Pyx_PyTuple_FromArray(args + start, stop - start)
#else
#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) PyTuple_GetSlice(args, start, stop)
#endif

/* py_dict_items.proto (used by OwnedDictNext) */
static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d);

/* CallCFunction.proto (used by CallUnboundCMethod0) */
#define __Pyx_CallCFunction(cfunc, self, args)\
    ((PyCFunction)(void(*)(void))(cfunc)->func)(self, args)
#define __Pyx_CallCFunctionWithKeywords(cfunc, self, args, kwargs)\
    ((PyCFunctionWithKeywords)(void(*)(void))(cfunc)->func)(self, args, kwargs)
#define __Pyx_CallCFunctionFast(cfunc, self, args, nargs)\
    ((__Pyx_PyCFunctionFast)(void(*)(void))(PyCFunction)(cfunc)->func)(self, args, nargs)
#define __Pyx_CallCFunctionFastWithKeywords(cfunc, self, args, nargs, kwnames)\
    ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))(PyCFunction)(cfunc)->func)(self, args, nargs, kwnames)

/* PyObjectCall.proto (used by PyObjectFastCall) */
#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 (used by PyObjectFastCall) */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
#endif

/* PyObjectFastCall.proto (used by PyObjectCallOneArg) */
#define __Pyx_PyObject_FastCall(func, args, nargs)  __Pyx_PyObject_FastCallDict(func, args, (size_t)(nargs), NULL)
static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs);

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

/* UnpackUnboundCMethod.proto (used by CallUnboundCMethod0) */
typedef struct {
    PyObject *type;
    PyObject **method_name;
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && CYTHON_ATOMICS
    __pyx_atomic_int_type initialized;
#endif
    PyCFunction func;
    PyObject *method;
    int flag;
} __Pyx_CachedCFunction;
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
static CYTHON_INLINE int __Pyx_CachedCFunction_GetAndSetInitializing(__Pyx_CachedCFunction *cfunc) {
#if !CYTHON_ATOMICS
    return 1;
#else
    __pyx_nonatomic_int_type expected = 0;
    if (__pyx_atomic_int_cmp_exchange(&cfunc->initialized, &expected, 1)) {
        return 0;
    }
    return expected;
#endif
}
static CYTHON_INLINE void __Pyx_CachedCFunction_SetFinishedInitializing(__Pyx_CachedCFunction *cfunc) {
#if CYTHON_ATOMICS
    __pyx_atomic_store(&cfunc->initialized, 2);
#endif
}
#else
#define __Pyx_CachedCFunction_GetAndSetInitializing(cfunc) 2
#define __Pyx_CachedCFunction_SetFinishedInitializing(cfunc)
#endif

/* CallUnboundCMethod0.proto */
CYTHON_UNUSED
static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self);
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self);
#else
#define __Pyx_CallUnboundCMethod0(cfunc, self)  __Pyx__CallUnboundCMethod0(cfunc, self)
#endif

/* py_dict_values.proto (used by OwnedDictNext) */
static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d);

/* OwnedDictNext.proto (used by ParseKeywordsImpl) */
#if CYTHON_AVOID_BORROWED_REFS
static int __Pyx_PyDict_NextRef(PyObject *p, PyObject **ppos, PyObject **pkey, PyObject **pvalue);
#else
CYTHON_INLINE
static int __Pyx_PyDict_NextRef(PyObject *p, Py_ssize_t *ppos, PyObject **pkey, PyObject **pvalue);
#endif

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

/* ParseKeywordsImpl.export */
static int __Pyx_ParseKeywordsTuple(
    PyObject *kwds,
    PyObject * const *kwvalues,
    PyObject ** const argnames[],
    PyObject *kwds2,
    PyObject *values[],
    Py_ssize_t num_pos_args,
    Py_ssize_t num_kwargs,
    const char* function_name,
    int ignore_unknown_kwargs
);
static int __Pyx_ParseKeywordDictToDict(
    PyObject *kwds,
    PyObject ** const argnames[],
    PyObject *kwds2,
    PyObject *values[],
    Py_ssize_t num_pos_args,
    const char* function_name
);
static int __Pyx_ParseKeywordDict(
    PyObject *kwds,
    PyObject ** const argnames[],
    PyObject *values[],
    Py_ssize_t num_pos_args,
    Py_ssize_t num_kwargs,
    const char* function_name,
    int ignore_unknown_kwargs
);

/* CallUnboundCMethod2.proto */
CYTHON_UNUSED
static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2);
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2);
#else
#define __Pyx_CallUnboundCMethod2(cfunc, self, arg1, arg2)  __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2)
#endif

/* ParseKeywords.proto */
static CYTHON_INLINE int __Pyx_ParseKeywords(
    PyObject *kwds, PyObject *const *kwvalues, PyObject ** const argnames[],
    PyObject *kwds2, PyObject *values[],
    Py_ssize_t num_pos_args, Py_ssize_t num_kwargs,
    const char* function_name,
    int ignore_unknown_kwargs
);

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

/* ArgTypeTestFunc.export */
static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact);

/* ArgTypeTest.proto */
#define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\
    ((likely(__Pyx_IS_TYPE(obj, type) | (none_allowed && (obj == Py_None)))) ? 1 :\
        __Pyx__ArgTypeTest(obj, type, name, exact))

/* PyValueError_Check.proto */
#define __Pyx_PyExc_ValueError_Check(obj)  __Pyx_TypeCheck(obj, PyExc_ValueError)

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

/* PyObjectFastCallMethod.proto */
#if CYTHON_VECTORCALL && PY_VERSION_HEX >= 0x03090000
#define __Pyx_PyObject_FastCallMethod(name, args, nargsf) PyObject_VectorcallMethod(name, args, nargsf, NULL)
#else
static PyObject *__Pyx_PyObject_FastCallMethod(PyObject *name, PyObject *const *args, size_t nargsf);
#endif

/* RaiseUnexpectedTypeError.proto */
static int __Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj);

/* PyMemoryError_Check.proto */
#define __Pyx_PyExc_MemoryError_Check(obj)  __Pyx_TypeCheck(obj, PyExc_MemoryError)

/* BuildPyUnicode.proto (used by COrdinalToPyUnicode) */
static PyObject* __Pyx_PyUnicode_BuildFromAscii(Py_ssize_t ulength, const char* chars, int clength,
                                                int prepend_sign, char padding_char);

/* COrdinalToPyUnicode.proto (used by CIntToPyUnicode) */
static CYTHON_INLINE int __Pyx_CheckUnicodeValue(int value);
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromOrdinal_Padded(int value, Py_ssize_t width, char padding_char);

/* GCCDiagnostics.proto (used by CIntToPyUnicode) */
#if !defined(__INTEL_COMPILER) && defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
#define __Pyx_HAS_GCC_DIAGNOSTIC
#endif

/* IncludeStdlibH.proto (used by CIntToPyUnicode) */
#include <stdlib.h>

/* CIntToPyUnicode.proto */
#define __Pyx_PyUnicode_From_int(value, width, padding_char, format_char) (\
    ((format_char) == ('c')) ?\
        __Pyx_uchar___Pyx_PyUnicode_From_int(value, width, padding_char) :\
        __Pyx____Pyx_PyUnicode_From_int(value, width, padding_char, format_char)\
    )
static CYTHON_INLINE PyObject* __Pyx_uchar___Pyx_PyUnicode_From_int(int value, Py_ssize_t width, char padding_char);
static CYTHON_INLINE PyObject* __Pyx____Pyx_PyUnicode_From_int(int value, Py_ssize_t width, char padding_char, char format_char);

/* CIntToPyUnicode.proto */
#define __Pyx_PyUnicode_From_Py_ssize_t(value, width, padding_char, format_char) (\
    ((format_char) == ('c')) ?\
        __Pyx_uchar___Pyx_PyUnicode_From_Py_ssize_t(value, width, padding_char) :\
        __Pyx____Pyx_PyUnicode_From_Py_ssize_t(value, width, padding_char, format_char)\
    )
static CYTHON_INLINE PyObject* __Pyx_uchar___Pyx_PyUnicode_From_Py_ssize_t(Py_ssize_t value, Py_ssize_t width, char padding_char);
static CYTHON_INLINE PyObject* __Pyx____Pyx_PyUnicode_From_Py_ssize_t(Py_ssize_t value, Py_ssize_t width, char padding_char, char format_char);

/* JoinPyUnicode.export */
static PyObject* __Pyx_PyUnicode_Join(PyObject** values, Py_ssize_t value_count, Py_ssize_t result_ulength,
                                      Py_UCS4 max_char);

/* PyObjectFormatSimple.proto */
#if CYTHON_COMPILING_IN_PYPY
    #define __Pyx_PyObject_FormatSimple(s, f) (\
        likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
        PyObject_Format(s, f))
#elif CYTHON_USE_TYPE_SLOTS
    #define __Pyx_PyObject_FormatSimple(s, f) (\
        likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
        likely(PyLong_CheckExact(s)) ? PyLong_Type.tp_repr(s) :\
        likely(PyFloat_CheckExact(s)) ? PyFloat_Type.tp_repr(s) :\
        PyObject_Format(s, f))
#else
    #define __Pyx_PyObject_FormatSimple(s, f) (\
        likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
        PyObject_Format(s, f))
#endif

CYTHON_UNUSED static int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *); /*proto*/
/* GetAttr.proto */
static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *);

/* GetItemInt.proto */
#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil, unsafe_shared)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck, unsafe_shared) :\
    (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, has_gil, unsafe_shared)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck, unsafe_shared) :\
    (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, int unsafe_shared);
#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil, unsafe_shared)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck, unsafe_shared) :\
    (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, int unsafe_shared);
static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
                                                     int is_list, int wraparound, int boundscheck, int unsafe_shared);

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

/* RejectKeywords.export */
static void __Pyx_RejectKeywords(const char* function_name, PyObject *kwds);

/* PyTypeError_Check.proto */
#define __Pyx_PyExc_TypeError_Check(obj)  __Pyx_TypeCheck(obj, PyExc_TypeError)

/* DivInt[Py_ssize_t].proto */
static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t, Py_ssize_t, int b_is_constant);

/* UnaryNegOverflows.proto */
#define __Pyx_UNARY_NEG_WOULD_OVERFLOW(x)\
        (((x) < 0) & ((unsigned long)(x) == 0-(unsigned long)(x)))

/* GetAttr3.proto */
static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *);

/* PyDictVersioning.proto (used by GetModuleGlobalName) */
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
#define __PYX_DICT_VERSION_INIT  ((PY_UINT64_T) -1)
#define __PYX_GET_DICT_VERSION(dict)  (((PyDictObject*)(dict))->ma_version_tag)
#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\
    (version_var) = __PYX_GET_DICT_VERSION(dict);\
    (cache_var) = (value);
#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\
    static PY_UINT64_T __pyx_dict_version = 0;\
    static PyObject *__pyx_dict_cached_value = NULL;\
    if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
        (VAR) = __Pyx_XNewRef(__pyx_dict_cached_value);\
    } else {\
        (VAR) = __pyx_dict_cached_value = (LOOKUP);\
        __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
    }\
}
static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj);
static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj);
static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version);
#else
#define __PYX_GET_DICT_VERSION(dict)  (0)
#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)
#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP)  (VAR) = (LOOKUP);
#endif

/* GetModuleGlobalName.proto */
#if CYTHON_USE_DICT_VERSIONS
#define __Pyx_GetModuleGlobalName(var, name)  do {\
    static PY_UINT64_T __pyx_dict_version = 0;\
    static PyObject *__pyx_dict_cached_value = NULL;\
    (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_mstate_global->__pyx_d))) ?\
        (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\
        __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
} while(0)
#define __Pyx_GetModuleGlobalNameUncached(var, name)  do {\
    PY_UINT64_T __pyx_dict_version;\
    PyObject *__pyx_dict_cached_value;\
    (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
} while(0)
static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value);
#else
#define __Pyx_GetModuleGlobalName(var, name)  (var) = __Pyx__GetModuleGlobalName(name)
#define __Pyx_GetModuleGlobalNameUncached(var, name)  (var) = __Pyx__GetModuleGlobalName(name)
static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name);
#endif

/* AssertionsEnabled.proto */
#if CYTHON_COMPILING_IN_LIMITED_API  ||  PY_VERSION_HEX >= 0x030C0000
  static int __pyx_assertions_enabled_flag;
  #define __pyx_assertions_enabled() (__pyx_assertions_enabled_flag)
  #if __clang__ || __GNUC__
  __attribute__((no_sanitize("thread")))
  #endif
  static int __Pyx_init_assertions_enabled(void) {
    PyObject *builtins, *debug, *debug_str;
    int flag;
    builtins = PyEval_GetBuiltins();
    if (!builtins) goto bad;
    debug_str = PyUnicode_FromStringAndSize("__debug__", 9);
    if (!debug_str) goto bad;
    debug = PyObject_GetItem(builtins, debug_str);
    Py_DECREF(debug_str);
    if (!debug) goto bad;
    flag = PyObject_IsTrue(debug);
    Py_DECREF(debug);
    if (flag == -1) goto bad;
    __pyx_assertions_enabled_flag = flag;
    return 0;
  bad:
    __pyx_assertions_enabled_flag = 1;
    return -1;
  }
#else
  #define __Pyx_init_assertions_enabled()  (0)
  #define __pyx_assertions_enabled()  (!Py_OptimizeFlag)
#endif

/* PyAssertionError_Check.proto */
#define __Pyx_PyExc_AssertionError_Check(obj)  __Pyx_TypeCheck(obj, PyExc_AssertionError)

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

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

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

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

/* GetTopmostException.proto (used by SaveResetException) */
#if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE
static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
#endif

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

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

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

/* HasAttr.proto (used by ImportImpl) */
#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
#define __Pyx_HasAttr(o, n)  PyObject_HasAttrWithError(o, n)
#else
static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *);
#endif

/* ImportImpl.export */
static PyObject *__Pyx__Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, PyObject *moddict, int level);

/* Import.proto */
static CYTHON_INLINE PyObject *__Pyx_Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, int level);

/* FastTypeChecks.proto */
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
#define __Pyx_TypeCheck2(obj, type1, type2) __Pyx_IsAnySubtype2(Py_TYPE(obj), (PyTypeObject *)type1, (PyTypeObject *)type2)
static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b);
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
#else
#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
#define __Pyx_TypeCheck2(obj, type1, type2) (PyObject_TypeCheck(obj, (PyTypeObject *)type1) || PyObject_TypeCheck(obj, (PyTypeObject *)type2))
#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2) {
    return PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2);
}
#endif
#define __Pyx_PyErr_ExceptionMatches2(err1, err2)  __Pyx_PyErr_GivenExceptionMatches2(__Pyx_PyErr_CurrentExceptionType(), err1, err2)
#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
#ifdef PyExceptionInstance_Check
  #define __Pyx_PyBaseException_Check(obj) PyExceptionInstance_Check(obj)
#else
  #define __Pyx_PyBaseException_Check(obj) __Pyx_TypeCheck(obj, PyExc_BaseException)
#endif

CYTHON_UNUSED static int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
/* ListCompAppend.proto */
#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) {
    PyListObject* L = (PyListObject*) list;
    Py_ssize_t len = Py_SIZE(list);
    if (likely(L->allocated > len)) {
        Py_INCREF(x);
        #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000
        L->ob_item[len] = x;
        #else
        PyList_SET_ITEM(list, len, x);
        #endif
        __Pyx_SET_SIZE(list, len + 1);
        return 0;
    }
    return PyList_Append(list, x);
}
#else
#define __Pyx_ListComp_Append(L,x) PyList_Append(L,x)
#endif

/* PySequenceMultiply.proto */
#define __Pyx_PySequence_Multiply_Left(mul, seq)  __Pyx_PySequence_Multiply(seq, mul)
#if !CYTHON_USE_TYPE_SLOTS
#define  __Pyx_PySequence_Multiply PySequence_Repeat
#else
static CYTHON_INLINE PyObject* __Pyx_PySequence_Multiply(PyObject *seq, Py_ssize_t mul);
#endif

/* PyObjectFormatAndDecref.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatSimpleAndDecref(PyObject* s, PyObject* f);
static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatAndDecref(PyObject* s, PyObject* f);

/* PyObjectFormat.proto */
#if CYTHON_USE_UNICODE_WRITER
static PyObject* __Pyx_PyObject_Format(PyObject* s, PyObject* f);
#else
#define __Pyx_PyObject_Format(s, f) PyObject_Format(s, f)
#endif

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

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

/* PyIndexError_Check.proto */
#define __Pyx_PyExc_IndexError_Check(obj)  __Pyx_TypeCheck(obj, PyExc_IndexError)

/* DivInt[long].proto */
static CYTHON_INLINE long __Pyx_div_long(long, long, int b_is_constant);

/* MoveIfSupported.proto */
#if CYTHON_USE_CPP_STD_MOVE
  #include <utility>
  #define __PYX_STD_MOVE_IF_SUPPORTED(x) std::move(x)
#else
  #define __PYX_STD_MOVE_IF_SUPPORTED(x) x
#endif

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

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

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

/* PyObject_Unicode.proto */
#define __Pyx_PyObject_Unicode(obj)\
    (likely(PyUnicode_CheckExact(obj)) ? __Pyx_NewRef(obj) : PyObject_Str(obj))

/* pybytes_as_double.proto (used by pynumber_float) */
static double __Pyx_SlowPyString_AsDouble(PyObject *obj);
static double __Pyx__PyBytes_AsDouble(PyObject *obj, const char* start, Py_ssize_t length);
static CYTHON_INLINE double __Pyx_PyBytes_AsDouble(PyObject *obj) {
    char* as_c_string;
    Py_ssize_t size;
#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE
    as_c_string = PyBytes_AS_STRING(obj);
    size = PyBytes_GET_SIZE(obj);
#else
    if (PyBytes_AsStringAndSize(obj, &as_c_string, &size) < 0) {
        return (double)-1;
    }
#endif
    return __Pyx__PyBytes_AsDouble(obj, as_c_string, size);
}
static CYTHON_INLINE double __Pyx_PyByteArray_AsDouble(PyObject *obj) {
    char* as_c_string;
    Py_ssize_t size;
#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE
    as_c_string = PyByteArray_AS_STRING(obj);
    size = PyByteArray_GET_SIZE(obj);
#else
    as_c_string = PyByteArray_AsString(obj);
    if (as_c_string == NULL) {
        return (double)-1;
    }
    size = PyByteArray_Size(obj);
#endif
    return __Pyx__PyBytes_AsDouble(obj, as_c_string, size);
}

/* pyunicode_as_double.proto (used by pynumber_float) */
#if !CYTHON_COMPILING_IN_PYPY && CYTHON_ASSUME_SAFE_MACROS
static const char* __Pyx__PyUnicode_AsDouble_Copy(const void* data, const int kind, char* buffer, Py_ssize_t start, Py_ssize_t end) {
    int last_was_punctuation;
    Py_ssize_t i;
    last_was_punctuation = 1;
    for (i=start; i <= end; i++) {
        Py_UCS4 chr = PyUnicode_READ(kind, data, i);
        int is_punctuation = (chr == '_') | (chr == '.');
        *buffer = (char)chr;
        buffer += (chr != '_');
        if (unlikely(chr > 127)) goto parse_failure;
        if (unlikely(last_was_punctuation & is_punctuation)) goto parse_failure;
        last_was_punctuation = is_punctuation;
    }
    if (unlikely(last_was_punctuation)) goto parse_failure;
    *buffer = '\0';
    return buffer;
parse_failure:
    return NULL;
}
static double __Pyx__PyUnicode_AsDouble_inf_nan(const void* data, int kind, Py_ssize_t start, Py_ssize_t length) {
    int matches = 1;
    Py_UCS4 chr;
    Py_UCS4 sign = PyUnicode_READ(kind, data, start);
    int is_signed = (sign == '-') | (sign == '+');
    start += is_signed;
    length -= is_signed;
    switch (PyUnicode_READ(kind, data, start)) {
        #ifdef Py_NAN
        case 'n':
        case 'N':
            if (unlikely(length != 3)) goto parse_failure;
            chr = PyUnicode_READ(kind, data, start+1);
            matches &= (chr == 'a') | (chr == 'A');
            chr = PyUnicode_READ(kind, data, start+2);
            matches &= (chr == 'n') | (chr == 'N');
            if (unlikely(!matches)) goto parse_failure;
            return (sign == '-') ? -Py_NAN : Py_NAN;
        #endif
        case 'i':
        case 'I':
            if (unlikely(length < 3)) goto parse_failure;
            chr = PyUnicode_READ(kind, data, start+1);
            matches &= (chr == 'n') | (chr == 'N');
            chr = PyUnicode_READ(kind, data, start+2);
            matches &= (chr == 'f') | (chr == 'F');
            if (likely(length == 3 && matches))
                return (sign == '-') ? -Py_HUGE_VAL : Py_HUGE_VAL;
            if (unlikely(length != 8)) goto parse_failure;
            chr = PyUnicode_READ(kind, data, start+3);
            matches &= (chr == 'i') | (chr == 'I');
            chr = PyUnicode_READ(kind, data, start+4);
            matches &= (chr == 'n') | (chr == 'N');
            chr = PyUnicode_READ(kind, data, start+5);
            matches &= (chr == 'i') | (chr == 'I');
            chr = PyUnicode_READ(kind, data, start+6);
            matches &= (chr == 't') | (chr == 'T');
            chr = PyUnicode_READ(kind, data, start+7);
            matches &= (chr == 'y') | (chr == 'Y');
            if (unlikely(!matches)) goto parse_failure;
            return (sign == '-') ? -Py_HUGE_VAL : Py_HUGE_VAL;
        case '.': case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9':
            break;
        default:
            goto parse_failure;
    }
    return 0.0;
parse_failure:
    return -1.0;
}
static double __Pyx_PyUnicode_AsDouble_WithSpaces(PyObject *obj) {
    double value;
    const char *last;
    char *end;
    Py_ssize_t start, length = PyUnicode_GET_LENGTH(obj);
    const int kind = PyUnicode_KIND(obj);
    const void* data = PyUnicode_DATA(obj);
    start = 0;
    while (Py_UNICODE_ISSPACE(PyUnicode_READ(kind, data, start)))
        start++;
    while (start < length - 1 && Py_UNICODE_ISSPACE(PyUnicode_READ(kind, data, length - 1)))
        length--;
    length -= start;
    if (unlikely(length <= 0)) goto fallback;
    value = __Pyx__PyUnicode_AsDouble_inf_nan(data, kind, start, length);
    if (unlikely(value == -1.0)) goto fallback;
    if (value != 0.0) return value;
    if (length < 40) {
        char number[40];
        last = __Pyx__PyUnicode_AsDouble_Copy(data, kind, number, start, start + length);
        if (unlikely(!last)) goto fallback;
        value = PyOS_string_to_double(number, &end, NULL);
    } else {
        char *number = (char*) PyMem_Malloc((length + 1) * sizeof(char));
        if (unlikely(!number)) goto fallback;
        last = __Pyx__PyUnicode_AsDouble_Copy(data, kind, number, start, start + length);
        if (unlikely(!last)) {
            PyMem_Free(number);
            goto fallback;
        }
        value = PyOS_string_to_double(number, &end, NULL);
        PyMem_Free(number);
    }
    if (likely(end == last) || (value == (double)-1 && PyErr_Occurred())) {
        return value;
    }
fallback:
    return __Pyx_SlowPyString_AsDouble(obj);
}
#endif
static CYTHON_INLINE double __Pyx_PyUnicode_AsDouble(PyObject *obj) {
#if !CYTHON_COMPILING_IN_PYPY && CYTHON_ASSUME_SAFE_MACROS
    if (unlikely(__Pyx_PyUnicode_READY(obj) == -1))
        return (double)-1;
    if (likely(PyUnicode_IS_ASCII(obj))) {
        const char *s;
        Py_ssize_t length;
        s = PyUnicode_AsUTF8AndSize(obj, &length);
        return __Pyx__PyBytes_AsDouble(obj, s, length);
    }
    return __Pyx_PyUnicode_AsDouble_WithSpaces(obj);
#else
    return __Pyx_SlowPyString_AsDouble(obj);
#endif
}

/* pynumber_float.proto */
static CYTHON_INLINE PyObject* __Pyx__PyNumber_Float(PyObject* obj);
#define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : __Pyx__PyNumber_Float(x))

/* py_abs.proto */
#if CYTHON_USE_PYLONG_INTERNALS
static PyObject *__Pyx_PyLong_AbsNeg(PyObject *num);
#define __Pyx_PyNumber_Absolute(x)\
    ((likely(PyLong_CheckExact(x))) ?\
         (likely(__Pyx_PyLong_IsNonNeg(x)) ? __Pyx_NewRef(x) : __Pyx_PyLong_AbsNeg(x)) :\
         PyNumber_Absolute(x))
#else
#define __Pyx_PyNumber_Absolute(x)  PyNumber_Absolute(x)
#endif

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

/* PyNotImplementedError_Check.proto */
#define __Pyx_PyExc_NotImplementedError_Check(obj)  __Pyx_TypeCheck(obj, PyExc_NotImplementedError)

/* PyImportError_Check.proto */
#define __Pyx_PyExc_ImportError_Check(obj)  __Pyx_TypeCheck(obj, PyExc_ImportError)

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

/* PyObjectCallNoArg.proto (used by PyObjectCallMethod0) */
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);

/* PyObjectGetMethod.proto (used by PyObjectCallMethod0) */
#if !(CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000)))
static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method);
#endif

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

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

/* UnpackTuple2.proto (used by dict_iter) */
static CYTHON_INLINE int __Pyx_unpack_tuple2(
    PyObject* tuple, PyObject** value1, PyObject** value2, int is_tuple, int has_known_size, int decref_tuple);
static CYTHON_INLINE int __Pyx_unpack_tuple2_exact(
    PyObject* tuple, PyObject** value1, PyObject** value2, int decref_tuple);
static int __Pyx_unpack_tuple2_generic(
    PyObject* tuple, PyObject** value1, PyObject** value2, int has_known_size, int decref_tuple);

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

/* PyKeyError_Check.proto */
#define __Pyx_PyExc_KeyError_Check(obj)  __Pyx_TypeCheck(obj, PyExc_KeyError)

/* UnicodeConcatInPlace.proto */
# if CYTHON_COMPILING_IN_CPYTHON
    #if CYTHON_REFNANNY
        #define __Pyx_PyUnicode_ConcatInPlace(left, right, unsafe_shared) __Pyx_PyUnicode_ConcatInPlaceImpl(&left, right, unsafe_shared, __pyx_refnanny)
    #else
        #define __Pyx_PyUnicode_ConcatInPlace(left, right, unsafe_shared) __Pyx_PyUnicode_ConcatInPlaceImpl(&left, right, unsafe_shared)
    #endif
    #define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_DefinitelyUniqueInPlace(left, right) __Pyx_PyUnicode_ConcatInPlace(left, right, __Pyx_ReferenceSharing_DefinitelyUnique)
    #define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(left, right) __Pyx_PyUnicode_ConcatInPlace(left, right, __Pyx_ReferenceSharing_OwnStrongReference)
    #define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_FunctionArgumentInPlace(left, right) __Pyx_PyUnicode_ConcatInPlace(left, right, __Pyx_ReferenceSharing_DefinitelyUnique)
    #define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_SharedReferenceInPlace(left, right) __Pyx_PyUnicode_ConcatInPlace(left, right, __Pyx_ReferenceSharing_SharedReference)
    static CYTHON_INLINE PyObject *__Pyx_PyUnicode_ConcatInPlaceImpl(PyObject **p_left, PyObject *right, int unsafe_shared
        #if CYTHON_REFNANNY
        , void* __pyx_refnanny
        #endif
    );
#else
#define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_DefinitelyUniqueInPlace __Pyx_PyUnicode_Concat
#define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace __Pyx_PyUnicode_Concat
#define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_FunctionArgumentInPlace __Pyx_PyUnicode_Concat
#define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_SharedReferenceInPlace __Pyx_PyUnicode_Concat
#endif
#define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_DefinitelyUniqueInPlaceSafe(left, right)\
    ((unlikely((left) == Py_None) || unlikely((right) == Py_None)) ?\
    PyNumber_InPlaceAdd(left, right) : __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_DefinitelyUniqueInPlace(left, right))
#define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlaceSafe(left, right)\
    ((unlikely((left) == Py_None) || unlikely((right) == Py_None)) ?\
    PyNumber_InPlaceAdd(left, right) : __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(left, right))
#define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_FunctionArgumentInPlaceSafe(left, right)\
    ((unlikely((left) == Py_None) || unlikely((right) == Py_None)) ?\
    PyNumber_InPlaceAdd(left, right) : __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_FunctionArgumentInPlace(left, right))
#define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_SharedReferenceInPlaceSafe(left, right)\
    ((unlikely((left) == Py_None) || unlikely((right) == Py_None)) ?\
    PyNumber_InPlaceAdd(left, right) : __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_SharedReferenceInPlace(left, right))

/* IncludeCppStringH.proto (used by decode_cpp_string) */
#include <string>

/* decode_c_string_utf16.proto (used by decode_c_bytes) */
static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16(const char *s, Py_ssize_t size, const char *errors) {
    int byteorder = 0;
    return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
}
static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16LE(const char *s, Py_ssize_t size, const char *errors) {
    int byteorder = -1;
    return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
}
static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16BE(const char *s, Py_ssize_t size, const char *errors) {
    int byteorder = 1;
    return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
}

/* decode_c_bytes.proto (used by decode_cpp_string) */
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_cpp_string.proto */
static CYTHON_INLINE PyObject* __Pyx_decode_cpp_string(
         std::string cppstring, 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(
        cppstring.data(), (Py_ssize_t) cppstring.size(), start, stop, encoding, errors, decode_func);
}

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

/* PyRuntimeError_Check.proto */
#define __Pyx_PyExc_RuntimeError_Check(obj)  __Pyx_TypeCheck(obj, PyExc_RuntimeError)

/* pop.proto */
static CYTHON_INLINE PyObject* __Pyx__PyObject_Pop(PyObject* L);
#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE
static CYTHON_INLINE PyObject* __Pyx_PyList_Pop(PyObject* L);
#define __Pyx_PyObject_Pop(L) (likely(PyList_CheckExact(L)) ?\
    __Pyx_PyList_Pop(L) : __Pyx__PyObject_Pop(L))
#else
#define __Pyx_PyList_Pop(L)  __Pyx__PyObject_Pop(L)
#define __Pyx_PyObject_Pop(L)  __Pyx__PyObject_Pop(L)
#endif

/* PyDeprecationWarning_Check.proto */
#define __Pyx_PyExc_DeprecationWarning_Check(obj)  __Pyx_TypeCheck(obj, PyExc_DeprecationWarning)

/* PyObjectCall2Args.proto (used by CallUnboundCMethod1) */
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2);

/* CallUnboundCMethod1.proto */
CYTHON_UNUSED
static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg);
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg);
#else
#define __Pyx_CallUnboundCMethod1(cfunc, self, arg)  __Pyx__CallUnboundCMethod1(cfunc, self, arg)
#endif

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

/* PyObjectVectorCallKwBuilder.proto (used by PyObjectVectorCallMethodKwBuilder) */
CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n);
#if CYTHON_VECTORCALL
#if PY_VERSION_HEX >= 0x03090000
#define __Pyx_Object_Vectorcall_CallFromBuilder PyObject_Vectorcall
#else
#define __Pyx_Object_Vectorcall_CallFromBuilder _PyObject_Vectorcall
#endif
#define __Pyx_MakeVectorcallBuilderKwds(n) PyTuple_New(n)
static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n);
static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n);
#else
#define __Pyx_Object_Vectorcall_CallFromBuilder __Pyx_PyObject_FastCallDict
#define __Pyx_MakeVectorcallBuilderKwds(n) __Pyx_PyDict_NewPresized(n)
#define __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n) PyDict_SetItem(builder, key, value)
#define __Pyx_VectorcallBuilder_AddArgStr(key, value, builder, args, n) PyDict_SetItemString(builder, key, value)
#endif

/* PyObjectVectorCallMethodKwBuilder.proto */
#if CYTHON_VECTORCALL && PY_VERSION_HEX >= 0x03090000
#define __Pyx_Object_VectorcallMethod_CallFromBuilder PyObject_VectorcallMethod
#else
static PyObject *__Pyx_Object_VectorcallMethod_CallFromBuilder(PyObject *name, PyObject *const *args, size_t nargsf, PyObject *kwnames);
#endif

/* PyLongCompare.proto */
static CYTHON_INLINE int __Pyx_PyLong_BoolNeObjC(PyObject *op1, PyObject *op2, long intval, long inplace);

/* py_dict_pop.proto */
static CYTHON_INLINE PyObject *__Pyx_PyDict_Pop(PyObject *d, PyObject *key, PyObject *default_value);

/* PyUnicode_Substring.proto */
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_Substring(
            PyObject* text, Py_ssize_t start, Py_ssize_t stop);

/* PyOverflowError_Check.proto */
#define __Pyx_PyExc_OverflowError_Check(obj)  __Pyx_TypeCheck(obj, PyExc_OverflowError)

/* PyNumber_Hex.proto */
#define __Pyx_PyNumber_Hex(obj) PyNumber_ToBase((obj), 16)

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

/* pyint_simplify.proto */
static CYTHON_INLINE int __Pyx_PyInt_FromNumber(PyObject **number_var, const char *argname, int accept_none);

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

/* PyLongCompare.proto */
static CYTHON_INLINE int __Pyx_PyLong_BoolEqObjC(PyObject *op1, PyObject *op2, long intval, long inplace);

/* SliceTupleAndList.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyList_GetSlice(PyObject* src, Py_ssize_t start, Py_ssize_t stop);
static CYTHON_INLINE PyObject* __Pyx_PyTuple_GetSlice(PyObject* src, Py_ssize_t start, Py_ssize_t stop);
#else
#define __Pyx_PyList_GetSlice(seq, start, stop)   PySequence_GetSlice(seq, start, stop)
#define __Pyx_PyTuple_GetSlice(seq, start, stop)  PySequence_GetSlice(seq, start, stop)
#endif

/* PyObjectDelAttr.proto (used by PyObjectSetAttrStr) */
#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000
#define __Pyx_PyObject_DelAttr(o, n) PyObject_SetAttr(o, n, NULL)
#else
#define __Pyx_PyObject_DelAttr(o, n) PyObject_DelAttr(o, n)
#endif

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

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

/* PyRange_Check.proto */
#if CYTHON_COMPILING_IN_PYPY && !defined(PyRange_Check)
  #define PyRange_Check(obj)  __Pyx_TypeCheck((obj), &PyRange_Type)
#endif

/* RaiseClosureNameError.proto */
static void __Pyx_RaiseClosureNameError(const char *varname);

/* dict_setdefault.proto (used by FetchCommonType) */
static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value);

/* LimitedApiGetTypeDict.proto (used by SetItemOnTypeDict) */
#if CYTHON_COMPILING_IN_LIMITED_API
static PyObject *__Pyx_GetTypeDict(PyTypeObject *tp);
#endif

/* SetItemOnTypeDict.proto (used by FixUpExtensionType) */
static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *v);
#define __Pyx_SetItemOnTypeDict(tp, k, v) __Pyx__SetItemOnTypeDict((PyTypeObject*)tp, k, v)

/* FixUpExtensionType.proto (used by FetchCommonType) */
static CYTHON_INLINE int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type);

/* AddModuleRef.proto (used by FetchSharedCythonModule) */
#if ((CYTHON_COMPILING_IN_CPYTHON_FREETHREADING ) ||\
     __PYX_LIMITED_VERSION_HEX < 0x030d0000)
  static PyObject *__Pyx_PyImport_AddModuleRef(const char *name);
#else
  #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name)
#endif

/* FetchSharedCythonModule.proto (used by FetchCommonType) */
static PyObject *__Pyx_FetchSharedCythonABIModule(void);

/* FetchCommonType.proto (used by CommonTypesMetaclass) */
static PyTypeObject* __Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases);

/* CommonTypesMetaclass.proto (used by CythonFunctionShared) */
static int __pyx_CommonTypesMetaclass_init(PyObject *module);
#define __Pyx_CommonTypesMetaclass_USED

/* CallTypeTraverse.proto (used by CythonFunctionShared) */
#if !CYTHON_USE_TYPE_SPECS || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x03090000)
#define __Pyx_call_type_traverse(o, always_call, visit, arg) 0
#else
static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visit, void *arg);
#endif

/* PyMethodNew.proto (used by CythonFunctionShared) */
static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ);

/* PyVectorcallFastCallDict.proto (used by CythonFunctionShared) */
#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL
static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw);
#endif

/* CythonFunctionShared.proto (used by CythonFunction) */
#define __Pyx_CyFunction_USED
#define __Pyx_CYFUNCTION_STATICMETHOD  0x01
#define __Pyx_CYFUNCTION_CLASSMETHOD   0x02
#define __Pyx_CYFUNCTION_CCLASS        0x04
#define __Pyx_CYFUNCTION_COROUTINE     0x08
#define __Pyx_CyFunction_GetClosure(f)\
    (((__pyx_CyFunctionObject *) (f))->func_closure)
#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
  #define __Pyx_CyFunction_GetClassObj(f)\
      (((__pyx_CyFunctionObject *) (f))->func_classobj)
#else
  #define __Pyx_CyFunction_GetClassObj(f)\
      ((PyObject*) ((PyCMethodObject *) (f))->mm_class)
#endif
#define __Pyx_CyFunction_SetClassObj(f, classobj)\
    __Pyx__CyFunction_SetClassObj((__pyx_CyFunctionObject *) (f), (classobj))
#define __Pyx_CyFunction_Defaults(type, f)\
    ((type *)(((__pyx_CyFunctionObject *) (f))->defaults))
#define __Pyx_CyFunction_SetDefaultsGetter(f, g)\
    ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g)
typedef struct {
#if CYTHON_COMPILING_IN_LIMITED_API
    PyObject_HEAD
    PyObject *func;
#elif PY_VERSION_HEX < 0x030900B1
    PyCFunctionObject func;
#else
    PyCMethodObject func;
#endif
#if CYTHON_COMPILING_IN_LIMITED_API && CYTHON_METH_FASTCALL
    __pyx_vectorcallfunc func_vectorcall;
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
    PyObject *func_weakreflist;
#endif
#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
    PyObject *func_dict;
#endif
    PyObject *func_name;
    PyObject *func_qualname;
    PyObject *func_doc;
    PyObject *func_globals;
    PyObject *func_code;
    PyObject *func_closure;
#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
    PyObject *func_classobj;
#endif
    PyObject *defaults;
    int flags;
    PyObject *defaults_tuple;
    PyObject *defaults_kwdict;
    PyObject *(*defaults_getter)(PyObject *);
    PyObject *func_annotations;
    PyObject *func_is_coroutine;
} __pyx_CyFunctionObject;
#undef __Pyx_CyOrPyCFunction_Check
#define __Pyx_CyFunction_Check(obj)  __Pyx_TypeCheck(obj, __pyx_mstate_global->__pyx_CyFunctionType)
#define __Pyx_CyOrPyCFunction_Check(obj)  __Pyx_TypeCheck2(obj, __pyx_mstate_global->__pyx_CyFunctionType, &PyCFunction_Type)
#define __Pyx_CyFunction_CheckExact(obj)  __Pyx_IS_TYPE(obj, __pyx_mstate_global->__pyx_CyFunctionType)
static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void));
#undef __Pyx_IsSameCFunction
#define __Pyx_IsSameCFunction(func, cfunc)   __Pyx__IsSameCyOrCFunction(func, cfunc)
static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml,
                                      int flags, PyObject* qualname,
                                      PyObject *closure,
                                      PyObject *module, PyObject *globals,
                                      PyObject* code);
static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj);
static CYTHON_INLINE PyObject *__Pyx_CyFunction_InitDefaults(PyObject *func,
                                                         PyTypeObject *defaults_type);
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m,
                                                            PyObject *tuple);
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m,
                                                             PyObject *dict);
static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m,
                                                              PyObject *dict);
static int __pyx_CyFunction_init(PyObject *module);
#if CYTHON_METH_FASTCALL
static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
#if CYTHON_COMPILING_IN_LIMITED_API
#define __Pyx_CyFunction_func_vectorcall(f) (((__pyx_CyFunctionObject*)f)->func_vectorcall)
#else
#define __Pyx_CyFunction_func_vectorcall(f) (((PyCFunctionObject*)f)->vectorcall)
#endif
#endif

/* CythonFunction.proto */
static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml,
                                      int flags, PyObject* qualname,
                                      PyObject *closure,
                                      PyObject *module, PyObject *globals,
                                      PyObject* code);

/* BufferIndexError.proto */
static void __Pyx_RaiseBufferIndexError(int axis);

/* PyStopIteration_Check.proto */
#define __Pyx_PyExc_StopIteration_Check(obj)  __Pyx_TypeCheck(obj, PyExc_StopIteration)

/* PyZeroDivisionError_Check.proto */
#define __Pyx_PyExc_ZeroDivisionError_Check(obj)  __Pyx_TypeCheck(obj, PyExc_ZeroDivisionError)

/* PyArithmeticError_Check.proto */
#define __Pyx_PyExc_ArithmeticError_Check(obj)  __Pyx_TypeCheck(obj, PyExc_ArithmeticError)

/* PyDictContains.proto */
static CYTHON_INLINE int __Pyx_PyDict_ContainsTF(PyObject* item, PyObject* dict, int eq) {
    int result = PyDict_Contains(dict, item);
    return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
}

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

/* pep479.proto */
static void __Pyx_Generator_Replace_StopIteration(int in_async_gen);

/* CIntToPyUnicode.proto */
#define __Pyx_PyUnicode_From_size_t(value, width, padding_char, format_char) (\
    ((format_char) == ('c')) ?\
        __Pyx_uchar___Pyx_PyUnicode_From_size_t(value, width, padding_char) :\
        __Pyx____Pyx_PyUnicode_From_size_t(value, width, padding_char, format_char)\
    )
static CYTHON_INLINE PyObject* __Pyx_uchar___Pyx_PyUnicode_From_size_t(size_t value, Py_ssize_t width, char padding_char);
static CYTHON_INLINE PyObject* __Pyx____Pyx_PyUnicode_From_size_t(size_t value, Py_ssize_t width, char padding_char, char format_char);

/* Py3UpdateBases.proto */
static PyObject* __Pyx_PEP560_update_bases(PyObject *bases);

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

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

/* SetNewInClass.proto */
static int __Pyx_SetNewInClass(PyObject *ns, PyObject *name, PyObject *value);

/* PyObjectLookupSpecial.proto (used by Py3ClassCreate) */
#if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
#define __Pyx_PyObject_LookupSpecialNoError(obj, attr_name)  __Pyx__PyObject_LookupSpecial(obj, attr_name, 0)
#define __Pyx_PyObject_LookupSpecial(obj, attr_name)  __Pyx__PyObject_LookupSpecial(obj, attr_name, 1)
static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error);
#else
#define __Pyx_PyObject_LookupSpecialNoError(o,n) __Pyx_PyObject_GetAttrStrNoError(o,n)
#define __Pyx_PyObject_LookupSpecial(o,n) __Pyx_PyObject_GetAttrStr(o,n)
#endif

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

/* MergeKeywords.proto */
static int __Pyx_MergeKeywords(PyObject *kwdict, PyObject *source_mapping);

/* AllocateExtensionType.proto */
static PyObject *__Pyx_AllocateExtensionType(PyTypeObject *t, int is_final);

/* DefaultPlacementNew.proto */
#include <new>
template<typename T>
void __Pyx_default_placement_construct(T* x) {
    new (static_cast<void*>(x)) T();
}

/* CheckTypeForFreelists.proto */
#if CYTHON_USE_FREELISTS
#if CYTHON_USE_TYPE_SPECS
#define __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, expected_tp, expected_size) ((int) ((t) == (expected_tp)))
#define __PYX_CHECK_TYPE_FOR_FREELIST_FLAGS  Py_TPFLAGS_IS_ABSTRACT
#else
#define __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, expected_tp, expected_size) ((int) ((t)->tp_basicsize == (expected_size)))
#define __PYX_CHECK_TYPE_FOR_FREELIST_FLAGS  (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)
#endif
#define __PYX_CHECK_TYPE_FOR_FREELISTS(t, expected_tp, expected_size)\
    (__PYX_CHECK_FINAL_TYPE_FOR_FREELISTS((t), (expected_tp), (expected_size)) &\
     (int) (!__Pyx_PyType_HasFeature((t), __PYX_CHECK_TYPE_FOR_FREELIST_FLAGS)))
#endif

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

/* GetApiDict.proto */
static PyObject *__Pyx_ApiExport_GetApiDict(void);

/* ValidateBasesTuple.proto (used by PyType_Ready) */
#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS
static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases);
#endif

/* PyType_Ready.proto */
CYTHON_UNUSED static int __Pyx_PyType_Ready(PyTypeObject *t);

/* DelItemOnTypeDict.proto (used by SetupReduce) */
static int __Pyx__DelItemOnTypeDict(PyTypeObject *tp, PyObject *k);
#define __Pyx_DelItemOnTypeDict(tp, k) __Pyx__DelItemOnTypeDict((PyTypeObject*)tp, k)

/* SetupReduce.proto */
static int __Pyx_setup_reduce(PyObject* type_obj);

/* SetVTable.proto */
static int __Pyx_SetVtable(PyTypeObject* typeptr , void* vtable);

/* GetVTable.proto (used by MergeVTables) */
static void* __Pyx_GetVtable(PyTypeObject *type);

/* MergeVTables.proto */
static int __Pyx_MergeVtables(PyTypeObject *type);

/* TypeImport.proto */
#ifndef __PYX_HAVE_RT_ImportType_proto_3_2_5
#define __PYX_HAVE_RT_ImportType_proto_3_2_5
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
#include <stdalign.h>
#endif
#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || __cplusplus >= 201103L
#define __PYX_GET_STRUCT_ALIGNMENT_3_2_5(s) alignof(s)
#else
#define __PYX_GET_STRUCT_ALIGNMENT_3_2_5(s) sizeof(void*)
#endif
enum __Pyx_ImportType_CheckSize_3_2_5 {
   __Pyx_ImportType_CheckSize_Error_3_2_5 = 0,
   __Pyx_ImportType_CheckSize_Warn_3_2_5 = 1,
   __Pyx_ImportType_CheckSize_Ignore_3_2_5 = 2
};
static PyTypeObject *__Pyx_ImportType_3_2_5(PyObject* module, const char *module_name, const char *class_name, size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_2_5 check_size);
#endif

/* GetNameInClass.proto */
#define __Pyx_GetNameInClass(var, nmspace, name)  (var) = __Pyx__GetNameInClass(nmspace, name)
static PyObject *__Pyx__GetNameInClass(PyObject *nmspace, PyObject *name);

/* ListPack.proto */
static PyObject *__Pyx_PyList_Pack(Py_ssize_t n, ...);

/* ClassMethod.proto */
#if !CYTHON_COMPILING_IN_LIMITED_API
#include "descrobject.h"
#endif
CYTHON_UNUSED static PyObject* __Pyx_Method_ClassMethod(PyObject *method);

/* CLineInTraceback.proto (used by AddTraceback) */
#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME
static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
#else
#define __Pyx_CLineForTraceback(tstate, c_line)  (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
#endif

/* CodeObjectCache.proto (used by AddTraceback) */
#if CYTHON_COMPILING_IN_LIMITED_API
typedef PyObject __Pyx_CachedCodeObjectType;
#else
typedef PyCodeObject __Pyx_CachedCodeObjectType;
#endif
typedef struct {
    __Pyx_CachedCodeObjectType* code_object;
    int code_line;
} __Pyx_CodeObjectCacheEntry;
struct __Pyx_CodeObjectCache {
    int count;
    int max_count;
    __Pyx_CodeObjectCacheEntry* entries;
  #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    __pyx_atomic_int_type accessor_count;
  #endif
};
static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line);
static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object);

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

/* BufferStructDeclare.proto */
typedef struct {
  Py_ssize_t shape, strides, suboffsets;
} __Pyx_Buf_DimInfo;
typedef struct {
  size_t refcount;
  Py_buffer pybuffer;
} __Pyx_Buffer;
typedef struct {
  __Pyx_Buffer *rcbuffer;
  char *data;
  __Pyx_Buf_DimInfo diminfo[8];
} __Pyx_LocalBuf_ND;

/* MemviewRefcount.proto */
static CYTHON_INLINE int __pyx_add_acquisition_count_locked(
    __pyx_atomic_int_type *acquisition_count, PyThread_type_lock lock);
static CYTHON_INLINE int __pyx_sub_acquisition_count_locked(
    __pyx_atomic_int_type *acquisition_count, PyThread_type_lock lock);
#define __pyx_get_slice_count_pointer(memview) (&memview->acquisition_count)
#define __PYX_INC_MEMVIEW(slice, have_gil) __Pyx_INC_MEMVIEW(slice, have_gil, __LINE__)
#define __PYX_XCLEAR_MEMVIEW(slice, have_gil) __Pyx_XCLEAR_MEMVIEW(slice, have_gil, __LINE__)
static CYTHON_INLINE void __Pyx_INC_MEMVIEW(__Pyx_memviewslice *, int, int);
static CYTHON_INLINE void __Pyx_XCLEAR_MEMVIEW(__Pyx_memviewslice *, int, int);

/* MemviewSliceIsContig.proto */
static int __pyx_memviewslice_is_contig(const __Pyx_memviewslice mvs, char order, int ndim);

/* OverlappingSlices.proto */
static int __pyx_slices_overlap(__Pyx_memviewslice *slice1,
                                __Pyx_memviewslice *slice2,
                                int ndim, size_t itemsize);

/* MemviewSliceInit.proto */
static int __Pyx_init_memviewslice(
                struct __pyx_memoryview_obj *memview,
                int ndim,
                __Pyx_memviewslice *memviewslice,
                int memview_is_new_reference);

/* SliceMemoryviewSlice.proto */
static CYTHON_INLINE int __pyx_memoryview_slice_memviewslice(
        __Pyx_memviewslice *dst,
        Py_ssize_t shape, Py_ssize_t stride, Py_ssize_t suboffset,
        int dim, int new_ndim, int *suboffset_dim,
        Py_ssize_t start, Py_ssize_t stop, Py_ssize_t step,
        int have_start, int have_stop, int have_step,
        int is_slice);

/* RealImag.proto */
#if CYTHON_CCOMPLEX
  #ifdef __cplusplus
    #define __Pyx_CREAL(z) ((z).real())
    #define __Pyx_CIMAG(z) ((z).imag())
  #else
    #define __Pyx_CREAL(z) (__real__(z))
    #define __Pyx_CIMAG(z) (__imag__(z))
  #endif
#else
    #define __Pyx_CREAL(z) ((z).real)
    #define __Pyx_CIMAG(z) ((z).imag)
#endif
#if defined(__cplusplus) && CYTHON_CCOMPLEX\
        && (defined(_WIN32) || defined(__clang__) || (defined(__GNUC__) && (__GNUC__ >= 5 || __GNUC__ == 4 && __GNUC_MINOR__ >= 4 )) || __cplusplus >= 201103)
    #define __Pyx_SET_CREAL(z,x) ((z).real(x))
    #define __Pyx_SET_CIMAG(z,y) ((z).imag(y))
#else
    #define __Pyx_SET_CREAL(z,x) __Pyx_CREAL(z) = (x)
    #define __Pyx_SET_CIMAG(z,y) __Pyx_CIMAG(z) = (y)
#endif

/* Arithmetic.proto */
#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
    #define __Pyx_c_eq_double(a, b)   ((a)==(b))
    #define __Pyx_c_sum_double(a, b)  ((a)+(b))
    #define __Pyx_c_diff_double(a, b) ((a)-(b))
    #define __Pyx_c_prod_double(a, b) ((a)*(b))
    #define __Pyx_c_quot_double(a, b) ((a)/(b))
    #define __Pyx_c_neg_double(a)     (-(a))
  #ifdef __cplusplus
    #define __Pyx_c_is_zero_double(z) ((z)==(double)0)
    #define __Pyx_c_conj_double(z)    (::std::conj(z))
    #if 1
        #define __Pyx_c_abs_double(z)     (::std::abs(z))
        #define __Pyx_c_pow_double(a, b)  (::std::pow(a, b))
    #endif
  #else
    #define __Pyx_c_is_zero_double(z) ((z)==0)
    #define __Pyx_c_conj_double(z)    (conj(z))
    #if 1
        #define __Pyx_c_abs_double(z)     (cabs(z))
        #define __Pyx_c_pow_double(a, b)  (cpow(a, b))
    #endif
 #endif
#else
    static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex, __pyx_t_double_complex);
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex, __pyx_t_double_complex);
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex, __pyx_t_double_complex);
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex, __pyx_t_double_complex);
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex, __pyx_t_double_complex);
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex);
    static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex);
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex);
    #if 1
        static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex);
        static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex, __pyx_t_double_complex);
    #endif
#endif

/* CheckUnpickleChecksum.proto */
static CYTHON_INLINE int __Pyx_CheckUnpickleChecksum(long checksum, long checksum1, long checksum2, long checksum3, const char *members);

/* LengthHint.proto */
#if CYTHON_COMPILING_IN_LIMITED_API
#define __Pyx_PyObject_LengthHint(o, defaultval)  (defaultval)
#else
#define __Pyx_PyObject_LengthHint(o, defaultval)  PyObject_LengthHint(o, defaultval)
#endif

/* IsLittleEndian.proto (used by BufferFormatCheck) */
static CYTHON_INLINE int __Pyx_Is_Little_Endian(void);

/* BufferFormatCheck.proto (used by MemviewSliceValidateAndInit) */
static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts);
static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx,
                              __Pyx_BufFmt_StackElem* stack,
                              const __Pyx_TypeInfo* type);

/* TypeInfoCompare.proto (used by MemviewSliceValidateAndInit) */
static int __pyx_typeinfo_cmp(const __Pyx_TypeInfo *a, const __Pyx_TypeInfo *b);

/* MemviewSliceValidateAndInit.export */
static int __Pyx_ValidateAndInit_memviewslice(
                int *axes_specs,
                int c_or_f_flag,
                int buf_flags,
                int ndim,
                const __Pyx_TypeInfo *dtype,
                __Pyx_BufFmt_StackElem stack[],
                __Pyx_memviewslice *memviewslice,
                PyObject *original_obj);

/* ObjectToMemviewSlice.proto */
static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_double(PyObject *, int writable_flag);

/* ObjectToMemviewSlice.proto */
static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc___pyx_t_double_complex(PyObject *, int writable_flag);

/* ObjectToMemviewSlice.proto */
static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_float(PyObject *, int writable_flag);

/* ObjectToMemviewSlice.proto */
static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_long__double(PyObject *, int writable_flag);

/* CppExceptionConversion.proto */
#ifndef __Pyx_CppExn2PyErr
#include <new>
#include <typeinfo>
#include <stdexcept>
#include <ios>
static void __Pyx_CppExn2PyErr() {
  try {
    if (PyErr_Occurred())
      ; // let the latest Python exn pass through and ignore the current one
    else
      throw;
  } catch (const std::bad_alloc& exn) {
    PyErr_SetString(PyExc_MemoryError, exn.what());
  } catch (const std::bad_cast& exn) {
    PyErr_SetString(PyExc_TypeError, exn.what());
  } catch (const std::bad_typeid& exn) {
    PyErr_SetString(PyExc_TypeError, exn.what());
  } catch (const std::domain_error& exn) {
    PyErr_SetString(PyExc_ValueError, exn.what());
  } catch (const std::invalid_argument& exn) {
    PyErr_SetString(PyExc_ValueError, exn.what());
  } catch (const std::ios_base::failure& exn) {
    PyErr_SetString(PyExc_IOError, exn.what());
  } catch (const std::out_of_range& exn) {
    PyErr_SetString(PyExc_IndexError, exn.what());
  } catch (const std::overflow_error& exn) {
    PyErr_SetString(PyExc_OverflowError, exn.what());
  } catch (const std::range_error& exn) {
    PyErr_SetString(PyExc_ArithmeticError, exn.what());
  } catch (const std::underflow_error& exn) {
    PyErr_SetString(PyExc_ArithmeticError, exn.what());
  } catch (const std::exception& exn) {
    PyErr_SetString(PyExc_RuntimeError, exn.what());
  }
  catch (...)
  {
    PyErr_SetString(PyExc_RuntimeError, "Unknown exception");
  }
}
#endif

/* FromPy.proto */
static __pyx_t_double_complex __Pyx_PyComplex_As___pyx_t_double_complex(PyObject*);

/* ToPy.proto */
#define __pyx_PyComplex_FromComplex(z)\
        PyComplex_FromDoubles((double)__Pyx_CREAL(z),\
                              (double)__Pyx_CIMAG(z))

/* MemviewDtypeToObject.proto */
static CYTHON_INLINE PyObject *__pyx_memview_get_double(const char *itemp);
static CYTHON_INLINE int __pyx_memview_set_double(char *itemp, PyObject *obj);

/* MemviewDtypeToObject.proto */
static CYTHON_INLINE PyObject *__pyx_memview_get___pyx_t_double_complex(const char *itemp);
static CYTHON_INLINE int __pyx_memview_set___pyx_t_double_complex(char *itemp, PyObject *obj);

/* ToPyCTupleUtility.proto */
static PyObject* __pyx_convert__to_py___pyx_ctuple_long(__pyx_ctuple_long);

/* MemviewDtypeToObject.proto */
static CYTHON_INLINE PyObject *__pyx_memview_get_float(const char *itemp);
static CYTHON_INLINE int __pyx_memview_set_float(char *itemp, PyObject *obj);

/* MemviewDtypeToObject.proto */
static CYTHON_INLINE PyObject *__pyx_memview_get_long__double(const char *itemp);
static CYTHON_INLINE int __pyx_memview_set_long__double(char *itemp, PyObject *obj);

/* MemviewSliceCopy.proto */
static __Pyx_memviewslice
__pyx_memoryview_copy_new_contig(const __Pyx_memviewslice *from_mvs,
                                 const char *mode, int ndim,
                                 size_t sizeof_dtype, int contig_flag,
                                 int dtype_is_object);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_int(int value);

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

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

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

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

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

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

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_unsigned_int(unsigned int value);

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

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_mpfr_prec_t(mpfr_prec_t value);

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

/* UpdateUnpickledDict.proto */
static int __Pyx_UpdateUnpickledDict(PyObject *obj, PyObject *state, Py_ssize_t index);

/* CIntFromPy.proto */
static CYTHON_INLINE char __Pyx_PyLong_As_char(PyObject *);

/* FormatTypeName.proto */
#if CYTHON_COMPILING_IN_LIMITED_API
typedef PyObject *__Pyx_TypeName;
#define __Pyx_FMT_TYPENAME "%U"
#define __Pyx_DECREF_TypeName(obj) Py_XDECREF(obj)
#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
#define __Pyx_PyType_GetFullyQualifiedName PyType_GetFullyQualifiedName
#else
static __Pyx_TypeName __Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp);
#endif
#else  // !LIMITED_API
typedef const char *__Pyx_TypeName;
#define __Pyx_FMT_TYPENAME "%.200s"
#define __Pyx_PyType_GetFullyQualifiedName(tp) ((tp)->tp_name)
#define __Pyx_DECREF_TypeName(obj)
#endif

/* GetRuntimeVersion.proto */
#if __PYX_LIMITED_VERSION_HEX < 0x030b0000
static unsigned long __Pyx_cached_runtime_version = 0;
static void __Pyx_init_runtime_version(void);
#else
#define __Pyx_init_runtime_version()
#endif
static unsigned long __Pyx_get_runtime_version(void);

/* IterNextPlain.proto (used by CoroutineBase) */
static CYTHON_INLINE PyObject *__Pyx_PyIter_Next_Plain(PyObject *iterator);
#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
static PyObject *__Pyx_GetBuiltinNext_LimitedAPI(void);
#endif

/* ReturnWithStopIteration.proto (used by CoroutineBase) */
static CYTHON_INLINE void __Pyx_ReturnWithStopIteration(PyObject* value, int async, int iternext);

/* CoroutineBase.proto (used by Generator) */
struct __pyx_CoroutineObject;
typedef PyObject *(*__pyx_coroutine_body_t)(struct __pyx_CoroutineObject *, PyThreadState *, PyObject *);
#if CYTHON_USE_EXC_INFO_STACK
#define __Pyx_ExcInfoStruct  _PyErr_StackItem
#else
typedef struct {
    PyObject *exc_type;
    PyObject *exc_value;
    PyObject *exc_traceback;
} __Pyx_ExcInfoStruct;
#endif
typedef struct __pyx_CoroutineObject {
    PyObject_HEAD
    __pyx_coroutine_body_t body;
    PyObject *closure;
    __Pyx_ExcInfoStruct gi_exc_state;
#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
    PyObject *gi_weakreflist;
#endif
    PyObject *classobj;
    PyObject *yieldfrom;
    __Pyx_pyiter_sendfunc yieldfrom_am_send;
    PyObject *gi_name;
    PyObject *gi_qualname;
    PyObject *gi_modulename;
    PyObject *gi_code;
    PyObject *gi_frame;
#if CYTHON_USE_SYS_MONITORING && (CYTHON_PROFILE || CYTHON_TRACE)
    PyMonitoringState __pyx_pymonitoring_state[__Pyx_MonitoringEventTypes_CyGen_count];
    uint64_t __pyx_pymonitoring_version;
#endif
    int resume_label;
    char is_running;
} __pyx_CoroutineObject;
static __pyx_CoroutineObject *__Pyx__Coroutine_New(
    PyTypeObject *type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
    PyObject *name, PyObject *qualname, PyObject *module_name);
static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit(
            __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
            PyObject *name, PyObject *qualname, PyObject *module_name);
static CYTHON_INLINE void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *self);
static int __Pyx_Coroutine_clear(PyObject *self);
static __Pyx_PySendResult __Pyx_Coroutine_AmSend(PyObject *self, PyObject *value, PyObject **retval);
static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value);
static __Pyx_PySendResult __Pyx_Coroutine_Close(PyObject *self, PyObject **retval);
static PyObject *__Pyx_Coroutine_Throw(PyObject *gen, PyObject *args);
#if CYTHON_USE_EXC_INFO_STACK
#define __Pyx_Coroutine_SwapException(self)
#define __Pyx_Coroutine_ResetAndClearException(self)  __Pyx_Coroutine_ExceptionClear(&(self)->gi_exc_state)
#else
#define __Pyx_Coroutine_SwapException(self) {\
    __Pyx_ExceptionSwap(&(self)->gi_exc_state.exc_type, &(self)->gi_exc_state.exc_value, &(self)->gi_exc_state.exc_traceback);\
    __Pyx_Coroutine_ResetFrameBackpointer(&(self)->gi_exc_state);\
    }
#define __Pyx_Coroutine_ResetAndClearException(self) {\
    __Pyx_ExceptionReset((self)->gi_exc_state.exc_type, (self)->gi_exc_state.exc_value, (self)->gi_exc_state.exc_traceback);\
    (self)->gi_exc_state.exc_type = (self)->gi_exc_state.exc_value = (self)->gi_exc_state.exc_traceback = NULL;\
    }
#endif
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyGen_FetchStopIterationValue(pvalue)\
    __Pyx_PyGen__FetchStopIterationValue(__pyx_tstate, pvalue)
#else
#define __Pyx_PyGen_FetchStopIterationValue(pvalue)\
    __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, pvalue)
#endif
static int __Pyx_PyGen__FetchStopIterationValue(PyThreadState *tstate, PyObject **pvalue);
static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state);
static char __Pyx_Coroutine_test_and_set_is_running(__pyx_CoroutineObject *gen);
static void __Pyx_Coroutine_unset_is_running(__pyx_CoroutineObject *gen);
static char __Pyx_Coroutine_get_is_running(__pyx_CoroutineObject *gen);
static PyObject *__Pyx_Coroutine_get_is_running_getter(PyObject *gen, void *closure);
#if __PYX_HAS_PY_AM_SEND == 2
static void __Pyx_SetBackportTypeAmSend(PyTypeObject *type, __Pyx_PyAsyncMethodsStruct *static_amsend_methods, __Pyx_pyiter_sendfunc am_send);
#endif
static PyObject *__Pyx_Coroutine_fail_reduce_ex(PyObject *self, PyObject *arg);

/* Generator.proto */
#define __Pyx_Generator_USED
#define __Pyx_Generator_CheckExact(obj) __Pyx_IS_TYPE(obj, __pyx_mstate_global->__pyx_GeneratorType)
#define __Pyx_Generator_New(body, code, closure, name, qualname, module_name)\
    __Pyx__Coroutine_New(__pyx_mstate_global->__pyx_GeneratorType, body, code, closure, name, qualname, module_name)
static PyObject *__Pyx_Generator_Next(PyObject *self);
static int __pyx_Generator_init(PyObject *module);
static CYTHON_INLINE PyObject *__Pyx_Generator_GetInlinedResult(PyObject *self);

/* CheckBinaryVersion.proto */
static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer);

/* DecompressString.proto */
static PyObject *__Pyx_DecompressString(const char *s, Py_ssize_t length, int algo);

/* MultiPhaseInitModuleState.proto */
#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE
static PyObject *__Pyx_State_FindModule(void*);
static int __Pyx_State_AddModule(PyObject* module, void*);
static int __Pyx_State_RemoveModule(void*);
#elif CYTHON_USE_MODULE_STATE
#define __Pyx_State_FindModule PyState_FindModule
#define __Pyx_State_AddModule PyState_AddModule
#define __Pyx_State_RemoveModule PyState_RemoveModule
#endif

/* #### Code section: module_declarations ### */
/* CythonABIVersion.proto */
#if CYTHON_COMPILING_IN_LIMITED_API
    #if CYTHON_METH_FASTCALL
        #define __PYX_FASTCALL_ABI_SUFFIX  "_fastcall"
    #else
        #define __PYX_FASTCALL_ABI_SUFFIX
    #endif
    #define __PYX_LIMITED_ABI_SUFFIX "limited" __PYX_FASTCALL_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX
#else
    #define __PYX_LIMITED_ABI_SUFFIX
#endif
#if __PYX_HAS_PY_AM_SEND == 1
    #define __PYX_AM_SEND_ABI_SUFFIX
#elif __PYX_HAS_PY_AM_SEND == 2
    #define __PYX_AM_SEND_ABI_SUFFIX "amsendbackport"
#else
    #define __PYX_AM_SEND_ABI_SUFFIX "noamsend"
#endif
#ifndef __PYX_MONITORING_ABI_SUFFIX
    #define __PYX_MONITORING_ABI_SUFFIX
#endif
#if CYTHON_USE_TP_FINALIZE
    #define __PYX_TP_FINALIZE_ABI_SUFFIX
#else
    #define __PYX_TP_FINALIZE_ABI_SUFFIX "nofinalize"
#endif
#if CYTHON_USE_FREELISTS || !defined(__Pyx_AsyncGen_USED)
    #define __PYX_FREELISTS_ABI_SUFFIX
#else
    #define __PYX_FREELISTS_ABI_SUFFIX "nofreelists"
#endif
#define CYTHON_ABI  __PYX_ABI_VERSION __PYX_LIMITED_ABI_SUFFIX __PYX_MONITORING_ABI_SUFFIX __PYX_TP_FINALIZE_ABI_SUFFIX __PYX_FREELISTS_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX
#define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI
#define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "."

static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *__pyx_v_self); /* proto*/
static char *__pyx_memoryview_get_item_pointer(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index); /* proto*/
static PyObject *__pyx_memoryview_is_slice(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj); /* proto*/
static PyObject *__pyx_memoryview_setitem_slice_assignment(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_dst, PyObject *__pyx_v_src); /* proto*/
static PyObject *__pyx_memoryview_setitem_slice_assign_scalar(struct __pyx_memoryview_obj *__pyx_v_self, struct __pyx_memoryview_obj *__pyx_v_dst, PyObject *__pyx_v_value); /* proto*/
static PyObject *__pyx_memoryview_setitem_indexed(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /* proto*/
static PyObject *__pyx_memoryview_convert_item_to_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp); /* proto*/
static PyObject *__pyx_memoryview_assign_item_from_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value); /* proto*/
static PyObject *__pyx_memoryview__get_base(struct __pyx_memoryview_obj *__pyx_v_self); /* proto*/
static PyObject *__pyx_memoryviewslice_convert_item_to_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp); /* proto*/
static PyObject *__pyx_memoryviewslice_assign_item_from_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value); /* proto*/
static PyObject *__pyx_memoryviewslice__get_base(struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto*/
#if !CYTHON_COMPILING_IN_LIMITED_API
static CYTHON_INLINE double __pyx_f_7cpython_7complex_7complex_4real_real(PyComplexObject *__pyx_v_self); /* proto*/
#endif
#if !CYTHON_COMPILING_IN_LIMITED_API
static CYTHON_INLINE double __pyx_f_7cpython_7complex_7complex_4imag_imag(PyComplexObject *__pyx_v_self); /* proto*/
#endif
static PyObject *__pyx_f_9symengine_3lib_17symengine_wrapper_13DictBasicIter_init(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DictBasicIter *__pyx_v_self, SymEngine::map_basic_basic::iterator __pyx_v_begin, SymEngine::map_basic_basic::iterator __pyx_v_end); /* proto*/
static PyObject *__pyx_f_9symengine_3lib_17symengine_wrapper_9_Lambdify__init(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify *__pyx_v_self, CYTHON_UNUSED SymEngine::vec_basic &__pyx_v_args_, CYTHON_UNUSED SymEngine::vec_basic &__pyx_v_outs_, CYTHON_UNUSED bool __pyx_v_cse); /* proto*/
static PyObject *__pyx_f_9symengine_3lib_17symengine_wrapper_9_Lambdify__load(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify *__pyx_v_self, CYTHON_UNUSED std::string const &__pyx_v_s); /* proto*/
static PyObject *__pyx_f_9symengine_3lib_17symengine_wrapper_9_Lambdify_eval_real(struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify *__pyx_v_self, PyObject *__pyx_v_inp, PyObject *__pyx_v_out, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_9symengine_3lib_17symengine_wrapper_9_Lambdify_eval_complex(struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify *__pyx_v_self, PyObject *__pyx_v_inp, PyObject *__pyx_v_out, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_9symengine_3lib_17symengine_wrapper_9_Lambdify_unsafe_eval(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_inp, CYTHON_UNUSED PyObject *__pyx_v_out, int __pyx_skip_dispatch, struct __pyx_opt_args_9symengine_3lib_17symengine_wrapper_9_Lambdify_unsafe_eval *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_9symengine_3lib_17symengine_wrapper_12LambdaDouble__init(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LambdaDouble *__pyx_v_self, SymEngine::vec_basic &__pyx_v_args_, SymEngine::vec_basic &__pyx_v_outs_, bool __pyx_v_cse); /* proto*/
static PyObject *__pyx_f_9symengine_3lib_17symengine_wrapper_12LambdaDouble_unsafe_real(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LambdaDouble *__pyx_v_self, __Pyx_memviewslice __pyx_v_inp, __Pyx_memviewslice __pyx_v_out, int __pyx_skip_dispatch, struct __pyx_opt_args_9symengine_3lib_17symengine_wrapper_12LambdaDouble_unsafe_real *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_9symengine_3lib_17symengine_wrapper_12LambdaDouble_unsafe_eval(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LambdaDouble *__pyx_v_self, PyObject *__pyx_v_inp, PyObject *__pyx_v_out, int __pyx_skip_dispatch, struct __pyx_opt_args_9symengine_3lib_17symengine_wrapper_12LambdaDouble_unsafe_eval *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_9symengine_3lib_17symengine_wrapper_12LambdaDouble_as_scipy_low_level_callable(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LambdaDouble *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_9symengine_3lib_17symengine_wrapper_12LambdaDouble_as_ctypes(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LambdaDouble *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_9symengine_3lib_17symengine_wrapper_19LambdaComplexDouble__init(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LambdaComplexDouble *__pyx_v_self, SymEngine::vec_basic &__pyx_v_args_, SymEngine::vec_basic &__pyx_v_outs_, bool __pyx_v_cse); /* proto*/
static PyObject *__pyx_f_9symengine_3lib_17symengine_wrapper_19LambdaComplexDouble_unsafe_complex(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LambdaComplexDouble *__pyx_v_self, __Pyx_memviewslice __pyx_v_inp, __Pyx_memviewslice __pyx_v_out, int __pyx_skip_dispatch, struct __pyx_opt_args_9symengine_3lib_17symengine_wrapper_19LambdaComplexDouble_unsafe_complex *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_9symengine_3lib_17symengine_wrapper_19LambdaComplexDouble_unsafe_eval(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LambdaComplexDouble *__pyx_v_self, PyObject *__pyx_v_inp, PyObject *__pyx_v_out, int __pyx_skip_dispatch, struct __pyx_opt_args_9symengine_3lib_17symengine_wrapper_19LambdaComplexDouble_unsafe_eval *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_9symengine_3lib_17symengine_wrapper_10LLVMDouble__init(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMDouble *__pyx_v_self, SymEngine::vec_basic &__pyx_v_args_, SymEngine::vec_basic &__pyx_v_outs_, bool __pyx_v_cse); /* proto*/
static PyObject *__pyx_f_9symengine_3lib_17symengine_wrapper_10LLVMDouble__load(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMDouble *__pyx_v_self, std::string const &__pyx_v_s); /* proto*/
static PyObject *__pyx_f_9symengine_3lib_17symengine_wrapper_10LLVMDouble_unsafe_real(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMDouble *__pyx_v_self, __Pyx_memviewslice __pyx_v_inp, __Pyx_memviewslice __pyx_v_out, int __pyx_skip_dispatch, struct __pyx_opt_args_9symengine_3lib_17symengine_wrapper_10LLVMDouble_unsafe_real *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_9symengine_3lib_17symengine_wrapper_10LLVMDouble_unsafe_eval(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMDouble *__pyx_v_self, PyObject *__pyx_v_inp, PyObject *__pyx_v_out, int __pyx_skip_dispatch, struct __pyx_opt_args_9symengine_3lib_17symengine_wrapper_10LLVMDouble_unsafe_eval *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_9symengine_3lib_17symengine_wrapper_10LLVMDouble_as_scipy_low_level_callable(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMDouble *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_9symengine_3lib_17symengine_wrapper_10LLVMDouble_as_ctypes(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMDouble *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_9symengine_3lib_17symengine_wrapper_9LLVMFloat__init(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMFloat *__pyx_v_self, SymEngine::vec_basic &__pyx_v_args_, SymEngine::vec_basic &__pyx_v_outs_, bool __pyx_v_cse); /* proto*/
static PyObject *__pyx_f_9symengine_3lib_17symengine_wrapper_9LLVMFloat__load(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMFloat *__pyx_v_self, std::string const &__pyx_v_s); /* proto*/
static PyObject *__pyx_f_9symengine_3lib_17symengine_wrapper_9LLVMFloat_unsafe_real(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMFloat *__pyx_v_self, __Pyx_memviewslice __pyx_v_inp, __Pyx_memviewslice __pyx_v_out, int __pyx_skip_dispatch, struct __pyx_opt_args_9symengine_3lib_17symengine_wrapper_9LLVMFloat_unsafe_real *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_9symengine_3lib_17symengine_wrapper_9LLVMFloat_unsafe_eval(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMFloat *__pyx_v_self, PyObject *__pyx_v_inp, PyObject *__pyx_v_out, int __pyx_skip_dispatch, struct __pyx_opt_args_9symengine_3lib_17symengine_wrapper_9LLVMFloat_unsafe_eval *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_9symengine_3lib_17symengine_wrapper_14LLVMLongDouble__init(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMLongDouble *__pyx_v_self, SymEngine::vec_basic &__pyx_v_args_, SymEngine::vec_basic &__pyx_v_outs_, bool __pyx_v_cse); /* proto*/
static PyObject *__pyx_f_9symengine_3lib_17symengine_wrapper_14LLVMLongDouble__load(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMLongDouble *__pyx_v_self, std::string const &__pyx_v_s); /* proto*/
static PyObject *__pyx_f_9symengine_3lib_17symengine_wrapper_14LLVMLongDouble_unsafe_real(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMLongDouble *__pyx_v_self, __Pyx_memviewslice __pyx_v_inp, __Pyx_memviewslice __pyx_v_out, int __pyx_skip_dispatch, struct __pyx_opt_args_9symengine_3lib_17symengine_wrapper_14LLVMLongDouble_unsafe_real *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_9symengine_3lib_17symengine_wrapper_14LLVMLongDouble_unsafe_eval(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMLongDouble *__pyx_v_self, PyObject *__pyx_v_inp, PyObject *__pyx_v_out, int __pyx_skip_dispatch, struct __pyx_opt_args_9symengine_3lib_17symengine_wrapper_14LLVMLongDouble_unsafe_eval *__pyx_optional_args); /* proto*/

/* Module declarations from "libcpp" */

/* Module declarations from "libc.string" */

/* Module declarations from "libcpp.string_view" */

/* Module declarations from "libcpp.string" */

/* Module declarations from "libcpp.utility" */

/* Module declarations from "libcpp.map" */

/* Module declarations from "libcpp.vector" */

/* Module declarations from "libc.stdio" */

/* Module declarations from "__builtin__" */

/* Module declarations from "cpython.type" */

/* Module declarations from "cpython.version" */

/* Module declarations from "cpython.exc" */

/* Module declarations from "cpython.module" */

/* Module declarations from "cpython.mem" */

/* Module declarations from "cpython.tuple" */

/* Module declarations from "cpython.list" */

/* Module declarations from "cpython.sequence" */

/* Module declarations from "cpython.mapping" */

/* Module declarations from "cpython.iterator" */

/* Module declarations from "cpython.number" */

/* Module declarations from "__builtin__" */

/* Module declarations from "cpython.bool" */

/* Module declarations from "cpython.long" */

/* Module declarations from "cpython.float" */

/* Module declarations from "cython.view" */

/* Module declarations from "cython.dataclasses" */

/* Module declarations from "cython" */

/* Module declarations from "__builtin__" */

/* Module declarations from "cpython.complex" */

/* Module declarations from "libc.stddef" */

/* Module declarations from "cpython.unicode" */

/* Module declarations from "cpython.pyport" */

/* Module declarations from "cpython.dict" */

/* Module declarations from "cpython.instance" */

/* Module declarations from "cpython.function" */

/* Module declarations from "cpython.method" */

/* Module declarations from "cpython.weakref" */

/* Module declarations from "cpython.getargs" */

/* Module declarations from "cpython.pythread" */

/* Module declarations from "cpython.pystate" */

/* Module declarations from "cpython.set" */

/* Module declarations from "cpython.buffer" */

/* Module declarations from "cpython.bytes" */

/* Module declarations from "cpython.pycapsule" */

/* Module declarations from "cpython.contextvars" */

/* Module declarations from "cpython" */

/* Module declarations from "cpython.object" */

/* Module declarations from "cpython.ref" */

/* Module declarations from "libcpp.pair" */

/* Module declarations from "libcpp.set" */

/* Module declarations from "libcpp.unordered_map" */

/* Module declarations from "symengine" */

/* Module declarations from "libcpp.memory" */

/* Module declarations from "symengine.lib.symengine_wrapper" */
static PyObject *__pyx_collections_abc_Sequence = 0;
static PyObject *generic = 0;
static PyObject *strided = 0;
static PyObject *indirect = 0;
static PyObject *contiguous = 0;
static PyObject *indirect_contiguous = 0;
static int __pyx_memoryview_thread_locks_used;
static PyThread_type_lock __pyx_memoryview_thread_locks[8];
static PyObject *__pyx_f_9symengine_3lib_17symengine_wrapper_c2py(SymEngine::RCP<const SymEngine::Basic>); /*proto*/
static PyObject *__pyx_f_9symengine_3lib_17symengine_wrapper_capsule_to_basic(PyObject *, int __pyx_skip_dispatch); /*proto*/
static void __pyx_f_9symengine_3lib_17symengine_wrapper_assign_to_capsule(PyObject *, PyObject *, int __pyx_skip_dispatch); /*proto*/
static PyObject *__pyx_f_9symengine_3lib_17symengine_wrapper_vec_basic_to_tuple(SymEngine::vec_basic &); /*proto*/
static PyObject *__pyx_f_9symengine_3lib_17symengine_wrapper_vec_basic_to_list(SymEngine::vec_basic &); /*proto*/
static PyObject *__pyx_f_9symengine_3lib_17symengine_wrapper_vec_pair_to_list(SymEngine::vec_pair &); /*proto*/
static SymEngine::RCP<const SymEngine::Basic> __pyx_f_9symengine_3lib_17symengine_wrapper_pynumber_to_symengine(PyObject *); /*proto*/
static PyObject *__pyx_f_9symengine_3lib_17symengine_wrapper_symengine_to_sage(SymEngine::RCP<const SymEngine::Basic>); /*proto*/
static PyObject *__pyx_f_9symengine_3lib_17symengine_wrapper_symengine_to_sympy(SymEngine::RCP<const SymEngine::Basic>); /*proto*/
static SymEngine::RCP<SymEngine::Number const >  __pyx_f_9symengine_3lib_17symengine_wrapper_sympy_eval(PyObject *, long); /*proto*/
static SymEngine::RCP<SymEngine::Number const >  __pyx_f_9symengine_3lib_17symengine_wrapper_sage_eval(PyObject *, long); /*proto*/
static SymEngine::RCP<const SymEngine::Basic> __pyx_f_9symengine_3lib_17symengine_wrapper_sage_diff(PyObject *, SymEngine::RCP<const SymEngine::Basic>); /*proto*/
static SymEngine::RCP<const SymEngine::Basic> __pyx_f_9symengine_3lib_17symengine_wrapper_sympy_diff(PyObject *, SymEngine::RCP<const SymEngine::Basic>); /*proto*/
static PyObject *__pyx_f_9symengine_3lib_17symengine_wrapper_matrix_to_vec(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *, SymEngine::vec_basic &); /*proto*/
static SymEngine::vec_basic __pyx_f_9symengine_3lib_17symengine_wrapper_iter_to_vec_basic(PyObject *); /*proto*/
static double __pyx_f_9symengine_3lib_17symengine_wrapper__scipy_callback_lambda_real(int, double *, void *); /*proto*/
static void __pyx_f_9symengine_3lib_17symengine_wrapper__ctypes_callback_lambda_real(double *, double const *, void *); /*proto*/
static double __pyx_f_9symengine_3lib_17symengine_wrapper__scipy_callback_llvm_real(int, double *, void *); /*proto*/
static void __pyx_f_9symengine_3lib_17symengine_wrapper__ctypes_callback_llvm_real(double *, double const *, void *); /*proto*/
static PyObject *__pyx_f_9symengine_3lib_17symengine_wrapper_tribool_py(SymEngine::tribool); /*proto*/
static PyObject *__pyx_f_9symengine_3lib_17symengine_wrapper__flattened_vec(SymEngine::vec_basic &, PyObject *); /*proto*/
static PyObject *__pyx_f_9symengine_3lib_17symengine_wrapper___pyx_unpickle_Sieve__set_state(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Sieve *, PyObject *); /*proto*/
static PyObject *__pyx_f_9symengine_3lib_17symengine_wrapper___pyx_unpickle__Lambdify__set_state(struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify *, PyObject *); /*proto*/
static PyObject *__pyx_convert_vector_to_py_int(std::vector<int>  const &); /*proto*/
static std::string __pyx_convert_string_from_py_6libcpp_6string_std__in_string(PyObject *); /*proto*/
static CYTHON_INLINE PyObject *__pyx_convert_PyObject_string_to_py_6libcpp_6string_std__in_string(std::string const &); /*proto*/
static CYTHON_INLINE PyObject *__pyx_convert_PyUnicode_string_to_py_6libcpp_6string_std__in_string(std::string const &); /*proto*/
static CYTHON_INLINE PyObject *__pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string(std::string const &); /*proto*/
static CYTHON_INLINE PyObject *__pyx_convert_PyByteArray_string_to_py_6libcpp_6string_std__in_string(std::string const &); /*proto*/
static PyObject *__pyx_convert_pair_to_py_int____int(std::pair<int,int>  const &); /*proto*/
static PyObject *__pyx_convert_vector_to_py_std_3a__3a_pair_3c_int_2c_int_3e___(std::vector<std::pair<int,int> >  const &); /*proto*/
static int __pyx_array_allocate_buffer(struct __pyx_array_obj *); /*proto*/
static struct __pyx_array_obj *__pyx_array_new(PyObject *, Py_ssize_t, char *, char const *, char *); /*proto*/
static PyObject *__pyx_memoryview_new(PyObject *, int, int, __Pyx_TypeInfo const *); /*proto*/
static CYTHON_INLINE int __pyx_memoryview_check(PyObject *); /*proto*/
static PyObject *_unellipsify(PyObject *, int); /*proto*/
static int assert_direct_dimensions(Py_ssize_t *, int); /*proto*/
static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_obj *, PyObject *); /*proto*/
static char *__pyx_pybuffer_index(Py_buffer *, char *, Py_ssize_t, Py_ssize_t); /*proto*/
static int __pyx_memslice_transpose(__Pyx_memviewslice *); /*proto*/
static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice, int, PyObject *(*)(char *), int (*)(char *, PyObject *), int); /*proto*/
static __Pyx_memviewslice *__pyx_memoryview_get_slice_from_memoryview(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/
static void __pyx_memoryview_slice_copy(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/
static PyObject *__pyx_memoryview_copy_object(struct __pyx_memoryview_obj *); /*proto*/
static PyObject *__pyx_memoryview_copy_object_from_slice(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/
static Py_ssize_t abs_py_ssize_t(Py_ssize_t); /*proto*/
static char __pyx_get_best_slice_order(__Pyx_memviewslice *, int); /*proto*/
static void _copy_strided_to_strided(char *, Py_ssize_t *, char *, Py_ssize_t *, Py_ssize_t *, Py_ssize_t *, int, size_t); /*proto*/
static void copy_strided_to_strided(__Pyx_memviewslice *, __Pyx_memviewslice *, int, size_t); /*proto*/
static Py_ssize_t __pyx_memoryview_slice_get_size(__Pyx_memviewslice *, int); /*proto*/
static Py_ssize_t __pyx_fill_contig_strides_array(Py_ssize_t *, Py_ssize_t *, Py_ssize_t, int, char); /*proto*/
static void *__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice *, __Pyx_memviewslice *, char, int); /*proto*/
static int __pyx_memoryview_err_extents(int, Py_ssize_t, Py_ssize_t); /*proto*/
static int __pyx_memoryview_err_dim(PyObject *, PyObject *, int); /*proto*/
static int __pyx_memoryview_err(PyObject *, PyObject *); /*proto*/
static int __pyx_memoryview_err_no_memory(void); /*proto*/
static int __pyx_memoryview_copy_contents(__Pyx_memviewslice, __Pyx_memviewslice, int, int, int); /*proto*/
static void __pyx_memoryview_broadcast_leading(__Pyx_memviewslice *, int, int); /*proto*/
static void __pyx_memoryview_refcount_copying(__Pyx_memviewslice *, int, int, int); /*proto*/
static void __pyx_memoryview_refcount_objects_in_slice_with_gil(char *, Py_ssize_t *, Py_ssize_t *, int, int); /*proto*/
static void __pyx_memoryview_refcount_objects_in_slice(char *, Py_ssize_t *, Py_ssize_t *, int, int); /*proto*/
static void __pyx_memoryview_slice_assign_scalar(__Pyx_memviewslice *, int, size_t, void *, int); /*proto*/
static void __pyx_memoryview__slice_assign_scalar(char *, Py_ssize_t *, Py_ssize_t *, int, size_t, void *); /*proto*/
static PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj *, PyObject *); /*proto*/
static std::vector<int>  __pyx_convert_vector_from_py_int(PyObject *); /*proto*/
/* #### Code section: typeinfo ### */
static const __Pyx_TypeInfo __Pyx_TypeInfo_double = { "double", NULL, sizeof(double), { 0 }, 0, 'R', 0, 0 };
static const __Pyx_TypeInfo __Pyx_TypeInfo___pyx_t_double_complex = { "double complex", NULL, sizeof(__pyx_t_double_complex), { 0 }, 0, 'C', 0, 0 };
static const __Pyx_TypeInfo __Pyx_TypeInfo_float = { "float", NULL, sizeof(float), { 0 }, 0, 'R', 0, 0 };
static const __Pyx_TypeInfo __Pyx_TypeInfo_long__double = { "long double", NULL, sizeof(long double), { 0 }, 0, 'R', 0, 0 };
/* #### Code section: before_global_var ### */
#define __Pyx_MODULE_NAME "symengine.lib.symengine_wrapper"
extern int __pyx_module_is_main_symengine__lib__symengine_wrapper;
int __pyx_module_is_main_symengine__lib__symengine_wrapper = 0;

/* Implementation of "symengine.lib.symengine_wrapper" */
/* #### Code section: global_var ### */
static PyObject *__pyx_builtin_object;
static PyObject *__pyx_builtin_staticmethod;
static PyObject *__pyx_builtin_property;
static PyObject *__pyx_builtin_zip;
static PyObject *__pyx_builtin_NotImplemented;
static PyObject *__pyx_builtin_any;
static PyObject *__pyx_builtin_map;
static PyObject *__pyx_builtin_round;
static PyObject *__pyx_builtin_super;
static PyObject *__pyx_builtin_enumerate;
static PyObject *__pyx_builtin___import__;
static PyObject *__pyx_builtin_Ellipsis;
static PyObject *__pyx_builtin_id;
/* #### Code section: string_decls ### */
static const char __pyx_k_c[] = "c";
static const char __pyx_k__13[] = "";
static const char __pyx_k_name[] = "name";
static const char __pyx_k_fortran[] = "fortran";
static const char __pyx_k_accum_out_sizes_args_size_n_expr[] = "accum_out_sizes, args_size, n_exprs, numpy_dtype, order, out_shapes, real, tot_out_size";
/* #### Code section: decls ### */
static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_shape, Py_ssize_t __pyx_v_itemsize, PyObject *__pyx_v_format, PyObject *__pyx_v_mode, int __pyx_v_allocate_buffer); /* proto */
static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(struct __pyx_array_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */
static void __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(struct __pyx_array_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_15View_dot_MemoryView_5array_7memview___get__(struct __pyx_array_obj *__pyx_v_self); /* proto */
static Py_ssize_t __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(struct __pyx_array_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_attr); /* proto */
static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item); /* proto */
static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_12__setitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf___pyx_array___reduce_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf___pyx_array_2__setstate_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
static PyObject *__pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(struct __pyx_MemviewEnum_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf___pyx_MemviewEnum___reduce_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf___pyx_MemviewEnum_2__setstate_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_v_flags, int __pyx_v_dtype_is_object); /* proto */
static void __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index); /* proto */
static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /* proto */
static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbuffer__(struct __pyx_memoryview_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */
static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static Py_ssize_t __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf___pyx_memoryview___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf___pyx_memoryview_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static void __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf___pyx_memoryviewslice___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf___pyx_memoryviewslice_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_15View_dot_MemoryView___pyx_unpickle_Enum(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_capsule_to_basic(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_capsule); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_2assign_to_capsule(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_capsule, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_4sympy2symengine(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_a, PyObject *__pyx_v_raise_error); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_6sympify(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_a); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8_sympify(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_a, PyObject *__pyx_v_raise_error); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10get_function_class(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_function, PyObject *__pyx_v_module); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_9Singleton_Zero(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_9Singleton_2One(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_9Singleton_4NegativeOne(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_9Singleton_6Half(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_9Singleton_8Pi(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_9Singleton_10NaN(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_9Singleton_12Infinity(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_9Singleton_14NegativeInfinity(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_9Singleton_16ComplexInfinity(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_9Singleton_18Exp1(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_9Singleton_20GoldenRatio(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_9Singleton_22Catalan(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_9Singleton_24EulerGamma(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_9Singleton_26ImaginaryUnit(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_9Singleton_28true(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_9Singleton_30false(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_9Singleton_32EmptySet(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_9Singleton_34UniversalSet(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_9Singleton_36Integers(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_9Singleton_38Rationals(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_9Singleton_40Reals(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_13DictBasicIter___iter__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DictBasicIter *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_13DictBasicIter_2__next__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DictBasicIter *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_13DictBasicIter_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DictBasicIter *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_13DictBasicIter_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DictBasicIter *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_9symengine_3lib_17symengine_wrapper_10_DictBasic___init__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper__DictBasic *__pyx_v_self, PyObject *__pyx_v_tocopy); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10_DictBasic_2as_dict(struct __pyx_obj_9symengine_3lib_17symengine_wrapper__DictBasic *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10_DictBasic_4add_dict(struct __pyx_obj_9symengine_3lib_17symengine_wrapper__DictBasic *__pyx_v_self, PyObject *__pyx_v_d); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10_DictBasic_6add(struct __pyx_obj_9symengine_3lib_17symengine_wrapper__DictBasic *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10_DictBasic_8copy(struct __pyx_obj_9symengine_3lib_17symengine_wrapper__DictBasic *__pyx_v_self); /* proto */
static Py_ssize_t __pyx_pf_9symengine_3lib_17symengine_wrapper_10_DictBasic_10__len__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper__DictBasic *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10_DictBasic_12__getitem__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper__DictBasic *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
static int __pyx_pf_9symengine_3lib_17symengine_wrapper_10_DictBasic_14__setitem__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper__DictBasic *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10_DictBasic_16clear(struct __pyx_obj_9symengine_3lib_17symengine_wrapper__DictBasic *__pyx_v_self); /* proto */
static int __pyx_pf_9symengine_3lib_17symengine_wrapper_10_DictBasic_18__delitem__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper__DictBasic *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
static int __pyx_pf_9symengine_3lib_17symengine_wrapper_10_DictBasic_20__contains__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper__DictBasic *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10_DictBasic_22__iter__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper__DictBasic *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10_DictBasic_24__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper__DictBasic *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10_DictBasic_26__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper__DictBasic *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_9DictBasic___str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_9DictBasic_2__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_12get_dict(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_args); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_14load_basic(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_s); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic___str__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_2__repr__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_4__reduce__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_6_repr_latex_(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self); /* proto */
static Py_hash_t __pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_8__hash__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self); /* proto */
static void __pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_10__dealloc__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_12_unsafe_reset(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_14__add__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_a, PyObject *__pyx_v_b); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_16__radd__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self, PyObject *__pyx_v_b); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_18__sub__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_a, PyObject *__pyx_v_b); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_20__rsub__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self, PyObject *__pyx_v_b); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_22__mul__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_a, PyObject *__pyx_v_b); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_24__rmul__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self, PyObject *__pyx_v_b); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_26__truediv__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_a, PyObject *__pyx_v_b); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_28__rtruediv__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self, PyObject *__pyx_v_b); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_30__floordiv__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_x, PyObject *__pyx_v_y); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_32__rfloordiv__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_y, PyObject *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_34__mod__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_x, PyObject *__pyx_v_y); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_36__rmod__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_y, PyObject *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_38__divmod__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_x, PyObject *__pyx_v_y); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_40__rdivmod__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_y, PyObject *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_42__pow__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_44__rpow__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self, PyObject *__pyx_v_b); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_46__neg__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_48__pos__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_50__abs__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_52__richcmp__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_a, PyObject *__pyx_v_b, int __pyx_v_op); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_54_richcmp_(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_A, struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_B, int __pyx_v_op); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_56expand(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self, bool __pyx_v_deep); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_58_diff(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self, struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_60diff(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self, PyObject *__pyx_v_args); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_62subs_dict(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self, PyObject *__pyx_v_args); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_64subs_oldnew(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self, PyObject *__pyx_v_old, PyObject *__pyx_v_new); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_66subs(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self, PyObject *__pyx_v_args); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_68xreplace(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self, PyObject *__pyx_v_args); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_70msubs(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self, PyObject *__pyx_v_args); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_72as_numer_denom(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_74as_real_imag(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_76n(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self, unsigned long __pyx_v_prec, PyObject *__pyx_v_real); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_4args___get__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_12free_symbols___get__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_7is_Atom___get__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_9is_Symbol___get__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_9is_symbol___get__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_8is_Dummy___get__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_11is_Function___get__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_6is_Add___get__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_6is_Mul___get__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_6is_Pow___get__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_9is_Number___get__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_9is_number___get__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_8is_Float___get__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_11is_Rational___get__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_10is_Integer___get__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_10is_integer___get__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_9is_finite___get__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_13is_Derivative___get__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_18is_AlgebraicNumber___get__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_13is_Relational___get__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_11is_Equality___get__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_10is_Boolean___get__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_6is_Not___get__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_9is_Matrix___get__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_7is_zero___get__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_11is_positive___get__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_11is_negative___get__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_14is_nonpositive___get__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_14is_nonnegative___get__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_7is_real___get__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_78copy(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_80_symbolic_(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self, PyObject *__pyx_v_ring); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_82atoms(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self, PyObject *__pyx_v_types); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_84simplify(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_86as_coefficients_dict(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_88coeff(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self, PyObject *__pyx_v_x, PyObject *__pyx_v_n); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_90has(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self, PyObject *__pyx_v_symbols); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_92args_as_sage(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_94args_as_sympy(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_96__float__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_98__int__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_100__complex__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_102as_powers_dict(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_16series(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_ex, PyObject *__pyx_v_x, PyObject *__pyx_v_x0, PyObject *__pyx_v_n, PyObject *__pyx_v_as_deg_coef_pair); /* proto */
static int __pyx_pf_9symengine_3lib_17symengine_wrapper_6Symbol___init__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Symbol *__pyx_v_self, PyObject *__pyx_v_name, CYTHON_UNUSED PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_6Symbol_2_sympy_(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Symbol *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_6Symbol_4__reduce__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Symbol *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_6Symbol_6_sage_(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Symbol *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_6Symbol_4name___get__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Symbol *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_6Symbol_7is_Atom___get__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Symbol *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_6Symbol_9is_Symbol___get__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Symbol *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_6Symbol_9is_symbol___get__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Symbol *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_6Symbol_14is_commutative___get__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Symbol *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_6Symbol_4func___get__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Symbol *__pyx_v_self); /* proto */
static int __pyx_pf_9symengine_3lib_17symengine_wrapper_5Dummy___init__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Dummy *__pyx_v_self, PyObject *__pyx_v_name, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Dummy_2_sympy_(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Dummy *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Dummy_8is_Dummy___get__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Dummy *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Dummy_4func___get__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Dummy *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_18symarray(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_prefix, PyObject *__pyx_v_shape, PyObject *__pyx_v_kwargs); /* proto */
static int __pyx_pf_9symengine_3lib_17symengine_wrapper_8Constant___cinit__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Constant *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8Constant_9is_number___get__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Constant *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8Constant_2_sympy_(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Constant *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8Constant_4_sage_(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Constant *__pyx_v_self); /* proto */
static int __pyx_pf_9symengine_3lib_17symengine_wrapper_13ImaginaryUnit___cinit__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_ImaginaryUnit *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_13ImaginaryUnit_2as_powers_dict(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_ImaginaryUnit *__pyx_v_self); /* proto */
static int __pyx_pf_9symengine_3lib_17symengine_wrapper_2Pi___cinit__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Pi *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_2Pi_2_sympy_(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Pi *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_2Pi_4_sage_(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Pi *__pyx_v_self); /* proto */
static int __pyx_pf_9symengine_3lib_17symengine_wrapper_4Exp1___cinit__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Exp1 *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_4Exp1_2_sympy_(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Exp1 *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_4Exp1_4_sage_(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Exp1 *__pyx_v_self); /* proto */
static int __pyx_pf_9symengine_3lib_17symengine_wrapper_11GoldenRatio___cinit__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_GoldenRatio *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_11GoldenRatio_2_sympy_(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_GoldenRatio *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_11GoldenRatio_4_sage_(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_GoldenRatio *__pyx_v_self); /* proto */
static int __pyx_pf_9symengine_3lib_17symengine_wrapper_7Catalan___cinit__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Catalan *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_7Catalan_2_sympy_(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Catalan *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_7Catalan_4_sage_(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Catalan *__pyx_v_self); /* proto */
static int __pyx_pf_9symengine_3lib_17symengine_wrapper_10EulerGamma___cinit__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_EulerGamma *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10EulerGamma_2_sympy_(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_EulerGamma *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10EulerGamma_4_sage_(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_EulerGamma *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_7Boolean_logical_not(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Boolean *__pyx_v_self); /* proto */
static int __pyx_pf_9symengine_3lib_17symengine_wrapper_7Boolean_2__bool__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Boolean *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_11BooleanAtom_10is_Boolean___get__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_BooleanAtom *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_11BooleanAtom_7is_Atom___get__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_BooleanAtom *__pyx_v_self); /* proto */
static int __pyx_pf_9symengine_3lib_17symengine_wrapper_11BooleanTrue___cinit__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_BooleanTrue *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_11BooleanTrue_2_sympy_(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_BooleanTrue *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_11BooleanTrue_4_sage_(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_BooleanTrue *__pyx_v_self); /* proto */
static int __pyx_pf_9symengine_3lib_17symengine_wrapper_11BooleanTrue_6__bool__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_BooleanTrue *__pyx_v_self); /* proto */
static int __pyx_pf_9symengine_3lib_17symengine_wrapper_12BooleanFalse___cinit__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_BooleanFalse *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_12BooleanFalse_2_sympy_(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_BooleanFalse *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_12BooleanFalse_4_sage_(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_BooleanFalse *__pyx_v_self); /* proto */
static int __pyx_pf_9symengine_3lib_17symengine_wrapper_12BooleanFalse_6__nonzero__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_BooleanFalse *__pyx_v_self); /* proto */
static int __pyx_pf_9symengine_3lib_17symengine_wrapper_12BooleanFalse_8__bool__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_BooleanFalse *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3And___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_args); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3And_2_sympy_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_2Or___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_args); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_2Or_2_sympy_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3Not___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3Not_2_sympy_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3Xor___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_args); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3Xor_2_sympy_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10Relational_is_Relational(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10Relational_2__bool__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8Equality___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_args); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8Equality_2_sympy_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8Equality_4_sage_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8Equality_6is_Equality(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8Equality_8func(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10Unequality___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_args); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10Unequality_2_sympy_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10Unequality_4_sage_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10Unequality_6func(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8LessThan___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_args); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8LessThan_2_sympy_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8LessThan_4_sage_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_14StrictLessThan___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_args); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_14StrictLessThan_2_sympy_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_14StrictLessThan_4_sage_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_6Number_7is_Atom___get__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Number *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_6Number_9is_Number___get__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Number *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_6Number_9is_number___get__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Number *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_6Number_14is_commutative___get__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Number *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_6Number_11is_positive___get__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Number *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_6Number_11is_negative___get__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Number *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_6Number_10is_nonzero___get__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Number *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_6Number_14is_nonnegative___get__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Number *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_6Number_14is_nonpositive___get__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Number *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_6Number_10is_complex___get__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Number *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_6Number_4real___get__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Number *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_6Number_4imag___get__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Number *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8Rational___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_p, PyObject *__pyx_v_q); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8Rational_2is_Rational(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8Rational_4is_rational(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8Rational_6is_real(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8Rational_8is_finite(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8Rational_10is_integer(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8Rational_12p(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8Rational_14q(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8Rational_16get_num_den(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8Rational_18_sympy_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8Rational_20_sage_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8Rational_22func(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_7Integer___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_i); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_7Integer_2is_Integer(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_7Integer_4is_integer(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_7Integer_6doit(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_hints); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_7Integer_8__hash__(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_7Integer_10__richcmp__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_a, PyObject *__pyx_v_b, int __pyx_v_op); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_7Integer_12_richcmp_(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_A, struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_B, int __pyx_v_op); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_7Integer_14_sympy_(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_7Integer_16_sage_(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_7Integer_18__int__(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_7Integer_20p(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_7Integer_22q(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_7Integer_24get_num_den(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_7Integer_26func(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_20dps_to_prec(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_n); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_9BasicMeta___instancecheck__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_instance); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Float_is_rational(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Float_2is_irrational(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Float_4is_real(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Float_6is_Float(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Float_8__new__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_num, PyObject *__pyx_v_dps, PyObject *__pyx_v_precision); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10RealDouble___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_i); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10RealDouble_2_sympy_(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10RealDouble_4_sage_(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10RealDouble_6__float__(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10RealDouble_8__complex__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_11ComplexBase_real_part(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_ComplexBase *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_11ComplexBase_2imaginary_part(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_ComplexBase *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_11ComplexBase_4real___get__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_ComplexBase *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_11ComplexBase_4imag___get__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_ComplexBase *__pyx_v_self); /* proto */
static int __pyx_pf_9symengine_3lib_17symengine_wrapper_13ComplexDouble___cinit__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_ComplexDouble *__pyx_v_self, PyObject *__pyx_v_i); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_13ComplexDouble_2_sympy_(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_ComplexDouble *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_13ComplexDouble_4_sage_(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_ComplexDouble *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_13ComplexDouble_6__complex__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_ComplexDouble *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8RealMPFR___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_i, long __pyx_v_prec, unsigned int __pyx_v_base); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8RealMPFR_2get_prec(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8RealMPFR_4_sympy_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8RealMPFR_6_sage_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static int __pyx_pf_9symengine_3lib_17symengine_wrapper_10ComplexMPC___cinit__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_ComplexMPC *__pyx_v_self, PyObject *__pyx_v_i, PyObject *__pyx_v_j, long __pyx_v_prec, unsigned int __pyx_v_base); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10ComplexMPC_2_sympy_(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_ComplexMPC *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10ComplexMPC_4_sage_(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_ComplexMPC *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_7Complex__sympy_(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Complex *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_7Complex_2_sage_(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Complex *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8Infinity_11is_infinite___get__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Infinity *__pyx_v_self); /* proto */
static int __pyx_pf_9symengine_3lib_17symengine_wrapper_8Infinity___cinit__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Infinity *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8Infinity_2_sympy_(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Infinity *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8Infinity_4_sage_(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Infinity *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_16NegativeInfinity_11is_infinite___get__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_NegativeInfinity *__pyx_v_self); /* proto */
static int __pyx_pf_9symengine_3lib_17symengine_wrapper_16NegativeInfinity___cinit__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_NegativeInfinity *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_16NegativeInfinity_2_sympy_(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_NegativeInfinity *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_16NegativeInfinity_4_sage_(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_NegativeInfinity *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_16NegativeInfinity_6as_powers_dict(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_NegativeInfinity *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15ComplexInfinity_11is_infinite___get__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_ComplexInfinity *__pyx_v_self); /* proto */
static int __pyx_pf_9symengine_3lib_17symengine_wrapper_15ComplexInfinity___cinit__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_ComplexInfinity *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15ComplexInfinity_2_sympy_(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_ComplexInfinity *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15ComplexInfinity_4_sage_(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_ComplexInfinity *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3NaN_11is_rational___get__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_NaN *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3NaN_10is_integer___get__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_NaN *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3NaN_7is_real___get__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_NaN *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3NaN_9is_finite___get__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_NaN *__pyx_v_self); /* proto */
static int __pyx_pf_9symengine_3lib_17symengine_wrapper_3NaN___cinit__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_NaN *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3NaN_2_sympy_(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_NaN *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3NaN_4_sage_(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_NaN *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_4Zero___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3One___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_11NegativeOne___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_4Half___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_7AssocOp_make_args(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_expr); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3Add___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3Add_2_from_args(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3Add_4is_Add(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3Add_6_sympy_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3Add_8_sage_(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3Add_10func(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3Add_12as_coefficients_dict(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3Mul___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3Mul_2_from_args(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3Mul_4is_Mul(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3Mul_6_sympy_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3Mul_8_sage_(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3Mul_10func(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3Mul_12as_coefficients_dict(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3Mul_14as_powers_dict(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3Pow___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_a, PyObject *__pyx_v_b); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3Pow_2base(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3Pow_4exp(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3Pow_6as_base_exp(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3Pow_8is_Pow(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3Pow_10is_commutative(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3Pow_12_sympy_(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3Pow_14_sage_(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3Pow_16func(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3Pow_18as_powers_dict(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8Function___new__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8Function_2is_Function(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8Function_4func(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_14OneArgFunction_get_arg(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_14OneArgFunction_2_sympy_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_14OneArgFunction_4_sage_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5gamma___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8LambertW___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8LambertW_2_sage_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_4zeta___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_s, PyObject *__pyx_v_a); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_4zeta_2_sympy_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_13dirichlet_eta___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_14KroneckerDelta___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_x, PyObject *__pyx_v_y); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_14KroneckerDelta_2_sympy_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_14KroneckerDelta_4_sage_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10LeviCivita___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_args); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10LeviCivita_2_sympy_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3erf___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_4erfc___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10lowergamma___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_x, PyObject *__pyx_v_y); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10lowergamma_2_sympy_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10lowergamma_4_sage_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10uppergamma___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_x, PyObject *__pyx_v_y); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10uppergamma_2_sympy_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10uppergamma_4_sage_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8loggamma___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8loggamma_2_sage_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_4beta___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_x, PyObject *__pyx_v_y); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_4beta_2_sympy_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_4beta_4_sage_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_9polygamma___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_x, PyObject *__pyx_v_y); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_9polygamma_2_sympy_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_4sign_is_complex(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_4sign_2is_finite(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_4sign_4__new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5floor___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_7ceiling___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_7ceiling_2_sage_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_9conjugate___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3log___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_x, PyObject *__pyx_v_y); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3sin___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3cos___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3tan___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3cot___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3sec___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3csc___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_4asin___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_4acos___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_4atan___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_4acot___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_4asec___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_4acsc___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_4sinh___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_4cosh___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_4tanh___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_4coth___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_4sech___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_4csch___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5asinh___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5acosh___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5atanh___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5acoth___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5asech___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5acsch___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5atan2___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_x, PyObject *__pyx_v_y); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5atan2_2_sympy_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5atan2_4_sage_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15UnevaluatedExpr___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15UnevaluatedExpr_2is_number(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15UnevaluatedExpr_4is_integer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15UnevaluatedExpr_6is_finite(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3Abs_is_real(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3Abs_2is_negative(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3Abs_4__new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3Abs_6_sympy_(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3Abs_8_sage_(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3Abs_10func(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_14FunctionSymbol_get_name(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_14FunctionSymbol_2name(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_14FunctionSymbol_4_sympy_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_14FunctionSymbol_6_sage_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_14FunctionSymbol_8func(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_13UndefFunction___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_13UndefFunction_2__call__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_22create_sympy_module(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_24create_sage_module(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static int __pyx_pf_9symengine_3lib_17symengine_wrapper_8PyNumber___cinit__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_PyNumber *__pyx_v_self, PyObject *__pyx_v_obj, struct __pyx_obj_9symengine_3lib_17symengine_wrapper_PyModule *__pyx_v_module); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8PyNumber_2_sympy_(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_PyNumber *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8PyNumber_4_sage_(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_PyNumber *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8PyNumber_6pyobject(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_PyNumber *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10PyFunction___init__(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self, PyObject *__pyx_v_pyfunction, PyObject *__pyx_v_args, PyObject *__pyx_v_pyfunction_class, PyObject *__pyx_v_module); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10PyFunction_2_sympy_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10PyFunction_4_sage_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10PyFunction_6pyobject(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self); /* proto */
static int __pyx_pf_9symengine_3lib_17symengine_wrapper_15PyFunctionClass___cinit__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_PyFunctionClass *__pyx_v_self, PyObject *__pyx_v_function, struct __pyx_obj_9symengine_3lib_17symengine_wrapper_PyModule *__pyx_v_module); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15PyFunctionClass_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_PyFunctionClass *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15PyFunctionClass_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_PyFunctionClass *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_26wrap_sage_function(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_func); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3Max___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_args); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3Max_2_sympy_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3Max_4_sage_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3Max_6func(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3Min___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_args); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3Min_2_sympy_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3Min_4_sage_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3Min_6func(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10Derivative___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_expr, PyObject *__pyx_v_variables); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10Derivative_2is_Derivative(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10Derivative_4expr(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10Derivative_6variables(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10Derivative_8_sympy_(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10Derivative_10_sage_(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10Derivative_12func(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_4Subs___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_expr, PyObject *__pyx_v_variables, PyObject *__pyx_v_point); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_4Subs_2expr(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_4Subs_4variables(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_4Subs_6point(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_4Subs_8_sympy_(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_4Subs_10_sage_(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_4Subs_12func(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_9Piecewise___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_args); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_9Piecewise_2_sympy_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3Set_intersection(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Set *__pyx_v_self, PyObject *__pyx_v_a); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3Set_2union(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Set *__pyx_v_self, PyObject *__pyx_v_a); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3Set_4complement(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Set *__pyx_v_self, PyObject *__pyx_v_a); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3Set_6contains(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Set *__pyx_v_self, PyObject *__pyx_v_a); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8Interval___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_left_open, PyObject *__pyx_v_right_open, PyObject *__pyx_v_args); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8Interval_2start(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8Interval_4end(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8Interval_6_sympy_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8EmptySet___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8EmptySet_2_sympy_(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8EmptySet_4func(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Reals___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Reals_2_sympy_(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Reals_4func(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_9Rationals___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_9Rationals_2_sympy_(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_9Rationals_4func(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8Integers___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8Integers_2_sympy_(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8Integers_4func(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_12UniversalSet___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_12UniversalSet_2_sympy_(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_12UniversalSet_4func(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_9FiniteSet___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_args); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_9FiniteSet_2_sympy_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8Contains___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_expr, PyObject *__pyx_v_sset); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8Contains_2_sympy_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Union___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_args); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Union_2_sympy_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10Complement___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_universe, PyObject *__pyx_v_container); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10Complement_2_sympy_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_12ConditionSet___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_sym, PyObject *__pyx_v_condition); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8ImageSet___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_sym, PyObject *__pyx_v_expr, PyObject *__pyx_v_base); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10MatrixBase_9is_Matrix___get__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_MatrixBase *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10MatrixBase___richcmp__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_MatrixBase *__pyx_v_a, PyObject *__pyx_v_b, int __pyx_v_op); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10MatrixBase_2_richcmp_(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_MatrixBase *__pyx_v_A, struct __pyx_obj_9symengine_3lib_17symengine_wrapper_MatrixBase *__pyx_v_B, int __pyx_v_op); /* proto */
static void __pyx_pf_9symengine_3lib_17symengine_wrapper_10MatrixBase_4__dealloc__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_MatrixBase *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10MatrixBase_6_symbolic_(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_MatrixBase *__pyx_v_self, PyObject *__pyx_v_ring); /* proto */
static Py_hash_t __pyx_pf_9symengine_3lib_17symengine_wrapper_10MatrixBase_8__hash__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_MatrixBase *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10MatrixBase_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_MatrixBase *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10MatrixBase_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_MatrixBase *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase___cinit__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self, PyObject *__pyx_v_row, PyObject *__pyx_v_col, PyObject *__pyx_v_v); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_2__repr__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_4__str__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_6_repr_latex_(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_8__add__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_a, PyObject *__pyx_v_b); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_10__radd__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self, PyObject *__pyx_v_a); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_12__mul__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_a, PyObject *__pyx_v_b); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_14__rmul__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self, PyObject *__pyx_v_a); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_16__matmul__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_a, PyObject *__pyx_v_b); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_18__rmatmul__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self, PyObject *__pyx_v_a); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_20__truediv__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_a, PyObject *__pyx_v_b); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_22__rtruediv__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self, PyObject *__pyx_v_a); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_24__sub__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_a, PyObject *__pyx_v_b); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_26__rsub__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self, PyObject *__pyx_v_a); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_28__neg__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_30__abs__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_32__getitem__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self, PyObject *__pyx_v_item); /* proto */
static int __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_34__setitem__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_36row_join(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_38col_join(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self, PyObject *__pyx_v_bott); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_40row_insert(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self, PyObject *__pyx_v_pos, PyObject *__pyx_v_bott); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_42col_insert(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self, PyObject *__pyx_v_pos, PyObject *__pyx_v_bott); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_44dot(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self, PyObject *__pyx_v_b); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_46cross(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self, PyObject *__pyx_v_b); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_4rows___get__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_4cols___get__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_9is_square___get__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_48nrows(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_50ncols(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self); /* proto */
static Py_ssize_t __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_52__len__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_5shape___get__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_4size___get__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_54ravel(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self, PyObject *__pyx_v_order); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_56reshape(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self, PyObject *__pyx_v_rows, PyObject *__pyx_v_cols); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_58_get_index(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self, PyObject *__pyx_v_i, PyObject *__pyx_v_j); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_60get(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self, PyObject *__pyx_v_i, PyObject *__pyx_v_j); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_62_get(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self, PyObject *__pyx_v_i, PyObject *__pyx_v_j); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_64col(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self, PyObject *__pyx_v_j); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_66row(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self, PyObject *__pyx_v_i); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_68set(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self, PyObject *__pyx_v_i, PyObject *__pyx_v_j, PyObject *__pyx_v_e); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_70_set(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self, PyObject *__pyx_v_i, PyObject *__pyx_v_j, PyObject *__pyx_v_e); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_72det(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_74inv(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self, PyObject *__pyx_v_method); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_76add_matrix(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self, PyObject *__pyx_v_A); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_78mul_matrix(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self, PyObject *__pyx_v_A); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_80multiply_elementwise(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self, PyObject *__pyx_v_A); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_82add_scalar(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self, PyObject *__pyx_v_k); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_84mul_scalar(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self, PyObject *__pyx_v_k); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_86transpose(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_88conjugate(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_90conjugate_transpose(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_1H___get__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_92trace(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_14is_zero_matrix___get__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_14is_real_matrix___get__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_11is_diagonal___get__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_12is_symmetric___get__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_12is_hermitian___get__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_29is_weakly_diagonally_dominant___get__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_31is_strongly_diagonally_dominant___get__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_20is_positive_definite___get__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_20is_negative_definite___get__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_1T___get__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_94applyfunc(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self, PyObject *__pyx_v_f); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_96_applyfunc(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self, PyObject *__pyx_v_f); /* proto */
static PyObject *__pyx_lambda_funcdef_lambda(PyObject *__pyx_self, PyObject *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_98msubs(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self, PyObject *__pyx_v_args); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_100_diff(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self, struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_102diff(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self, PyObject *__pyx_v_args); /* proto */
static PyObject *__pyx_lambda_funcdef_lambda1(PyObject *__pyx_self, PyObject *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_104subs(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self, PyObject *__pyx_v_args); /* proto */
static PyObject *__pyx_lambda_funcdef_lambda2(PyObject *__pyx_self, PyObject *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_106xreplace(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self, PyObject *__pyx_v_args); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_12free_symbols___get__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_108_submatrix(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self, unsigned int __pyx_v_r_i, unsigned int __pyx_v_c_i, unsigned int __pyx_v_r_j, unsigned int __pyx_v_c_j, unsigned int __pyx_v_r_s, unsigned int __pyx_v_c_s); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_110LU(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_112LUdecomposition(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_114LDL(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_116solve(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self, PyObject *__pyx_v_b, PyObject *__pyx_v_method); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_118LUsolve(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self, PyObject *__pyx_v_b); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_120FFLU(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_122FFLDU(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_124QR(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_126cholesky(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_128jacobian(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self, PyObject *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_130_sympy_(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_132_sage_(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_134dump_real(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self, __Pyx_memviewslice __pyx_v_out); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_136dump_complex(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self, __Pyx_memviewslice __pyx_v_out); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_138__iter__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_140as_mutable(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_142as_immutable(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_144tolist(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_146__array__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_148_mat(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_150atoms(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self, PyObject *__pyx_v_types); /* proto */
static PyObject *__pyx_lambda_funcdef_lambda3(PyObject *__pyx_self, PyObject *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_152simplify(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_lambda_funcdef_lambda4(PyObject *__pyx_self, PyObject *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_154expand(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_156__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_158__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_19DenseMatrixBaseIter___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_d); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_19DenseMatrixBaseIter_2__iter__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_19DenseMatrixBaseIter_4__next__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_18MutableDenseMatrix_col_swap(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_MutableDenseMatrix *__pyx_v_self, PyObject *__pyx_v_i, PyObject *__pyx_v_j); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_18MutableDenseMatrix_2fill(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_MutableDenseMatrix *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_18MutableDenseMatrix_4row_swap(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_MutableDenseMatrix *__pyx_v_self, PyObject *__pyx_v_i, PyObject *__pyx_v_j); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_18MutableDenseMatrix_6rowmul(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_MutableDenseMatrix *__pyx_v_self, PyObject *__pyx_v_i, PyObject *__pyx_v_c, CYTHON_UNUSED PyObject *__pyx_v_args); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_18MutableDenseMatrix_8rowadd(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_MutableDenseMatrix *__pyx_v_self, PyObject *__pyx_v_i, PyObject *__pyx_v_j, PyObject *__pyx_v_c, CYTHON_UNUSED PyObject *__pyx_v_args); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_18MutableDenseMatrix_10row_del(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_MutableDenseMatrix *__pyx_v_self, PyObject *__pyx_v_i); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_18MutableDenseMatrix_12col_del(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_MutableDenseMatrix *__pyx_v_self, PyObject *__pyx_v_i); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_18MutableDenseMatrix_14__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_MutableDenseMatrix *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_18MutableDenseMatrix_16__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_MutableDenseMatrix *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_9symengine_3lib_17symengine_wrapper_20ImmutableDenseMatrix___setitem__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_ImmutableDenseMatrix *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_key, CYTHON_UNUSED PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_20ImmutableDenseMatrix_2_applyfunc(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_ImmutableDenseMatrix *__pyx_v_self, PyObject *__pyx_v_f); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_20ImmutableDenseMatrix_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_ImmutableDenseMatrix *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_20ImmutableDenseMatrix_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_ImmutableDenseMatrix *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_28eye(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_n); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_30diag(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_32ones(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_r, PyObject *__pyx_v_c); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_34zeros(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_r, PyObject *__pyx_v_c); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Sieve_generate_primes(PyObject *__pyx_v_n); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Sieve_2__reduce_cython__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Sieve *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Sieve_4__setstate_cython__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Sieve *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_9symengine_3lib_17symengine_wrapper_14Sieve_iterator___cinit__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Sieve_iterator *__pyx_v_self); /* proto */
static int __pyx_pf_9symengine_3lib_17symengine_wrapper_14Sieve_iterator_2__cinit__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Sieve_iterator *__pyx_v_self, PyObject *__pyx_v_n); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_14Sieve_iterator_4__iter__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Sieve_iterator *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_14Sieve_iterator_6__next__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Sieve_iterator *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_14Sieve_iterator_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Sieve_iterator *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_14Sieve_iterator_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Sieve_iterator *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_36module_cleanup(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_38diff(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_expr, PyObject *__pyx_v_args); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_40_diff(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_expr, PyObject *__pyx_v_args); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_42expand(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x, PyObject *__pyx_v_deep); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_44function_symbol(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name, PyObject *__pyx_v_args); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_46sqrt(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_48exp(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_50perfect_power(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_n); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_52is_square(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_n); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_54integer_nthroot(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_a, PyObject *__pyx_v_n); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_56_max(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_args); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_58_min(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_args); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_60gamma(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_62eq(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_64ne(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_66ge(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_68gt(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_70le(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_72lt(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_74digamma(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_76trigamma(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_78logical_and(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_args); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_80logical_or(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_args); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_82Nor(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_args); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_84Nand(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_args); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_86logical_not(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_88logical_xor(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_args); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_90Xnor(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_args); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_92evalf(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x, unsigned long __pyx_v_bits, PyObject *__pyx_v_real); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_94eval_double(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_96eval_complex_double(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_98eval_mpfr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x, unsigned long __pyx_v_prec); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_100eval_mpc(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x, unsigned long __pyx_v_prec); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_102require(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_t); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_104eval(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x, long __pyx_v_prec); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_106eval_real(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x, long __pyx_v_prec); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_108probab_prime_p(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_n, PyObject *__pyx_v_reps); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_110nextprime(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_n); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_112gcd(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_a, PyObject *__pyx_v_b); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_114lcm(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_a, PyObject *__pyx_v_b); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_116gcd_ext(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_a, PyObject *__pyx_v_b); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_118mod(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_a, PyObject *__pyx_v_b); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_120quotient(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_a, PyObject *__pyx_v_b); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_122quotient_mod(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_a, PyObject *__pyx_v_b); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_124mod_inverse(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_a, PyObject *__pyx_v_b); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_126crt(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_rem, PyObject *__pyx_v_mod); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_128fibonacci(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_n); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_130fibonacci2(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_n); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_132lucas(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_n); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_134lucas2(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_n); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_136binomial(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_n, PyObject *__pyx_v_k); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_138factorial(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_n); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_140divides(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_a, PyObject *__pyx_v_b); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_142factor(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_n, PyObject *__pyx_v_B1); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_144factor_lehman_method(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_n); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_146factor_pollard_pm1_method(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_n, PyObject *__pyx_v_B, PyObject *__pyx_v_retries); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_148factor_pollard_rho_method(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_n, PyObject *__pyx_v_retries); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_150prime_factors(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_n); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_152prime_factor_multiplicities(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_n); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_154bernoulli(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_n); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_156primitive_root(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_n); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_158primitive_root_list(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_n); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_160totient(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_n); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_162carmichael(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_n); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_164multiplicative_order(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_a, PyObject *__pyx_v_n); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_166legendre(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_a, PyObject *__pyx_v_n); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_168jacobi(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_a, PyObject *__pyx_v_n); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_170kronecker(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_a, PyObject *__pyx_v_n); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_172nthroot_mod(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_a, PyObject *__pyx_v_n, PyObject *__pyx_v_m); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_174nthroot_mod_list(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_a, PyObject *__pyx_v_n, PyObject *__pyx_v_m); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_176sqrt_mod(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_a, PyObject *__pyx_v_p, PyObject *__pyx_v_all_roots); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_178powermod(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_m); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_180powermod_list(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_m); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_182has_symbol(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_symbol); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_9_Lambdify_8__init___genexpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0); /* proto */
static int __pyx_pf_9symengine_3lib_17symengine_wrapper_9_Lambdify___init__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify *__pyx_v_self, PyObject *__pyx_v_args, bool __pyx_v_real, PyObject *__pyx_v_order, bool __pyx_v_cse, bool __pyx_v__load, PyObject *__pyx_v_dtype, PyObject *__pyx_v_exprs, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_9_Lambdify_2eval_real(struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify *__pyx_v_self, PyObject *__pyx_v_inp, PyObject *__pyx_v_out); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_9_Lambdify_4eval_complex(struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify *__pyx_v_self, PyObject *__pyx_v_inp, PyObject *__pyx_v_out); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_9_Lambdify_6unsafe_eval(struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify *__pyx_v_self, PyObject *__pyx_v_inp, PyObject *__pyx_v_out, unsigned int __pyx_v_nbroadcast); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_9_Lambdify_8__call__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify *__pyx_v_self, PyObject *__pyx_v_out, PyObject *__pyx_v_args); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_9_Lambdify_4real___get__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_9_Lambdify_7n_exprs___get__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_9_Lambdify_5order___get__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify *__pyx_v_self); /* proto */
static int __pyx_pf_9symengine_3lib_17symengine_wrapper_9_Lambdify_5order_2__set__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_9symengine_3lib_17symengine_wrapper_9_Lambdify_5order_4__del__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_9_Lambdify_10__reduce_cython__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_9_Lambdify_12__setstate_cython__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_25create_low_level_callable_24LambdifyLowLevelCallable___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_lambdify, CYTHON_UNUSED PyObject *__pyx_v_args); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_25create_low_level_callable_24LambdifyLowLevelCallable_2__new__(PyObject *__pyx_self, PyObject *__pyx_v_cls, CYTHON_UNUSED PyObject *__pyx_v_value, PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_184create_low_level_callable(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lambdify, PyObject *__pyx_v_args); /* proto */
static int __pyx_pf_9symengine_3lib_17symengine_wrapper_12LambdaDouble___cinit__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LambdaDouble *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED bool __pyx_v_real, CYTHON_UNUSED PyObject *__pyx_v_order, CYTHON_UNUSED bool __pyx_v_cse, CYTHON_UNUSED bool __pyx_v__load, CYTHON_UNUSED PyObject *__pyx_v_dtype, CYTHON_UNUSED PyObject *__pyx_v_exprs); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_12LambdaDouble_2unsafe_real(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LambdaDouble *__pyx_v_self, __Pyx_memviewslice __pyx_v_inp, __Pyx_memviewslice __pyx_v_out, int __pyx_v_inp_offset, int __pyx_v_out_offset); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_12LambdaDouble_4unsafe_eval(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LambdaDouble *__pyx_v_self, PyObject *__pyx_v_inp, PyObject *__pyx_v_out, unsigned int __pyx_v_nbroadcast); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_12LambdaDouble_6as_scipy_low_level_callable(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LambdaDouble *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_12LambdaDouble_8as_ctypes(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LambdaDouble *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_12LambdaDouble_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LambdaDouble *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_12LambdaDouble_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LambdaDouble *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_9symengine_3lib_17symengine_wrapper_19LambdaComplexDouble___cinit__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LambdaComplexDouble *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED bool __pyx_v_real, CYTHON_UNUSED PyObject *__pyx_v_order, CYTHON_UNUSED bool __pyx_v_cse, CYTHON_UNUSED bool __pyx_v__load, CYTHON_UNUSED PyObject *__pyx_v_dtype, CYTHON_UNUSED PyObject *__pyx_v_exprs); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_19LambdaComplexDouble_2unsafe_complex(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LambdaComplexDouble *__pyx_v_self, __Pyx_memviewslice __pyx_v_inp, __Pyx_memviewslice __pyx_v_out, int __pyx_v_inp_offset, int __pyx_v_out_offset); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_19LambdaComplexDouble_4unsafe_eval(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LambdaComplexDouble *__pyx_v_self, PyObject *__pyx_v_inp, PyObject *__pyx_v_out, unsigned int __pyx_v_nbroadcast); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_19LambdaComplexDouble_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LambdaComplexDouble *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_19LambdaComplexDouble_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LambdaComplexDouble *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_9symengine_3lib_17symengine_wrapper_10LLVMDouble___cinit__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMDouble *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED bool __pyx_v_real, CYTHON_UNUSED PyObject *__pyx_v_order, CYTHON_UNUSED bool __pyx_v_cse, CYTHON_UNUSED bool __pyx_v__load, PyObject *__pyx_v_opt_level, CYTHON_UNUSED PyObject *__pyx_v_dtype, CYTHON_UNUSED PyObject *__pyx_v_exprs); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10LLVMDouble_2__reduce__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMDouble *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10LLVMDouble_4unsafe_real(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMDouble *__pyx_v_self, __Pyx_memviewslice __pyx_v_inp, __Pyx_memviewslice __pyx_v_out, int __pyx_v_inp_offset, int __pyx_v_out_offset); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10LLVMDouble_6unsafe_eval(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMDouble *__pyx_v_self, PyObject *__pyx_v_inp, PyObject *__pyx_v_out, unsigned int __pyx_v_nbroadcast); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10LLVMDouble_8as_scipy_low_level_callable(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMDouble *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10LLVMDouble_10as_ctypes(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMDouble *__pyx_v_self); /* proto */
static int __pyx_pf_9symengine_3lib_17symengine_wrapper_9LLVMFloat___cinit__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMFloat *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED bool __pyx_v_real, CYTHON_UNUSED PyObject *__pyx_v_order, CYTHON_UNUSED bool __pyx_v_cse, CYTHON_UNUSED bool __pyx_v__load, PyObject *__pyx_v_opt_level, CYTHON_UNUSED PyObject *__pyx_v_dtype, CYTHON_UNUSED PyObject *__pyx_v_exprs); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_9LLVMFloat_2__reduce__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMFloat *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_9LLVMFloat_4unsafe_real(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMFloat *__pyx_v_self, __Pyx_memviewslice __pyx_v_inp, __Pyx_memviewslice __pyx_v_out, int __pyx_v_inp_offset, int __pyx_v_out_offset); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_9LLVMFloat_6unsafe_eval(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMFloat *__pyx_v_self, PyObject *__pyx_v_inp, PyObject *__pyx_v_out, unsigned int __pyx_v_nbroadcast); /* proto */
static int __pyx_pf_9symengine_3lib_17symengine_wrapper_14LLVMLongDouble___cinit__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMLongDouble *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED bool __pyx_v_real, CYTHON_UNUSED PyObject *__pyx_v_order, CYTHON_UNUSED bool __pyx_v_cse, CYTHON_UNUSED bool __pyx_v__load, PyObject *__pyx_v_opt_level, CYTHON_UNUSED PyObject *__pyx_v_dtype, CYTHON_UNUSED PyObject *__pyx_v_exprs); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_14LLVMLongDouble_2__reduce__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMLongDouble *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_14LLVMLongDouble_4unsafe_real(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMLongDouble *__pyx_v_self, __Pyx_memviewslice __pyx_v_inp, __Pyx_memviewslice __pyx_v_out, int __pyx_v_inp_offset, int __pyx_v_out_offset); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_14LLVMLongDouble_6unsafe_eval(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMLongDouble *__pyx_v_self, PyObject *__pyx_v_inp, PyObject *__pyx_v_out, unsigned int __pyx_v_nbroadcast); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_186llvm_loading_func(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_args); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_188llvm_float_loading_func(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_args); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_190llvm_long_double_loading_func(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_args); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_192Lambdify(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_args, bool __pyx_v_real, PyObject *__pyx_v_backend, PyObject *__pyx_v_order, PyObject *__pyx_v_as_scipy, PyObject *__pyx_v_cse, PyObject *__pyx_v_dtype, PyObject *__pyx_v_exprs, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_194LambdifyCSE(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_args, PyObject *__pyx_v_order, PyObject *__pyx_v_exprs, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_196ccode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_expr); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_198piecewise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_v); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_200interval(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_start, PyObject *__pyx_v_end, PyObject *__pyx_v_left_open, PyObject *__pyx_v_right_open); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_202emptyset(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_204universalset(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_206reals(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_208rationals(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_210integers(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_212finiteset(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_args); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_214contains(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_expr, PyObject *__pyx_v_sset); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_216is_zero(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_expr); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_218is_positive(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_expr); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_220is_negative(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_expr); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_222is_nonpositive(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_expr); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_224is_nonnegative(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_expr); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_226is_real(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_expr); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_228set_union(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_args); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_230set_intersection(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_args); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_232set_complement(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_universe, PyObject *__pyx_v_container); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_234set_complement_helper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_container, PyObject *__pyx_v_universe); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_236conditionset(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_sym, PyObject *__pyx_v_condition); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_238imageset(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_sym, PyObject *__pyx_v_expr, PyObject *__pyx_v_base); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_240solve(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_f, PyObject *__pyx_v_sym, PyObject *__pyx_v_domain); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_242linsolve(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_eqs, PyObject *__pyx_v_syms); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_244cse(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_exprs); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_246latex(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_expr); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_248unicode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_expr); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_250count_ops(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_exprs); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_252__pyx_unpickle_Sieve(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_254__pyx_unpickle__Lambdify(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_tp_new_9symengine_3lib_17symengine_wrapper_Basic(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9symengine_3lib_17symengine_wrapper_MatrixBase(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9symengine_3lib_17symengine_wrapper_PyFunctionClass(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9symengine_3lib_17symengine_wrapper_PyModule(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9symengine_3lib_17symengine_wrapper__DictBasic(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9symengine_3lib_17symengine_wrapper_DictBasicIter(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9symengine_3lib_17symengine_wrapper__Lambdify(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9symengine_3lib_17symengine_wrapper_LambdaDouble(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9symengine_3lib_17symengine_wrapper_LambdaComplexDouble(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9symengine_3lib_17symengine_wrapper__LLVMLambdify(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9symengine_3lib_17symengine_wrapper_LLVMDouble(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9symengine_3lib_17symengine_wrapper_LLVMFloat(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9symengine_3lib_17symengine_wrapper_LLVMLongDouble(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9symengine_3lib_17symengine_wrapper_Constant(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9symengine_3lib_17symengine_wrapper_Pi(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9symengine_3lib_17symengine_wrapper_Exp1(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9symengine_3lib_17symengine_wrapper_GoldenRatio(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9symengine_3lib_17symengine_wrapper_Catalan(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9symengine_3lib_17symengine_wrapper_EulerGamma(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9symengine_3lib_17symengine_wrapper_BooleanTrue(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9symengine_3lib_17symengine_wrapper_BooleanFalse(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9symengine_3lib_17symengine_wrapper_ComplexDouble(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9symengine_3lib_17symengine_wrapper_ComplexMPC(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9symengine_3lib_17symengine_wrapper_ImaginaryUnit(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9symengine_3lib_17symengine_wrapper_Infinity(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9symengine_3lib_17symengine_wrapper_NegativeInfinity(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9symengine_3lib_17symengine_wrapper_ComplexInfinity(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9symengine_3lib_17symengine_wrapper_NaN(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9symengine_3lib_17symengine_wrapper_PyNumber(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9symengine_3lib_17symengine_wrapper_DenseMatrixBase(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9symengine_3lib_17symengine_wrapper_Sieve(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9symengine_3lib_17symengine_wrapper_Sieve_iterator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9symengine_3lib_17symengine_wrapper___pyx_scope_struct__msubs(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_1_subs(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_2_xreplace(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_3_simplify(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_4_expand(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_5_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_6_create_low_level_callable(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_array(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_Enum(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_memoryview(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new__memoryviewslice(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
/* #### Code section: late_includes ### */
/* #### Code section: module_state ### */
/* SmallCodeConfig */
#ifndef CYTHON_SMALL_CODE
#if defined(__clang__)
    #define CYTHON_SMALL_CODE
#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
    #define CYTHON_SMALL_CODE __attribute__((cold))
#else
    #define CYTHON_SMALL_CODE
#endif
#endif

typedef struct {
  PyObject *__pyx_d;
  PyObject *__pyx_b;
  PyObject *__pyx_cython_runtime;
  PyObject *__pyx_empty_tuple;
  PyObject *__pyx_empty_bytes;
  PyObject *__pyx_empty_unicode;
  PyTypeObject *__pyx_ptype_7cpython_4type_type;
  PyTypeObject *__pyx_ptype_7cpython_4bool_bool;
  PyTypeObject *__pyx_ptype_7cpython_7complex_complex;
  PyObject *__pyx_type_9symengine_3lib_17symengine_wrapper_Basic;
  PyObject *__pyx_type_9symengine_3lib_17symengine_wrapper_MatrixBase;
  PyObject *__pyx_type_9symengine_3lib_17symengine_wrapper_PyFunctionClass;
  PyObject *__pyx_type_9symengine_3lib_17symengine_wrapper_PyModule;
  PyObject *__pyx_type_9symengine_3lib_17symengine_wrapper__DictBasic;
  PyObject *__pyx_type_9symengine_3lib_17symengine_wrapper_DictBasicIter;
  PyObject *__pyx_type_9symengine_3lib_17symengine_wrapper__Lambdify;
  PyObject *__pyx_type_9symengine_3lib_17symengine_wrapper_LambdaDouble;
  PyObject *__pyx_type_9symengine_3lib_17symengine_wrapper_LambdaComplexDouble;
  PyObject *__pyx_type_9symengine_3lib_17symengine_wrapper__LLVMLambdify;
  PyObject *__pyx_type_9symengine_3lib_17symengine_wrapper_LLVMDouble;
  PyObject *__pyx_type_9symengine_3lib_17symengine_wrapper_LLVMFloat;
  PyObject *__pyx_type_9symengine_3lib_17symengine_wrapper_LLVMLongDouble;
  PyObject *__pyx_type_9symengine_3lib_17symengine_wrapper_Expr;
  PyObject *__pyx_type_9symengine_3lib_17symengine_wrapper_Symbol;
  PyObject *__pyx_type_9symengine_3lib_17symengine_wrapper_Dummy;
  PyObject *__pyx_type_9symengine_3lib_17symengine_wrapper_Constant;
  PyObject *__pyx_type_9symengine_3lib_17symengine_wrapper_Pi;
  PyObject *__pyx_type_9symengine_3lib_17symengine_wrapper_Exp1;
  PyObject *__pyx_type_9symengine_3lib_17symengine_wrapper_GoldenRatio;
  PyObject *__pyx_type_9symengine_3lib_17symengine_wrapper_Catalan;
  PyObject *__pyx_type_9symengine_3lib_17symengine_wrapper_EulerGamma;
  PyObject *__pyx_type_9symengine_3lib_17symengine_wrapper_Boolean;
  PyObject *__pyx_type_9symengine_3lib_17symengine_wrapper_BooleanAtom;
  PyObject *__pyx_type_9symengine_3lib_17symengine_wrapper_BooleanTrue;
  PyObject *__pyx_type_9symengine_3lib_17symengine_wrapper_BooleanFalse;
  PyObject *__pyx_type_9symengine_3lib_17symengine_wrapper_Number;
  PyObject *__pyx_type_9symengine_3lib_17symengine_wrapper_ComplexBase;
  PyObject *__pyx_type_9symengine_3lib_17symengine_wrapper_ComplexDouble;
  PyObject *__pyx_type_9symengine_3lib_17symengine_wrapper_ComplexMPC;
  PyObject *__pyx_type_9symengine_3lib_17symengine_wrapper_Complex;
  PyObject *__pyx_type_9symengine_3lib_17symengine_wrapper_ImaginaryUnit;
  PyObject *__pyx_type_9symengine_3lib_17symengine_wrapper_Infinity;
  PyObject *__pyx_type_9symengine_3lib_17symengine_wrapper_NegativeInfinity;
  PyObject *__pyx_type_9symengine_3lib_17symengine_wrapper_ComplexInfinity;
  PyObject *__pyx_type_9symengine_3lib_17symengine_wrapper_NaN;
  PyObject *__pyx_type_9symengine_3lib_17symengine_wrapper_PyNumber;
  PyObject *__pyx_type_9symengine_3lib_17symengine_wrapper_Set;
  PyObject *__pyx_type_9symengine_3lib_17symengine_wrapper_DenseMatrixBase;
  PyObject *__pyx_type_9symengine_3lib_17symengine_wrapper_MutableDenseMatrix;
  PyObject *__pyx_type_9symengine_3lib_17symengine_wrapper_ImmutableDenseMatrix;
  PyObject *__pyx_type_9symengine_3lib_17symengine_wrapper_Sieve;
  PyObject *__pyx_type_9symengine_3lib_17symengine_wrapper_Sieve_iterator;
  PyObject *__pyx_type_9symengine_3lib_17symengine_wrapper___pyx_scope_struct__msubs;
  PyObject *__pyx_type_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_1_subs;
  PyObject *__pyx_type_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_2_xreplace;
  PyObject *__pyx_type_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_3_simplify;
  PyObject *__pyx_type_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_4_expand;
  PyObject *__pyx_type_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_5_genexpr;
  PyObject *__pyx_type_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_6_create_low_level_callable;
  PyObject *__pyx_type___pyx_array;
  PyObject *__pyx_type___pyx_MemviewEnum;
  PyObject *__pyx_type___pyx_memoryview;
  PyObject *__pyx_type___pyx_memoryviewslice;
  PyTypeObject *__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic;
  PyTypeObject *__pyx_ptype_9symengine_3lib_17symengine_wrapper_MatrixBase;
  PyTypeObject *__pyx_ptype_9symengine_3lib_17symengine_wrapper_PyFunctionClass;
  PyTypeObject *__pyx_ptype_9symengine_3lib_17symengine_wrapper_PyModule;
  PyTypeObject *__pyx_ptype_9symengine_3lib_17symengine_wrapper__DictBasic;
  PyTypeObject *__pyx_ptype_9symengine_3lib_17symengine_wrapper_DictBasicIter;
  PyTypeObject *__pyx_ptype_9symengine_3lib_17symengine_wrapper__Lambdify;
  PyTypeObject *__pyx_ptype_9symengine_3lib_17symengine_wrapper_LambdaDouble;
  PyTypeObject *__pyx_ptype_9symengine_3lib_17symengine_wrapper_LambdaComplexDouble;
  PyTypeObject *__pyx_ptype_9symengine_3lib_17symengine_wrapper__LLVMLambdify;
  PyTypeObject *__pyx_ptype_9symengine_3lib_17symengine_wrapper_LLVMDouble;
  PyTypeObject *__pyx_ptype_9symengine_3lib_17symengine_wrapper_LLVMFloat;
  PyTypeObject *__pyx_ptype_9symengine_3lib_17symengine_wrapper_LLVMLongDouble;
  PyTypeObject *__pyx_ptype_9symengine_3lib_17symengine_wrapper_Expr;
  PyTypeObject *__pyx_ptype_9symengine_3lib_17symengine_wrapper_Symbol;
  PyTypeObject *__pyx_ptype_9symengine_3lib_17symengine_wrapper_Dummy;
  PyTypeObject *__pyx_ptype_9symengine_3lib_17symengine_wrapper_Constant;
  PyTypeObject *__pyx_ptype_9symengine_3lib_17symengine_wrapper_Pi;
  PyTypeObject *__pyx_ptype_9symengine_3lib_17symengine_wrapper_Exp1;
  PyTypeObject *__pyx_ptype_9symengine_3lib_17symengine_wrapper_GoldenRatio;
  PyTypeObject *__pyx_ptype_9symengine_3lib_17symengine_wrapper_Catalan;
  PyTypeObject *__pyx_ptype_9symengine_3lib_17symengine_wrapper_EulerGamma;
  PyTypeObject *__pyx_ptype_9symengine_3lib_17symengine_wrapper_Boolean;
  PyTypeObject *__pyx_ptype_9symengine_3lib_17symengine_wrapper_BooleanAtom;
  PyTypeObject *__pyx_ptype_9symengine_3lib_17symengine_wrapper_BooleanTrue;
  PyTypeObject *__pyx_ptype_9symengine_3lib_17symengine_wrapper_BooleanFalse;
  PyTypeObject *__pyx_ptype_9symengine_3lib_17symengine_wrapper_Number;
  PyTypeObject *__pyx_ptype_9symengine_3lib_17symengine_wrapper_ComplexBase;
  PyTypeObject *__pyx_ptype_9symengine_3lib_17symengine_wrapper_ComplexDouble;
  PyTypeObject *__pyx_ptype_9symengine_3lib_17symengine_wrapper_ComplexMPC;
  PyTypeObject *__pyx_ptype_9symengine_3lib_17symengine_wrapper_Complex;
  PyTypeObject *__pyx_ptype_9symengine_3lib_17symengine_wrapper_ImaginaryUnit;
  PyTypeObject *__pyx_ptype_9symengine_3lib_17symengine_wrapper_Infinity;
  PyTypeObject *__pyx_ptype_9symengine_3lib_17symengine_wrapper_NegativeInfinity;
  PyTypeObject *__pyx_ptype_9symengine_3lib_17symengine_wrapper_ComplexInfinity;
  PyTypeObject *__pyx_ptype_9symengine_3lib_17symengine_wrapper_NaN;
  PyTypeObject *__pyx_ptype_9symengine_3lib_17symengine_wrapper_PyNumber;
  PyTypeObject *__pyx_ptype_9symengine_3lib_17symengine_wrapper_Set;
  PyTypeObject *__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase;
  PyTypeObject *__pyx_ptype_9symengine_3lib_17symengine_wrapper_MutableDenseMatrix;
  PyTypeObject *__pyx_ptype_9symengine_3lib_17symengine_wrapper_ImmutableDenseMatrix;
  PyTypeObject *__pyx_ptype_9symengine_3lib_17symengine_wrapper_Sieve;
  PyTypeObject *__pyx_ptype_9symengine_3lib_17symengine_wrapper_Sieve_iterator;
  PyTypeObject *__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct__msubs;
  PyTypeObject *__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_1_subs;
  PyTypeObject *__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_2_xreplace;
  PyTypeObject *__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_3_simplify;
  PyTypeObject *__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_4_expand;
  PyTypeObject *__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_5_genexpr;
  PyTypeObject *__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_6_create_low_level_callable;
  PyTypeObject *__pyx_array_type;
  PyTypeObject *__pyx_MemviewEnum_type;
  PyTypeObject *__pyx_memoryview_type;
  PyTypeObject *__pyx_memoryviewslice_type;
  __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_items;
  __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_pop;
  __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_values;
  __Pyx_CachedCFunction __pyx_umethod_PyList_Type_pop;
  __Pyx_CachedCFunction __pyx_umethod_PySet_Type__update;
  PyObject *__pyx_slice[2];
  PyObject *__pyx_tuple[25];
  PyObject *__pyx_codeobj_tab[591];
  PyObject *__pyx_string_tab[1874];
  PyObject *__pyx_number_tab[18];
/* #### Code section: module_state_contents ### */
/* CommonTypesMetaclass.module_state_decls */
PyTypeObject *__pyx_CommonTypesMetaclassType;

/* CachedMethodType.module_state_decls */
#if CYTHON_COMPILING_IN_LIMITED_API
PyObject *__Pyx_CachedMethodType;
#endif

/* CythonFunctionShared.module_state_decls */
PyTypeObject *__pyx_CyFunctionType;


#if CYTHON_USE_FREELISTS
struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct__msubs *__pyx_freelist_9symengine_3lib_17symengine_wrapper___pyx_scope_struct__msubs[8];
int __pyx_freecount_9symengine_3lib_17symengine_wrapper___pyx_scope_struct__msubs;
#endif

#if CYTHON_USE_FREELISTS
struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_1_subs *__pyx_freelist_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_1_subs[8];
int __pyx_freecount_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_1_subs;
#endif

#if CYTHON_USE_FREELISTS
struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_2_xreplace *__pyx_freelist_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_2_xreplace[8];
int __pyx_freecount_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_2_xreplace;
#endif

#if CYTHON_USE_FREELISTS
struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_3_simplify *__pyx_freelist_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_3_simplify[8];
int __pyx_freecount_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_3_simplify;
#endif

#if CYTHON_USE_FREELISTS
struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_4_expand *__pyx_freelist_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_4_expand[8];
int __pyx_freecount_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_4_expand;
#endif

#if CYTHON_USE_FREELISTS
struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_5_genexpr *__pyx_freelist_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_5_genexpr[8];
int __pyx_freecount_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_5_genexpr;
#endif

#if CYTHON_USE_FREELISTS
struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_6_create_low_level_callable *__pyx_freelist_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_6_create_low_level_callable[8];
int __pyx_freecount_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_6_create_low_level_callable;
#endif
/* CodeObjectCache.module_state_decls */
struct __Pyx_CodeObjectCache __pyx_code_cache;

/* IterNextPlain.module_state_decls */
#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
PyObject *__Pyx_GetBuiltinNext_LimitedAPI_cache;
#endif

/* Generator.module_state_decls */
PyTypeObject *__pyx_GeneratorType;

/* #### Code section: module_state_end ### */
} __pyx_mstatetype;

#if CYTHON_USE_MODULE_STATE
#ifdef __cplusplus
namespace {
extern struct PyModuleDef __pyx_moduledef;
} /* anonymous namespace */
#else
static struct PyModuleDef __pyx_moduledef;
#endif

#define __pyx_mstate_global (__Pyx_PyModule_GetState(__Pyx_State_FindModule(&__pyx_moduledef)))

#define __pyx_m (__Pyx_State_FindModule(&__pyx_moduledef))
#else
static __pyx_mstatetype __pyx_mstate_global_static =
#ifdef __cplusplus
    {};
#else
    {0};
#endif
static __pyx_mstatetype * const __pyx_mstate_global = &__pyx_mstate_global_static;
#endif
/* #### Code section: constant_name_defines ### */
#define __pyx_kp_u_ __pyx_string_tab[0]
#define __pyx_kp_u_1_0 __pyx_string_tab[1]
#define __pyx_kp_u_Both_decimal_and_binary_precisio __pyx_string_tab[2]
#define __pyx_kp_u_Both_or_neither_keyword_argument __pyx_string_tab[3]
#define __pyx_kp_u_Broadcasting_failed_input_arg_si __pyx_string_tab[4]
#define __pyx_kp_u_Buffer_view_does_not_expose_stri __pyx_string_tab[5]
#define __pyx_kp_u_C_order_implies_last_dim __pyx_string_tab[6]
#define __pyx_kp_u_Can_only_create_a_buffer_that_is __pyx_string_tab[7]
#define __pyx_kp_u_Can_t_convert_expression_to_floa __pyx_string_tab[8]
#define __pyx_kp_u_Cannot_assign_to_read_only_memor __pyx_string_tab[9]
#define __pyx_kp_u_Cannot_create_writable_memory_vi __pyx_string_tab[10]
#define __pyx_kp_u_Cannot_index_with_type __pyx_string_tab[11]
#define __pyx_kp_u_Cannot_set_values_of __pyx_string_tab[12]
#define __pyx_kp_u_Cannot_transpose_memoryview_with __pyx_string_tab[13]
#define __pyx_kp_u_Column_index_out_of_bounds_d __pyx_string_tab[14]
#define __pyx_kp_u_Converts_an_expression_a_into_a __pyx_string_tab[15]
#define __pyx_kp_u_Converts_an_expression_a_into_a_2 __pyx_string_tab[16]
#define __pyx_kp_u_Dimension_d_is_not_direct __pyx_string_tab[17]
#define __pyx_kp_u_Dimensions_incorrect_for_cross_p __pyx_string_tab[18]
#define __pyx_kp_u_Empty_shape_tuple_for_cython_arr __pyx_string_tab[19]
#define __pyx_kp_u_F_order_implies_first_dim __pyx_string_tab[20]
#define __pyx_kp_u_Incompatible_size_of_output_argu __pyx_string_tab[21]
#define __pyx_kp_u_Index_out_of_range_i __pyx_string_tab[22]
#define __pyx_kp_u_Index_out_of_range_i_2 __pyx_string_tab[23]
#define __pyx_kp_u_Indirect_dimensions_not_supporte __pyx_string_tab[24]
#define __pyx_kp_u_Internal_error_in_symengine_py_t __pyx_string_tab[25]
#define __pyx_kp_u_Invalid_mode_expected_c_or_fortr __pyx_string_tab[26]
#define __pyx_kp_u_Invalid_reshape_parameters __pyx_string_tab[27]
#define __pyx_kp_u_Invalid_shape_in_axis __pyx_string_tab[28]
#define __pyx_kp_u_Invalid_shapes_for_matrix_additi __pyx_string_tab[29]
#define __pyx_kp_u_Invalid_shapes_for_matrix_multip __pyx_string_tab[30]
#define __pyx_kp_u_Invalid_shapes_for_matrix_subtra __pyx_string_tab[31]
#define __pyx_kp_u_LU_decomposition_not_implemented __pyx_string_tab[32]
#define __pyx_kp_u_Lambda_function_has_to_be_real __pyx_string_tab[33]
#define __pyx_kp_u_LambdifyCSE_is_deprecated_Use_La __pyx_string_tab[34]
#define __pyx_kp_u_Lambdify_instances_are_callback __pyx_string_tab[35]
#define __pyx_kp_u_Lambdify_line_5342 __pyx_string_tab[36]
#define __pyx_kp_u_MemoryView_of __pyx_string_tab[37]
#define __pyx_kp_u_Not_supported __pyx_string_tab[38]
#define __pyx_kp_u_Note_that_Cython_is_deliberately __pyx_string_tab[39]
#define __pyx_kp_u_Number_of_elements_should_equal __pyx_string_tab[40]
#define __pyx_kp_u_Number_of_equations_and_symbols __pyx_string_tab[41]
#define __pyx_kp_u_Only_C_F_order_supported_for_now __pyx_string_tab[42]
#define __pyx_kp_u_Out_of_bounds_on_buffer_access_a __pyx_string_tab[43]
#define __pyx_kp_u_Output_argument_needs_to_be_C_co __pyx_string_tab[44]
#define __pyx_kp_u_Output_argument_needs_to_be_F_co __pyx_string_tab[45]
#define __pyx_kp_u_Output_argument_needs_to_be_writ __pyx_string_tab[46]
#define __pyx_kp_u_Output_array_need_to_be_contiguo __pyx_string_tab[47]
#define __pyx_kp_u_RealMPFR_unavailable_for_high_pr __pyx_string_tab[48]
#define __pyx_kp_u_Required_at_least_one_argument_t __pyx_string_tab[49]
#define __pyx_kp_u_Row_index_out_of_bounds_d __pyx_string_tab[50]
#define __pyx_kp_u_SciPy_LowLevelCallable_supports __pyx_string_tab[51]
#define __pyx_kp_u_Size_of_inp_incompatible_with_nu __pyx_string_tab[52]
#define __pyx_kp_u_Size_of_out_incompatible_with_nu __pyx_string_tab[53]
#define __pyx_kp_u_Support_for_zero_arguments_not_y __pyx_string_tab[54]
#define __pyx_kp_u_Unable_to_convert_item_to_object __pyx_string_tab[55]
#define __pyx_kp_u_Unexpected_extra_arguments __pyx_string_tab[56]
#define __pyx_kp_u_Unexpected_integer_argument __pyx_string_tab[57]
#define __pyx_kp_u_Unknown_Constant __pyx_string_tab[58]
#define __pyx_kp_u_Unknown_SymEngine_backend_s_Usin __pyx_string_tab[59]
#define __pyx_kp_u_Unknown_numpy_dtype __pyx_string_tab[60]
#define __pyx_kp_u_Unknown_order_s __pyx_string_tab[61]
#define __pyx_kp_u_Unsupported_SymEngine_class __pyx_string_tab[62]
#define __pyx_kp_u_Unsupported_method __pyx_string_tab[63]
#define __pyx_kp_u_Variable_w_r_t_should_be_given __pyx_string_tab[64]
#define __pyx_kp_u_Wrong_matrix_shape __pyx_string_tab[65]
#define __pyx_kp_u__11 __pyx_string_tab[66]
#define __pyx_kp_u__12 __pyx_string_tab[67]
#define __pyx_kp_u__14 __pyx_string_tab[68]
#define __pyx_kp_u__2 __pyx_string_tab[69]
#define __pyx_kp_u__3 __pyx_string_tab[70]
#define __pyx_kp_u__4 __pyx_string_tab[71]
#define __pyx_kp_u__5 __pyx_string_tab[72]
#define __pyx_kp_u__6 __pyx_string_tab[73]
#define __pyx_kp_u__7 __pyx_string_tab[74]
#define __pyx_kp_u__8 __pyx_string_tab[75]
#define __pyx_kp_u__9 __pyx_string_tab[76]
#define __pyx_kp_u_add_note __pyx_string_tab[77]
#define __pyx_kp_u_and __pyx_string_tab[78]
#define __pyx_kp_u_at_0x __pyx_string_tab[79]
#define __pyx_kp_u_cannot_determine_truth_value_of __pyx_string_tab[80]
#define __pyx_kp_u_cannot_determine_truth_value_of_2 __pyx_string_tab[81]
#define __pyx_kp_u_collections_abc __pyx_string_tab[82]
#define __pyx_kp_u_contiguous_and_direct __pyx_string_tab[83]
#define __pyx_kp_u_contiguous_and_indirect __pyx_string_tab[84]
#define __pyx_kp_u_disable __pyx_string_tab[85]
#define __pyx_kp_u_enable __pyx_string_tab[86]
#define __pyx_kp_u_eval_complex_double_is_deprecate __pyx_string_tab[87]
#define __pyx_kp_u_eval_double_is_deprecated_Use_ev __pyx_string_tab[88]
#define __pyx_kp_u_eval_is_deprecated_Use_evalf_rea __pyx_string_tab[89]
#define __pyx_kp_u_eval_mpc_is_deprecated_Use_evalf __pyx_string_tab[90]
#define __pyx_kp_u_eval_mpfr_is_deprecated_Use_eval __pyx_string_tab[91]
#define __pyx_kp_u_eval_real_is_deprecated_Use_eval __pyx_string_tab[92]
#define __pyx_kp_u_gc __pyx_string_tab[93]
#define __pyx_kp_u_got __pyx_string_tab[94]
#define __pyx_kp_u_got_differing_extents_in_dimensi __pyx_string_tab[95]
#define __pyx_kp_u_i_2 __pyx_string_tab[96]
#define __pyx_kp_u_isenabled __pyx_string_tab[97]
#define __pyx_kp_u_itemsize_0_for_cython_array __pyx_string_tab[98]
#define __pyx_kp_u_len_args __pyx_string_tab[99]
#define __pyx_kp_u_no_default___reduce___due_to_non __pyx_string_tab[100]
#define __pyx_kp_u_object_2 __pyx_string_tab[101]
#define __pyx_kp_u_of_type __pyx_string_tab[102]
#define __pyx_kp_u_out_parameter_too_short __pyx_string_tab[103]
#define __pyx_kp_u_output_array_with_ndim_1_assumes __pyx_string_tab[104]
#define __pyx_kp_u_pickling_for_Symbol_subclass_not __pyx_string_tab[105]
#define __pyx_kp_u_required_is_of_type __pyx_string_tab[106]
#define __pyx_kp_u_self_and_other_must_have_the_sa __pyx_string_tab[107]
#define __pyx_kp_u_self_and_other_must_have_the_sa_2 __pyx_string_tab[108]
#define __pyx_kp_u_self_and_rhs_must_have_the_same __pyx_string_tab[109]
#define __pyx_kp_u_self_and_rhs_must_have_the_same_2 __pyx_string_tab[110]
#define __pyx_kp_u_self_begin_self_end_cannot_be_co __pyx_string_tab[111]
#define __pyx_kp_u_self_c_cannot_be_converted_to_a __pyx_string_tab[112]
#define __pyx_kp_u_self_thisptr_cannot_be_converted __pyx_string_tab[113]
#define __pyx_kp_u_shape_mismatch_for_output_array __pyx_string_tab[114]
#define __pyx_kp_u_sizes_don_t_match __pyx_string_tab[115]
#define __pyx_kp_u_strided_and_direct __pyx_string_tab[116]
#define __pyx_kp_u_strided_and_direct_or_indirect __pyx_string_tab[117]
#define __pyx_kp_u_strided_and_indirect __pyx_string_tab[118]
#define __pyx_kp_u_subs_dict_is_deprecated_Use_subs __pyx_string_tab[119]
#define __pyx_kp_u_subs_msubs_takes_one_or_two_argu __pyx_string_tab[120]
#define __pyx_kp_u_subs_oldnew_is_deprecated_Use_su __pyx_string_tab[121]
#define __pyx_kp_u_symengine_wrapper_pyx __pyx_string_tab[122]
#define __pyx_kp_u_sympify_Cannot_convert __pyx_string_tab[123]
#define __pyx_kp_u_sympify_line_504 __pyx_string_tab[124]
#define __pyx_kp_u_sympify_line_537 __pyx_string_tab[125]
#define __pyx_kp_u_sympy2symengine_Cannot_convert __pyx_string_tab[126]
#define __pyx_kp_u_to_a_symengine_type __pyx_string_tab[127]
#define __pyx_kp_u_tree_fragment __pyx_string_tab[128]
#define __pyx_kp_u_unable_to_allocate_array_data __pyx_string_tab[129]
#define __pyx_kp_u_unable_to_allocate_shape_and_str __pyx_string_tab[130]
#define __pyx_kp_u_utf_8 __pyx_string_tab[131]
#define __pyx_kp_u_valid __pyx_string_tab[132]
#define __pyx_kp_u_x_2 __pyx_string_tab[133]
#define __pyx_n_u_A __pyx_string_tab[134]
#define __pyx_n_u_ACos __pyx_string_tab[135]
#define __pyx_n_u_ACosh __pyx_string_tab[136]
#define __pyx_n_u_ACot __pyx_string_tab[137]
#define __pyx_n_u_ACoth __pyx_string_tab[138]
#define __pyx_n_u_ACsc __pyx_string_tab[139]
#define __pyx_n_u_ACsch __pyx_string_tab[140]
#define __pyx_n_u_ASCII __pyx_string_tab[141]
#define __pyx_n_u_ASec __pyx_string_tab[142]
#define __pyx_n_u_ASech __pyx_string_tab[143]
#define __pyx_n_u_ASin __pyx_string_tab[144]
#define __pyx_n_u_ASinh __pyx_string_tab[145]
#define __pyx_n_u_ATan __pyx_string_tab[146]
#define __pyx_n_u_ATan2 __pyx_string_tab[147]
#define __pyx_n_u_ATanh __pyx_string_tab[148]
#define __pyx_n_u_A_3 __pyx_string_tab[149]
#define __pyx_n_u_Abs __pyx_string_tab[150]
#define __pyx_n_u_Abs___new __pyx_string_tab[151]
#define __pyx_n_u_Abs__sage __pyx_string_tab[152]
#define __pyx_n_u_Abs__sympy __pyx_string_tab[153]
#define __pyx_n_u_Abs_func __pyx_string_tab[154]
#define __pyx_n_u_Abs_is_negative __pyx_string_tab[155]
#define __pyx_n_u_Abs_is_real __pyx_string_tab[156]
#define __pyx_n_u_Add __pyx_string_tab[157]
#define __pyx_n_u_Add___new __pyx_string_tab[158]
#define __pyx_n_u_Add__from_args __pyx_string_tab[159]
#define __pyx_n_u_Add__sage __pyx_string_tab[160]
#define __pyx_n_u_Add__sympy __pyx_string_tab[161]
#define __pyx_n_u_Add_as_coefficients_dict __pyx_string_tab[162]
#define __pyx_n_u_Add_func __pyx_string_tab[163]
#define __pyx_n_u_Add_is_Add __pyx_string_tab[164]
#define __pyx_n_u_And __pyx_string_tab[165]
#define __pyx_n_u_And___new __pyx_string_tab[166]
#define __pyx_n_u_And__sympy __pyx_string_tab[167]
#define __pyx_n_u_AppliedUndef __pyx_string_tab[168]
#define __pyx_n_u_AssocOp __pyx_string_tab[169]
#define __pyx_n_u_AssocOp_make_args __pyx_string_tab[170]
#define __pyx_n_u_B __pyx_string_tab[171]
#define __pyx_n_u_B1 __pyx_string_tab[172]
#define __pyx_n_u_Basic __pyx_string_tab[173]
#define __pyx_n_u_BasicMeta __pyx_string_tab[174]
#define __pyx_n_u_BasicMeta___instancecheck __pyx_string_tab[175]
#define __pyx_n_u_Basic___complex __pyx_string_tab[176]
#define __pyx_n_u_Basic___reduce __pyx_string_tab[177]
#define __pyx_n_u_Basic__diff __pyx_string_tab[178]
#define __pyx_n_u_Basic__repr_latex __pyx_string_tab[179]
#define __pyx_n_u_Basic__richcmp __pyx_string_tab[180]
#define __pyx_n_u_Basic__symbolic __pyx_string_tab[181]
#define __pyx_n_u_Basic__unsafe_reset __pyx_string_tab[182]
#define __pyx_n_u_Basic_args_as_sage __pyx_string_tab[183]
#define __pyx_n_u_Basic_args_as_sympy __pyx_string_tab[184]
#define __pyx_n_u_Basic_as_coefficients_dict __pyx_string_tab[185]
#define __pyx_n_u_Basic_as_numer_denom __pyx_string_tab[186]
#define __pyx_n_u_Basic_as_powers_dict __pyx_string_tab[187]
#define __pyx_n_u_Basic_as_real_imag __pyx_string_tab[188]
#define __pyx_n_u_Basic_atoms __pyx_string_tab[189]
#define __pyx_n_u_Basic_coeff __pyx_string_tab[190]
#define __pyx_n_u_Basic_copy __pyx_string_tab[191]
#define __pyx_n_u_Basic_diff __pyx_string_tab[192]
#define __pyx_n_u_Basic_expand __pyx_string_tab[193]
#define __pyx_n_u_Basic_has __pyx_string_tab[194]
#define __pyx_n_u_Basic_msubs __pyx_string_tab[195]
#define __pyx_n_u_Basic_n __pyx_string_tab[196]
#define __pyx_n_u_Basic_simplify __pyx_string_tab[197]
#define __pyx_n_u_Basic_subs __pyx_string_tab[198]
#define __pyx_n_u_Basic_subs_dict __pyx_string_tab[199]
#define __pyx_n_u_Basic_subs_oldnew __pyx_string_tab[200]
#define __pyx_n_u_Basic_xreplace __pyx_string_tab[201]
#define __pyx_n_u_Boolean __pyx_string_tab[202]
#define __pyx_n_u_BooleanAtom __pyx_string_tab[203]
#define __pyx_n_u_BooleanFalse __pyx_string_tab[204]
#define __pyx_n_u_BooleanFalse__sage __pyx_string_tab[205]
#define __pyx_n_u_BooleanFalse__sympy __pyx_string_tab[206]
#define __pyx_n_u_BooleanTrue __pyx_string_tab[207]
#define __pyx_n_u_BooleanTrue__sage __pyx_string_tab[208]
#define __pyx_n_u_BooleanTrue__sympy __pyx_string_tab[209]
#define __pyx_n_u_Boolean_logical_not __pyx_string_tab[210]
#define __pyx_n_u_C __pyx_string_tab[211]
#define __pyx_n_u_CFUNCTYPE __pyx_string_tab[212]
#define __pyx_n_u_C_CONTIGUOUS __pyx_string_tab[213]
#define __pyx_n_u_Catalan __pyx_string_tab[214]
#define __pyx_n_u_Catalan__sage __pyx_string_tab[215]
#define __pyx_n_u_Catalan__sympy __pyx_string_tab[216]
#define __pyx_n_u_Complement __pyx_string_tab[217]
#define __pyx_n_u_Complement___new __pyx_string_tab[218]
#define __pyx_n_u_Complement__sympy __pyx_string_tab[219]
#define __pyx_n_u_Complex __pyx_string_tab[220]
#define __pyx_n_u_ComplexBase __pyx_string_tab[221]
#define __pyx_n_u_ComplexBase_imaginary_part __pyx_string_tab[222]
#define __pyx_n_u_ComplexBase_real_part __pyx_string_tab[223]
#define __pyx_n_u_ComplexDouble __pyx_string_tab[224]
#define __pyx_n_u_ComplexDouble___complex __pyx_string_tab[225]
#define __pyx_n_u_ComplexDouble__sage __pyx_string_tab[226]
#define __pyx_n_u_ComplexDouble__sympy __pyx_string_tab[227]
#define __pyx_n_u_ComplexInfinity __pyx_string_tab[228]
#define __pyx_n_u_ComplexInfinity__sage __pyx_string_tab[229]
#define __pyx_n_u_ComplexInfinity__sympy __pyx_string_tab[230]
#define __pyx_n_u_ComplexMPC __pyx_string_tab[231]
#define __pyx_n_u_ComplexMPC__sage __pyx_string_tab[232]
#define __pyx_n_u_ComplexMPC__sympy __pyx_string_tab[233]
#define __pyx_n_u_Complex__sage __pyx_string_tab[234]
#define __pyx_n_u_Complex__sympy __pyx_string_tab[235]
#define __pyx_n_u_ConditionSet __pyx_string_tab[236]
#define __pyx_n_u_ConditionSet___new __pyx_string_tab[237]
#define __pyx_n_u_Constant __pyx_string_tab[238]
#define __pyx_n_u_Constant__sage __pyx_string_tab[239]
#define __pyx_n_u_Constant__sympy __pyx_string_tab[240]
#define __pyx_n_u_Contains __pyx_string_tab[241]
#define __pyx_n_u_Contains___new __pyx_string_tab[242]
#define __pyx_n_u_Contains__sympy __pyx_string_tab[243]
#define __pyx_n_u_Cos __pyx_string_tab[244]
#define __pyx_n_u_Cosh __pyx_string_tab[245]
#define __pyx_n_u_Cot __pyx_string_tab[246]
#define __pyx_n_u_Coth __pyx_string_tab[247]
#define __pyx_n_u_Csc __pyx_string_tab[248]
#define __pyx_n_u_Csch __pyx_string_tab[249]
#define __pyx_n_u_D __pyx_string_tab[250]
#define __pyx_n_u_DenseMatrix __pyx_string_tab[251]
#define __pyx_n_u_DenseMatrixBase __pyx_string_tab[252]
#define __pyx_n_u_DenseMatrixBaseIter __pyx_string_tab[253]
#define __pyx_n_u_DenseMatrixBaseIter___init __pyx_string_tab[254]
#define __pyx_n_u_DenseMatrixBaseIter___iter __pyx_string_tab[255]
#define __pyx_n_u_DenseMatrixBaseIter___next __pyx_string_tab[256]
#define __pyx_n_u_DenseMatrixBase_FFLDU __pyx_string_tab[257]
#define __pyx_n_u_DenseMatrixBase_FFLU __pyx_string_tab[258]
#define __pyx_n_u_DenseMatrixBase_LDL __pyx_string_tab[259]
#define __pyx_n_u_DenseMatrixBase_LU __pyx_string_tab[260]
#define __pyx_n_u_DenseMatrixBase_LUdecomposition __pyx_string_tab[261]
#define __pyx_n_u_DenseMatrixBase_LUsolve __pyx_string_tab[262]
#define __pyx_n_u_DenseMatrixBase_QR __pyx_string_tab[263]
#define __pyx_n_u_DenseMatrixBase___array __pyx_string_tab[264]
#define __pyx_n_u_DenseMatrixBase___reduce_cython __pyx_string_tab[265]
#define __pyx_n_u_DenseMatrixBase___setstate_cytho __pyx_string_tab[266]
#define __pyx_n_u_DenseMatrixBase__applyfunc __pyx_string_tab[267]
#define __pyx_n_u_DenseMatrixBase__diff __pyx_string_tab[268]
#define __pyx_n_u_DenseMatrixBase__get __pyx_string_tab[269]
#define __pyx_n_u_DenseMatrixBase__get_index __pyx_string_tab[270]
#define __pyx_n_u_DenseMatrixBase__mat __pyx_string_tab[271]
#define __pyx_n_u_DenseMatrixBase__repr_latex __pyx_string_tab[272]
#define __pyx_n_u_DenseMatrixBase__sage __pyx_string_tab[273]
#define __pyx_n_u_DenseMatrixBase__set __pyx_string_tab[274]
#define __pyx_n_u_DenseMatrixBase__submatrix __pyx_string_tab[275]
#define __pyx_n_u_DenseMatrixBase__sympy __pyx_string_tab[276]
#define __pyx_n_u_DenseMatrixBase_add_matrix __pyx_string_tab[277]
#define __pyx_n_u_DenseMatrixBase_add_scalar __pyx_string_tab[278]
#define __pyx_n_u_DenseMatrixBase_applyfunc __pyx_string_tab[279]
#define __pyx_n_u_DenseMatrixBase_as_immutable __pyx_string_tab[280]
#define __pyx_n_u_DenseMatrixBase_as_mutable __pyx_string_tab[281]
#define __pyx_n_u_DenseMatrixBase_atoms __pyx_string_tab[282]
#define __pyx_n_u_DenseMatrixBase_cholesky __pyx_string_tab[283]
#define __pyx_n_u_DenseMatrixBase_col __pyx_string_tab[284]
#define __pyx_n_u_DenseMatrixBase_col_insert __pyx_string_tab[285]
#define __pyx_n_u_DenseMatrixBase_col_join __pyx_string_tab[286]
#define __pyx_n_u_DenseMatrixBase_conjugate __pyx_string_tab[287]
#define __pyx_n_u_DenseMatrixBase_conjugate_transp __pyx_string_tab[288]
#define __pyx_n_u_DenseMatrixBase_cross __pyx_string_tab[289]
#define __pyx_n_u_DenseMatrixBase_det __pyx_string_tab[290]
#define __pyx_n_u_DenseMatrixBase_diff __pyx_string_tab[291]
#define __pyx_n_u_DenseMatrixBase_dot __pyx_string_tab[292]
#define __pyx_n_u_DenseMatrixBase_dump_complex __pyx_string_tab[293]
#define __pyx_n_u_DenseMatrixBase_dump_real __pyx_string_tab[294]
#define __pyx_n_u_DenseMatrixBase_expand __pyx_string_tab[295]
#define __pyx_n_u_DenseMatrixBase_get __pyx_string_tab[296]
#define __pyx_n_u_DenseMatrixBase_inv __pyx_string_tab[297]
#define __pyx_n_u_DenseMatrixBase_jacobian __pyx_string_tab[298]
#define __pyx_n_u_DenseMatrixBase_msubs __pyx_string_tab[299]
#define __pyx_n_u_DenseMatrixBase_mul_matrix __pyx_string_tab[300]
#define __pyx_n_u_DenseMatrixBase_mul_scalar __pyx_string_tab[301]
#define __pyx_n_u_DenseMatrixBase_multiply_element __pyx_string_tab[302]
#define __pyx_n_u_DenseMatrixBase_ncols __pyx_string_tab[303]
#define __pyx_n_u_DenseMatrixBase_nrows __pyx_string_tab[304]
#define __pyx_n_u_DenseMatrixBase_ravel __pyx_string_tab[305]
#define __pyx_n_u_DenseMatrixBase_reshape __pyx_string_tab[306]
#define __pyx_n_u_DenseMatrixBase_row __pyx_string_tab[307]
#define __pyx_n_u_DenseMatrixBase_row_insert __pyx_string_tab[308]
#define __pyx_n_u_DenseMatrixBase_row_join __pyx_string_tab[309]
#define __pyx_n_u_DenseMatrixBase_set __pyx_string_tab[310]
#define __pyx_n_u_DenseMatrixBase_simplify __pyx_string_tab[311]
#define __pyx_n_u_DenseMatrixBase_solve __pyx_string_tab[312]
#define __pyx_n_u_DenseMatrixBase_subs __pyx_string_tab[313]
#define __pyx_n_u_DenseMatrixBase_tolist __pyx_string_tab[314]
#define __pyx_n_u_DenseMatrixBase_trace __pyx_string_tab[315]
#define __pyx_n_u_DenseMatrixBase_transpose __pyx_string_tab[316]
#define __pyx_n_u_DenseMatrixBase_xreplace __pyx_string_tab[317]
#define __pyx_n_u_Derivative __pyx_string_tab[318]
#define __pyx_n_u_Derivative___new __pyx_string_tab[319]
#define __pyx_n_u_Derivative__sage __pyx_string_tab[320]
#define __pyx_n_u_Derivative__sympy __pyx_string_tab[321]
#define __pyx_n_u_Derivative_expr __pyx_string_tab[322]
#define __pyx_n_u_Derivative_func __pyx_string_tab[323]
#define __pyx_n_u_Derivative_is_Derivative __pyx_string_tab[324]
#define __pyx_n_u_Derivative_variables __pyx_string_tab[325]
#define __pyx_n_u_DictBasic __pyx_string_tab[326]
#define __pyx_n_u_DictBasicIter __pyx_string_tab[327]
#define __pyx_n_u_DictBasicIter___reduce_cython __pyx_string_tab[328]
#define __pyx_n_u_DictBasicIter___setstate_cython __pyx_string_tab[329]
#define __pyx_n_u_DictBasic_2 __pyx_string_tab[330]
#define __pyx_n_u_DictBasic___reduce_cython __pyx_string_tab[331]
#define __pyx_n_u_DictBasic___repr __pyx_string_tab[332]
#define __pyx_n_u_DictBasic___setstate_cython __pyx_string_tab[333]
#define __pyx_n_u_DictBasic___str __pyx_string_tab[334]
#define __pyx_n_u_DictBasic_add __pyx_string_tab[335]
#define __pyx_n_u_DictBasic_add_dict __pyx_string_tab[336]
#define __pyx_n_u_DictBasic_as_dict __pyx_string_tab[337]
#define __pyx_n_u_DictBasic_clear __pyx_string_tab[338]
#define __pyx_n_u_DictBasic_copy __pyx_string_tab[339]
#define __pyx_n_u_Dummy __pyx_string_tab[340]
#define __pyx_n_u_Dummy__sympy __pyx_string_tab[341]
#define __pyx_n_u_E __pyx_string_tab[342]
#define __pyx_n_u_Ellipsis __pyx_string_tab[343]
#define __pyx_n_u_EmptySet __pyx_string_tab[344]
#define __pyx_n_u_EmptySet___new __pyx_string_tab[345]
#define __pyx_n_u_EmptySet__sympy __pyx_string_tab[346]
#define __pyx_n_u_EmptySet_func __pyx_string_tab[347]
#define __pyx_n_u_Eq __pyx_string_tab[348]
#define __pyx_n_u_Equality __pyx_string_tab[349]
#define __pyx_n_u_Equality___new __pyx_string_tab[350]
#define __pyx_n_u_Equality__sage __pyx_string_tab[351]
#define __pyx_n_u_Equality__sympy __pyx_string_tab[352]
#define __pyx_n_u_Equality_func __pyx_string_tab[353]
#define __pyx_n_u_Equality_is_Equality __pyx_string_tab[354]
#define __pyx_n_u_EulerGamma __pyx_string_tab[355]
#define __pyx_n_u_EulerGamma__sage __pyx_string_tab[356]
#define __pyx_n_u_EulerGamma__sympy __pyx_string_tab[357]
#define __pyx_n_u_Exp1 __pyx_string_tab[358]
#define __pyx_n_u_Exp1__sage __pyx_string_tab[359]
#define __pyx_n_u_Exp1__sympy __pyx_string_tab[360]
#define __pyx_n_u_Expr __pyx_string_tab[361]
#define __pyx_n_u_F __pyx_string_tab[362]
#define __pyx_n_u_FFGJ __pyx_string_tab[363]
#define __pyx_n_u_FFLDU __pyx_string_tab[364]
#define __pyx_n_u_FFLU __pyx_string_tab[365]
#define __pyx_n_u_F_CONTIGUOUS __pyx_string_tab[366]
#define __pyx_n_u_FiniteSet __pyx_string_tab[367]
#define __pyx_n_u_FiniteSet___new __pyx_string_tab[368]
#define __pyx_n_u_FiniteSet__sympy __pyx_string_tab[369]
#define __pyx_n_u_Float __pyx_string_tab[370]
#define __pyx_n_u_Float___new __pyx_string_tab[371]
#define __pyx_n_u_Float_is_Float __pyx_string_tab[372]
#define __pyx_n_u_Float_is_irrational __pyx_string_tab[373]
#define __pyx_n_u_Float_is_rational __pyx_string_tab[374]
#define __pyx_n_u_Float_is_real __pyx_string_tab[375]
#define __pyx_n_u_Function __pyx_string_tab[376]
#define __pyx_n_u_FunctionSymbol __pyx_string_tab[377]
#define __pyx_n_u_FunctionSymbol__sage __pyx_string_tab[378]
#define __pyx_n_u_FunctionSymbol__sympy __pyx_string_tab[379]
#define __pyx_n_u_FunctionSymbol_func __pyx_string_tab[380]
#define __pyx_n_u_FunctionSymbol_get_name __pyx_string_tab[381]
#define __pyx_n_u_FunctionSymbol_name __pyx_string_tab[382]
#define __pyx_n_u_Function___new __pyx_string_tab[383]
#define __pyx_n_u_Function_func __pyx_string_tab[384]
#define __pyx_n_u_Function_is_Function __pyx_string_tab[385]
#define __pyx_n_u_GJ __pyx_string_tab[386]
#define __pyx_n_u_Gamma __pyx_string_tab[387]
#define __pyx_n_u_Ge __pyx_string_tab[388]
#define __pyx_n_u_GoldenRatio __pyx_string_tab[389]
#define __pyx_n_u_GoldenRatio__sage __pyx_string_tab[390]
#define __pyx_n_u_GoldenRatio__sympy __pyx_string_tab[391]
#define __pyx_n_u_GreaterThan __pyx_string_tab[392]
#define __pyx_n_u_Gt __pyx_string_tab[393]
#define __pyx_n_u_Half __pyx_string_tab[394]
#define __pyx_n_u_Half___new __pyx_string_tab[395]
#define __pyx_n_u_HyperbolicFunction __pyx_string_tab[396]
#define __pyx_n_u_I __pyx_string_tab[397]
#define __pyx_n_u_ImageSet __pyx_string_tab[398]
#define __pyx_n_u_ImageSet___new __pyx_string_tab[399]
#define __pyx_n_u_ImaginaryUnit __pyx_string_tab[400]
#define __pyx_n_u_ImaginaryUnit_as_powers_dict __pyx_string_tab[401]
#define __pyx_n_u_ImmutableDenseMatrix __pyx_string_tab[402]
#define __pyx_n_u_ImmutableDenseMatrix___reduce_cy __pyx_string_tab[403]
#define __pyx_n_u_ImmutableDenseMatrix___setstate __pyx_string_tab[404]
#define __pyx_n_u_ImmutableDenseMatrix__applyfunc __pyx_string_tab[405]
#define __pyx_n_u_ImmutableMatrix __pyx_string_tab[406]
#define __pyx_n_u_Infinity __pyx_string_tab[407]
#define __pyx_n_u_Infinity__sage __pyx_string_tab[408]
#define __pyx_n_u_Infinity__sympy __pyx_string_tab[409]
#define __pyx_n_u_Integer __pyx_string_tab[410]
#define __pyx_n_u_Integer___hash __pyx_string_tab[411]
#define __pyx_n_u_Integer___int __pyx_string_tab[412]
#define __pyx_n_u_Integer___new __pyx_string_tab[413]
#define __pyx_n_u_Integer___richcmp __pyx_string_tab[414]
#define __pyx_n_u_Integer__richcmp __pyx_string_tab[415]
#define __pyx_n_u_Integer__sage __pyx_string_tab[416]
#define __pyx_n_u_Integer__sympy __pyx_string_tab[417]
#define __pyx_n_u_Integer_doit __pyx_string_tab[418]
#define __pyx_n_u_Integer_func __pyx_string_tab[419]
#define __pyx_n_u_Integer_get_num_den __pyx_string_tab[420]
#define __pyx_n_u_Integer_is_Integer __pyx_string_tab[421]
#define __pyx_n_u_Integer_is_integer __pyx_string_tab[422]
#define __pyx_n_u_Integer_p __pyx_string_tab[423]
#define __pyx_n_u_Integer_q __pyx_string_tab[424]
#define __pyx_n_u_Integers __pyx_string_tab[425]
#define __pyx_n_u_Integers___new __pyx_string_tab[426]
#define __pyx_n_u_Integers__sympy __pyx_string_tab[427]
#define __pyx_n_u_Integers_func __pyx_string_tab[428]
#define __pyx_n_u_Integral __pyx_string_tab[429]
#define __pyx_n_u_Intersection __pyx_string_tab[430]
#define __pyx_n_u_Interval __pyx_string_tab[431]
#define __pyx_n_u_Interval___new __pyx_string_tab[432]
#define __pyx_n_u_Interval__sympy __pyx_string_tab[433]
#define __pyx_n_u_Interval_end __pyx_string_tab[434]
#define __pyx_n_u_Interval_start __pyx_string_tab[435]
#define __pyx_n_u_InverseTrigonometricFunction __pyx_string_tab[436]
#define __pyx_n_u_K __pyx_string_tab[437]
#define __pyx_n_u_KroneckerDelta __pyx_string_tab[438]
#define __pyx_n_u_KroneckerDelta___new __pyx_string_tab[439]
#define __pyx_n_u_KroneckerDelta__sage __pyx_string_tab[440]
#define __pyx_n_u_KroneckerDelta__sympy __pyx_string_tab[441]
#define __pyx_n_u_L __pyx_string_tab[442]
#define __pyx_n_u_LDL __pyx_string_tab[443]
#define __pyx_n_u_LLVMDouble __pyx_string_tab[444]
#define __pyx_n_u_LLVMDouble___reduce __pyx_string_tab[445]
#define __pyx_n_u_LLVMDouble_as_ctypes __pyx_string_tab[446]
#define __pyx_n_u_LLVMDouble_as_scipy_low_level_ca __pyx_string_tab[447]
#define __pyx_n_u_LLVMDouble_unsafe_eval __pyx_string_tab[448]
#define __pyx_n_u_LLVMDouble_unsafe_real __pyx_string_tab[449]
#define __pyx_n_u_LLVMFloat __pyx_string_tab[450]
#define __pyx_n_u_LLVMFloat___reduce __pyx_string_tab[451]
#define __pyx_n_u_LLVMFloat_unsafe_eval __pyx_string_tab[452]
#define __pyx_n_u_LLVMFloat_unsafe_real __pyx_string_tab[453]
#define __pyx_n_u_LLVMLambdify __pyx_string_tab[454]
#define __pyx_n_u_LLVMLongDouble __pyx_string_tab[455]
#define __pyx_n_u_LLVMLongDouble___reduce __pyx_string_tab[456]
#define __pyx_n_u_LLVMLongDouble_unsafe_eval __pyx_string_tab[457]
#define __pyx_n_u_LLVMLongDouble_unsafe_real __pyx_string_tab[458]
#define __pyx_n_u_LU __pyx_string_tab[459]
#define __pyx_n_u_LUdecomposition __pyx_string_tab[460]
#define __pyx_n_u_LUsolve __pyx_string_tab[461]
#define __pyx_n_u_LambdaComplexDouble __pyx_string_tab[462]
#define __pyx_n_u_LambdaComplexDouble___reduce_cyt __pyx_string_tab[463]
#define __pyx_n_u_LambdaComplexDouble___setstate_c __pyx_string_tab[464]
#define __pyx_n_u_LambdaComplexDouble_unsafe_compl __pyx_string_tab[465]
#define __pyx_n_u_LambdaComplexDouble_unsafe_eval __pyx_string_tab[466]
#define __pyx_n_u_LambdaDouble __pyx_string_tab[467]
#define __pyx_n_u_LambdaDouble___reduce_cython __pyx_string_tab[468]
#define __pyx_n_u_LambdaDouble___setstate_cython __pyx_string_tab[469]
#define __pyx_n_u_LambdaDouble_as_ctypes __pyx_string_tab[470]
#define __pyx_n_u_LambdaDouble_as_scipy_low_level __pyx_string_tab[471]
#define __pyx_n_u_LambdaDouble_unsafe_eval __pyx_string_tab[472]
#define __pyx_n_u_LambdaDouble_unsafe_real __pyx_string_tab[473]
#define __pyx_n_u_Lambdify __pyx_string_tab[474]
#define __pyx_n_u_LambdifyCSE __pyx_string_tab[475]
#define __pyx_n_u_LambdifyLowLevelCallable __pyx_string_tab[476]
#define __pyx_n_u_Lambdify_2 __pyx_string_tab[477]
#define __pyx_n_u_Lambdify___reduce_cython __pyx_string_tab[478]
#define __pyx_n_u_Lambdify___setstate_cython __pyx_string_tab[479]
#define __pyx_n_u_Lambdify_eval_complex __pyx_string_tab[480]
#define __pyx_n_u_Lambdify_eval_real __pyx_string_tab[481]
#define __pyx_n_u_Lambdify_unsafe_eval __pyx_string_tab[482]
#define __pyx_n_u_LambertW __pyx_string_tab[483]
#define __pyx_n_u_LambertW___new __pyx_string_tab[484]
#define __pyx_n_u_LambertW__sage __pyx_string_tab[485]
#define __pyx_n_u_Le __pyx_string_tab[486]
#define __pyx_n_u_LessThan __pyx_string_tab[487]
#define __pyx_n_u_LessThan___new __pyx_string_tab[488]
#define __pyx_n_u_LessThan__sage __pyx_string_tab[489]
#define __pyx_n_u_LessThan__sympy __pyx_string_tab[490]
#define __pyx_n_u_LeviCivita __pyx_string_tab[491]
#define __pyx_n_u_LeviCivita___new __pyx_string_tab[492]
#define __pyx_n_u_LeviCivita__sympy __pyx_string_tab[493]
#define __pyx_n_u_Log __pyx_string_tab[494]
#define __pyx_n_u_LowLevelCallable __pyx_string_tab[495]
#define __pyx_n_u_Lt __pyx_string_tab[496]
#define __pyx_n_u_MPComplexField __pyx_string_tab[497]
#define __pyx_n_u_Matrix __pyx_string_tab[498]
#define __pyx_n_u_MatrixBase __pyx_string_tab[499]
#define __pyx_n_u_MatrixBase___reduce_cython __pyx_string_tab[500]
#define __pyx_n_u_MatrixBase___setstate_cython __pyx_string_tab[501]
#define __pyx_n_u_MatrixBase__richcmp __pyx_string_tab[502]
#define __pyx_n_u_MatrixBase__symbolic __pyx_string_tab[503]
#define __pyx_n_u_MatrixError __pyx_string_tab[504]
#define __pyx_n_u_Max __pyx_string_tab[505]
#define __pyx_n_u_Max___new __pyx_string_tab[506]
#define __pyx_n_u_Max__sage __pyx_string_tab[507]
#define __pyx_n_u_Max__sympy __pyx_string_tab[508]
#define __pyx_n_u_Max_func __pyx_string_tab[509]
#define __pyx_n_u_Min __pyx_string_tab[510]
#define __pyx_n_u_Min___new __pyx_string_tab[511]
#define __pyx_n_u_Min__sage __pyx_string_tab[512]
#define __pyx_n_u_Min__sympy __pyx_string_tab[513]
#define __pyx_n_u_Min_func __pyx_string_tab[514]
#define __pyx_n_u_ModularInteger __pyx_string_tab[515]
#define __pyx_n_u_Mul __pyx_string_tab[516]
#define __pyx_n_u_Mul___new __pyx_string_tab[517]
#define __pyx_n_u_Mul__from_args __pyx_string_tab[518]
#define __pyx_n_u_Mul__sage __pyx_string_tab[519]
#define __pyx_n_u_Mul__sympy __pyx_string_tab[520]
#define __pyx_n_u_Mul_as_coefficients_dict __pyx_string_tab[521]
#define __pyx_n_u_Mul_as_powers_dict __pyx_string_tab[522]
#define __pyx_n_u_Mul_func __pyx_string_tab[523]
#define __pyx_n_u_Mul_is_Mul __pyx_string_tab[524]
#define __pyx_n_u_MutableDenseMatrix __pyx_string_tab[525]
#define __pyx_n_u_MutableDenseMatrix___reduce_cyth __pyx_string_tab[526]
#define __pyx_n_u_MutableDenseMatrix___setstate_cy __pyx_string_tab[527]
#define __pyx_n_u_MutableDenseMatrix_col_del __pyx_string_tab[528]
#define __pyx_n_u_MutableDenseMatrix_col_swap __pyx_string_tab[529]
#define __pyx_n_u_MutableDenseMatrix_fill __pyx_string_tab[530]
#define __pyx_n_u_MutableDenseMatrix_row_del __pyx_string_tab[531]
#define __pyx_n_u_MutableDenseMatrix_row_swap __pyx_string_tab[532]
#define __pyx_n_u_MutableDenseMatrix_rowadd __pyx_string_tab[533]
#define __pyx_n_u_MutableDenseMatrix_rowmul __pyx_string_tab[534]
#define __pyx_n_u_MutableMapping __pyx_string_tab[535]
#define __pyx_n_u_NaN __pyx_string_tab[536]
#define __pyx_n_u_NaN__sage __pyx_string_tab[537]
#define __pyx_n_u_NaN__sympy __pyx_string_tab[538]
#define __pyx_n_u_Nand __pyx_string_tab[539]
#define __pyx_n_u_Ne __pyx_string_tab[540]
#define __pyx_n_u_NegativeInfinity __pyx_string_tab[541]
#define __pyx_n_u_NegativeInfinity__sage __pyx_string_tab[542]
#define __pyx_n_u_NegativeInfinity__sympy __pyx_string_tab[543]
#define __pyx_n_u_NegativeInfinity_as_powers_dict __pyx_string_tab[544]
#define __pyx_n_u_NegativeOne __pyx_string_tab[545]
#define __pyx_n_u_NegativeOne___new __pyx_string_tab[546]
#define __pyx_n_u_NonSquareMatrixError __pyx_string_tab[547]
#define __pyx_n_u_Nor __pyx_string_tab[548]
#define __pyx_n_u_Not __pyx_string_tab[549]
#define __pyx_n_u_NotImplemented __pyx_string_tab[550]
#define __pyx_n_u_Not___new __pyx_string_tab[551]
#define __pyx_n_u_Not__sympy __pyx_string_tab[552]
#define __pyx_n_u_Number __pyx_string_tab[553]
#define __pyx_n_u_One __pyx_string_tab[554]
#define __pyx_n_u_OneArgFunction __pyx_string_tab[555]
#define __pyx_n_u_OneArgFunction__sage __pyx_string_tab[556]
#define __pyx_n_u_OneArgFunction__sympy __pyx_string_tab[557]
#define __pyx_n_u_OneArgFunction_get_arg __pyx_string_tab[558]
#define __pyx_n_u_One___new __pyx_string_tab[559]
#define __pyx_n_u_Or __pyx_string_tab[560]
#define __pyx_n_u_Or___new __pyx_string_tab[561]
#define __pyx_n_u_Or__sympy __pyx_string_tab[562]
#define __pyx_n_u_P __pyx_string_tab[563]
#define __pyx_n_u_POINTER __pyx_string_tab[564]
#define __pyx_n_u_Pi __pyx_string_tab[565]
#define __pyx_n_u_Pi__sage __pyx_string_tab[566]
#define __pyx_n_u_Pi__sympy __pyx_string_tab[567]
#define __pyx_n_u_Piecewise __pyx_string_tab[568]
#define __pyx_n_u_Piecewise___new __pyx_string_tab[569]
#define __pyx_n_u_Piecewise__sympy __pyx_string_tab[570]
#define __pyx_n_u_Pow __pyx_string_tab[571]
#define __pyx_n_u_Pow___new __pyx_string_tab[572]
#define __pyx_n_u_Pow__sage __pyx_string_tab[573]
#define __pyx_n_u_Pow__sympy __pyx_string_tab[574]
#define __pyx_n_u_Pow_as_base_exp __pyx_string_tab[575]
#define __pyx_n_u_Pow_as_powers_dict __pyx_string_tab[576]
#define __pyx_n_u_Pow_base __pyx_string_tab[577]
#define __pyx_n_u_Pow_exp __pyx_string_tab[578]
#define __pyx_n_u_Pow_func __pyx_string_tab[579]
#define __pyx_n_u_Pow_is_Pow __pyx_string_tab[580]
#define __pyx_n_u_Pow_is_commutative __pyx_string_tab[581]
#define __pyx_n_u_PyFunction __pyx_string_tab[582]
#define __pyx_n_u_PyFunctionClass __pyx_string_tab[583]
#define __pyx_n_u_PyFunctionClass___reduce_cython __pyx_string_tab[584]
#define __pyx_n_u_PyFunctionClass___setstate_cytho __pyx_string_tab[585]
#define __pyx_n_u_PyFunction___init __pyx_string_tab[586]
#define __pyx_n_u_PyFunction__sage __pyx_string_tab[587]
#define __pyx_n_u_PyFunction__sympy __pyx_string_tab[588]
#define __pyx_n_u_PyFunction_pyobject __pyx_string_tab[589]
#define __pyx_n_u_PyModule __pyx_string_tab[590]
#define __pyx_n_u_PyNumber __pyx_string_tab[591]
#define __pyx_n_u_PyNumber__sage __pyx_string_tab[592]
#define __pyx_n_u_PyNumber__sympy __pyx_string_tab[593]
#define __pyx_n_u_PyNumber_pyobject __pyx_string_tab[594]
#define __pyx_n_u_Pyx_PyDict_NextRef __pyx_string_tab[595]
#define __pyx_n_u_QR __pyx_string_tab[596]
#define __pyx_n_u_Q_2 __pyx_string_tab[597]
#define __pyx_n_u_R __pyx_string_tab[598]
#define __pyx_n_u_Rational __pyx_string_tab[599]
#define __pyx_n_u_Rational___new __pyx_string_tab[600]
#define __pyx_n_u_Rational__sage __pyx_string_tab[601]
#define __pyx_n_u_Rational__sympy __pyx_string_tab[602]
#define __pyx_n_u_Rational_func __pyx_string_tab[603]
#define __pyx_n_u_Rational_get_num_den __pyx_string_tab[604]
#define __pyx_n_u_Rational_is_Rational __pyx_string_tab[605]
#define __pyx_n_u_Rational_is_finite __pyx_string_tab[606]
#define __pyx_n_u_Rational_is_integer __pyx_string_tab[607]
#define __pyx_n_u_Rational_is_rational __pyx_string_tab[608]
#define __pyx_n_u_Rational_is_real __pyx_string_tab[609]
#define __pyx_n_u_Rational_p __pyx_string_tab[610]
#define __pyx_n_u_Rational_q __pyx_string_tab[611]
#define __pyx_n_u_Rationals __pyx_string_tab[612]
#define __pyx_n_u_Rationals___new __pyx_string_tab[613]
#define __pyx_n_u_Rationals__sympy __pyx_string_tab[614]
#define __pyx_n_u_Rationals_func __pyx_string_tab[615]
#define __pyx_n_u_RealDouble __pyx_string_tab[616]
#define __pyx_n_u_RealDoubleField __pyx_string_tab[617]
#define __pyx_n_u_RealDouble___complex __pyx_string_tab[618]
#define __pyx_n_u_RealDouble___float __pyx_string_tab[619]
#define __pyx_n_u_RealDouble___new __pyx_string_tab[620]
#define __pyx_n_u_RealDouble__sage __pyx_string_tab[621]
#define __pyx_n_u_RealDouble__sympy __pyx_string_tab[622]
#define __pyx_n_u_RealField __pyx_string_tab[623]
#define __pyx_n_u_RealMPFR __pyx_string_tab[624]
#define __pyx_n_u_RealMPFR___new __pyx_string_tab[625]
#define __pyx_n_u_RealMPFR__sage __pyx_string_tab[626]
#define __pyx_n_u_RealMPFR__sympy __pyx_string_tab[627]
#define __pyx_n_u_RealMPFR_get_prec __pyx_string_tab[628]
#define __pyx_n_u_RealNumber __pyx_string_tab[629]
#define __pyx_n_u_Reals __pyx_string_tab[630]
#define __pyx_n_u_Reals___new __pyx_string_tab[631]
#define __pyx_n_u_Reals__sympy __pyx_string_tab[632]
#define __pyx_n_u_Reals_func __pyx_string_tab[633]
#define __pyx_n_u_Rel __pyx_string_tab[634]
#define __pyx_n_u_Relational __pyx_string_tab[635]
#define __pyx_n_u_Relational___bool __pyx_string_tab[636]
#define __pyx_n_u_Relational_is_Relational __pyx_string_tab[637]
#define __pyx_n_u_S __pyx_string_tab[638]
#define __pyx_n_u_SR __pyx_string_tab[639]
#define __pyx_n_u_SYMENGINE_LAMBDIFY_BACKEND __pyx_string_tab[640]
#define __pyx_n_u_Sec __pyx_string_tab[641]
#define __pyx_n_u_Sech __pyx_string_tab[642]
#define __pyx_n_u_Sequence __pyx_string_tab[643]
#define __pyx_n_u_Set __pyx_string_tab[644]
#define __pyx_n_u_Set_complement __pyx_string_tab[645]
#define __pyx_n_u_Set_contains __pyx_string_tab[646]
#define __pyx_n_u_Set_intersection __pyx_string_tab[647]
#define __pyx_n_u_Set_union __pyx_string_tab[648]
#define __pyx_n_u_ShapeError __pyx_string_tab[649]
#define __pyx_n_u_Sieve __pyx_string_tab[650]
#define __pyx_n_u_Sieve___reduce_cython __pyx_string_tab[651]
#define __pyx_n_u_Sieve___setstate_cython __pyx_string_tab[652]
#define __pyx_n_u_Sieve_generate_primes __pyx_string_tab[653]
#define __pyx_n_u_Sieve_iterator __pyx_string_tab[654]
#define __pyx_n_u_Sieve_iterator___reduce_cython __pyx_string_tab[655]
#define __pyx_n_u_Sieve_iterator___setstate_cython __pyx_string_tab[656]
#define __pyx_n_u_Sin __pyx_string_tab[657]
#define __pyx_n_u_Singleton __pyx_string_tab[658]
#define __pyx_n_u_Singleton_Catalan __pyx_string_tab[659]
#define __pyx_n_u_Singleton_ComplexInfinity __pyx_string_tab[660]
#define __pyx_n_u_Singleton_EmptySet __pyx_string_tab[661]
#define __pyx_n_u_Singleton_EulerGamma __pyx_string_tab[662]
#define __pyx_n_u_Singleton_Exp1 __pyx_string_tab[663]
#define __pyx_n_u_Singleton_GoldenRatio __pyx_string_tab[664]
#define __pyx_n_u_Singleton_Half __pyx_string_tab[665]
#define __pyx_n_u_Singleton_ImaginaryUnit __pyx_string_tab[666]
#define __pyx_n_u_Singleton_Infinity __pyx_string_tab[667]
#define __pyx_n_u_Singleton_Integers __pyx_string_tab[668]
#define __pyx_n_u_Singleton_NaN __pyx_string_tab[669]
#define __pyx_n_u_Singleton_NegativeInfinity __pyx_string_tab[670]
#define __pyx_n_u_Singleton_NegativeOne __pyx_string_tab[671]
#define __pyx_n_u_Singleton_One __pyx_string_tab[672]
#define __pyx_n_u_Singleton_Pi __pyx_string_tab[673]
#define __pyx_n_u_Singleton_Rationals __pyx_string_tab[674]
#define __pyx_n_u_Singleton_Reals __pyx_string_tab[675]
#define __pyx_n_u_Singleton_UniversalSet __pyx_string_tab[676]
#define __pyx_n_u_Singleton_Zero __pyx_string_tab[677]
#define __pyx_n_u_Singleton_false __pyx_string_tab[678]
#define __pyx_n_u_Singleton_true __pyx_string_tab[679]
#define __pyx_n_u_Sinh __pyx_string_tab[680]
#define __pyx_n_u_StrictGreaterThan __pyx_string_tab[681]
#define __pyx_n_u_StrictLessThan __pyx_string_tab[682]
#define __pyx_n_u_StrictLessThan___new __pyx_string_tab[683]
#define __pyx_n_u_StrictLessThan__sage __pyx_string_tab[684]
#define __pyx_n_u_StrictLessThan__sympy __pyx_string_tab[685]
#define __pyx_n_u_Subs __pyx_string_tab[686]
#define __pyx_n_u_Subs___new __pyx_string_tab[687]
#define __pyx_n_u_Subs__sage __pyx_string_tab[688]
#define __pyx_n_u_Subs__sympy __pyx_string_tab[689]
#define __pyx_n_u_Subs_expr __pyx_string_tab[690]
#define __pyx_n_u_Subs_func __pyx_string_tab[691]
#define __pyx_n_u_Subs_point __pyx_string_tab[692]
#define __pyx_n_u_Subs_variables __pyx_string_tab[693]
#define __pyx_n_u_Symbol __pyx_string_tab[694]
#define __pyx_n_u_Symbol___reduce __pyx_string_tab[695]
#define __pyx_n_u_Symbol__sage __pyx_string_tab[696]
#define __pyx_n_u_Symbol__sympy __pyx_string_tab[697]
#define __pyx_n_u_SympifyError __pyx_string_tab[698]
#define __pyx_n_u_Tan __pyx_string_tab[699]
#define __pyx_n_u_Tanh __pyx_string_tab[700]
#define __pyx_n_u_TrigFunction __pyx_string_tab[701]
#define __pyx_n_u_TrigonometricFunction __pyx_string_tab[702]
#define __pyx_n_u_U __pyx_string_tab[703]
#define __pyx_n_u_UndefFunction __pyx_string_tab[704]
#define __pyx_n_u_UndefFunction___call __pyx_string_tab[705]
#define __pyx_n_u_UndefFunction___init __pyx_string_tab[706]
#define __pyx_n_u_Unequality __pyx_string_tab[707]
#define __pyx_n_u_Unequality___new __pyx_string_tab[708]
#define __pyx_n_u_Unequality__sage __pyx_string_tab[709]
#define __pyx_n_u_Unequality__sympy __pyx_string_tab[710]
#define __pyx_n_u_Unequality_func __pyx_string_tab[711]
#define __pyx_n_u_UnevaluatedExpr __pyx_string_tab[712]
#define __pyx_n_u_UnevaluatedExpr___new __pyx_string_tab[713]
#define __pyx_n_u_UnevaluatedExpr_is_finite __pyx_string_tab[714]
#define __pyx_n_u_UnevaluatedExpr_is_integer __pyx_string_tab[715]
#define __pyx_n_u_UnevaluatedExpr_is_number __pyx_string_tab[716]
#define __pyx_n_u_Union __pyx_string_tab[717]
#define __pyx_n_u_Union___new __pyx_string_tab[718]
#define __pyx_n_u_Union__sympy __pyx_string_tab[719]
#define __pyx_n_u_UniversalSet __pyx_string_tab[720]
#define __pyx_n_u_UniversalSet___new __pyx_string_tab[721]
#define __pyx_n_u_UniversalSet__sympy __pyx_string_tab[722]
#define __pyx_n_u_UniversalSet_func __pyx_string_tab[723]
#define __pyx_n_u_V __pyx_string_tab[724]
#define __pyx_n_u_View_MemoryView __pyx_string_tab[725]
#define __pyx_n_u_WRITEABLE __pyx_string_tab[726]
#define __pyx_n_u_X __pyx_string_tab[727]
#define __pyx_n_u_Xnor __pyx_string_tab[728]
#define __pyx_n_u_Xor __pyx_string_tab[729]
#define __pyx_n_u_Xor___new __pyx_string_tab[730]
#define __pyx_n_u_Xor__sympy __pyx_string_tab[731]
#define __pyx_n_u_Y __pyx_string_tab[732]
#define __pyx_n_u_Zero __pyx_string_tab[733]
#define __pyx_n_u_Zero___new __pyx_string_tab[734]
#define __pyx_n_u__10 __pyx_string_tab[735]
#define __pyx_n_u_a __pyx_string_tab[736]
#define __pyx_n_u_a1 __pyx_string_tab[737]
#define __pyx_n_u_a_2 __pyx_string_tab[738]
#define __pyx_n_u_a_3 __pyx_string_tab[739]
#define __pyx_n_u_abc __pyx_string_tab[740]
#define __pyx_n_u_abs __pyx_string_tab[741]
#define __pyx_n_u_acos __pyx_string_tab[742]
#define __pyx_n_u_acos___new __pyx_string_tab[743]
#define __pyx_n_u_acosh __pyx_string_tab[744]
#define __pyx_n_u_acosh___new __pyx_string_tab[745]
#define __pyx_n_u_acot __pyx_string_tab[746]
#define __pyx_n_u_acot___new __pyx_string_tab[747]
#define __pyx_n_u_acoth __pyx_string_tab[748]
#define __pyx_n_u_acoth___new __pyx_string_tab[749]
#define __pyx_n_u_acsc __pyx_string_tab[750]
#define __pyx_n_u_acsc___new __pyx_string_tab[751]
#define __pyx_n_u_acsch __pyx_string_tab[752]
#define __pyx_n_u_acsch___new __pyx_string_tab[753]
#define __pyx_n_u_add __pyx_string_tab[754]
#define __pyx_n_u_add_dict __pyx_string_tab[755]
#define __pyx_n_u_add_matrix __pyx_string_tab[756]
#define __pyx_n_u_add_scalar __pyx_string_tab[757]
#define __pyx_n_u_all __pyx_string_tab[758]
#define __pyx_n_u_all_roots __pyx_string_tab[759]
#define __pyx_n_u_allocate_buffer __pyx_string_tab[760]
#define __pyx_n_u_any __pyx_string_tab[761]
#define __pyx_n_u_applyfunc __pyx_string_tab[762]
#define __pyx_n_u_applyfunc_2 __pyx_string_tab[763]
#define __pyx_n_u_arg __pyx_string_tab[764]
#define __pyx_n_u_args __pyx_string_tab[765]
#define __pyx_n_u_args_as_sage __pyx_string_tab[766]
#define __pyx_n_u_args_as_sympy __pyx_string_tab[767]
#define __pyx_n_u_arr __pyx_string_tab[768]
#define __pyx_n_u_array __pyx_string_tab[769]
#define __pyx_n_u_array_2 __pyx_string_tab[770]
#define __pyx_n_u_as_base_exp __pyx_string_tab[771]
#define __pyx_n_u_as_coefficients_dict __pyx_string_tab[772]
#define __pyx_n_u_as_ctypes __pyx_string_tab[773]
#define __pyx_n_u_as_deg_coef_pair __pyx_string_tab[774]
#define __pyx_n_u_as_dict __pyx_string_tab[775]
#define __pyx_n_u_as_immutable __pyx_string_tab[776]
#define __pyx_n_u_as_mutable __pyx_string_tab[777]
#define __pyx_n_u_as_numer_denom __pyx_string_tab[778]
#define __pyx_n_u_as_powers_dict __pyx_string_tab[779]
#define __pyx_n_u_as_real_imag __pyx_string_tab[780]
#define __pyx_n_u_as_scipy __pyx_string_tab[781]
#define __pyx_n_u_as_scipy_low_level_callable __pyx_string_tab[782]
#define __pyx_n_u_asanyarray __pyx_string_tab[783]
#define __pyx_n_u_ascontiguousarray __pyx_string_tab[784]
#define __pyx_n_u_asec __pyx_string_tab[785]
#define __pyx_n_u_asec___new __pyx_string_tab[786]
#define __pyx_n_u_asech __pyx_string_tab[787]
#define __pyx_n_u_asech___new __pyx_string_tab[788]
#define __pyx_n_u_asin __pyx_string_tab[789]
#define __pyx_n_u_asin___new __pyx_string_tab[790]
#define __pyx_n_u_asinh __pyx_string_tab[791]
#define __pyx_n_u_asinh___new __pyx_string_tab[792]
#define __pyx_n_u_assign_to_capsule __pyx_string_tab[793]
#define __pyx_n_u_asyncio_coroutines __pyx_string_tab[794]
#define __pyx_n_u_atan __pyx_string_tab[795]
#define __pyx_n_u_atan2 __pyx_string_tab[796]
#define __pyx_n_u_atan2___new __pyx_string_tab[797]
#define __pyx_n_u_atan2__sage __pyx_string_tab[798]
#define __pyx_n_u_atan2__sympy __pyx_string_tab[799]
#define __pyx_n_u_atan___new __pyx_string_tab[800]
#define __pyx_n_u_atanh __pyx_string_tab[801]
#define __pyx_n_u_atanh___new __pyx_string_tab[802]
#define __pyx_n_u_atexit __pyx_string_tab[803]
#define __pyx_n_u_atoms __pyx_string_tab[804]
#define __pyx_n_u_b __pyx_string_tab[805]
#define __pyx_n_u_b1 __pyx_string_tab[806]
#define __pyx_n_u_b_2 __pyx_string_tab[807]
#define __pyx_n_u_b_3 __pyx_string_tab[808]
#define __pyx_n_u_backend __pyx_string_tab[809]
#define __pyx_n_u_backend_default __pyx_string_tab[810]
#define __pyx_n_u_base __pyx_string_tab[811]
#define __pyx_n_u_base_2 __pyx_string_tab[812]
#define __pyx_n_u_basic_expr __pyx_string_tab[813]
#define __pyx_n_u_bernoulli __pyx_string_tab[814]
#define __pyx_n_u_beta __pyx_string_tab[815]
#define __pyx_n_u_beta___new __pyx_string_tab[816]
#define __pyx_n_u_beta__sage __pyx_string_tab[817]
#define __pyx_n_u_beta__sympy __pyx_string_tab[818]
#define __pyx_n_u_binomial __pyx_string_tab[819]
#define __pyx_n_u_bits __pyx_string_tab[820]
#define __pyx_n_u_bool __pyx_string_tab[821]
#define __pyx_n_u_bott __pyx_string_tab[822]
#define __pyx_n_u_c __pyx_string_tab[823]
#define __pyx_n_u_c_2 __pyx_string_tab[824]
#define __pyx_n_u_c_double __pyx_string_tab[825]
#define __pyx_n_u_c_i __pyx_string_tab[826]
#define __pyx_n_u_c_int __pyx_string_tab[827]
#define __pyx_n_u_c_j __pyx_string_tab[828]
#define __pyx_n_u_c_s __pyx_string_tab[829]
#define __pyx_n_u_c_void_p __pyx_string_tab[830]
#define __pyx_n_u_call __pyx_string_tab[831]
#define __pyx_n_u_capsule __pyx_string_tab[832]
#define __pyx_n_u_capsule_to_basic __pyx_string_tab[833]
#define __pyx_n_u_carmichael __pyx_string_tab[834]
#define __pyx_n_u_cast __pyx_string_tab[835]
#define __pyx_n_u_catalan __pyx_string_tab[836]
#define __pyx_n_u_ccode __pyx_string_tab[837]
#define __pyx_n_u_ceil __pyx_string_tab[838]
#define __pyx_n_u_ceiling __pyx_string_tab[839]
#define __pyx_n_u_ceiling___new __pyx_string_tab[840]
#define __pyx_n_u_ceiling__sage __pyx_string_tab[841]
#define __pyx_n_u_cholesky __pyx_string_tab[842]
#define __pyx_n_u_ci __pyx_string_tab[843]
#define __pyx_n_u_class __pyx_string_tab[844]
#define __pyx_n_u_class_getitem __pyx_string_tab[845]
#define __pyx_n_u_classes __pyx_string_tab[846]
#define __pyx_n_u_clear __pyx_string_tab[847]
#define __pyx_n_u_cline_in_traceback __pyx_string_tab[848]
#define __pyx_n_u_close __pyx_string_tab[849]
#define __pyx_n_u_cls __pyx_string_tab[850]
#define __pyx_n_u_coef __pyx_string_tab[851]
#define __pyx_n_u_coeff __pyx_string_tab[852]
#define __pyx_n_u_col __pyx_string_tab[853]
#define __pyx_n_u_col_del __pyx_string_tab[854]
#define __pyx_n_u_col_insert __pyx_string_tab[855]
#define __pyx_n_u_col_join __pyx_string_tab[856]
#define __pyx_n_u_col_swap __pyx_string_tab[857]
#define __pyx_n_u_coli __pyx_string_tab[858]
#define __pyx_n_u_collections __pyx_string_tab[859]
#define __pyx_n_u_collections_abc __pyx_string_tab[860]
#define __pyx_n_u_cols __pyx_string_tab[861]
#define __pyx_n_u_complement __pyx_string_tab[862]
#define __pyx_n_u_complex __pyx_string_tab[863]
#define __pyx_n_u_complex128 __pyx_string_tab[864]
#define __pyx_n_u_condition __pyx_string_tab[865]
#define __pyx_n_u_condition_2 __pyx_string_tab[866]
#define __pyx_n_u_conditionset __pyx_string_tab[867]
#define __pyx_n_u_conjugate __pyx_string_tab[868]
#define __pyx_n_u_conjugate___new __pyx_string_tab[869]
#define __pyx_n_u_conjugate_transpose __pyx_string_tab[870]
#define __pyx_n_u_container __pyx_string_tab[871]
#define __pyx_n_u_container_2 __pyx_string_tab[872]
#define __pyx_n_u_contains __pyx_string_tab[873]
#define __pyx_n_u_convert_to_integer __pyx_string_tab[874]
#define __pyx_n_u_convert_to_mpcomplex_number __pyx_string_tab[875]
#define __pyx_n_u_convert_to_rational __pyx_string_tab[876]
#define __pyx_n_u_convert_to_real_number __pyx_string_tab[877]
#define __pyx_n_u_copy __pyx_string_tab[878]
#define __pyx_n_u_copy_2 __pyx_string_tab[879]
#define __pyx_n_u_cos __pyx_string_tab[880]
#define __pyx_n_u_cos___new __pyx_string_tab[881]
#define __pyx_n_u_cosh __pyx_string_tab[882]
#define __pyx_n_u_cosh___new __pyx_string_tab[883]
#define __pyx_n_u_cot __pyx_string_tab[884]
#define __pyx_n_u_cot___new __pyx_string_tab[885]
#define __pyx_n_u_coth __pyx_string_tab[886]
#define __pyx_n_u_coth___new __pyx_string_tab[887]
#define __pyx_n_u_count __pyx_string_tab[888]
#define __pyx_n_u_count_ops __pyx_string_tab[889]
#define __pyx_n_u_create_low_level_callable __pyx_string_tab[890]
#define __pyx_n_u_create_low_level_callable_locals __pyx_string_tab[891]
#define __pyx_n_u_create_low_level_callable_locals_2 __pyx_string_tab[892]
#define __pyx_n_u_create_low_level_callable_locals_3 __pyx_string_tab[893]
#define __pyx_n_u_create_sage_module __pyx_string_tab[894]
#define __pyx_n_u_create_sympy_module __pyx_string_tab[895]
#define __pyx_n_u_cross __pyx_string_tab[896]
#define __pyx_n_u_crt __pyx_string_tab[897]
#define __pyx_n_u_csc __pyx_string_tab[898]
#define __pyx_n_u_csc___new __pyx_string_tab[899]
#define __pyx_n_u_csch __pyx_string_tab[900]
#define __pyx_n_u_csch___new __pyx_string_tab[901]
#define __pyx_n_u_cse __pyx_string_tab[902]
#define __pyx_n_u_ctypes __pyx_string_tab[903]
#define __pyx_n_u_cur_arg __pyx_string_tab[904]
#define __pyx_n_u_curr __pyx_string_tab[905]
#define __pyx_n_u_d __pyx_string_tab[906]
#define __pyx_n_u_deep __pyx_string_tab[907]
#define __pyx_n_u_defaultdict __pyx_string_tab[908]
#define __pyx_n_u_den __pyx_string_tab[909]
#define __pyx_n_u_det __pyx_string_tab[910]
#define __pyx_n_u_diag __pyx_string_tab[911]
#define __pyx_n_u_dict __pyx_string_tab[912]
#define __pyx_n_u_dict_2 __pyx_string_tab[913]
#define __pyx_n_u_dict_3 __pyx_string_tab[914]
#define __pyx_n_u_diff __pyx_string_tab[915]
#define __pyx_n_u_diff_2 __pyx_string_tab[916]
#define __pyx_n_u_digamma __pyx_string_tab[917]
#define __pyx_n_u_dirichlet_eta __pyx_string_tab[918]
#define __pyx_n_u_dirichlet_eta___new __pyx_string_tab[919]
#define __pyx_n_u_divides __pyx_string_tab[920]
#define __pyx_n_u_doc __pyx_string_tab[921]
#define __pyx_n_u_doit __pyx_string_tab[922]
#define __pyx_n_u_domain __pyx_string_tab[923]
#define __pyx_n_u_domain_2 __pyx_string_tab[924]
#define __pyx_n_u_domains __pyx_string_tab[925]
#define __pyx_n_u_dot __pyx_string_tab[926]
#define __pyx_n_u_dps __pyx_string_tab[927]
#define __pyx_n_u_dps_to_prec __pyx_string_tab[928]
#define __pyx_n_u_dtype __pyx_string_tab[929]
#define __pyx_n_u_dtype_is_object __pyx_string_tab[930]
#define __pyx_n_u_dump_complex __pyx_string_tab[931]
#define __pyx_n_u_dump_real __pyx_string_tab[932]
#define __pyx_n_u_e __pyx_string_tab[933]
#define __pyx_n_u_e_2 __pyx_string_tab[934]
#define __pyx_n_u_elementary __pyx_string_tab[935]
#define __pyx_n_u_empty __pyx_string_tab[936]
#define __pyx_n_u_empty_set_singleton __pyx_string_tab[937]
#define __pyx_n_u_emptyset __pyx_string_tab[938]
#define __pyx_n_u_encode __pyx_string_tab[939]
#define __pyx_n_u_end __pyx_string_tab[940]
#define __pyx_n_u_end_2 __pyx_string_tab[941]
#define __pyx_n_u_enumerate __pyx_string_tab[942]
#define __pyx_n_u_eq __pyx_string_tab[943]
#define __pyx_n_u_eqs __pyx_string_tab[944]
#define __pyx_n_u_eqs_2 __pyx_string_tab[945]
#define __pyx_n_u_erf __pyx_string_tab[946]
#define __pyx_n_u_erf___new __pyx_string_tab[947]
#define __pyx_n_u_erfc __pyx_string_tab[948]
#define __pyx_n_u_erfc___new __pyx_string_tab[949]
#define __pyx_n_u_error __pyx_string_tab[950]
#define __pyx_n_u_euler_gamma __pyx_string_tab[951]
#define __pyx_n_u_eulergamma __pyx_string_tab[952]
#define __pyx_n_u_eval __pyx_string_tab[953]
#define __pyx_n_u_eval_complex __pyx_string_tab[954]
#define __pyx_n_u_eval_complex_double __pyx_string_tab[955]
#define __pyx_n_u_eval_double __pyx_string_tab[956]
#define __pyx_n_u_eval_mpc __pyx_string_tab[957]
#define __pyx_n_u_eval_mpfr __pyx_string_tab[958]
#define __pyx_n_u_eval_real __pyx_string_tab[959]
#define __pyx_n_u_evalf __pyx_string_tab[960]
#define __pyx_n_u_ex __pyx_string_tab[961]
#define __pyx_n_u_ex_2 __pyx_string_tab[962]
#define __pyx_n_u_exp __pyx_string_tab[963]
#define __pyx_n_u_expand __pyx_string_tab[964]
#define __pyx_n_u_expand_locals_lambda __pyx_string_tab[965]
#define __pyx_n_u_expand_mul __pyx_string_tab[966]
#define __pyx_n_u_expr __pyx_string_tab[967]
#define __pyx_n_u_expr_2 __pyx_string_tab[968]
#define __pyx_n_u_exprs __pyx_string_tab[969]
#define __pyx_n_u_eye __pyx_string_tab[970]
#define __pyx_n_u_f __pyx_string_tab[971]
#define __pyx_n_u_f1 __pyx_string_tab[972]
#define __pyx_n_u_f2 __pyx_string_tab[973]
#define __pyx_n_u_f_2 __pyx_string_tab[974]
#define __pyx_n_u_factor __pyx_string_tab[975]
#define __pyx_n_u_factor_lehman_method __pyx_string_tab[976]
#define __pyx_n_u_factor_pollard_pm1_method __pyx_string_tab[977]
#define __pyx_n_u_factor_pollard_rho_method __pyx_string_tab[978]
#define __pyx_n_u_factorial __pyx_string_tab[979]
#define __pyx_n_u_factors __pyx_string_tab[980]
#define __pyx_n_u_false __pyx_string_tab[981]
#define __pyx_n_u_fibonacci __pyx_string_tab[982]
#define __pyx_n_u_fibonacci2 __pyx_string_tab[983]
#define __pyx_n_u_fill __pyx_string_tab[984]
#define __pyx_n_u_finiteset __pyx_string_tab[985]
#define __pyx_n_u_flags __pyx_string_tab[986]
#define __pyx_n_u_float __pyx_string_tab[987]
#define __pyx_n_u_float16 __pyx_string_tab[988]
#define __pyx_n_u_float32 __pyx_string_tab[989]
#define __pyx_n_u_float64 __pyx_string_tab[990]
#define __pyx_n_u_floor __pyx_string_tab[991]
#define __pyx_n_u_floor___new __pyx_string_tab[992]
#define __pyx_n_u_format __pyx_string_tab[993]
#define __pyx_n_u_fortran __pyx_string_tab[994]
#define __pyx_n_u_free_symbols __pyx_string_tab[995]
#define __pyx_n_u_from_args __pyx_string_tab[996]
#define __pyx_n_u_fromiter __pyx_string_tab[997]
#define __pyx_n_u_func __pyx_string_tab[998]
#define __pyx_n_u_func_2 __pyx_string_tab[999]
#define __pyx_n_u_funcs __pyx_string_tab[1000]
#define __pyx_n_u_function __pyx_string_tab[1001]
#define __pyx_n_u_function_symbol __pyx_string_tab[1002]
#define __pyx_n_u_functions __pyx_string_tab[1003]
#define __pyx_n_u_functools __pyx_string_tab[1004]
#define __pyx_n_u_g __pyx_string_tab[1005]
#define __pyx_n_u_gamma __pyx_string_tab[1006]
#define __pyx_n_u_gamma___new __pyx_string_tab[1007]
#define __pyx_n_u_gamma_inc __pyx_string_tab[1008]
#define __pyx_n_u_gamma_inc_lower __pyx_string_tab[1009]
#define __pyx_n_u_gcd __pyx_string_tab[1010]
#define __pyx_n_u_gcd_ext __pyx_string_tab[1011]
#define __pyx_n_u_ge __pyx_string_tab[1012]
#define __pyx_n_u_generate_primes __pyx_string_tab[1013]
#define __pyx_n_u_genexpr __pyx_string_tab[1014]
#define __pyx_n_u_get __pyx_string_tab[1015]
#define __pyx_n_u_get_2 __pyx_string_tab[1016]
#define __pyx_n_u_get_arg __pyx_string_tab[1017]
#define __pyx_n_u_get_dict __pyx_string_tab[1018]
#define __pyx_n_u_get_function_class __pyx_string_tab[1019]
#define __pyx_n_u_get_index __pyx_string_tab[1020]
#define __pyx_n_u_get_name __pyx_string_tab[1021]
#define __pyx_n_u_get_num_den __pyx_string_tab[1022]
#define __pyx_n_u_get_prec __pyx_string_tab[1023]
#define __pyx_n_u_getenv __pyx_string_tab[1024]
#define __pyx_n_u_getstate __pyx_string_tab[1025]
#define __pyx_n_u_golden_ratio __pyx_string_tab[1026]
#define __pyx_n_u_gt __pyx_string_tab[1027]
#define __pyx_n_u_half __pyx_string_tab[1028]
#define __pyx_n_u_has __pyx_string_tab[1029]
#define __pyx_n_u_has_symbol __pyx_string_tab[1030]
#define __pyx_n_u_hash __pyx_string_tab[1031]
#define __pyx_n_u_have_flint __pyx_string_tab[1032]
#define __pyx_n_u_have_llvm __pyx_string_tab[1033]
#define __pyx_n_u_have_llvm_long_double __pyx_string_tab[1034]
#define __pyx_n_u_have_mpc __pyx_string_tab[1035]
#define __pyx_n_u_have_mpfr __pyx_string_tab[1036]
#define __pyx_n_u_have_numpy __pyx_string_tab[1037]
#define __pyx_n_u_have_piranha __pyx_string_tab[1038]
#define __pyx_n_u_hints __pyx_string_tab[1039]
#define __pyx_n_u_hyperbolic __pyx_string_tab[1040]
#define __pyx_n_u_i __pyx_string_tab[1041]
#define __pyx_n_u_i_3 __pyx_string_tab[1042]
#define __pyx_n_u_i_4 __pyx_string_tab[1043]
#define __pyx_n_u_id __pyx_string_tab[1044]
#define __pyx_n_u_identity __pyx_string_tab[1045]
#define __pyx_n_u_igcdex __pyx_string_tab[1046]
#define __pyx_n_u_imag __pyx_string_tab[1047]
#define __pyx_n_u_imageset __pyx_string_tab[1048]
#define __pyx_n_u_imaginary_part __pyx_string_tab[1049]
#define __pyx_n_u_immutable __pyx_string_tab[1050]
#define __pyx_n_u_import __pyx_string_tab[1051]
#define __pyx_n_u_index __pyx_string_tab[1052]
#define __pyx_n_u_indices __pyx_string_tab[1053]
#define __pyx_n_u_init __pyx_string_tab[1054]
#define __pyx_n_u_init___locals_genexpr __pyx_string_tab[1055]
#define __pyx_n_u_inp __pyx_string_tab[1056]
#define __pyx_n_u_inp_offset __pyx_string_tab[1057]
#define __pyx_n_u_instance __pyx_string_tab[1058]
#define __pyx_n_u_instancecheck __pyx_string_tab[1059]
#define __pyx_n_u_int __pyx_string_tab[1060]
#define __pyx_n_u_int_ok __pyx_string_tab[1061]
#define __pyx_n_u_integer_nthroot __pyx_string_tab[1062]
#define __pyx_n_u_integers __pyx_string_tab[1063]
#define __pyx_n_u_integers_singleton __pyx_string_tab[1064]
#define __pyx_n_u_intersection __pyx_string_tab[1065]
#define __pyx_n_u_interval __pyx_string_tab[1066]
#define __pyx_n_u_inv __pyx_string_tab[1067]
#define __pyx_n_u_is_Add __pyx_string_tab[1068]
#define __pyx_n_u_is_Derivative __pyx_string_tab[1069]
#define __pyx_n_u_is_Equality __pyx_string_tab[1070]
#define __pyx_n_u_is_Float __pyx_string_tab[1071]
#define __pyx_n_u_is_Function __pyx_string_tab[1072]
#define __pyx_n_u_is_Integer __pyx_string_tab[1073]
#define __pyx_n_u_is_Mul __pyx_string_tab[1074]
#define __pyx_n_u_is_Pow __pyx_string_tab[1075]
#define __pyx_n_u_is_Rational __pyx_string_tab[1076]
#define __pyx_n_u_is_Relational __pyx_string_tab[1077]
#define __pyx_n_u_is_commutative __pyx_string_tab[1078]
#define __pyx_n_u_is_complex __pyx_string_tab[1079]
#define __pyx_n_u_is_coroutine __pyx_string_tab[1080]
#define __pyx_n_u_is_finite __pyx_string_tab[1081]
#define __pyx_n_u_is_integer __pyx_string_tab[1082]
#define __pyx_n_u_is_irrational __pyx_string_tab[1083]
#define __pyx_n_u_is_negative __pyx_string_tab[1084]
#define __pyx_n_u_is_nonnegative __pyx_string_tab[1085]
#define __pyx_n_u_is_nonpositive __pyx_string_tab[1086]
#define __pyx_n_u_is_number __pyx_string_tab[1087]
#define __pyx_n_u_is_positive __pyx_string_tab[1088]
#define __pyx_n_u_is_rational __pyx_string_tab[1089]
#define __pyx_n_u_is_real __pyx_string_tab[1090]
#define __pyx_n_u_is_sequence __pyx_string_tab[1091]
#define __pyx_n_u_is_square __pyx_string_tab[1092]
#define __pyx_n_u_is_zero __pyx_string_tab[1093]
#define __pyx_n_u_isprime __pyx_string_tab[1094]
#define __pyx_n_u_it __pyx_string_tab[1095]
#define __pyx_n_u_it_end __pyx_string_tab[1096]
#define __pyx_n_u_item __pyx_string_tab[1097]
#define __pyx_n_u_items __pyx_string_tab[1098]
#define __pyx_n_u_itemsize __pyx_string_tab[1099]
#define __pyx_n_u_iter __pyx_string_tab[1100]
#define __pyx_n_u_iter_2 __pyx_string_tab[1101]
#define __pyx_n_u_iterend __pyx_string_tab[1102]
#define __pyx_n_u_iteritems __pyx_string_tab[1103]
#define __pyx_n_u_itertools __pyx_string_tab[1104]
#define __pyx_n_u_j __pyx_string_tab[1105]
#define __pyx_n_u_jacobi __pyx_string_tab[1106]
#define __pyx_n_u_jacobian __pyx_string_tab[1107]
#define __pyx_n_u_k __pyx_string_tab[1108]
#define __pyx_n_u_k_2 __pyx_string_tab[1109]
#define __pyx_n_u_key __pyx_string_tab[1110]
#define __pyx_n_u_kronecker __pyx_string_tab[1111]
#define __pyx_n_u_kronecker_delta __pyx_string_tab[1112]
#define __pyx_n_u_kwargs __pyx_string_tab[1113]
#define __pyx_n_u_l __pyx_string_tab[1114]
#define __pyx_n_u_lambda __pyx_string_tab[1115]
#define __pyx_n_u_lambda_2 __pyx_string_tab[1116]
#define __pyx_n_u_lambdify __pyx_string_tab[1117]
#define __pyx_n_u_lambert_w __pyx_string_tab[1118]
#define __pyx_n_u_latex __pyx_string_tab[1119]
#define __pyx_n_u_lcm __pyx_string_tab[1120]
#define __pyx_n_u_le __pyx_string_tab[1121]
#define __pyx_n_u_left_open __pyx_string_tab[1122]
#define __pyx_n_u_left_open_2 __pyx_string_tab[1123]
#define __pyx_n_u_legendre __pyx_string_tab[1124]
#define __pyx_n_u_length __pyx_string_tab[1125]
#define __pyx_n_u_lhs __pyx_string_tab[1126]
#define __pyx_n_u_linsolve __pyx_string_tab[1127]
#define __pyx_n_u_list_args __pyx_string_tab[1128]
#define __pyx_n_u_llvm __pyx_string_tab[1129]
#define __pyx_n_u_llvm_float_loading_func __pyx_string_tab[1130]
#define __pyx_n_u_llvm_loading_func __pyx_string_tab[1131]
#define __pyx_n_u_llvm_long_double_loading_func __pyx_string_tab[1132]
#define __pyx_n_u_load __pyx_string_tab[1133]
#define __pyx_n_u_load_basic __pyx_string_tab[1134]
#define __pyx_n_u_log __pyx_string_tab[1135]
#define __pyx_n_u_log___new __pyx_string_tab[1136]
#define __pyx_n_u_log_gamma __pyx_string_tab[1137]
#define __pyx_n_u_loggamma __pyx_string_tab[1138]
#define __pyx_n_u_loggamma___new __pyx_string_tab[1139]
#define __pyx_n_u_loggamma__sage __pyx_string_tab[1140]
#define __pyx_n_u_logical_and __pyx_string_tab[1141]
#define __pyx_n_u_logical_not __pyx_string_tab[1142]
#define __pyx_n_u_logical_or __pyx_string_tab[1143]
#define __pyx_n_u_logical_xor __pyx_string_tab[1144]
#define __pyx_n_u_longdouble __pyx_string_tab[1145]
#define __pyx_n_u_lower __pyx_string_tab[1146]
#define __pyx_n_u_lowergamma __pyx_string_tab[1147]
#define __pyx_n_u_lowergamma___new __pyx_string_tab[1148]
#define __pyx_n_u_lowergamma__sage __pyx_string_tab[1149]
#define __pyx_n_u_lowergamma__sympy __pyx_string_tab[1150]
#define __pyx_n_u_lt __pyx_string_tab[1151]
#define __pyx_n_u_lucas __pyx_string_tab[1152]
#define __pyx_n_u_lucas2 __pyx_string_tab[1153]
#define __pyx_n_u_m __pyx_string_tab[1154]
#define __pyx_n_u_m1 __pyx_string_tab[1155]
#define __pyx_n_u_m_2 __pyx_string_tab[1156]
#define __pyx_n_u_main __pyx_string_tab[1157]
#define __pyx_n_u_make_args __pyx_string_tab[1158]
#define __pyx_n_u_map __pyx_string_tab[1159]
#define __pyx_n_u_mat __pyx_string_tab[1160]
#define __pyx_n_u_mat_expr __pyx_string_tab[1161]
#define __pyx_n_u_max __pyx_string_tab[1162]
#define __pyx_n_u_max_2 __pyx_string_tab[1163]
#define __pyx_n_u_me __pyx_string_tab[1164]
#define __pyx_n_u_memview __pyx_string_tab[1165]
#define __pyx_n_u_metaclass __pyx_string_tab[1166]
#define __pyx_n_u_method __pyx_string_tab[1167]
#define __pyx_n_u_min __pyx_string_tab[1168]
#define __pyx_n_u_min_2 __pyx_string_tab[1169]
#define __pyx_n_u_minus_one __pyx_string_tab[1170]
#define __pyx_n_u_minus_oo __pyx_string_tab[1171]
#define __pyx_n_u_mod __pyx_string_tab[1172]
#define __pyx_n_u_mod_2 __pyx_string_tab[1173]
#define __pyx_n_u_mod_inverse __pyx_string_tab[1174]
#define __pyx_n_u_mode __pyx_string_tab[1175]
#define __pyx_n_u_modularinteger __pyx_string_tab[1176]
#define __pyx_n_u_module __pyx_string_tab[1177]
#define __pyx_n_u_module_2 __pyx_string_tab[1178]
#define __pyx_n_u_module_cleanup __pyx_string_tab[1179]
#define __pyx_n_u_modules __pyx_string_tab[1180]
#define __pyx_n_u_mro_entries __pyx_string_tab[1181]
#define __pyx_n_u_msubs __pyx_string_tab[1182]
#define __pyx_n_u_msubs_locals_lambda __pyx_string_tab[1183]
#define __pyx_n_u_mul __pyx_string_tab[1184]
#define __pyx_n_u_mul_matrix __pyx_string_tab[1185]
#define __pyx_n_u_mul_scalar __pyx_string_tab[1186]
#define __pyx_n_u_multiplicative_order __pyx_string_tab[1187]
#define __pyx_n_u_multiply_elementwise __pyx_string_tab[1188]
#define __pyx_n_u_n __pyx_string_tab[1189]
#define __pyx_n_u_n1 __pyx_string_tab[1190]
#define __pyx_n_u_n2 __pyx_string_tab[1191]
#define __pyx_n_u_n_2 __pyx_string_tab[1192]
#define __pyx_n_u_name __pyx_string_tab[1193]
#define __pyx_n_u_name_2 __pyx_string_tab[1194]
#define __pyx_n_u_nan __pyx_string_tab[1195]
#define __pyx_n_u_nargs __pyx_string_tab[1196]
#define __pyx_n_u_nbroadcast __pyx_string_tab[1197]
#define __pyx_n_u_nc __pyx_string_tab[1198]
#define __pyx_n_u_ncols __pyx_string_tab[1199]
#define __pyx_n_u_ndim __pyx_string_tab[1200]
#define __pyx_n_u_ndindex __pyx_string_tab[1201]
#define __pyx_n_u_ne __pyx_string_tab[1202]
#define __pyx_n_u_new __pyx_string_tab[1203]
#define __pyx_n_u_new_2 __pyx_string_tab[1204]
#define __pyx_n_u_next __pyx_string_tab[1205]
#define __pyx_n_u_next_2 __pyx_string_tab[1206]
#define __pyx_n_u_next_arg __pyx_string_tab[1207]
#define __pyx_n_u_nextprime __pyx_string_tab[1208]
#define __pyx_n_u_np __pyx_string_tab[1209]
#define __pyx_n_u_nr __pyx_string_tab[1210]
#define __pyx_n_u_nrows __pyx_string_tab[1211]
#define __pyx_n_u_nthroot_mod __pyx_string_tab[1212]
#define __pyx_n_u_nthroot_mod_list __pyx_string_tab[1213]
#define __pyx_n_u_num __pyx_string_tab[1214]
#define __pyx_n_u_num_2 __pyx_string_tab[1215]
#define __pyx_n_u_numbers __pyx_string_tab[1216]
#define __pyx_n_u_numpy __pyx_string_tab[1217]
#define __pyx_n_u_o __pyx_string_tab[1218]
#define __pyx_n_u_obj __pyx_string_tab[1219]
#define __pyx_n_u_object __pyx_string_tab[1220]
#define __pyx_n_u_old __pyx_string_tab[1221]
#define __pyx_n_u_one __pyx_string_tab[1222]
#define __pyx_n_u_ones __pyx_string_tab[1223]
#define __pyx_n_u_oo __pyx_string_tab[1224]
#define __pyx_n_u_op __pyx_string_tab[1225]
#define __pyx_n_u_operands __pyx_string_tab[1226]
#define __pyx_n_u_operator __pyx_string_tab[1227]
#define __pyx_n_u_opt_level __pyx_string_tab[1228]
#define __pyx_n_u_order __pyx_string_tab[1229]
#define __pyx_n_u_os __pyx_string_tab[1230]
#define __pyx_n_u_other __pyx_string_tab[1231]
#define __pyx_n_u_other_2 __pyx_string_tab[1232]
#define __pyx_n_u_out __pyx_string_tab[1233]
#define __pyx_n_u_out_offset __pyx_string_tab[1234]
#define __pyx_n_u_p __pyx_string_tab[1235]
#define __pyx_n_u_p_2 __pyx_string_tab[1236]
#define __pyx_n_u_p_3 __pyx_string_tab[1237]
#define __pyx_n_u_pack __pyx_string_tab[1238]
#define __pyx_n_u_pair __pyx_string_tab[1239]
#define __pyx_n_u_perfect_power __pyx_string_tab[1240]
#define __pyx_n_u_perm __pyx_string_tab[1241]
#define __pyx_n_u_pi __pyx_string_tab[1242]
#define __pyx_n_u_piecewise __pyx_string_tab[1243]
#define __pyx_n_u_point __pyx_string_tab[1244]
#define __pyx_n_u_poly __pyx_string_tab[1245]
#define __pyx_n_u_polygamma __pyx_string_tab[1246]
#define __pyx_n_u_polygamma___new __pyx_string_tab[1247]
#define __pyx_n_u_polygamma__sympy __pyx_string_tab[1248]
#define __pyx_n_u_polys __pyx_string_tab[1249]
#define __pyx_n_u_pop __pyx_string_tab[1250]
#define __pyx_n_u_pos __pyx_string_tab[1251]
#define __pyx_n_u_powermod __pyx_string_tab[1252]
#define __pyx_n_u_powermod_list __pyx_string_tab[1253]
#define __pyx_n_u_prec __pyx_string_tab[1254]
#define __pyx_n_u_prec_2 __pyx_string_tab[1255]
#define __pyx_n_u_prec_3 __pyx_string_tab[1256]
#define __pyx_n_u_precision __pyx_string_tab[1257]
#define __pyx_n_u_prefix __pyx_string_tab[1258]
#define __pyx_n_u_prepare __pyx_string_tab[1259]
#define __pyx_n_u_prev __pyx_string_tab[1260]
#define __pyx_n_u_prime_factor_multiplicities __pyx_string_tab[1261]
#define __pyx_n_u_prime_factors __pyx_string_tab[1262]
#define __pyx_n_u_primes __pyx_string_tab[1263]
#define __pyx_n_u_primitive_root __pyx_string_tab[1264]
#define __pyx_n_u_primitive_root_list __pyx_string_tab[1265]
#define __pyx_n_u_probab_prime_p __pyx_string_tab[1266]
#define __pyx_n_u_property __pyx_string_tab[1267]
#define __pyx_n_u_pyfunction __pyx_string_tab[1268]
#define __pyx_n_u_pyfunction_2 __pyx_string_tab[1269]
#define __pyx_n_u_pyfunction_class __pyx_string_tab[1270]
#define __pyx_n_u_pyfunction_class_2 __pyx_string_tab[1271]
#define __pyx_n_u_pyobject __pyx_string_tab[1272]
#define __pyx_n_u_pyx_capi __pyx_string_tab[1273]
#define __pyx_n_u_pyx_checksum __pyx_string_tab[1274]
#define __pyx_n_u_pyx_result __pyx_string_tab[1275]
#define __pyx_n_u_pyx_state __pyx_string_tab[1276]
#define __pyx_n_u_pyx_type __pyx_string_tab[1277]
#define __pyx_n_u_pyx_unpickle_Enum __pyx_string_tab[1278]
#define __pyx_n_u_pyx_unpickle_Sieve __pyx_string_tab[1279]
#define __pyx_n_u_pyx_unpickle__Lambdify __pyx_string_tab[1280]
#define __pyx_n_u_pyx_vtable __pyx_string_tab[1281]
#define __pyx_n_u_q __pyx_string_tab[1282]
#define __pyx_n_u_q_2 __pyx_string_tab[1283]
#define __pyx_n_u_q_3 __pyx_string_tab[1284]
#define __pyx_n_u_qualname __pyx_string_tab[1285]
#define __pyx_n_u_quotient __pyx_string_tab[1286]
#define __pyx_n_u_quotient_mod __pyx_string_tab[1287]
#define __pyx_n_u_r __pyx_string_tab[1288]
#define __pyx_n_u_r_2 __pyx_string_tab[1289]
#define __pyx_n_u_r_i __pyx_string_tab[1290]
#define __pyx_n_u_r_j __pyx_string_tab[1291]
#define __pyx_n_u_r_s __pyx_string_tab[1292]
#define __pyx_n_u_raise_error __pyx_string_tab[1293]
#define __pyx_n_u_rat __pyx_string_tab[1294]
#define __pyx_n_u_rationals __pyx_string_tab[1295]
#define __pyx_n_u_rationals_singleton __pyx_string_tab[1296]
#define __pyx_n_u_ravel __pyx_string_tab[1297]
#define __pyx_n_u_real __pyx_string_tab[1298]
#define __pyx_n_u_real_2 __pyx_string_tab[1299]
#define __pyx_n_u_real_part __pyx_string_tab[1300]
#define __pyx_n_u_reals __pyx_string_tab[1301]
#define __pyx_n_u_reals_singleton __pyx_string_tab[1302]
#define __pyx_n_u_reduce __pyx_string_tab[1303]
#define __pyx_n_u_reduce_2 __pyx_string_tab[1304]
#define __pyx_n_u_reduce_cython __pyx_string_tab[1305]
#define __pyx_n_u_reduce_ex __pyx_string_tab[1306]
#define __pyx_n_u_reduced_exprs __pyx_string_tab[1307]
#define __pyx_n_u_register __pyx_string_tab[1308]
#define __pyx_n_u_rel __pyx_string_tab[1309]
#define __pyx_n_u_rem __pyx_string_tab[1310]
#define __pyx_n_u_rem_2 __pyx_string_tab[1311]
#define __pyx_n_u_replace __pyx_string_tab[1312]
#define __pyx_n_u_replacements __pyx_string_tab[1313]
#define __pyx_n_u_repr __pyx_string_tab[1314]
#define __pyx_n_u_repr_latex __pyx_string_tab[1315]
#define __pyx_n_u_repr_latex_2 __pyx_string_tab[1316]
#define __pyx_n_u_reps __pyx_string_tab[1317]
#define __pyx_n_u_require __pyx_string_tab[1318]
#define __pyx_n_u_res __pyx_string_tab[1319]
#define __pyx_n_u_reshape __pyx_string_tab[1320]
#define __pyx_n_u_result __pyx_string_tab[1321]
#define __pyx_n_u_ret __pyx_string_tab[1322]
#define __pyx_n_u_ret_val __pyx_string_tab[1323]
#define __pyx_n_u_retries __pyx_string_tab[1324]
#define __pyx_n_u_rhs __pyx_string_tab[1325]
#define __pyx_n_u_ri __pyx_string_tab[1326]
#define __pyx_n_u_richcmp __pyx_string_tab[1327]
#define __pyx_n_u_richcmp_2 __pyx_string_tab[1328]
#define __pyx_n_u_right_open __pyx_string_tab[1329]
#define __pyx_n_u_right_open_2 __pyx_string_tab[1330]
#define __pyx_n_u_ring __pyx_string_tab[1331]
#define __pyx_n_u_root __pyx_string_tab[1332]
#define __pyx_n_u_root_list __pyx_string_tab[1333]
#define __pyx_n_u_round __pyx_string_tab[1334]
#define __pyx_n_u_row __pyx_string_tab[1335]
#define __pyx_n_u_row_del __pyx_string_tab[1336]
#define __pyx_n_u_row_insert __pyx_string_tab[1337]
#define __pyx_n_u_row_join __pyx_string_tab[1338]
#define __pyx_n_u_row_swap __pyx_string_tab[1339]
#define __pyx_n_u_rowadd __pyx_string_tab[1340]
#define __pyx_n_u_rowi __pyx_string_tab[1341]
#define __pyx_n_u_rowmul __pyx_string_tab[1342]
#define __pyx_n_u_rows __pyx_string_tab[1343]
#define __pyx_n_u_s __pyx_string_tab[1344]
#define __pyx_n_u_sage __pyx_string_tab[1345]
#define __pyx_n_u_sage_2 __pyx_string_tab[1346]
#define __pyx_n_u_sage_all __pyx_string_tab[1347]
#define __pyx_n_u_sage_module __pyx_string_tab[1348]
#define __pyx_n_u_sage_symbolic_symengine_conversi __pyx_string_tab[1349]
#define __pyx_n_u_scipy __pyx_string_tab[1350]
#define __pyx_n_u_sec __pyx_string_tab[1351]
#define __pyx_n_u_sec___new __pyx_string_tab[1352]
#define __pyx_n_u_sech __pyx_string_tab[1353]
#define __pyx_n_u_sech___new __pyx_string_tab[1354]
#define __pyx_n_u_self __pyx_string_tab[1355]
#define __pyx_n_u_send __pyx_string_tab[1356]
#define __pyx_n_u_series __pyx_string_tab[1357]
#define __pyx_n_u_set __pyx_string_tab[1358]
#define __pyx_n_u_set_2 __pyx_string_tab[1359]
#define __pyx_n_u_set_complement __pyx_string_tab[1360]
#define __pyx_n_u_set_complement_helper __pyx_string_tab[1361]
#define __pyx_n_u_set_intersection __pyx_string_tab[1362]
#define __pyx_n_u_set_name __pyx_string_tab[1363]
#define __pyx_n_u_set_union __pyx_string_tab[1364]
#define __pyx_n_u_setdefault __pyx_string_tab[1365]
#define __pyx_n_u_setstate __pyx_string_tab[1366]
#define __pyx_n_u_setstate_cython __pyx_string_tab[1367]
#define __pyx_n_u_shape __pyx_string_tab[1368]
#define __pyx_n_u_sign __pyx_string_tab[1369]
#define __pyx_n_u_sign___new __pyx_string_tab[1370]
#define __pyx_n_u_sign_is_complex __pyx_string_tab[1371]
#define __pyx_n_u_sign_is_finite __pyx_string_tab[1372]
#define __pyx_n_u_simplify __pyx_string_tab[1373]
#define __pyx_n_u_simplify_locals_lambda __pyx_string_tab[1374]
#define __pyx_n_u_sin __pyx_string_tab[1375]
#define __pyx_n_u_sin___new __pyx_string_tab[1376]
#define __pyx_n_u_sinh __pyx_string_tab[1377]
#define __pyx_n_u_sinh___new __pyx_string_tab[1378]
#define __pyx_n_u_size __pyx_string_tab[1379]
#define __pyx_n_u_solve __pyx_string_tab[1380]
#define __pyx_n_u_sqrt __pyx_string_tab[1381]
#define __pyx_n_u_sqrt_mod __pyx_string_tab[1382]
#define __pyx_n_u_sset __pyx_string_tab[1383]
#define __pyx_n_u_sset_2 __pyx_string_tab[1384]
#define __pyx_n_u_start __pyx_string_tab[1385]
#define __pyx_n_u_start_2 __pyx_string_tab[1386]
#define __pyx_n_u_state __pyx_string_tab[1387]
#define __pyx_n_u_staticmethod __pyx_string_tab[1388]
#define __pyx_n_u_step __pyx_string_tab[1389]
#define __pyx_n_u_stop __pyx_string_tab[1390]
#define __pyx_n_u_store_pickle __pyx_string_tab[1391]
#define __pyx_n_u_str __pyx_string_tab[1392]
#define __pyx_n_u_struct __pyx_string_tab[1393]
#define __pyx_n_u_submatrix __pyx_string_tab[1394]
#define __pyx_n_u_subs __pyx_string_tab[1395]
#define __pyx_n_u_subs_dict __pyx_string_tab[1396]
#define __pyx_n_u_subs_locals_lambda __pyx_string_tab[1397]
#define __pyx_n_u_subs_oldnew __pyx_string_tab[1398]
#define __pyx_n_u_super __pyx_string_tab[1399]
#define __pyx_n_u_sym __pyx_string_tab[1400]
#define __pyx_n_u_sym_2 __pyx_string_tab[1401]
#define __pyx_n_u_symarray __pyx_string_tab[1402]
#define __pyx_n_u_symbol __pyx_string_tab[1403]
#define __pyx_n_u_symbolic __pyx_string_tab[1404]
#define __pyx_n_u_symbols __pyx_string_tab[1405]
#define __pyx_n_u_symengine __pyx_string_tab[1406]
#define __pyx_n_u_symengine_lib_symengine_wrapper __pyx_string_tab[1407]
#define __pyx_n_u_symengine_utilities __pyx_string_tab[1408]
#define __pyx_n_u_sympify __pyx_string_tab[1409]
#define __pyx_n_u_sympify_2 __pyx_string_tab[1410]
#define __pyx_n_u_sympy __pyx_string_tab[1411]
#define __pyx_n_u_sympy2symengine __pyx_string_tab[1412]
#define __pyx_n_u_sympy_2 __pyx_string_tab[1413]
#define __pyx_n_u_sympy_AppliedUndef __pyx_string_tab[1414]
#define __pyx_n_u_sympy_core_function __pyx_string_tab[1415]
#define __pyx_n_u_sympy_module __pyx_string_tab[1416]
#define __pyx_n_u_syms __pyx_string_tab[1417]
#define __pyx_n_u_syms_2 __pyx_string_tab[1418]
#define __pyx_n_u_sys __pyx_string_tab[1419]
#define __pyx_n_u_t __pyx_string_tab[1420]
#define __pyx_n_u_tan __pyx_string_tab[1421]
#define __pyx_n_u_tan___new __pyx_string_tab[1422]
#define __pyx_n_u_tanh __pyx_string_tab[1423]
#define __pyx_n_u_tanh___new __pyx_string_tab[1424]
#define __pyx_n_u_tbool __pyx_string_tab[1425]
#define __pyx_n_u_test __pyx_string_tab[1426]
#define __pyx_n_u_throw __pyx_string_tab[1427]
#define __pyx_n_u_tmp __pyx_string_tab[1428]
#define __pyx_n_u_tocopy __pyx_string_tab[1429]
#define __pyx_n_u_tolist __pyx_string_tab[1430]
#define __pyx_n_u_totient __pyx_string_tab[1431]
#define __pyx_n_u_trace __pyx_string_tab[1432]
#define __pyx_n_u_transpose __pyx_string_tab[1433]
#define __pyx_n_u_trigamma __pyx_string_tab[1434]
#define __pyx_n_u_trigonometric __pyx_string_tab[1435]
#define __pyx_n_u_true __pyx_string_tab[1436]
#define __pyx_n_u_types __pyx_string_tab[1437]
#define __pyx_n_u_u __pyx_string_tab[1438]
#define __pyx_n_u_umap __pyx_string_tab[1439]
#define __pyx_n_u_unicode __pyx_string_tab[1440]
#define __pyx_n_u_union __pyx_string_tab[1441]
#define __pyx_n_u_universal_set_singleton __pyx_string_tab[1442]
#define __pyx_n_u_universalset __pyx_string_tab[1443]
#define __pyx_n_u_universe __pyx_string_tab[1444]
#define __pyx_n_u_universe_2 __pyx_string_tab[1445]
#define __pyx_n_u_unpack __pyx_string_tab[1446]
#define __pyx_n_u_unsafe_complex __pyx_string_tab[1447]
#define __pyx_n_u_unsafe_eval __pyx_string_tab[1448]
#define __pyx_n_u_unsafe_real __pyx_string_tab[1449]
#define __pyx_n_u_unsafe_reset __pyx_string_tab[1450]
#define __pyx_n_u_unsigned_infinity __pyx_string_tab[1451]
#define __pyx_n_u_update __pyx_string_tab[1452]
#define __pyx_n_u_upper __pyx_string_tab[1453]
#define __pyx_n_u_uppergamma __pyx_string_tab[1454]
#define __pyx_n_u_uppergamma___new __pyx_string_tab[1455]
#define __pyx_n_u_uppergamma__sage __pyx_string_tab[1456]
#define __pyx_n_u_uppergamma__sympy __pyx_string_tab[1457]
#define __pyx_n_u_use_setstate __pyx_string_tab[1458]
#define __pyx_n_u_v __pyx_string_tab[1459]
#define __pyx_n_u_v_2 __pyx_string_tab[1460]
#define __pyx_n_u_value __pyx_string_tab[1461]
#define __pyx_n_u_values __pyx_string_tab[1462]
#define __pyx_n_u_variables __pyx_string_tab[1463]
#define __pyx_n_u_vec __pyx_string_tab[1464]
#define __pyx_n_u_version __pyx_string_tab[1465]
#define __pyx_n_u_warn __pyx_string_tab[1466]
#define __pyx_n_u_warnings __pyx_string_tab[1467]
#define __pyx_n_u_wrap_sage_function __pyx_string_tab[1468]
#define __pyx_n_u_x __pyx_string_tab[1469]
#define __pyx_n_u_x0 __pyx_string_tab[1470]
#define __pyx_n_u_x_3 __pyx_string_tab[1471]
#define __pyx_n_u_x_4 __pyx_string_tab[1472]
#define __pyx_n_u_xreplace __pyx_string_tab[1473]
#define __pyx_n_u_xreplace_locals_lambda __pyx_string_tab[1474]
#define __pyx_n_u_y __pyx_string_tab[1475]
#define __pyx_n_u_zero __pyx_string_tab[1476]
#define __pyx_n_u_zeros __pyx_string_tab[1477]
#define __pyx_n_u_zeta __pyx_string_tab[1478]
#define __pyx_n_u_zeta___new __pyx_string_tab[1479]
#define __pyx_n_u_zeta__sympy __pyx_string_tab[1480]
#define __pyx_n_u_zip __pyx_string_tab[1481]
#define __pyx_n_u_zoo __pyx_string_tab[1482]
#define __pyx_kp_b_PyObject_SymEngine_RCP_const_Sym __pyx_string_tab[1483]
#define __pyx_kp_b_iso88591_0_TTU_c_6aq_11C1DVVW_1_4AS8I_ST __pyx_string_tab[1484]
#define __pyx_kp_b_iso88591_1 __pyx_string_tab[1485]
#define __pyx_kp_b_iso88591_1F __pyx_string_tab[1486]
#define __pyx_kp_b_iso88591_1_q_q_3a_as_Q __pyx_string_tab[1487]
#define __pyx_kp_b_iso88591_1_t_WAT_1 __pyx_string_tab[1488]
#define __pyx_kp_b_iso88591_4q __pyx_string_tab[1489]
#define __pyx_kp_b_iso88591_4q_6 __pyx_string_tab[1490]
#define __pyx_kp_b_iso88591_4q_9A __pyx_string_tab[1491]
#define __pyx_kp_b_iso88591_4q_Q __pyx_string_tab[1492]
#define __pyx_kp_b_iso88591_4z_q __pyx_string_tab[1493]
#define __pyx_kp_b_iso88591_5Qa_q_G1A_q_Zq_uE_Ct5_l_1_IQfA __pyx_string_tab[1494]
#define __pyx_kp_b_iso88591_5_34xq_a __pyx_string_tab[1495]
#define __pyx_kp_b_iso88591_5_Jaq __pyx_string_tab[1496]
#define __pyx_kp_b_iso88591_6_A_1D_Qc_D_U_4vQ_U_4vQ_3a_1D_Q __pyx_string_tab[1497]
#define __pyx_kp_b_iso88591_7_1_4z_1 __pyx_string_tab[1498]
#define __pyx_kp_b_iso88591_7_1_4z_1A __pyx_string_tab[1499]
#define __pyx_kp_b_iso88591_7_1_4z_Qaq __pyx_string_tab[1500]
#define __pyx_kp_b_iso88591_7_1_4z_aq __pyx_string_tab[1501]
#define __pyx_kp_b_iso88591_7_1_4z_q __pyx_string_tab[1502]
#define __pyx_kp_b_iso88591_7_1_7_1_4q_3aq_1 __pyx_string_tab[1503]
#define __pyx_kp_b_iso88591_8_4q __pyx_string_tab[1504]
#define __pyx_kp_b_iso88591_9AV6 __pyx_string_tab[1505]
#define __pyx_kp_b_iso88591_9Bha __pyx_string_tab[1506]
#define __pyx_kp_b_iso88591_9Cq_Ql_A_5 __pyx_string_tab[1507]
#define __pyx_kp_b_iso88591_AQ_t1_q_A_gQd_1_Ba_Qiq_AQ_2Rr_A __pyx_string_tab[1508]
#define __pyx_kp_b_iso88591_AS_avT_A_G5_e1AU_3at_K1EQRRUUVV __pyx_string_tab[1509]
#define __pyx_kp_b_iso88591_AYc_2_1_1L_1_1 __pyx_string_tab[1510]
#define __pyx_kp_b_iso88591_A_0_Q_d_6_83gQ_a_A_E_WAT_Cwa_s_r __pyx_string_tab[1511]
#define __pyx_kp_b_iso88591_A_0_Q_d_6_83ha_a_A_E_WAT_Cxq_uKq __pyx_string_tab[1512]
#define __pyx_kp_b_iso88591_A_1 __pyx_string_tab[1513]
#define __pyx_kp_b_iso88591_A_1A __pyx_string_tab[1514]
#define __pyx_kp_b_iso88591_A_1E __pyx_string_tab[1515]
#define __pyx_kp_b_iso88591_A_1_1_6_Qa_q_F_A_1_a __pyx_string_tab[1516]
#define __pyx_kp_b_iso88591_A_1_1_6_Qa_t1_F_A_1_4q __pyx_string_tab[1517]
#define __pyx_kp_b_iso88591_A_1_2 __pyx_string_tab[1518]
#define __pyx_kp_b_iso88591_A_2 __pyx_string_tab[1519]
#define __pyx_kp_b_iso88591_A_2Rq_F_Rs_a_AQ_4wd_2Rq_Q_q_Jhaq __pyx_string_tab[1520]
#define __pyx_kp_b_iso88591_A_2Rq_F_Rs_a_AQ_4wd_2Rq_Q_q_Jhaq_2 __pyx_string_tab[1521]
#define __pyx_kp_b_iso88591_A_31D_BSST_s_1G1Je1 __pyx_string_tab[1522]
#define __pyx_kp_b_iso88591_A_33Gq_A_9_F_IQ_K_1A_a_q_a_q_A_f __pyx_string_tab[1523]
#define __pyx_kp_b_iso88591_A_33Gq_A_K_1A_A_vRy_vRy_t6_d_e3a __pyx_string_tab[1524]
#define __pyx_kp_b_iso88591_A_33Gq_A_b_Zwa_G1A_t1BgS_ar __pyx_string_tab[1525]
#define __pyx_kp_b_iso88591_A_33Gq_A_d_6_83gQ_s_1 __pyx_string_tab[1526]
#define __pyx_kp_b_iso88591_A_33Gq_A_d_6_83ha_s_1 __pyx_string_tab[1527]
#define __pyx_kp_b_iso88591_A_33Gq_A_r_t1_fBiq_5_1_q_O1_QfA __pyx_string_tab[1528]
#define __pyx_kp_b_iso88591_A_33Gq_A_t1F_HA __pyx_string_tab[1529]
#define __pyx_kp_b_iso88591_A_33Gq_A_t1F_IQ __pyx_string_tab[1530]
#define __pyx_kp_b_iso88591_A_33Gq_A_t1F_IQ_d_6_81_t7_S_7 __pyx_string_tab[1531]
#define __pyx_kp_b_iso88591_A_33Gq_A_t1F_IQ_d_6_81_t83c_HA __pyx_string_tab[1532]
#define __pyx_kp_b_iso88591_A_3a_Rt_ay_4q_y_t1G1 __pyx_string_tab[1533]
#define __pyx_kp_b_iso88591_A_3avS_4q_s_4q_s_A __pyx_string_tab[1534]
#define __pyx_kp_b_iso88591_A_3avS_AQ_A_C6_Zq_q_7_6_q __pyx_string_tab[1535]
#define __pyx_kp_b_iso88591_A_3avS_A_1Cs_l_1_4vQat1_uAWA __pyx_string_tab[1536]
#define __pyx_kp_b_iso88591_A_3fBd_AQ_T_q_T_q_F_q_e1A_1Bas_O __pyx_string_tab[1537]
#define __pyx_kp_b_iso88591_A_3fBd_AQ_T_q_T_q_F_q_e1A_1Bas_O_2 __pyx_string_tab[1538]
#define __pyx_kp_b_iso88591_A_3fCt1_AQ_3fCt1_AQ_L_a __pyx_string_tab[1539]
#define __pyx_kp_b_iso88591_A_3fCt1_AQ_3fCt1_AQ_O1E __pyx_string_tab[1540]
#define __pyx_kp_b_iso88591_A_4 __pyx_string_tab[1541]
#define __pyx_kp_b_iso88591_A_44I_a_d_6_83gQ_V2_1_V2Zq_A_E_a __pyx_string_tab[1542]
#define __pyx_kp_b_iso88591_A_44I_a_d_6_83ha_V2_1_V2Zq_A_A_E __pyx_string_tab[1543]
#define __pyx_kp_b_iso88591_A_4AT_vRy_s_1 __pyx_string_tab[1544]
#define __pyx_kp_b_iso88591_A_4q_c_5_1A_Qa __pyx_string_tab[1545]
#define __pyx_kp_b_iso88591_A_4r_fBa_4r_4q_a_4vS_AQ_Zq_q_a_V __pyx_string_tab[1546]
#define __pyx_kp_b_iso88591_A_4s_Cq_vS_iq_s_AT_r_iq_Qd_1_uAZ __pyx_string_tab[1547]
#define __pyx_kp_b_iso88591_A_4t_as_t5_A __pyx_string_tab[1548]
#define __pyx_kp_b_iso88591_A_4t_as_t5_Cq __pyx_string_tab[1549]
#define __pyx_kp_b_iso88591_A_4vRt6_Bc_6_A_AQ_7_iq_q_d_AT_A __pyx_string_tab[1550]
#define __pyx_kp_b_iso88591_A_4vS_4vQ_a_t1F_it1 __pyx_string_tab[1551]
#define __pyx_kp_b_iso88591_A_4vS_AQ_Zq_q_9A_Tllmmnno_q __pyx_string_tab[1552]
#define __pyx_kp_b_iso88591_A_4vS_A_Qa_Zq_F_d_Zq_F_d_A_31D_3 __pyx_string_tab[1553]
#define __pyx_kp_b_iso88591_A_4wa_5_HAQ_4we4z_AQ_4s_t_S_S_1 __pyx_string_tab[1554]
#define __pyx_kp_b_iso88591_A_4z_d_d_E_aq_U_1_WAQat5_A_3gQ_Y __pyx_string_tab[1555]
#define __pyx_kp_b_iso88591_A_55J_4q_V3nA __pyx_string_tab[1556]
#define __pyx_kp_b_iso88591_A_55J_4q_s_A __pyx_string_tab[1557]
#define __pyx_kp_b_iso88591_A_55J_4q_t1F_XQ __pyx_string_tab[1558]
#define __pyx_kp_b_iso88591_A_6aq_t __pyx_string_tab[1559]
#define __pyx_kp_b_iso88591_A_7_1_t3a_t1_s_1A_7_1_4q_3aq_1 __pyx_string_tab[1560]
#define __pyx_kp_b_iso88591_A_7_1_uCq_Q_Q_Q_4q_6_F __pyx_string_tab[1561]
#define __pyx_kp_b_iso88591_A_7q_t_T __pyx_string_tab[1562]
#define __pyx_kp_b_iso88591_A_81A_81A_1D_A_t1M_q_1F_fAQ __pyx_string_tab[1563]
#define __pyx_kp_b_iso88591_A_88LAURS_t1_o5I_a_1A __pyx_string_tab[1564]
#define __pyx_kp_b_iso88591_A_88LAURS_t1_o5I_a_Qa __pyx_string_tab[1565]
#define __pyx_kp_b_iso88591_A_88LAURS_t1_o5I_a_aq __pyx_string_tab[1566]
#define __pyx_kp_b_iso88591_A_8_q_PPWWXXY_t1_WD_1B __pyx_string_tab[1567]
#define __pyx_kp_b_iso88591_A_9_j_RS __pyx_string_tab[1568]
#define __pyx_kp_b_iso88591_A_9_q_1 __pyx_string_tab[1569]
#define __pyx_kp_b_iso88591_A_A __pyx_string_tab[1570]
#define __pyx_kp_b_iso88591_A_AT_K __pyx_string_tab[1571]
#define __pyx_kp_b_iso88591_A_A_4LATQ_a __pyx_string_tab[1572]
#define __pyx_kp_b_iso88591_A_A_4z_Qd_4q_1A __pyx_string_tab[1573]
#define __pyx_kp_b_iso88591_A_A_6NatST_E_aq_a_U_1F_Qat1Cs_WA __pyx_string_tab[1574]
#define __pyx_kp_b_iso88591_A_A_6NatST_E_aq_a_U_1F_Qat1Cs_WA_2 __pyx_string_tab[1575]
#define __pyx_kp_b_iso88591_A_A_Qa_4xq_1A __pyx_string_tab[1576]
#define __pyx_kp_b_iso88591_A_A_aq_4_as_4y_AS_ZuTWWXX_kkl __pyx_string_tab[1577]
#define __pyx_kp_b_iso88591_A_A_aq_l_3ar_2S_7 __pyx_string_tab[1578]
#define __pyx_kp_b_iso88591_A_Cq_Cq_4q_a_Qb_q_a_Qb_q_a_4q_2 __pyx_string_tab[1579]
#define __pyx_kp_b_iso88591_A_Cq_Q_Q_Qb_q_a_1_4q_2_1_4q_2_1 __pyx_string_tab[1580]
#define __pyx_kp_b_iso88591_A_Cs_6_3avQa_A_4vQis_6_1 __pyx_string_tab[1581]
#define __pyx_kp_b_iso88591_A_Cs_Cq_a_A_D_q_6_Cs_4q_33aq_1_A __pyx_string_tab[1582]
#define __pyx_kp_b_iso88591_A_D_5_4z_oQ_1A_waq __pyx_string_tab[1583]
#define __pyx_kp_b_iso88591_A_D_A_E_as_Qd_WBaq_aq_Bha_uJb __pyx_string_tab[1584]
#define __pyx_kp_b_iso88591_A_D_Q_t3b __pyx_string_tab[1585]
#define __pyx_kp_b_iso88591_A_D_Q_t4r __pyx_string_tab[1586]
#define __pyx_kp_b_iso88591_A_D_a_uCr __pyx_string_tab[1587]
#define __pyx_kp_b_iso88591_A_D_a_uD __pyx_string_tab[1588]
#define __pyx_kp_b_iso88591_A_D_a_uIRq __pyx_string_tab[1589]
#define __pyx_kp_b_iso88591_A_D_a_uKr __pyx_string_tab[1590]
#define __pyx_kp_b_iso88591_A_D_a_uO2Q __pyx_string_tab[1591]
#define __pyx_kp_b_iso88591_A_D_b_uD __pyx_string_tab[1592]
#define __pyx_kp_b_iso88591_A_E_T_Q __pyx_string_tab[1593]
#define __pyx_kp_b_iso88591_A_E_at1_U_4q_AS_Q __pyx_string_tab[1594]
#define __pyx_kp_b_iso88591_A_F __pyx_string_tab[1595]
#define __pyx_kp_b_iso88591_A_G1F_a_vWE_Q_q_q_q_d_7_WA_d_7 __pyx_string_tab[1596]
#define __pyx_kp_b_iso88591_A_HA __pyx_string_tab[1597]
#define __pyx_kp_b_iso88591_A_HAS_HAS_5_3it_Qc_3a_q_S_q_1_wj __pyx_string_tab[1598]
#define __pyx_kp_b_iso88591_A_HBa_t_Qa __pyx_string_tab[1599]
#define __pyx_kp_b_iso88591_A_HBa_t_V1D_1 __pyx_string_tab[1600]
#define __pyx_kp_b_iso88591_A_HBa_t_Yat_Qa __pyx_string_tab[1601]
#define __pyx_kp_b_iso88591_A_HD_b_D_b_BfBd_A_4r_at6_D_V2T_1 __pyx_string_tab[1602]
#define __pyx_kp_b_iso88591_A_HF __pyx_string_tab[1603]
#define __pyx_kp_b_iso88591_A_IQ_E __pyx_string_tab[1604]
#define __pyx_kp_b_iso88591_A_K_1A_fD_A_4_D_Cr_S_D_2Q_Qaq_Qh __pyx_string_tab[1605]
#define __pyx_kp_b_iso88591_A_K_1A_q __pyx_string_tab[1606]
#define __pyx_kp_b_iso88591_A_K_1A_q_q __pyx_string_tab[1607]
#define __pyx_kp_b_iso88591_A_K_1A_q_q_2 __pyx_string_tab[1608]
#define __pyx_kp_b_iso88591_A_Q_Gq_t5 __pyx_string_tab[1609]
#define __pyx_kp_b_iso88591_A_Q_I_t5_q __pyx_string_tab[1610]
#define __pyx_kp_b_iso88591_A_Qa_6_aq_1 __pyx_string_tab[1611]
#define __pyx_kp_b_iso88591_A_Qc_2V4q_a_Yaz_D_a __pyx_string_tab[1612]
#define __pyx_kp_b_iso88591_A_QfA_4q_G1A __pyx_string_tab[1613]
#define __pyx_kp_b_iso88591_A_Qj __pyx_string_tab[1614]
#define __pyx_kp_b_iso88591_A_Qo_Fat1_314DOSTTU_q_A_gT_2C1 __pyx_string_tab[1615]
#define __pyx_kp_b_iso88591_A_T_q_T_q_2Rq_2Rq_2Rr_Bc_A_2Q_2R __pyx_string_tab[1616]
#define __pyx_kp_b_iso88591_A_UUVVZZ_t1F_HA __pyx_string_tab[1617]
#define __pyx_kp_b_iso88591_A_V4y_A_E_aq_Q_WAT_AQd_q __pyx_string_tab[1618]
#define __pyx_kp_b_iso88591_A_V4y_A_E_aq_Q_WAT_AQd_q_2 __pyx_string_tab[1619]
#define __pyx_kp_b_iso88591_A_WAQ_Qc_1_a_c_fD_F_d_2_6_fFRS_q __pyx_string_tab[1620]
#define __pyx_kp_b_iso88591_A_WAQ_Qc_1_a_c_fD_F_d_avR_a_q __pyx_string_tab[1621]
#define __pyx_kp_b_iso88591_A_WAQ_Qc_1_a_c_fD_q_d_avR_a_q __pyx_string_tab[1622]
#define __pyx_kp_b_iso88591_A_Zq_F_avQ_A_vRq_q_q __pyx_string_tab[1623]
#define __pyx_kp_b_iso88591_A_Zq_F_d_Zq_F_d_ASPTTZZ_aaggh_d __pyx_string_tab[1624]
#define __pyx_kp_b_iso88591_A_Zq_F_d_Zq_F_d_Zq_F_d_d_6_F_fAQ __pyx_string_tab[1625]
#define __pyx_kp_b_iso88591_A_Zq_F_d_Zq_F_d_d_3avQk_q_s __pyx_string_tab[1626]
#define __pyx_kp_b_iso88591_A_Zq_F_d_Zq_F_d_d_4q_a_s __pyx_string_tab[1627]
#define __pyx_kp_b_iso88591_A_Zq_F_d_d_9AV1A_q __pyx_string_tab[1628]
#define __pyx_kp_b_iso88591_A_Zq_G4q_a_6fD_4F_1_q __pyx_string_tab[1629]
#define __pyx_kp_b_iso88591_A_Zq_t1F_2J_4q_31Ba_31AQ_q __pyx_string_tab[1630]
#define __pyx_kp_b_iso88591_A_ZwfIQ_4_Rq_aq_AXQa_G7_a_AXT_D __pyx_string_tab[1631]
#define __pyx_kp_b_iso88591_A_ZwfIQ_4t1_aq_4_Rq_aq_AXQa_G7_a __pyx_string_tab[1632]
#define __pyx_kp_b_iso88591_A_ZwfIQ_4t1_aq_AXQa_G1Kwa_RS_AXT __pyx_string_tab[1633]
#define __pyx_kp_b_iso88591_A_ZwfIQ_AXQa_G1Kwa_RS_AXT_D_wa __pyx_string_tab[1634]
#define __pyx_kp_b_iso88591_A___AQj_PQQ_xxyyzz_Cs_2Rq_A_2S_A __pyx_string_tab[1635]
#define __pyx_kp_b_iso88591_A_a_T_6_c_D_a_q_AV3k_QfCq_q_q __pyx_string_tab[1636]
#define __pyx_kp_b_iso88591_A_at81 __pyx_string_tab[1637]
#define __pyx_kp_b_iso88591_A_at_6gQ_OwVWWX_t1_XT_2C1 __pyx_string_tab[1638]
#define __pyx_kp_b_iso88591_A_avT_Q __pyx_string_tab[1639]
#define __pyx_kp_b_iso88591_A_bbc_t1F_HA __pyx_string_tab[1640]
#define __pyx_kp_b_iso88591_A_d_1_7_5_3gQ_q __pyx_string_tab[1641]
#define __pyx_kp_b_iso88591_A_d_AT_A_Qo_Qd_o_uuvvw_x_D_D_S_S __pyx_string_tab[1642]
#define __pyx_kp_b_iso88591_A_d_AT_t4vQ_d_QfF_q __pyx_string_tab[1643]
#define __pyx_kp_b_iso88591_A_d_AT_t4vQ_d_q_fA_q __pyx_string_tab[1644]
#define __pyx_kp_b_iso88591_A_d_a_s_2XS_Qb __pyx_string_tab[1645]
#define __pyx_kp_b_iso88591_A_d_d_E_aq_U_1_E_S_e1Cq __pyx_string_tab[1646]
#define __pyx_kp_b_iso88591_A_iq __pyx_string_tab[1647]
#define __pyx_kp_b_iso88591_A_iq_3c_q_Q_9_uF_3awa __pyx_string_tab[1648]
#define __pyx_kp_b_iso88591_A_k_aq_1A __pyx_string_tab[1649]
#define __pyx_kp_b_iso88591_A_q __pyx_string_tab[1650]
#define __pyx_kp_b_iso88591_A_q_1O3K1DP___bbdde_q __pyx_string_tab[1651]
#define __pyx_kp_b_iso88591_A_q_2 __pyx_string_tab[1652]
#define __pyx_kp_b_iso88591_A_q_3gQ_it1Cs_A __pyx_string_tab[1653]
#define __pyx_kp_b_iso88591_A_q_7OqPTT_ccd __pyx_string_tab[1654]
#define __pyx_kp_b_iso88591_A_q_A __pyx_string_tab[1655]
#define __pyx_kp_b_iso88591_A_q_A_E_avU_WAV1A_q __pyx_string_tab[1656]
#define __pyx_kp_b_iso88591_A_q_Q __pyx_string_tab[1657]
#define __pyx_kp_b_iso88591_A_q_QfF_he1D_a_HE_fA __pyx_string_tab[1658]
#define __pyx_kp_b_iso88591_A_q_a_6NatS__bbdde_q __pyx_string_tab[1659]
#define __pyx_kp_b_iso88591_A_q_d_AT_t4vQ_d_ar_6_q_q __pyx_string_tab[1660]
#define __pyx_kp_b_iso88591_A_q_t1_o5I_a_Qb __pyx_string_tab[1661]
#define __pyx_kp_b_iso88591_A_r_1 __pyx_string_tab[1662]
#define __pyx_kp_b_iso88591_A_r_A_A_A_1A_1 __pyx_string_tab[1663]
#define __pyx_kp_b_iso88591_A_r_q_G1 __pyx_string_tab[1664]
#define __pyx_kp_b_iso88591_A_s_1 __pyx_string_tab[1665]
#define __pyx_kp_b_iso88591_A_s_1JavXT_1 __pyx_string_tab[1666]
#define __pyx_kp_b_iso88591_A_s_D __pyx_string_tab[1667]
#define __pyx_kp_b_iso88591_A_t1 __pyx_string_tab[1668]
#define __pyx_kp_b_iso88591_A_t1A __pyx_string_tab[1669]
#define __pyx_kp_b_iso88591_A_t1D_q __pyx_string_tab[1670]
#define __pyx_kp_b_iso88591_A_t1F_it1Cq __pyx_string_tab[1671]
#define __pyx_kp_b_iso88591_A_t1O_1D_PQ __pyx_string_tab[1672]
#define __pyx_kp_b_iso88591_A_t1_2 __pyx_string_tab[1673]
#define __pyx_kp_b_iso88591_A_t1__4PPQQUU__iij __pyx_string_tab[1674]
#define __pyx_kp_b_iso88591_A_t1__4PPQQUU__nno __pyx_string_tab[1675]
#define __pyx_kp_b_iso88591_A_t1_o5MQdR_hhi __pyx_string_tab[1676]
#define __pyx_kp_b_iso88591_A_t2Q __pyx_string_tab[1677]
#define __pyx_kp_b_iso88591_A_t2T_aq_Cq_c_e9TXX_cceef __pyx_string_tab[1678]
#define __pyx_kp_b_iso88591_A_t3at9A __pyx_string_tab[1679]
#define __pyx_kp_b_iso88591_A_t3gQc __pyx_string_tab[1680]
#define __pyx_kp_b_iso88591_A_t4q __pyx_string_tab[1681]
#define __pyx_kp_b_iso88591_A_t5 __pyx_string_tab[1682]
#define __pyx_kp_b_iso88591_A_t5_1 __pyx_string_tab[1683]
#define __pyx_kp_b_iso88591_A_t5_XRwa __pyx_string_tab[1684]
#define __pyx_kp_b_iso88591_A_t5_m1 __pyx_string_tab[1685]
#define __pyx_kp_b_iso88591_A_t6_4_A __pyx_string_tab[1686]
#define __pyx_kp_b_iso88591_A_t7_a __pyx_string_tab[1687]
#define __pyx_kp_b_iso88591_A_t81 __pyx_string_tab[1688]
#define __pyx_kp_b_iso88591_A_t9A __pyx_string_tab[1689]
#define __pyx_kp_b_iso88591_A_t9A_awa __pyx_string_tab[1690]
#define __pyx_kp_b_iso88591_A_t9A_t9AU_D_Q __pyx_string_tab[1691]
#define __pyx_kp_b_iso88591_A_t9A_uIQe2T_q __pyx_string_tab[1692]
#define __pyx_kp_b_iso88591_A_t_1 __pyx_string_tab[1693]
#define __pyx_kp_b_iso88591_A_t_2Qe1A __pyx_string_tab[1694]
#define __pyx_kp_b_iso88591_A_t_2T_a __pyx_string_tab[1695]
#define __pyx_kp_b_iso88591_A_t_Qa __pyx_string_tab[1696]
#define __pyx_kp_b_iso88591_A_t_Qd_G1 __pyx_string_tab[1697]
#define __pyx_kp_b_iso88591_A_t_Rt __pyx_string_tab[1698]
#define __pyx_kp_b_iso88591_A_t_Rwc_4s_D_r_PQ __pyx_string_tab[1699]
#define __pyx_kp_b_iso88591_A_t_Rxs_E_Bd_8ST __pyx_string_tab[1700]
#define __pyx_kp_b_iso88591_A_t_U_4z __pyx_string_tab[1701]
#define __pyx_kp_b_iso88591_A_t_aq __pyx_string_tab[1702]
#define __pyx_kp_b_iso88591_A_t_r __pyx_string_tab[1703]
#define __pyx_kp_b_iso88591_A_uA __pyx_string_tab[1704]
#define __pyx_kp_b_iso88591_A_uAWA __pyx_string_tab[1705]
#define __pyx_kp_b_iso88591_A_uA_2 __pyx_string_tab[1706]
#define __pyx_kp_b_iso88591_A_uBa __pyx_string_tab[1707]
#define __pyx_kp_b_iso88591_A_uE_4_Q __pyx_string_tab[1708]
#define __pyx_kp_b_iso88591_A_uF_3auAQ __pyx_string_tab[1709]
#define __pyx_kp_b_iso88591_A_uF_5 __pyx_string_tab[1710]
#define __pyx_kp_b_iso88591_A_uF_AS_4wd __pyx_string_tab[1711]
#define __pyx_kp_b_iso88591_A_uF_D_a __pyx_string_tab[1712]
#define __pyx_kp_b_iso88591_A_uG1Cq __pyx_string_tab[1713]
#define __pyx_kp_b_iso88591_A_uHAS __pyx_string_tab[1714]
#define __pyx_kp_b_iso88591_A_uHAT __pyx_string_tab[1715]
#define __pyx_kp_b_iso88591_A_uIRq_83d_Q __pyx_string_tab[1716]
#define __pyx_kp_b_iso88591_A_uJb_HCt7_a __pyx_string_tab[1717]
#define __pyx_kp_b_iso88591_A_uJb_N __pyx_string_tab[1718]
#define __pyx_kp_b_iso88591_A_uKr_1 __pyx_string_tab[1719]
#define __pyx_kp_b_iso88591_A_uKr_XS_G4q __pyx_string_tab[1720]
#define __pyx_kp_b_iso88591_A_uO2T_q __pyx_string_tab[1721]
#define __pyx_kp_b_iso88591_A_vQ __pyx_string_tab[1722]
#define __pyx_kp_b_iso88591_A_vT __pyx_string_tab[1723]
#define __pyx_kp_b_iso88591_A_vT_1_q_4_4_d_W_hd_D_a __pyx_string_tab[1724]
#define __pyx_kp_b_iso88591_A_vT_1_q__DP_aab_hd_D_a __pyx_string_tab[1725]
#define __pyx_kp_b_iso88591_A_vT_1_q_t_t_RVVccggh_hd_D_a __pyx_string_tab[1726]
#define __pyx_kp_b_iso88591_A_vT_q __pyx_string_tab[1727]
#define __pyx_kp_b_iso88591_A_vXQa_haq_q __pyx_string_tab[1728]
#define __pyx_kp_b_iso88591_A_vXQa_hb_q __pyx_string_tab[1729]
#define __pyx_kp_b_iso88591_A_vXQa_iq_1_q __pyx_string_tab[1730]
#define __pyx_kp_b_iso88591_A_wa_q_JiWX __pyx_string_tab[1731]
#define __pyx_kp_b_iso88591_A_waq_t_1AQ __pyx_string_tab[1732]
#define __pyx_kp_b_iso88591_A_waq_t_T_1 __pyx_string_tab[1733]
#define __pyx_kp_b_iso88591_A_waq_t_U_1A __pyx_string_tab[1734]
#define __pyx_kp_b_iso88591_A_waq_t_V1AQ __pyx_string_tab[1735]
#define __pyx_kp_b_iso88591_A_waq_t_XQaq __pyx_string_tab[1736]
#define __pyx_kp_b_iso88591_A_waq_t_Yaq __pyx_string_tab[1737]
#define __pyx_kp_b_iso88591_A_waq_t_Zq __pyx_string_tab[1738]
#define __pyx_kp_b_iso88591_A_waq_t_aq __pyx_string_tab[1739]
#define __pyx_kp_b_iso88591_A_waq_waq_IQa_Jaq_t2WAU __pyx_string_tab[1740]
#define __pyx_kp_b_iso88591_A_waq_waq_t_AQ __pyx_string_tab[1741]
#define __pyx_kp_b_iso88591_A_waq_waq_t_Qaz __pyx_string_tab[1742]
#define __pyx_kp_b_iso88591_A_waq_waq_t_U_1Jaq __pyx_string_tab[1743]
#define __pyx_kp_b_iso88591_A_waq_waq_t_V1AZq __pyx_string_tab[1744]
#define __pyx_kp_b_iso88591_A_waq_waq_t_Zq_1A __pyx_string_tab[1745]
#define __pyx_kp_b_iso88591_A_was_d_IV3bPQ __pyx_string_tab[1746]
#define __pyx_kp_b_iso88591_A_wat82Yb __pyx_string_tab[1747]
#define __pyx_kp_b_iso88591_A_wauAQ __pyx_string_tab[1748]
#define __pyx_kp_b_iso88591_A_wauE_Q __pyx_string_tab[1749]
#define __pyx_kp_b_iso88591_A_wavT_9F_Qd_GST __pyx_string_tab[1750]
#define __pyx_kp_b_iso88591_A_wawd_Jat82XQ __pyx_string_tab[1751]
#define __pyx_kp_b_iso88591_A_x_A_jP __pyx_string_tab[1752]
#define __pyx_kp_b_iso88591_A_x_q_Jn __pyx_string_tab[1753]
#define __pyx_kp_b_iso88591_A_xq __pyx_string_tab[1754]
#define __pyx_kp_b_iso88591_A_xq_3a __pyx_string_tab[1755]
#define __pyx_kp_b_iso88591_A_xq_V1 __pyx_string_tab[1756]
#define __pyx_kp_b_iso88591_A_xq_a __pyx_string_tab[1757]
#define __pyx_kp_b_iso88591_A_y __pyx_string_tab[1758]
#define __pyx_kp_b_iso88591_A_y_2 __pyx_string_tab[1759]
#define __pyx_kp_b_iso88591_A_y_3 __pyx_string_tab[1760]
#define __pyx_kp_b_iso88591_A_z_1 __pyx_string_tab[1761]
#define __pyx_kp_b_iso88591_A_z_D __pyx_string_tab[1762]
#define __pyx_kp_b_iso88591_C1IQ_C1Ja_4q_3a __pyx_string_tab[1763]
#define __pyx_kp_b_iso88591_C1Ja_C1IQ_4q_A_Q __pyx_string_tab[1764]
#define __pyx_kp_b_iso88591_E_DA_5_F_q __pyx_string_tab[1765]
#define __pyx_kp_b_iso88591_E_H_5_F_q __pyx_string_tab[1766]
#define __pyx_kp_b_iso88591_E_J_5_D_Q __pyx_string_tab[1767]
#define __pyx_kp_b_iso88591_E_SST_5_D_Q __pyx_string_tab[1768]
#define __pyx_kp_b_iso88591_F_7_81A_1IV1Kxs_q_1E_Q_1 __pyx_string_tab[1769]
#define __pyx_kp_b_iso88591_G1A_1D_1I_4LARq_1_U_7_q_D_7_1_B __pyx_string_tab[1770]
#define __pyx_kp_b_iso88591_G1A_1D_1I_4LARq_U_7_q_Q_q_1 __pyx_string_tab[1771]
#define __pyx_kp_b_iso88591_G1A_1D_33K1Ba_4q_1 __pyx_string_tab[1772]
#define __pyx_kp_b_iso88591_G1A_1D_33K1Ba_4q_Qa __pyx_string_tab[1773]
#define __pyx_kp_b_iso88591_G1A_1D_44LARq_4q_q __pyx_string_tab[1774]
#define __pyx_kp_b_iso88591_G1A_1D_4q_QoE_a __pyx_string_tab[1775]
#define __pyx_kp_b_iso88591_G1A_1D_5Z_aq_q_1_t1_Q_q __pyx_string_tab[1776]
#define __pyx_kp_b_iso88591_G1A_1D_N_2J_2Q __pyx_string_tab[1777]
#define __pyx_kp_b_iso88591_G1A_1D_O1O3K1Ba __pyx_string_tab[1778]
#define __pyx_kp_b_iso88591_G1A_1D_OSTTU_q_a_1_t1_Q_q __pyx_string_tab[1779]
#define __pyx_kp_b_iso88591_G1A_1D_OSTTU_q_c_1_t1_Q_q __pyx_string_tab[1780]
#define __pyx_kp_b_iso88591_G1A_1D_O__AQ_q_xs_q_4q __pyx_string_tab[1781]
#define __pyx_kp_b_iso88591_G1A_1D__AU_Yqqrrt_u_A_A_B_D_xs __pyx_string_tab[1782]
#define __pyx_kp_b_iso88591_G1A_1D_q_U_9E_Q_1 __pyx_string_tab[1783]
#define __pyx_kp_b_iso88591_G1A_G1A_1D_1D_44LARq_44LARq_3 __pyx_string_tab[1784]
#define __pyx_kp_b_iso88591_G1A_G1A_1D_1D_4q_4q_WWXXZZ_q __pyx_string_tab[1785]
#define __pyx_kp_b_iso88591_G1A_G1A_1D_1D_G1O_C1Ba_q __pyx_string_tab[1786]
#define __pyx_kp_b_iso88591_G1A_G1A_1D_1D_HA__DARq_q __pyx_string_tab[1787]
#define __pyx_kp_b_iso88591_G1A_G1A_1D_1D_IQo_EQb_q __pyx_string_tab[1788]
#define __pyx_kp_b_iso88591_G1A_G1A_1D_1D_Ja_Far_q __pyx_string_tab[1789]
#define __pyx_kp_b_iso88591_G1A_G1A_1D_1D_JoQa_q_oMeeffhhi __pyx_string_tab[1790]
#define __pyx_kp_b_iso88591_G1A_G1A_1D_1D_Z_a_O1MYhhiij_q_o __pyx_string_tab[1791]
#define __pyx_kp_b_iso88591_G1A_G1A_G1A_1D_1D_1D_44LARq_44L __pyx_string_tab[1792]
#define __pyx_kp_b_iso88591_G1A_G1A_G1A_1D_1D_1D_44LARq_44L_2 __pyx_string_tab[1793]
#define __pyx_kp_b_iso88591_G1A_G1A_WAQ_1D_1D_44LARq_44LARq __pyx_string_tab[1794]
#define __pyx_kp_b_iso88591_G1A_G1A_WAQ_1D_1D_44LARq_44LARq_2 __pyx_string_tab[1795]
#define __pyx_kp_b_iso88591_G1A_Qaq_q_A__Qa __pyx_string_tab[1796]
#define __pyx_kp_b_iso88591_G1A_gQa_1F_22I_a_wc_t1_vQb_waq __pyx_string_tab[1797]
#define __pyx_kp_b_iso88591_HAV_Zwaq __pyx_string_tab[1798]
#define __pyx_kp_b_iso88591_KK_d_q_A_3aq __pyx_string_tab[1799]
#define __pyx_kp_b_iso88591_L_AYa_7_1_aq __pyx_string_tab[1800]
#define __pyx_kp_b_iso88591_MM___d_q_A_3aq __pyx_string_tab[1801]
#define __pyx_kp_b_iso88591_Q __pyx_string_tab[1802]
#define __pyx_kp_b_iso88591_Q_D_ZwfE_Cwe_SPVV_ffmmn_AQ_WA_W __pyx_string_tab[1803]
#define __pyx_kp_b_iso88591_Q_WAQ_1Ba_4z_Qa __pyx_string_tab[1804]
#define __pyx_kp_b_iso88591_Q_WAQ_2Q_4q_Qa __pyx_string_tab[1805]
#define __pyx_kp_b_iso88591_Q_WAQ_2_2Q_4q __pyx_string_tab[1806]
#define __pyx_kp_b_iso88591_Q_WAQ_2_2Q_4q_aq __pyx_string_tab[1807]
#define __pyx_kp_b_iso88591_Q_WAQ_2_2Q_4q_q __pyx_string_tab[1808]
#define __pyx_kp_b_iso88591_Q_WAQ_3gQ_Zq_4z_gQj __pyx_string_tab[1809]
#define __pyx_kp_b_iso88591_Q_WAQ_5Qb_4q __pyx_string_tab[1810]
#define __pyx_kp_b_iso88591_Q_WAQ_5Qb_4q_q __pyx_string_tab[1811]
#define __pyx_kp_b_iso88591_Q_WAQ_ar_4q_AQ __pyx_string_tab[1812]
#define __pyx_kp_b_iso88591_Q_WAQ_ar_4q_Qa __pyx_string_tab[1813]
#define __pyx_kp_b_iso88591_Q_r_A_A_A_1O_1AQ_1 __pyx_string_tab[1814]
#define __pyx_kp_b_iso88591_QfD_T_a __pyx_string_tab[1815]
#define __pyx_kp_b_iso88591_QfF __pyx_string_tab[1816]
#define __pyx_kp_b_iso88591_T_4_4z_SWW__ccpptt_A_G1F_a_vWE __pyx_string_tab[1817]
#define __pyx_kp_b_iso88591_U_3aq_WAS_q_A_Jj_8_1_WAS_q_A_Jj __pyx_string_tab[1818]
#define __pyx_kp_b_iso88591_WWiij_d_q_A_3aq __pyx_string_tab[1819]
#define __pyx_kp_b_iso88591_Ya_uAV6 __pyx_string_tab[1820]
#define __pyx_kp_b_iso88591_Z_q_2S_ARwaq_V1_t1_j_SSTTU __pyx_string_tab[1821]
#define __pyx_kp_b_iso88591_a_1_1Kq __pyx_string_tab[1822]
#define __pyx_kp_b_iso88591_a_4 __pyx_string_tab[1823]
#define __pyx_kp_b_iso88591_a_7_2WAQ __pyx_string_tab[1824]
#define __pyx_kp_b_iso88591_a_E_LA_81G7_fF_1 __pyx_string_tab[1825]
#define __pyx_kp_b_iso88591_a_G1A_1D_O1O3K1BlZ_ccd __pyx_string_tab[1826]
#define __pyx_kp_b_iso88591_a_G1A_1D_z_q_a_1_t1_Q_q __pyx_string_tab[1827]
#define __pyx_kp_b_iso88591_a_Zq_BfA_6_s_Q_a_6NatST_7q_7q_6 __pyx_string_tab[1828]
#define __pyx_kp_b_iso88591_d_AT_t4vQ_6_s_Q_it1F_6_Cq_2J_4q __pyx_string_tab[1829]
#define __pyx_kp_b_iso88591_gQ_G1A_G1A_1A_RRSSTTU_Qa_4z_1D __pyx_string_tab[1830]
#define __pyx_kp_b_iso88591_gQa_gQa_33K1JVW_4q_Zq __pyx_string_tab[1831]
#define __pyx_kp_b_iso88591_gQa_waq_WAQ_C1E_4q_9AT_5_RS __pyx_string_tab[1832]
#define __pyx_kp_b_iso88591_hhaq_1A_AXXYYZ_Q_1 __pyx_string_tab[1833]
#define __pyx_kp_b_iso88591_hhaq_1A_A_BYYZZ_Q_1 __pyx_string_tab[1834]
#define __pyx_kp_b_iso88591_j_1 __pyx_string_tab[1835]
#define __pyx_kp_b_iso88591_j_2 __pyx_string_tab[1836]
#define __pyx_kp_b_iso88591_j_aq __pyx_string_tab[1837]
#define __pyx_kp_b_iso88591_j_q __pyx_string_tab[1838]
#define __pyx_kp_b_iso88591_k_81 __pyx_string_tab[1839]
#define __pyx_kp_b_iso88591_nA_xs_Ja_G1_xs_6_A_Ba_6_Ba_AWG5 __pyx_string_tab[1840]
#define __pyx_kp_b_iso88591_nno_V4r_D_d_Ct2U_U_EQUUWW___ddf __pyx_string_tab[1841]
#define __pyx_kp_b_iso88591_q_0_kQR_5_7_q_a_1 __pyx_string_tab[1842]
#define __pyx_kp_b_iso88591_q_0_kQR_9HAQ_7_1L_a_1 __pyx_string_tab[1843]
#define __pyx_kp_b_iso88591_q_3c_T_5_V7_L_m6_a __pyx_string_tab[1844]
#define __pyx_kp_b_iso88591_q_A_z_U_vQaq_1CuA_uAQa_1CuA_s_A __pyx_string_tab[1845]
#define __pyx_kp_b_iso88591_q_a __pyx_string_tab[1846]
#define __pyx_kp_b_iso88591_q_q_A_q_t_V1F_k_r_FRTTU __pyx_string_tab[1847]
#define __pyx_kp_b_iso88591_r_1_a_4q_6 __pyx_string_tab[1848]
#define __pyx_kp_b_iso88591_r_1_a_4q_Qa __pyx_string_tab[1849]
#define __pyx_kp_b_iso88591_r_1_a_G1A_1D_4q_1OC_jjk __pyx_string_tab[1850]
#define __pyx_kp_b_iso88591_r_1_a_JoQnO1EQR_1D_t1_Q __pyx_string_tab[1851]
#define __pyx_kp_b_iso88591_r_1_a_qPUUV_1D_t1_Q __pyx_string_tab[1852]
#define __pyx_kp_b_iso88591_r_A_a_G1A_G1A_1D_1D_4q_4q_WWXXZ __pyx_string_tab[1853]
#define __pyx_kp_b_iso88591_r_A_a_G1A_G1A_1D_1D_4q_9A_D __pyx_string_tab[1854]
#define __pyx_kp_b_iso88591_r_A_a_G1A_G1A_1D_1D_O1M_PQQR_q __pyx_string_tab[1855]
#define __pyx_kp_b_iso88591_rrs_d_q_A_3aq __pyx_string_tab[1856]
#define __pyx_kp_b_iso88591_s_6_A_at1A_5_1D_T_Qc_T_at4q_q_A __pyx_string_tab[1857]
#define __pyx_kp_b_iso88591_s_Qe2S_1Baq __pyx_string_tab[1858]
#define __pyx_kp_b_iso88591_t_Qe1_iq_7was_t1A __pyx_string_tab[1859]
#define __pyx_kp_b_iso88591_waq_2S_4z_Qaq_waq_t_T_Qa __pyx_string_tab[1860]
#define __pyx_kp_b_iso88591_waq_2S_4z_aq_waq_t_U_1Jaq __pyx_string_tab[1861]
#define __pyx_kp_b_iso88591_waq_6_a_Qa __pyx_string_tab[1862]
#define __pyx_kp_b_iso88591_waq_F_6_j_q __pyx_string_tab[1863]
#define __pyx_kp_b_iso88591_waq_Q_Qa __pyx_string_tab[1864]
#define __pyx_kp_b_iso88591_waq_WAQ_C1E_4q_9AU_A __pyx_string_tab[1865]
#define __pyx_kp_b_iso88591_waq_avU_Qa __pyx_string_tab[1866]
#define __pyx_kp_b_iso88591_xvU_WAQ_3a_t1_q_r_A_T_q_WAQ_1D __pyx_string_tab[1867]
#define __pyx_kp_b_iso88591_z_1_a_Fax___bbiijjk_WAQ_avZz __pyx_string_tab[1868]
#define __pyx_kp_b_iso88591_z_A_z_q_Q_waq_a_q_33J_6QR_33J_4 __pyx_string_tab[1869]
#define __pyx_kp_b_iso88591_z_Q_t_V1AWAQ_1Cq_A_E_WAWAQ_uAQ __pyx_string_tab[1870]
#define __pyx_kp_b_iso88591_z_gQ_q_1Cq_q_1Cwa_waq_1Cq_z_D_4 __pyx_string_tab[1871]
#define __pyx_kp_b_iso88591_z_uAWA_5 __pyx_string_tab[1872]
#define __pyx_n_b_O __pyx_string_tab[1873]
#define __pyx_float_1_0 __pyx_number_tab[0]
#define __pyx_float_3_3219280948873626 __pyx_number_tab[1]
#define __pyx_int_0 __pyx_number_tab[2]
#define __pyx_int_neg_1 __pyx_number_tab[3]
#define __pyx_int_1 __pyx_number_tab[4]
#define __pyx_int_2 __pyx_number_tab[5]
#define __pyx_int_3 __pyx_number_tab[6]
#define __pyx_int_4 __pyx_number_tab[7]
#define __pyx_int_5 __pyx_number_tab[8]
#define __pyx_int_6 __pyx_number_tab[9]
#define __pyx_int_10 __pyx_number_tab[10]
#define __pyx_int_15 __pyx_number_tab[11]
#define __pyx_int_16 __pyx_number_tab[12]
#define __pyx_int_25 __pyx_number_tab[13]
#define __pyx_int_53 __pyx_number_tab[14]
#define __pyx_int_136983863 __pyx_number_tab[15]
#define __pyx_int_163199335 __pyx_number_tab[16]
#define __pyx_int_238750788 __pyx_number_tab[17]
/* #### Code section: module_state_clear ### */
#if CYTHON_USE_MODULE_STATE
static CYTHON_SMALL_CODE int __pyx_m_clear(PyObject *m) {
  __pyx_mstatetype *clear_module_state = __Pyx_PyModule_GetState(m);
  if (!clear_module_state) return 0;
  Py_CLEAR(clear_module_state->__pyx_d);
  Py_CLEAR(clear_module_state->__pyx_b);
  Py_CLEAR(clear_module_state->__pyx_cython_runtime);
  Py_CLEAR(clear_module_state->__pyx_empty_tuple);
  Py_CLEAR(clear_module_state->__pyx_empty_bytes);
  Py_CLEAR(clear_module_state->__pyx_empty_unicode);
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  __Pyx_State_RemoveModule(NULL);
  #endif
  Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_4type_type);
  Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_4bool_bool);
  Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_7complex_complex);
  Py_CLEAR(clear_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic);
  Py_CLEAR(clear_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper_Basic);
  Py_CLEAR(clear_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper_MatrixBase);
  Py_CLEAR(clear_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper_MatrixBase);
  Py_CLEAR(clear_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper_PyFunctionClass);
  Py_CLEAR(clear_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper_PyFunctionClass);
  Py_CLEAR(clear_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper_PyModule);
  Py_CLEAR(clear_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper_PyModule);
  Py_CLEAR(clear_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper__DictBasic);
  Py_CLEAR(clear_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper__DictBasic);
  Py_CLEAR(clear_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DictBasicIter);
  Py_CLEAR(clear_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper_DictBasicIter);
  Py_CLEAR(clear_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper__Lambdify);
  Py_CLEAR(clear_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper__Lambdify);
  Py_CLEAR(clear_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LambdaDouble);
  Py_CLEAR(clear_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper_LambdaDouble);
  Py_CLEAR(clear_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LambdaComplexDouble);
  Py_CLEAR(clear_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper_LambdaComplexDouble);
  Py_CLEAR(clear_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper__LLVMLambdify);
  Py_CLEAR(clear_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper__LLVMLambdify);
  Py_CLEAR(clear_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LLVMDouble);
  Py_CLEAR(clear_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper_LLVMDouble);
  Py_CLEAR(clear_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LLVMFloat);
  Py_CLEAR(clear_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper_LLVMFloat);
  Py_CLEAR(clear_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LLVMLongDouble);
  Py_CLEAR(clear_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper_LLVMLongDouble);
  Py_CLEAR(clear_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Expr);
  Py_CLEAR(clear_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper_Expr);
  Py_CLEAR(clear_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Symbol);
  Py_CLEAR(clear_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper_Symbol);
  Py_CLEAR(clear_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Dummy);
  Py_CLEAR(clear_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper_Dummy);
  Py_CLEAR(clear_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Constant);
  Py_CLEAR(clear_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper_Constant);
  Py_CLEAR(clear_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Pi);
  Py_CLEAR(clear_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper_Pi);
  Py_CLEAR(clear_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Exp1);
  Py_CLEAR(clear_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper_Exp1);
  Py_CLEAR(clear_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper_GoldenRatio);
  Py_CLEAR(clear_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper_GoldenRatio);
  Py_CLEAR(clear_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Catalan);
  Py_CLEAR(clear_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper_Catalan);
  Py_CLEAR(clear_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper_EulerGamma);
  Py_CLEAR(clear_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper_EulerGamma);
  Py_CLEAR(clear_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Boolean);
  Py_CLEAR(clear_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper_Boolean);
  Py_CLEAR(clear_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper_BooleanAtom);
  Py_CLEAR(clear_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper_BooleanAtom);
  Py_CLEAR(clear_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper_BooleanTrue);
  Py_CLEAR(clear_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper_BooleanTrue);
  Py_CLEAR(clear_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper_BooleanFalse);
  Py_CLEAR(clear_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper_BooleanFalse);
  Py_CLEAR(clear_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Number);
  Py_CLEAR(clear_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper_Number);
  Py_CLEAR(clear_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ComplexBase);
  Py_CLEAR(clear_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper_ComplexBase);
  Py_CLEAR(clear_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ComplexDouble);
  Py_CLEAR(clear_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper_ComplexDouble);
  Py_CLEAR(clear_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ComplexMPC);
  Py_CLEAR(clear_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper_ComplexMPC);
  Py_CLEAR(clear_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Complex);
  Py_CLEAR(clear_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper_Complex);
  Py_CLEAR(clear_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ImaginaryUnit);
  Py_CLEAR(clear_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper_ImaginaryUnit);
  Py_CLEAR(clear_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Infinity);
  Py_CLEAR(clear_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper_Infinity);
  Py_CLEAR(clear_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper_NegativeInfinity);
  Py_CLEAR(clear_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper_NegativeInfinity);
  Py_CLEAR(clear_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ComplexInfinity);
  Py_CLEAR(clear_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper_ComplexInfinity);
  Py_CLEAR(clear_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper_NaN);
  Py_CLEAR(clear_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper_NaN);
  Py_CLEAR(clear_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper_PyNumber);
  Py_CLEAR(clear_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper_PyNumber);
  Py_CLEAR(clear_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Set);
  Py_CLEAR(clear_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper_Set);
  Py_CLEAR(clear_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase);
  Py_CLEAR(clear_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper_DenseMatrixBase);
  Py_CLEAR(clear_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper_MutableDenseMatrix);
  Py_CLEAR(clear_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper_MutableDenseMatrix);
  Py_CLEAR(clear_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ImmutableDenseMatrix);
  Py_CLEAR(clear_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper_ImmutableDenseMatrix);
  Py_CLEAR(clear_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Sieve);
  Py_CLEAR(clear_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper_Sieve);
  Py_CLEAR(clear_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Sieve_iterator);
  Py_CLEAR(clear_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper_Sieve_iterator);
  Py_CLEAR(clear_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct__msubs);
  Py_CLEAR(clear_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper___pyx_scope_struct__msubs);
  Py_CLEAR(clear_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_1_subs);
  Py_CLEAR(clear_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_1_subs);
  Py_CLEAR(clear_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_2_xreplace);
  Py_CLEAR(clear_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_2_xreplace);
  Py_CLEAR(clear_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_3_simplify);
  Py_CLEAR(clear_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_3_simplify);
  Py_CLEAR(clear_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_4_expand);
  Py_CLEAR(clear_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_4_expand);
  Py_CLEAR(clear_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_5_genexpr);
  Py_CLEAR(clear_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_5_genexpr);
  Py_CLEAR(clear_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_6_create_low_level_callable);
  Py_CLEAR(clear_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_6_create_low_level_callable);
  Py_CLEAR(clear_module_state->__pyx_array_type);
  Py_CLEAR(clear_module_state->__pyx_type___pyx_array);
  Py_CLEAR(clear_module_state->__pyx_MemviewEnum_type);
  Py_CLEAR(clear_module_state->__pyx_type___pyx_MemviewEnum);
  Py_CLEAR(clear_module_state->__pyx_memoryview_type);
  Py_CLEAR(clear_module_state->__pyx_type___pyx_memoryview);
  Py_CLEAR(clear_module_state->__pyx_memoryviewslice_type);
  Py_CLEAR(clear_module_state->__pyx_type___pyx_memoryviewslice);
  for (int i=0; i<2; ++i) { Py_CLEAR(clear_module_state->__pyx_slice[i]); }
  for (int i=0; i<25; ++i) { Py_CLEAR(clear_module_state->__pyx_tuple[i]); }
  for (int i=0; i<591; ++i) { Py_CLEAR(clear_module_state->__pyx_codeobj_tab[i]); }
  for (int i=0; i<1874; ++i) { Py_CLEAR(clear_module_state->__pyx_string_tab[i]); }
  for (int i=0; i<18; ++i) { Py_CLEAR(clear_module_state->__pyx_number_tab[i]); }
/* #### Code section: module_state_clear_contents ### */
/* CommonTypesMetaclass.module_state_clear */
Py_CLEAR(clear_module_state->__pyx_CommonTypesMetaclassType);

/* CythonFunctionShared.module_state_clear */
Py_CLEAR(clear_module_state->__pyx_CyFunctionType);

/* Generator.module_state_clear */
Py_CLEAR(clear_module_state->__pyx_GeneratorType);

/* #### Code section: module_state_clear_end ### */
return 0;
}
#endif
/* #### Code section: module_state_traverse ### */
#if CYTHON_USE_MODULE_STATE
static CYTHON_SMALL_CODE int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) {
  __pyx_mstatetype *traverse_module_state = __Pyx_PyModule_GetState(m);
  if (!traverse_module_state) return 0;
  Py_VISIT(traverse_module_state->__pyx_d);
  Py_VISIT(traverse_module_state->__pyx_b);
  Py_VISIT(traverse_module_state->__pyx_cython_runtime);
  __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_tuple);
  __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_bytes);
  __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_unicode);
  Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_4type_type);
  Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_4bool_bool);
  Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_7complex_complex);
  Py_VISIT(traverse_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic);
  Py_VISIT(traverse_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper_Basic);
  Py_VISIT(traverse_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper_MatrixBase);
  Py_VISIT(traverse_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper_MatrixBase);
  Py_VISIT(traverse_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper_PyFunctionClass);
  Py_VISIT(traverse_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper_PyFunctionClass);
  Py_VISIT(traverse_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper_PyModule);
  Py_VISIT(traverse_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper_PyModule);
  Py_VISIT(traverse_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper__DictBasic);
  Py_VISIT(traverse_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper__DictBasic);
  Py_VISIT(traverse_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DictBasicIter);
  Py_VISIT(traverse_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper_DictBasicIter);
  Py_VISIT(traverse_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper__Lambdify);
  Py_VISIT(traverse_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper__Lambdify);
  Py_VISIT(traverse_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LambdaDouble);
  Py_VISIT(traverse_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper_LambdaDouble);
  Py_VISIT(traverse_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LambdaComplexDouble);
  Py_VISIT(traverse_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper_LambdaComplexDouble);
  Py_VISIT(traverse_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper__LLVMLambdify);
  Py_VISIT(traverse_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper__LLVMLambdify);
  Py_VISIT(traverse_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LLVMDouble);
  Py_VISIT(traverse_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper_LLVMDouble);
  Py_VISIT(traverse_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LLVMFloat);
  Py_VISIT(traverse_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper_LLVMFloat);
  Py_VISIT(traverse_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LLVMLongDouble);
  Py_VISIT(traverse_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper_LLVMLongDouble);
  Py_VISIT(traverse_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Expr);
  Py_VISIT(traverse_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper_Expr);
  Py_VISIT(traverse_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Symbol);
  Py_VISIT(traverse_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper_Symbol);
  Py_VISIT(traverse_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Dummy);
  Py_VISIT(traverse_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper_Dummy);
  Py_VISIT(traverse_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Constant);
  Py_VISIT(traverse_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper_Constant);
  Py_VISIT(traverse_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Pi);
  Py_VISIT(traverse_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper_Pi);
  Py_VISIT(traverse_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Exp1);
  Py_VISIT(traverse_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper_Exp1);
  Py_VISIT(traverse_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper_GoldenRatio);
  Py_VISIT(traverse_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper_GoldenRatio);
  Py_VISIT(traverse_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Catalan);
  Py_VISIT(traverse_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper_Catalan);
  Py_VISIT(traverse_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper_EulerGamma);
  Py_VISIT(traverse_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper_EulerGamma);
  Py_VISIT(traverse_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Boolean);
  Py_VISIT(traverse_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper_Boolean);
  Py_VISIT(traverse_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper_BooleanAtom);
  Py_VISIT(traverse_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper_BooleanAtom);
  Py_VISIT(traverse_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper_BooleanTrue);
  Py_VISIT(traverse_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper_BooleanTrue);
  Py_VISIT(traverse_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper_BooleanFalse);
  Py_VISIT(traverse_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper_BooleanFalse);
  Py_VISIT(traverse_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Number);
  Py_VISIT(traverse_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper_Number);
  Py_VISIT(traverse_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ComplexBase);
  Py_VISIT(traverse_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper_ComplexBase);
  Py_VISIT(traverse_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ComplexDouble);
  Py_VISIT(traverse_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper_ComplexDouble);
  Py_VISIT(traverse_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ComplexMPC);
  Py_VISIT(traverse_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper_ComplexMPC);
  Py_VISIT(traverse_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Complex);
  Py_VISIT(traverse_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper_Complex);
  Py_VISIT(traverse_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ImaginaryUnit);
  Py_VISIT(traverse_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper_ImaginaryUnit);
  Py_VISIT(traverse_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Infinity);
  Py_VISIT(traverse_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper_Infinity);
  Py_VISIT(traverse_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper_NegativeInfinity);
  Py_VISIT(traverse_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper_NegativeInfinity);
  Py_VISIT(traverse_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ComplexInfinity);
  Py_VISIT(traverse_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper_ComplexInfinity);
  Py_VISIT(traverse_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper_NaN);
  Py_VISIT(traverse_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper_NaN);
  Py_VISIT(traverse_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper_PyNumber);
  Py_VISIT(traverse_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper_PyNumber);
  Py_VISIT(traverse_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Set);
  Py_VISIT(traverse_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper_Set);
  Py_VISIT(traverse_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase);
  Py_VISIT(traverse_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper_DenseMatrixBase);
  Py_VISIT(traverse_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper_MutableDenseMatrix);
  Py_VISIT(traverse_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper_MutableDenseMatrix);
  Py_VISIT(traverse_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ImmutableDenseMatrix);
  Py_VISIT(traverse_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper_ImmutableDenseMatrix);
  Py_VISIT(traverse_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Sieve);
  Py_VISIT(traverse_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper_Sieve);
  Py_VISIT(traverse_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Sieve_iterator);
  Py_VISIT(traverse_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper_Sieve_iterator);
  Py_VISIT(traverse_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct__msubs);
  Py_VISIT(traverse_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper___pyx_scope_struct__msubs);
  Py_VISIT(traverse_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_1_subs);
  Py_VISIT(traverse_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_1_subs);
  Py_VISIT(traverse_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_2_xreplace);
  Py_VISIT(traverse_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_2_xreplace);
  Py_VISIT(traverse_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_3_simplify);
  Py_VISIT(traverse_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_3_simplify);
  Py_VISIT(traverse_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_4_expand);
  Py_VISIT(traverse_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_4_expand);
  Py_VISIT(traverse_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_5_genexpr);
  Py_VISIT(traverse_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_5_genexpr);
  Py_VISIT(traverse_module_state->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_6_create_low_level_callable);
  Py_VISIT(traverse_module_state->__pyx_type_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_6_create_low_level_callable);
  Py_VISIT(traverse_module_state->__pyx_array_type);
  Py_VISIT(traverse_module_state->__pyx_type___pyx_array);
  Py_VISIT(traverse_module_state->__pyx_MemviewEnum_type);
  Py_VISIT(traverse_module_state->__pyx_type___pyx_MemviewEnum);
  Py_VISIT(traverse_module_state->__pyx_memoryview_type);
  Py_VISIT(traverse_module_state->__pyx_type___pyx_memoryview);
  Py_VISIT(traverse_module_state->__pyx_memoryviewslice_type);
  Py_VISIT(traverse_module_state->__pyx_type___pyx_memoryviewslice);
  for (int i=0; i<2; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_slice[i]); }
  for (int i=0; i<25; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_tuple[i]); }
  for (int i=0; i<591; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_codeobj_tab[i]); }
  for (int i=0; i<1874; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_string_tab[i]); }
  for (int i=0; i<18; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_number_tab[i]); }
/* #### Code section: module_state_traverse_contents ### */
/* CommonTypesMetaclass.module_state_traverse */
Py_VISIT(traverse_module_state->__pyx_CommonTypesMetaclassType);

/* CythonFunctionShared.module_state_traverse */
Py_VISIT(traverse_module_state->__pyx_CyFunctionType);

/* Generator.module_state_traverse */
Py_VISIT(traverse_module_state->__pyx_GeneratorType);

/* #### Code section: module_state_traverse_end ### */
return 0;
}
#endif
/* #### Code section: module_code ### */

/* "vector.to_py":79
 *     const Py_ssize_t PY_SSIZE_T_MAX
 * 
 * @cname("__pyx_convert_vector_to_py_int")             # <<<<<<<<<<<<<<
 * cdef object __pyx_convert_vector_to_py_int(const vector[X]& v):
 *     if v.size() > <size_t> PY_SSIZE_T_MAX:
*/

static PyObject *__pyx_convert_vector_to_py_int(std::vector<int>  const &__pyx_v_v) {
  Py_ssize_t __pyx_v_v_size_signed;
  PyObject *__pyx_v_o = NULL;
  Py_ssize_t __pyx_v_i;
  PyObject *__pyx_v_item = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_convert_vector_to_py_int", 0);

  /* "vector.to_py":81
 * @cname("__pyx_convert_vector_to_py_int")
 * cdef object __pyx_convert_vector_to_py_int(const vector[X]& v):
 *     if v.size() > <size_t> PY_SSIZE_T_MAX:             # <<<<<<<<<<<<<<
 *         raise MemoryError()
 *     v_size_signed = <Py_ssize_t> v.size()
*/
  __pyx_t_1 = (__pyx_v_v.size() > ((size_t)PY_SSIZE_T_MAX));
  if (unlikely(__pyx_t_1)) {

    /* "vector.to_py":82
 * cdef object __pyx_convert_vector_to_py_int(const vector[X]& v):
 *     if v.size() > <size_t> PY_SSIZE_T_MAX:
 *         raise MemoryError()             # <<<<<<<<<<<<<<
 *     v_size_signed = <Py_ssize_t> v.size()
 * 
*/
    PyErr_NoMemory(); __PYX_ERR(1, 82, __pyx_L1_error)

    /* "vector.to_py":81
 * @cname("__pyx_convert_vector_to_py_int")
 * cdef object __pyx_convert_vector_to_py_int(const vector[X]& v):
 *     if v.size() > <size_t> PY_SSIZE_T_MAX:             # <<<<<<<<<<<<<<
 *         raise MemoryError()
 *     v_size_signed = <Py_ssize_t> v.size()
*/
  }

  /* "vector.to_py":83
 *     if v.size() > <size_t> PY_SSIZE_T_MAX:
 *         raise MemoryError()
 *     v_size_signed = <Py_ssize_t> v.size()             # <<<<<<<<<<<<<<
 * 
 *     o = PyList_New(v_size_signed)
*/
  __pyx_v_v_size_signed = ((Py_ssize_t)__pyx_v_v.size());

  /* "vector.to_py":85
 *     v_size_signed = <Py_ssize_t> v.size()
 * 
 *     o = PyList_New(v_size_signed)             # <<<<<<<<<<<<<<
 * 
 *     cdef Py_ssize_t i
*/
  __pyx_t_2 = PyList_New(__pyx_v_v_size_signed); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 85, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_o = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "vector.to_py":90
 *     cdef object item
 * 
 *     for i in range(v_size_signed):             # <<<<<<<<<<<<<<
 *         item = v[i]
 *         Py_INCREF(item)
*/
  __pyx_t_3 = __pyx_v_v_size_signed;
  __pyx_t_4 = __pyx_t_3;
  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
    __pyx_v_i = __pyx_t_5;

    /* "vector.to_py":91
 * 
 *     for i in range(v_size_signed):
 *         item = v[i]             # <<<<<<<<<<<<<<
 *         Py_INCREF(item)
 *         __Pyx_PyList_SET_ITEM(o, i, item)
*/
    __pyx_t_2 = __Pyx_PyLong_From_int((__pyx_v_v[__pyx_v_i])); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 91, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "vector.to_py":92
 *     for i in range(v_size_signed):
 *         item = v[i]
 *         Py_INCREF(item)             # <<<<<<<<<<<<<<
 *         __Pyx_PyList_SET_ITEM(o, i, item)
 * 
*/
    Py_INCREF(__pyx_v_item);

    /* "vector.to_py":93
 *         item = v[i]
 *         Py_INCREF(item)
 *         __Pyx_PyList_SET_ITEM(o, i, item)             # <<<<<<<<<<<<<<
 * 
 *     return o
*/
    __pyx_t_6 = __Pyx_PyList_SET_ITEM(__pyx_v_o, __pyx_v_i, __pyx_v_item); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(1, 93, __pyx_L1_error)
  }

  /* "vector.to_py":95
 *         __Pyx_PyList_SET_ITEM(o, i, item)
 * 
 *     return o             # <<<<<<<<<<<<<<
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_o);
  __pyx_r = __pyx_v_o;
  goto __pyx_L0;

  /* "vector.to_py":79
 *     const Py_ssize_t PY_SSIZE_T_MAX
 * 
 * @cname("__pyx_convert_vector_to_py_int")             # <<<<<<<<<<<<<<
 * cdef object __pyx_convert_vector_to_py_int(const vector[X]& v):
 *     if v.size() > <size_t> PY_SSIZE_T_MAX:
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("vector.to_py.__pyx_convert_vector_to_py_int", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_o);
  __Pyx_XDECREF(__pyx_v_item);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "string.from_py":12
 *     cdef const char* __Pyx_PyObject_AsStringAndSize(object, Py_ssize_t*) except NULL
 * 
 * @cname("__pyx_convert_string_from_py_6libcpp_6string_std__in_string")             # <<<<<<<<<<<<<<
 * cdef string __pyx_convert_string_from_py_6libcpp_6string_std__in_string(object o) except *:
 *     cdef Py_ssize_t length = 0
*/

static std::string __pyx_convert_string_from_py_6libcpp_6string_std__in_string(PyObject *__pyx_v_o) {
  Py_ssize_t __pyx_v_length;
  char const *__pyx_v_data;
  std::string __pyx_r;
  char const *__pyx_t_1;
  std::string __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "string.from_py":14
 * @cname("__pyx_convert_string_from_py_6libcpp_6string_std__in_string")
 * cdef string __pyx_convert_string_from_py_6libcpp_6string_std__in_string(object o) except *:
 *     cdef Py_ssize_t length = 0             # <<<<<<<<<<<<<<
 *     cdef const char* data = __Pyx_PyObject_AsStringAndSize(o, &length)
 *     return string(data, <size_t> length)
*/
  __pyx_v_length = 0;

  /* "string.from_py":15
 * cdef string __pyx_convert_string_from_py_6libcpp_6string_std__in_string(object o) except *:
 *     cdef Py_ssize_t length = 0
 *     cdef const char* data = __Pyx_PyObject_AsStringAndSize(o, &length)             # <<<<<<<<<<<<<<
 *     return string(data, <size_t> length)
 * 
*/
  __pyx_t_1 = __Pyx_PyObject_AsStringAndSize(__pyx_v_o, (&__pyx_v_length)); if (unlikely(__pyx_t_1 == ((void *)NULL))) __PYX_ERR(1, 15, __pyx_L1_error)
  __pyx_v_data = __pyx_t_1;

  /* "string.from_py":16
 *     cdef Py_ssize_t length = 0
 *     cdef const char* data = __Pyx_PyObject_AsStringAndSize(o, &length)
 *     return string(data, <size_t> length)             # <<<<<<<<<<<<<<
 * 
*/
  try {
    __pyx_t_2 = std::string(__pyx_v_data, ((size_t)__pyx_v_length));
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 16, __pyx_L1_error)
  }
  __pyx_r = __pyx_t_2;
  goto __pyx_L0;

  /* "string.from_py":12
 *     cdef const char* __Pyx_PyObject_AsStringAndSize(object, Py_ssize_t*) except NULL
 * 
 * @cname("__pyx_convert_string_from_py_6libcpp_6string_std__in_string")             # <<<<<<<<<<<<<<
 * cdef string __pyx_convert_string_from_py_6libcpp_6string_std__in_string(object o) except *:
 *     cdef Py_ssize_t length = 0
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("string.from_py.__pyx_convert_string_from_py_6libcpp_6string_std__in_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_pretend_to_initialize(&__pyx_r);
  __pyx_L0:;
  return __pyx_r;
}

/* "string.to_py":31
 *     cdef object __Pyx_PyObject_FromStringAndSize(const char*, size_t)
 * 
 * @cname("__pyx_convert_PyObject_string_to_py_6libcpp_6string_std__in_string")             # <<<<<<<<<<<<<<
 * cdef inline object __pyx_convert_PyObject_string_to_py_6libcpp_6string_std__in_string(const string& s):
 *     if s.size() > <size_t> PY_SSIZE_T_MAX:
*/

static CYTHON_INLINE PyObject *__pyx_convert_PyObject_string_to_py_6libcpp_6string_std__in_string(std::string const &__pyx_v_s) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_convert_PyObject_string_to_py_6libcpp_6string_std__in_string", 0);

  /* "string.to_py":33
 * @cname("__pyx_convert_PyObject_string_to_py_6libcpp_6string_std__in_string")
 * cdef inline object __pyx_convert_PyObject_string_to_py_6libcpp_6string_std__in_string(const string& s):
 *     if s.size() > <size_t> PY_SSIZE_T_MAX:             # <<<<<<<<<<<<<<
 *         raise MemoryError()
 *     return __Pyx_PyObject_FromStringAndSize(s.data(), <Py_ssize_t> s.size())
*/
  __pyx_t_1 = (__pyx_v_s.size() > ((size_t)PY_SSIZE_T_MAX));
  if (unlikely(__pyx_t_1)) {

    /* "string.to_py":34
 * cdef inline object __pyx_convert_PyObject_string_to_py_6libcpp_6string_std__in_string(const string& s):
 *     if s.size() > <size_t> PY_SSIZE_T_MAX:
 *         raise MemoryError()             # <<<<<<<<<<<<<<
 *     return __Pyx_PyObject_FromStringAndSize(s.data(), <Py_ssize_t> s.size())
 * cdef extern from *:
*/
    PyErr_NoMemory(); __PYX_ERR(1, 34, __pyx_L1_error)

    /* "string.to_py":33
 * @cname("__pyx_convert_PyObject_string_to_py_6libcpp_6string_std__in_string")
 * cdef inline object __pyx_convert_PyObject_string_to_py_6libcpp_6string_std__in_string(const string& s):
 *     if s.size() > <size_t> PY_SSIZE_T_MAX:             # <<<<<<<<<<<<<<
 *         raise MemoryError()
 *     return __Pyx_PyObject_FromStringAndSize(s.data(), <Py_ssize_t> s.size())
*/
  }

  /* "string.to_py":35
 *     if s.size() > <size_t> PY_SSIZE_T_MAX:
 *         raise MemoryError()
 *     return __Pyx_PyObject_FromStringAndSize(s.data(), <Py_ssize_t> s.size())             # <<<<<<<<<<<<<<
 * cdef extern from *:
 *     cdef object __Pyx_PyUnicode_FromStringAndSize(const char*, size_t)
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_FromStringAndSize(__pyx_v_s.data(), ((Py_ssize_t)__pyx_v_s.size())); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 35, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "string.to_py":31
 *     cdef object __Pyx_PyObject_FromStringAndSize(const char*, size_t)
 * 
 * @cname("__pyx_convert_PyObject_string_to_py_6libcpp_6string_std__in_string")             # <<<<<<<<<<<<<<
 * cdef inline object __pyx_convert_PyObject_string_to_py_6libcpp_6string_std__in_string(const string& s):
 *     if s.size() > <size_t> PY_SSIZE_T_MAX:
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("string.to_py.__pyx_convert_PyObject_string_to_py_6libcpp_6string_std__in_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "string.to_py":39
 *     cdef object __Pyx_PyUnicode_FromStringAndSize(const char*, size_t)
 * 
 * @cname("__pyx_convert_PyUnicode_string_to_py_6libcpp_6string_std__in_string")             # <<<<<<<<<<<<<<
 * cdef inline object __pyx_convert_PyUnicode_string_to_py_6libcpp_6string_std__in_string(const string& s):
 *     if s.size() > <size_t> PY_SSIZE_T_MAX:
*/

static CYTHON_INLINE PyObject *__pyx_convert_PyUnicode_string_to_py_6libcpp_6string_std__in_string(std::string const &__pyx_v_s) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_convert_PyUnicode_string_to_py_6libcpp_6string_std__in_string", 0);

  /* "string.to_py":41
 * @cname("__pyx_convert_PyUnicode_string_to_py_6libcpp_6string_std__in_string")
 * cdef inline object __pyx_convert_PyUnicode_string_to_py_6libcpp_6string_std__in_string(const string& s):
 *     if s.size() > <size_t> PY_SSIZE_T_MAX:             # <<<<<<<<<<<<<<
 *         raise MemoryError()
 *     return __Pyx_PyUnicode_FromStringAndSize(s.data(), <Py_ssize_t> s.size())
*/
  __pyx_t_1 = (__pyx_v_s.size() > ((size_t)PY_SSIZE_T_MAX));
  if (unlikely(__pyx_t_1)) {

    /* "string.to_py":42
 * cdef inline object __pyx_convert_PyUnicode_string_to_py_6libcpp_6string_std__in_string(const string& s):
 *     if s.size() > <size_t> PY_SSIZE_T_MAX:
 *         raise MemoryError()             # <<<<<<<<<<<<<<
 *     return __Pyx_PyUnicode_FromStringAndSize(s.data(), <Py_ssize_t> s.size())
 * cdef extern from *:
*/
    PyErr_NoMemory(); __PYX_ERR(1, 42, __pyx_L1_error)

    /* "string.to_py":41
 * @cname("__pyx_convert_PyUnicode_string_to_py_6libcpp_6string_std__in_string")
 * cdef inline object __pyx_convert_PyUnicode_string_to_py_6libcpp_6string_std__in_string(const string& s):
 *     if s.size() > <size_t> PY_SSIZE_T_MAX:             # <<<<<<<<<<<<<<
 *         raise MemoryError()
 *     return __Pyx_PyUnicode_FromStringAndSize(s.data(), <Py_ssize_t> s.size())
*/
  }

  /* "string.to_py":43
 *     if s.size() > <size_t> PY_SSIZE_T_MAX:
 *         raise MemoryError()
 *     return __Pyx_PyUnicode_FromStringAndSize(s.data(), <Py_ssize_t> s.size())             # <<<<<<<<<<<<<<
 * cdef extern from *:
 *     cdef object __Pyx_PyBytes_FromStringAndSize(const char*, size_t)
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyUnicode_FromStringAndSize(__pyx_v_s.data(), ((Py_ssize_t)__pyx_v_s.size())); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 43, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "string.to_py":39
 *     cdef object __Pyx_PyUnicode_FromStringAndSize(const char*, size_t)
 * 
 * @cname("__pyx_convert_PyUnicode_string_to_py_6libcpp_6string_std__in_string")             # <<<<<<<<<<<<<<
 * cdef inline object __pyx_convert_PyUnicode_string_to_py_6libcpp_6string_std__in_string(const string& s):
 *     if s.size() > <size_t> PY_SSIZE_T_MAX:
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("string.to_py.__pyx_convert_PyUnicode_string_to_py_6libcpp_6string_std__in_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "string.to_py":47
 *     cdef object __Pyx_PyBytes_FromStringAndSize(const char*, size_t)
 * 
 * @cname("__pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string")             # <<<<<<<<<<<<<<
 * cdef inline object __pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string(const string& s):
 *     if s.size() > <size_t> PY_SSIZE_T_MAX:
*/

static CYTHON_INLINE PyObject *__pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string(std::string const &__pyx_v_s) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string", 0);

  /* "string.to_py":49
 * @cname("__pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string")
 * cdef inline object __pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string(const string& s):
 *     if s.size() > <size_t> PY_SSIZE_T_MAX:             # <<<<<<<<<<<<<<
 *         raise MemoryError()
 *     return __Pyx_PyBytes_FromStringAndSize(s.data(), <Py_ssize_t> s.size())
*/
  __pyx_t_1 = (__pyx_v_s.size() > ((size_t)PY_SSIZE_T_MAX));
  if (unlikely(__pyx_t_1)) {

    /* "string.to_py":50
 * cdef inline object __pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string(const string& s):
 *     if s.size() > <size_t> PY_SSIZE_T_MAX:
 *         raise MemoryError()             # <<<<<<<<<<<<<<
 *     return __Pyx_PyBytes_FromStringAndSize(s.data(), <Py_ssize_t> s.size())
 * cdef extern from *:
*/
    PyErr_NoMemory(); __PYX_ERR(1, 50, __pyx_L1_error)

    /* "string.to_py":49
 * @cname("__pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string")
 * cdef inline object __pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string(const string& s):
 *     if s.size() > <size_t> PY_SSIZE_T_MAX:             # <<<<<<<<<<<<<<
 *         raise MemoryError()
 *     return __Pyx_PyBytes_FromStringAndSize(s.data(), <Py_ssize_t> s.size())
*/
  }

  /* "string.to_py":51
 *     if s.size() > <size_t> PY_SSIZE_T_MAX:
 *         raise MemoryError()
 *     return __Pyx_PyBytes_FromStringAndSize(s.data(), <Py_ssize_t> s.size())             # <<<<<<<<<<<<<<
 * cdef extern from *:
 *     cdef object __Pyx_PyByteArray_FromStringAndSize(const char*, size_t)
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_s.data(), ((Py_ssize_t)__pyx_v_s.size())); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 51, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "string.to_py":47
 *     cdef object __Pyx_PyBytes_FromStringAndSize(const char*, size_t)
 * 
 * @cname("__pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string")             # <<<<<<<<<<<<<<
 * cdef inline object __pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string(const string& s):
 *     if s.size() > <size_t> PY_SSIZE_T_MAX:
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("string.to_py.__pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "string.to_py":55
 *     cdef object __Pyx_PyByteArray_FromStringAndSize(const char*, size_t)
 * 
 * @cname("__pyx_convert_PyByteArray_string_to_py_6libcpp_6string_std__in_string")             # <<<<<<<<<<<<<<
 * cdef inline object __pyx_convert_PyByteArray_string_to_py_6libcpp_6string_std__in_string(const string& s):
 *     if s.size() > <size_t> PY_SSIZE_T_MAX:
*/

static CYTHON_INLINE PyObject *__pyx_convert_PyByteArray_string_to_py_6libcpp_6string_std__in_string(std::string const &__pyx_v_s) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_convert_PyByteArray_string_to_py_6libcpp_6string_std__in_string", 0);

  /* "string.to_py":57
 * @cname("__pyx_convert_PyByteArray_string_to_py_6libcpp_6string_std__in_string")
 * cdef inline object __pyx_convert_PyByteArray_string_to_py_6libcpp_6string_std__in_string(const string& s):
 *     if s.size() > <size_t> PY_SSIZE_T_MAX:             # <<<<<<<<<<<<<<
 *         raise MemoryError()
 *     return __Pyx_PyByteArray_FromStringAndSize(s.data(), <Py_ssize_t> s.size())
*/
  __pyx_t_1 = (__pyx_v_s.size() > ((size_t)PY_SSIZE_T_MAX));
  if (unlikely(__pyx_t_1)) {

    /* "string.to_py":58
 * cdef inline object __pyx_convert_PyByteArray_string_to_py_6libcpp_6string_std__in_string(const string& s):
 *     if s.size() > <size_t> PY_SSIZE_T_MAX:
 *         raise MemoryError()             # <<<<<<<<<<<<<<
 *     return __Pyx_PyByteArray_FromStringAndSize(s.data(), <Py_ssize_t> s.size())
*/
    PyErr_NoMemory(); __PYX_ERR(1, 58, __pyx_L1_error)

    /* "string.to_py":57
 * @cname("__pyx_convert_PyByteArray_string_to_py_6libcpp_6string_std__in_string")
 * cdef inline object __pyx_convert_PyByteArray_string_to_py_6libcpp_6string_std__in_string(const string& s):
 *     if s.size() > <size_t> PY_SSIZE_T_MAX:             # <<<<<<<<<<<<<<
 *         raise MemoryError()
 *     return __Pyx_PyByteArray_FromStringAndSize(s.data(), <Py_ssize_t> s.size())
*/
  }

  /* "string.to_py":59
 *     if s.size() > <size_t> PY_SSIZE_T_MAX:
 *         raise MemoryError()
 *     return __Pyx_PyByteArray_FromStringAndSize(s.data(), <Py_ssize_t> s.size())             # <<<<<<<<<<<<<<
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyByteArray_FromStringAndSize(__pyx_v_s.data(), ((Py_ssize_t)__pyx_v_s.size())); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 59, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "string.to_py":55
 *     cdef object __Pyx_PyByteArray_FromStringAndSize(const char*, size_t)
 * 
 * @cname("__pyx_convert_PyByteArray_string_to_py_6libcpp_6string_std__in_string")             # <<<<<<<<<<<<<<
 * cdef inline object __pyx_convert_PyByteArray_string_to_py_6libcpp_6string_std__in_string(const string& s):
 *     if s.size() > <size_t> PY_SSIZE_T_MAX:
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("string.to_py.__pyx_convert_PyByteArray_string_to_py_6libcpp_6string_std__in_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pair.to_py":203
 *         U second
 * 
 * @cname("__pyx_convert_pair_to_py_int____int")             # <<<<<<<<<<<<<<
 * cdef object __pyx_convert_pair_to_py_int____int(const pair[X,Y]& p):
 *     return p.first, p.second
*/

static PyObject *__pyx_convert_pair_to_py_int____int(std::pair<int,int>  const &__pyx_v_p) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_convert_pair_to_py_int____int", 0);

  /* "pair.to_py":205
 * @cname("__pyx_convert_pair_to_py_int____int")
 * cdef object __pyx_convert_pair_to_py_int____int(const pair[X,Y]& p):
 *     return p.first, p.second             # <<<<<<<<<<<<<<
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_p.first); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 205, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_v_p.second); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 205, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 205, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1) != (0)) __PYX_ERR(1, 205, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2) != (0)) __PYX_ERR(1, 205, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pair.to_py":203
 *         U second
 * 
 * @cname("__pyx_convert_pair_to_py_int____int")             # <<<<<<<<<<<<<<
 * cdef object __pyx_convert_pair_to_py_int____int(const pair[X,Y]& p):
 *     return p.first, p.second
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pair.to_py.__pyx_convert_pair_to_py_int____int", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vector.to_py":79
 *     const Py_ssize_t PY_SSIZE_T_MAX
 * 
 * @cname("__pyx_convert_vector_to_py_std_3a__3a_pair_3c_int_2c_int_3e___")             # <<<<<<<<<<<<<<
 * cdef object __pyx_convert_vector_to_py_std_3a__3a_pair_3c_int_2c_int_3e___(const vector[X]& v):
 *     if v.size() > <size_t> PY_SSIZE_T_MAX:
*/

static PyObject *__pyx_convert_vector_to_py_std_3a__3a_pair_3c_int_2c_int_3e___(std::vector<std::pair<int,int> >  const &__pyx_v_v) {
  Py_ssize_t __pyx_v_v_size_signed;
  PyObject *__pyx_v_o = NULL;
  Py_ssize_t __pyx_v_i;
  PyObject *__pyx_v_item = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_convert_vector_to_py_std_3a__3a_pair_3c_int_2c_int_3e___", 0);

  /* "vector.to_py":81
 * @cname("__pyx_convert_vector_to_py_std_3a__3a_pair_3c_int_2c_int_3e___")
 * cdef object __pyx_convert_vector_to_py_std_3a__3a_pair_3c_int_2c_int_3e___(const vector[X]& v):
 *     if v.size() > <size_t> PY_SSIZE_T_MAX:             # <<<<<<<<<<<<<<
 *         raise MemoryError()
 *     v_size_signed = <Py_ssize_t> v.size()
*/
  __pyx_t_1 = (__pyx_v_v.size() > ((size_t)PY_SSIZE_T_MAX));
  if (unlikely(__pyx_t_1)) {

    /* "vector.to_py":82
 * cdef object __pyx_convert_vector_to_py_std_3a__3a_pair_3c_int_2c_int_3e___(const vector[X]& v):
 *     if v.size() > <size_t> PY_SSIZE_T_MAX:
 *         raise MemoryError()             # <<<<<<<<<<<<<<
 *     v_size_signed = <Py_ssize_t> v.size()
 * 
*/
    PyErr_NoMemory(); __PYX_ERR(1, 82, __pyx_L1_error)

    /* "vector.to_py":81
 * @cname("__pyx_convert_vector_to_py_std_3a__3a_pair_3c_int_2c_int_3e___")
 * cdef object __pyx_convert_vector_to_py_std_3a__3a_pair_3c_int_2c_int_3e___(const vector[X]& v):
 *     if v.size() > <size_t> PY_SSIZE_T_MAX:             # <<<<<<<<<<<<<<
 *         raise MemoryError()
 *     v_size_signed = <Py_ssize_t> v.size()
*/
  }

  /* "vector.to_py":83
 *     if v.size() > <size_t> PY_SSIZE_T_MAX:
 *         raise MemoryError()
 *     v_size_signed = <Py_ssize_t> v.size()             # <<<<<<<<<<<<<<
 * 
 *     o = PyList_New(v_size_signed)
*/
  __pyx_v_v_size_signed = ((Py_ssize_t)__pyx_v_v.size());

  /* "vector.to_py":85
 *     v_size_signed = <Py_ssize_t> v.size()
 * 
 *     o = PyList_New(v_size_signed)             # <<<<<<<<<<<<<<
 * 
 *     cdef Py_ssize_t i
*/
  __pyx_t_2 = PyList_New(__pyx_v_v_size_signed); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 85, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_o = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "vector.to_py":90
 *     cdef object item
 * 
 *     for i in range(v_size_signed):             # <<<<<<<<<<<<<<
 *         item = v[i]
 *         Py_INCREF(item)
*/
  __pyx_t_3 = __pyx_v_v_size_signed;
  __pyx_t_4 = __pyx_t_3;
  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
    __pyx_v_i = __pyx_t_5;

    /* "vector.to_py":91
 * 
 *     for i in range(v_size_signed):
 *         item = v[i]             # <<<<<<<<<<<<<<
 *         Py_INCREF(item)
 *         __Pyx_PyList_SET_ITEM(o, i, item)
*/
    __pyx_t_2 = __pyx_convert_pair_to_py_int____int((__pyx_v_v[__pyx_v_i])); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 91, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "vector.to_py":92
 *     for i in range(v_size_signed):
 *         item = v[i]
 *         Py_INCREF(item)             # <<<<<<<<<<<<<<
 *         __Pyx_PyList_SET_ITEM(o, i, item)
 * 
*/
    Py_INCREF(__pyx_v_item);

    /* "vector.to_py":93
 *         item = v[i]
 *         Py_INCREF(item)
 *         __Pyx_PyList_SET_ITEM(o, i, item)             # <<<<<<<<<<<<<<
 * 
 *     return o
*/
    __pyx_t_6 = __Pyx_PyList_SET_ITEM(__pyx_v_o, __pyx_v_i, __pyx_v_item); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(1, 93, __pyx_L1_error)
  }

  /* "vector.to_py":95
 *         __Pyx_PyList_SET_ITEM(o, i, item)
 * 
 *     return o             # <<<<<<<<<<<<<<
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_o);
  __pyx_r = __pyx_v_o;
  goto __pyx_L0;

  /* "vector.to_py":79
 *     const Py_ssize_t PY_SSIZE_T_MAX
 * 
 * @cname("__pyx_convert_vector_to_py_std_3a__3a_pair_3c_int_2c_int_3e___")             # <<<<<<<<<<<<<<
 * cdef object __pyx_convert_vector_to_py_std_3a__3a_pair_3c_int_2c_int_3e___(const vector[X]& v):
 *     if v.size() > <size_t> PY_SSIZE_T_MAX:
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("vector.to_py.__pyx_convert_vector_to_py_std_3a__3a_pair_3c_int_2c_int_3e___", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_o);
  __Pyx_XDECREF(__pyx_v_item);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":137
 *         cdef bint dtype_is_object
 * 
 *     def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None,             # <<<<<<<<<<<<<<
 *                   mode="c", bint allocate_buffer=True):
 * 
*/

/* Python wrapper */
static int __pyx_array___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_array___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_shape = 0;
  Py_ssize_t __pyx_v_itemsize;
  PyObject *__pyx_v_format = 0;
  PyObject *__pyx_v_mode = 0;
  int __pyx_v_allocate_buffer;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[5] = {0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_shape,&__pyx_mstate_global->__pyx_n_u_itemsize,&__pyx_mstate_global->__pyx_n_u_format,&__pyx_mstate_global->__pyx_n_u_mode,&__pyx_mstate_global->__pyx_n_u_allocate_buffer,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(1, 137, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  5:
        values[4] = __Pyx_ArgRef_VARARGS(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(1, 137, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(1, 137, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 137, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 137, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 137, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__cinit__", 0) < (0)) __PYX_ERR(1, 137, __pyx_L3_error)
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_n_u_c));
      for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, i); __PYX_ERR(1, 137, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  5:
        values[4] = __Pyx_ArgRef_VARARGS(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(1, 137, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(1, 137, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 137, __pyx_L3_error)
        values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 137, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 137, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_n_u_c));
    }
    __pyx_v_shape = ((PyObject*)values[0]);
    __pyx_v_itemsize = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_itemsize == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 137, __pyx_L3_error)
    __pyx_v_format = values[2];
    __pyx_v_mode = values[3];
    if (values[4]) {
      __pyx_v_allocate_buffer = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_allocate_buffer == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 138, __pyx_L3_error)
    } else {

      /* "View.MemoryView":138
 * 
 *     def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None,
 *                   mode="c", bint allocate_buffer=True):             # <<<<<<<<<<<<<<
 * 
 *         cdef int idx
*/
      __pyx_v_allocate_buffer = ((int)1);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, __pyx_nargs); __PYX_ERR(1, 137, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("View.MemoryView.array.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_shape), (&PyTuple_Type), 1, "shape", 1))) __PYX_ERR(1, 137, __pyx_L1_error)
  if (unlikely(((PyObject *)__pyx_v_format) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "format"); __PYX_ERR(1, 137, __pyx_L1_error)
  }
  __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(((struct __pyx_array_obj *)__pyx_v_self), __pyx_v_shape, __pyx_v_itemsize, __pyx_v_format, __pyx_v_mode, __pyx_v_allocate_buffer);

  /* "View.MemoryView":137
 *         cdef bint dtype_is_object
 * 
 *     def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None,             # <<<<<<<<<<<<<<
 *                   mode="c", bint allocate_buffer=True):
 * 
*/

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_shape, Py_ssize_t __pyx_v_itemsize, PyObject *__pyx_v_format, PyObject *__pyx_v_mode, int __pyx_v_allocate_buffer) {
  int __pyx_v_idx;
  Py_ssize_t __pyx_v_dim;
  char __pyx_v_order;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  char *__pyx_t_7;
  int __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11[5];
  PyObject *__pyx_t_12 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_INCREF(__pyx_v_format);

  /* "View.MemoryView":143
 *         cdef Py_ssize_t dim
 * 
 *         self.ndim = <int> len(shape)             # <<<<<<<<<<<<<<
 *         self.itemsize = itemsize
 * 
*/
  if (unlikely(__pyx_v_shape == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 143, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyTuple_GET_SIZE(__pyx_v_shape); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(1, 143, __pyx_L1_error)
  __pyx_v_self->ndim = ((int)__pyx_t_1);

  /* "View.MemoryView":144
 * 
 *         self.ndim = <int> len(shape)
 *         self.itemsize = itemsize             # <<<<<<<<<<<<<<
 * 
 *         if not self.ndim:
*/
  __pyx_v_self->itemsize = __pyx_v_itemsize;

  /* "View.MemoryView":146
 *         self.itemsize = itemsize
 * 
 *         if not self.ndim:             # <<<<<<<<<<<<<<
 *             raise ValueError, "Empty shape tuple for cython.array"
 * 
*/
  __pyx_t_2 = (!(__pyx_v_self->ndim != 0));
  if (unlikely(__pyx_t_2)) {

    /* "View.MemoryView":147
 * 
 *         if not self.ndim:
 *             raise ValueError, "Empty shape tuple for cython.array"             # <<<<<<<<<<<<<<
 * 
 *         if itemsize <= 0:
*/
    __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_ValueError))), __pyx_mstate_global->__pyx_kp_u_Empty_shape_tuple_for_cython_arr, 0, 0);
    __PYX_ERR(1, 147, __pyx_L1_error)

    /* "View.MemoryView":146
 *         self.itemsize = itemsize
 * 
 *         if not self.ndim:             # <<<<<<<<<<<<<<
 *             raise ValueError, "Empty shape tuple for cython.array"
 * 
*/
  }

  /* "View.MemoryView":149
 *             raise ValueError, "Empty shape tuple for cython.array"
 * 
 *         if itemsize <= 0:             # <<<<<<<<<<<<<<
 *             raise ValueError, "itemsize <= 0 for cython.array"
 * 
*/
  __pyx_t_2 = (__pyx_v_itemsize <= 0);
  if (unlikely(__pyx_t_2)) {

    /* "View.MemoryView":150
 * 
 *         if itemsize <= 0:
 *             raise ValueError, "itemsize <= 0 for cython.array"             # <<<<<<<<<<<<<<
 * 
 *         if not isinstance(format, bytes):
*/
    __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_ValueError))), __pyx_mstate_global->__pyx_kp_u_itemsize_0_for_cython_array, 0, 0);
    __PYX_ERR(1, 150, __pyx_L1_error)

    /* "View.MemoryView":149
 *             raise ValueError, "Empty shape tuple for cython.array"
 * 
 *         if itemsize <= 0:             # <<<<<<<<<<<<<<
 *             raise ValueError, "itemsize <= 0 for cython.array"
 * 
*/
  }

  /* "View.MemoryView":152
 *             raise ValueError, "itemsize <= 0 for cython.array"
 * 
 *         if not isinstance(format, bytes):             # <<<<<<<<<<<<<<
 *             format = format.encode('ASCII')
 *         self._format = format  # keep a reference to the byte string
*/
  __pyx_t_2 = PyBytes_Check(__pyx_v_format); 
  __pyx_t_3 = (!__pyx_t_2);
  if (__pyx_t_3) {

    /* "View.MemoryView":153
 * 
 *         if not isinstance(format, bytes):
 *             format = format.encode('ASCII')             # <<<<<<<<<<<<<<
 *         self._format = format  # keep a reference to the byte string
 *         self.format = self._format
*/
    __pyx_t_5 = __pyx_v_format;
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_6 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_n_u_ASCII};
      __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_encode, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 153, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_DECREF_SET(__pyx_v_format, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "View.MemoryView":152
 *             raise ValueError, "itemsize <= 0 for cython.array"
 * 
 *         if not isinstance(format, bytes):             # <<<<<<<<<<<<<<
 *             format = format.encode('ASCII')
 *         self._format = format  # keep a reference to the byte string
*/
  }

  /* "View.MemoryView":154
 *         if not isinstance(format, bytes):
 *             format = format.encode('ASCII')
 *         self._format = format  # keep a reference to the byte string             # <<<<<<<<<<<<<<
 *         self.format = self._format
 * 
*/
  __pyx_t_4 = __pyx_v_format;
  __Pyx_INCREF(__pyx_t_4);
  if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_4))) __PYX_ERR(1, 154, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_4);
  __Pyx_GOTREF(__pyx_v_self->_format);
  __Pyx_DECREF(__pyx_v_self->_format);
  __pyx_v_self->_format = ((PyObject*)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "View.MemoryView":155
 *             format = format.encode('ASCII')
 *         self._format = format  # keep a reference to the byte string
 *         self.format = self._format             # <<<<<<<<<<<<<<
 * 
 * 
*/
  if (unlikely(__pyx_v_self->_format == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(1, 155, __pyx_L1_error)
  }
  __pyx_t_7 = __Pyx_PyBytes_AsWritableString(__pyx_v_self->_format); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(1, 155, __pyx_L1_error)
  __pyx_v_self->format = __pyx_t_7;

  /* "View.MemoryView":158
 * 
 * 
 *         self._shape = <Py_ssize_t *> PyObject_Malloc(sizeof(Py_ssize_t)*self.ndim*2)             # <<<<<<<<<<<<<<
 *         self._strides = self._shape + self.ndim
 * 
*/
  __pyx_v_self->_shape = ((Py_ssize_t *)PyObject_Malloc((((sizeof(Py_ssize_t)) * __pyx_v_self->ndim) * 2)));

  /* "View.MemoryView":159
 * 
 *         self._shape = <Py_ssize_t *> PyObject_Malloc(sizeof(Py_ssize_t)*self.ndim*2)
 *         self._strides = self._shape + self.ndim             # <<<<<<<<<<<<<<
 * 
 *         if not self._shape:
*/
  __pyx_v_self->_strides = (__pyx_v_self->_shape + __pyx_v_self->ndim);

  /* "View.MemoryView":161
 *         self._strides = self._shape + self.ndim
 * 
 *         if not self._shape:             # <<<<<<<<<<<<<<
 *             raise MemoryError, "unable to allocate shape and strides."
 * 
*/
  __pyx_t_3 = (!(__pyx_v_self->_shape != 0));
  if (unlikely(__pyx_t_3)) {

    /* "View.MemoryView":162
 * 
 *         if not self._shape:
 *             raise MemoryError, "unable to allocate shape and strides."             # <<<<<<<<<<<<<<
 * 
 * 
*/
    __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_MemoryError))), __pyx_mstate_global->__pyx_kp_u_unable_to_allocate_shape_and_str, 0, 0);
    __PYX_ERR(1, 162, __pyx_L1_error)

    /* "View.MemoryView":161
 *         self._strides = self._shape + self.ndim
 * 
 *         if not self._shape:             # <<<<<<<<<<<<<<
 *             raise MemoryError, "unable to allocate shape and strides."
 * 
*/
  }

  /* "View.MemoryView":165
 * 
 * 
 *         for idx, dim in enumerate(shape):             # <<<<<<<<<<<<<<
 *             if dim <= 0:
 *                 raise ValueError, f"Invalid shape in axis {idx}: {dim}."
*/
  __pyx_t_8 = 0;
  __pyx_t_4 = __pyx_v_shape; __Pyx_INCREF(__pyx_t_4);
  __pyx_t_1 = 0;
  for (;;) {
    {
      Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_4);
      #if !CYTHON_ASSUME_SAFE_SIZE
      if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 165, __pyx_L1_error)
      #endif
      if (__pyx_t_1 >= __pyx_temp) break;
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_5 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_1));
    #else
    __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_1);
    #endif
    ++__pyx_t_1;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 165, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 165, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_dim = __pyx_t_9;
    __pyx_v_idx = __pyx_t_8;
    __pyx_t_8 = (__pyx_t_8 + 1);

    /* "View.MemoryView":166
 * 
 *         for idx, dim in enumerate(shape):
 *             if dim <= 0:             # <<<<<<<<<<<<<<
 *                 raise ValueError, f"Invalid shape in axis {idx}: {dim}."
 *             self._shape[idx] = dim
*/
    __pyx_t_3 = (__pyx_v_dim <= 0);
    if (unlikely(__pyx_t_3)) {

      /* "View.MemoryView":167
 *         for idx, dim in enumerate(shape):
 *             if dim <= 0:
 *                 raise ValueError, f"Invalid shape in axis {idx}: {dim}."             # <<<<<<<<<<<<<<
 *             self._shape[idx] = dim
 * 
*/
      __pyx_t_5 = __Pyx_PyUnicode_From_int(__pyx_v_idx, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 167, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_10 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_dim, 0, ' ', 'd'); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 167, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_11[0] = __pyx_mstate_global->__pyx_kp_u_Invalid_shape_in_axis;
      __pyx_t_11[1] = __pyx_t_5;
      __pyx_t_11[2] = __pyx_mstate_global->__pyx_kp_u_;
      __pyx_t_11[3] = __pyx_t_10;
      __pyx_t_11[4] = __pyx_mstate_global->__pyx_kp_u__2;
      __pyx_t_12 = __Pyx_PyUnicode_Join(__pyx_t_11, 5, 22 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_10) + 1, 127);
      if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 167, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_ValueError))), __pyx_t_12, 0, 0);
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __PYX_ERR(1, 167, __pyx_L1_error)

      /* "View.MemoryView":166
 * 
 *         for idx, dim in enumerate(shape):
 *             if dim <= 0:             # <<<<<<<<<<<<<<
 *                 raise ValueError, f"Invalid shape in axis {idx}: {dim}."
 *             self._shape[idx] = dim
*/
    }

    /* "View.MemoryView":168
 *             if dim <= 0:
 *                 raise ValueError, f"Invalid shape in axis {idx}: {dim}."
 *             self._shape[idx] = dim             # <<<<<<<<<<<<<<
 * 
 *         cdef char order
*/
    (__pyx_v_self->_shape[__pyx_v_idx]) = __pyx_v_dim;

    /* "View.MemoryView":165
 * 
 * 
 *         for idx, dim in enumerate(shape):             # <<<<<<<<<<<<<<
 *             if dim <= 0:
 *                 raise ValueError, f"Invalid shape in axis {idx}: {dim}."
*/
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "View.MemoryView":171
 * 
 *         cdef char order
 *         if mode == 'c':             # <<<<<<<<<<<<<<
 *             order = b'C'
 *             self.mode = u'c'
*/
  __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_v_mode, __pyx_mstate_global->__pyx_n_u_c, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(1, 171, __pyx_L1_error)
  if (__pyx_t_3) {

    /* "View.MemoryView":172
 *         cdef char order
 *         if mode == 'c':
 *             order = b'C'             # <<<<<<<<<<<<<<
 *             self.mode = u'c'
 *         elif mode == 'fortran':
*/
    __pyx_v_order = 'C';

    /* "View.MemoryView":173
 *         if mode == 'c':
 *             order = b'C'
 *             self.mode = u'c'             # <<<<<<<<<<<<<<
 *         elif mode == 'fortran':
 *             order = b'F'
*/
    __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_c);
    __Pyx_GIVEREF(__pyx_mstate_global->__pyx_n_u_c);
    __Pyx_GOTREF(__pyx_v_self->mode);
    __Pyx_DECREF(__pyx_v_self->mode);
    __pyx_v_self->mode = __pyx_mstate_global->__pyx_n_u_c;

    /* "View.MemoryView":171
 * 
 *         cdef char order
 *         if mode == 'c':             # <<<<<<<<<<<<<<
 *             order = b'C'
 *             self.mode = u'c'
*/
    goto __pyx_L11;
  }

  /* "View.MemoryView":174
 *             order = b'C'
 *             self.mode = u'c'
 *         elif mode == 'fortran':             # <<<<<<<<<<<<<<
 *             order = b'F'
 *             self.mode = u'fortran'
*/
  __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_v_mode, __pyx_mstate_global->__pyx_n_u_fortran, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(1, 174, __pyx_L1_error)
  if (likely(__pyx_t_3)) {

    /* "View.MemoryView":175
 *             self.mode = u'c'
 *         elif mode == 'fortran':
 *             order = b'F'             # <<<<<<<<<<<<<<
 *             self.mode = u'fortran'
 *         else:
*/
    __pyx_v_order = 'F';

    /* "View.MemoryView":176
 *         elif mode == 'fortran':
 *             order = b'F'
 *             self.mode = u'fortran'             # <<<<<<<<<<<<<<
 *         else:
 *             raise ValueError, f"Invalid mode, expected 'c' or 'fortran', got {mode}"
*/
    __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_fortran);
    __Pyx_GIVEREF(__pyx_mstate_global->__pyx_n_u_fortran);
    __Pyx_GOTREF(__pyx_v_self->mode);
    __Pyx_DECREF(__pyx_v_self->mode);
    __pyx_v_self->mode = __pyx_mstate_global->__pyx_n_u_fortran;

    /* "View.MemoryView":174
 *             order = b'C'
 *             self.mode = u'c'
 *         elif mode == 'fortran':             # <<<<<<<<<<<<<<
 *             order = b'F'
 *             self.mode = u'fortran'
*/
    goto __pyx_L11;
  }

  /* "View.MemoryView":178
 *             self.mode = u'fortran'
 *         else:
 *             raise ValueError, f"Invalid mode, expected 'c' or 'fortran', got {mode}"             # <<<<<<<<<<<<<<
 * 
 *         self.len = fill_contig_strides_array(self._shape, self._strides, itemsize, self.ndim, order)
*/
  /*else*/ {
    __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_v_mode, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 178, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_12 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Invalid_mode_expected_c_or_fortr, __pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 178, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_ValueError))), __pyx_t_12, 0, 0);
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    __PYX_ERR(1, 178, __pyx_L1_error)
  }
  __pyx_L11:;

  /* "View.MemoryView":180
 *             raise ValueError, f"Invalid mode, expected 'c' or 'fortran', got {mode}"
 * 
 *         self.len = fill_contig_strides_array(self._shape, self._strides, itemsize, self.ndim, order)             # <<<<<<<<<<<<<<
 * 
 *         self.free_data = allocate_buffer
*/
  __pyx_v_self->len = __pyx_fill_contig_strides_array(__pyx_v_self->_shape, __pyx_v_self->_strides, __pyx_v_itemsize, __pyx_v_self->ndim, __pyx_v_order);

  /* "View.MemoryView":182
 *         self.len = fill_contig_strides_array(self._shape, self._strides, itemsize, self.ndim, order)
 * 
 *         self.free_data = allocate_buffer             # <<<<<<<<<<<<<<
 *         self.dtype_is_object = format == b'O'
 * 
*/
  __pyx_v_self->free_data = __pyx_v_allocate_buffer;

  /* "View.MemoryView":183
 * 
 *         self.free_data = allocate_buffer
 *         self.dtype_is_object = format == b'O'             # <<<<<<<<<<<<<<
 * 
 *         if allocate_buffer:
*/
  __pyx_t_12 = PyObject_RichCompare(__pyx_v_format, __pyx_mstate_global->__pyx_n_b_O, Py_EQ); __Pyx_XGOTREF(__pyx_t_12); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 183, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 183, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __pyx_v_self->dtype_is_object = __pyx_t_3;

  /* "View.MemoryView":185
 *         self.dtype_is_object = format == b'O'
 * 
 *         if allocate_buffer:             # <<<<<<<<<<<<<<
 *             _allocate_buffer(self)
 * 
*/
  if (__pyx_v_allocate_buffer) {

    /* "View.MemoryView":186
 * 
 *         if allocate_buffer:
 *             _allocate_buffer(self)             # <<<<<<<<<<<<<<
 * 
 *     @cname('getbuffer')
*/
    __pyx_t_8 = __pyx_array_allocate_buffer(__pyx_v_self); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(1, 186, __pyx_L1_error)

    /* "View.MemoryView":185
 *         self.dtype_is_object = format == b'O'
 * 
 *         if allocate_buffer:             # <<<<<<<<<<<<<<
 *             _allocate_buffer(self)
 * 
*/
  }

  /* "View.MemoryView":137
 *         cdef bint dtype_is_object
 * 
 *     def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None,             # <<<<<<<<<<<<<<
 *                   mode="c", bint allocate_buffer=True):
 * 
*/

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("View.MemoryView.array.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_format);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":188
 *             _allocate_buffer(self)
 * 
 *     @cname('getbuffer')             # <<<<<<<<<<<<<<
 *     def __getbuffer__(self, Py_buffer *info, int flags):
 *         cdef int bufmode = -1
*/

/* Python wrapper */
CYTHON_UNUSED static int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
CYTHON_UNUSED static int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(((struct __pyx_array_obj *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags));

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

static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(struct __pyx_array_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
  int __pyx_v_bufmode;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  char *__pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  Py_ssize_t *__pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  if (unlikely(__pyx_v_info == NULL)) {
    PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete");
    return -1;
  }
  __Pyx_RefNannySetupContext("__getbuffer__", 0);
  __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(__pyx_v_info->obj);

  /* "View.MemoryView":190
 *     @cname('getbuffer')
 *     def __getbuffer__(self, Py_buffer *info, int flags):
 *         cdef int bufmode = -1             # <<<<<<<<<<<<<<
 *         if flags & (PyBUF_C_CONTIGUOUS | PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS):
 *             if self.mode == u"c":
*/
  __pyx_v_bufmode = -1;

  /* "View.MemoryView":191
 *     def __getbuffer__(self, Py_buffer *info, int flags):
 *         cdef int bufmode = -1
 *         if flags & (PyBUF_C_CONTIGUOUS | PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS):             # <<<<<<<<<<<<<<
 *             if self.mode == u"c":
 *                 bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
*/
  __pyx_t_1 = ((__pyx_v_flags & ((PyBUF_C_CONTIGUOUS | PyBUF_F_CONTIGUOUS) | PyBUF_ANY_CONTIGUOUS)) != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":192
 *         cdef int bufmode = -1
 *         if flags & (PyBUF_C_CONTIGUOUS | PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS):
 *             if self.mode == u"c":             # <<<<<<<<<<<<<<
 *                 bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
 *             elif self.mode == u"fortran":
*/
    __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_self->mode, __pyx_mstate_global->__pyx_n_u_c, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 192, __pyx_L1_error)
    if (__pyx_t_1) {

      /* "View.MemoryView":193
 *         if flags & (PyBUF_C_CONTIGUOUS | PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS):
 *             if self.mode == u"c":
 *                 bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS             # <<<<<<<<<<<<<<
 *             elif self.mode == u"fortran":
 *                 bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
*/
      __pyx_v_bufmode = (PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS);

      /* "View.MemoryView":192
 *         cdef int bufmode = -1
 *         if flags & (PyBUF_C_CONTIGUOUS | PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS):
 *             if self.mode == u"c":             # <<<<<<<<<<<<<<
 *                 bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
 *             elif self.mode == u"fortran":
*/
      goto __pyx_L4;
    }

    /* "View.MemoryView":194
 *             if self.mode == u"c":
 *                 bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
 *             elif self.mode == u"fortran":             # <<<<<<<<<<<<<<
 *                 bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
 *             if not (flags & bufmode):
*/
    __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_self->mode, __pyx_mstate_global->__pyx_n_u_fortran, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 194, __pyx_L1_error)
    if (__pyx_t_1) {

      /* "View.MemoryView":195
 *                 bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
 *             elif self.mode == u"fortran":
 *                 bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS             # <<<<<<<<<<<<<<
 *             if not (flags & bufmode):
 *                 raise ValueError, "Can only create a buffer that is contiguous in memory."
*/
      __pyx_v_bufmode = (PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS);

      /* "View.MemoryView":194
 *             if self.mode == u"c":
 *                 bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
 *             elif self.mode == u"fortran":             # <<<<<<<<<<<<<<
 *                 bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
 *             if not (flags & bufmode):
*/
    }
    __pyx_L4:;

    /* "View.MemoryView":196
 *             elif self.mode == u"fortran":
 *                 bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
 *             if not (flags & bufmode):             # <<<<<<<<<<<<<<
 *                 raise ValueError, "Can only create a buffer that is contiguous in memory."
 *         info.buf = self.data
*/
    __pyx_t_1 = (!((__pyx_v_flags & __pyx_v_bufmode) != 0));
    if (unlikely(__pyx_t_1)) {

      /* "View.MemoryView":197
 *                 bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
 *             if not (flags & bufmode):
 *                 raise ValueError, "Can only create a buffer that is contiguous in memory."             # <<<<<<<<<<<<<<
 *         info.buf = self.data
 *         info.len = self.len
*/
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_ValueError))), __pyx_mstate_global->__pyx_kp_u_Can_only_create_a_buffer_that_is, 0, 0);
      __PYX_ERR(1, 197, __pyx_L1_error)

      /* "View.MemoryView":196
 *             elif self.mode == u"fortran":
 *                 bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
 *             if not (flags & bufmode):             # <<<<<<<<<<<<<<
 *                 raise ValueError, "Can only create a buffer that is contiguous in memory."
 *         info.buf = self.data
*/
    }

    /* "View.MemoryView":191
 *     def __getbuffer__(self, Py_buffer *info, int flags):
 *         cdef int bufmode = -1
 *         if flags & (PyBUF_C_CONTIGUOUS | PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS):             # <<<<<<<<<<<<<<
 *             if self.mode == u"c":
 *                 bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
*/
  }

  /* "View.MemoryView":198
 *             if not (flags & bufmode):
 *                 raise ValueError, "Can only create a buffer that is contiguous in memory."
 *         info.buf = self.data             # <<<<<<<<<<<<<<
 *         info.len = self.len
 * 
*/
  __pyx_t_2 = __pyx_v_self->data;
  __pyx_v_info->buf = __pyx_t_2;

  /* "View.MemoryView":199
 *                 raise ValueError, "Can only create a buffer that is contiguous in memory."
 *         info.buf = self.data
 *         info.len = self.len             # <<<<<<<<<<<<<<
 * 
 *         if flags & PyBUF_STRIDES:
*/
  __pyx_t_3 = __pyx_v_self->len;
  __pyx_v_info->len = __pyx_t_3;

  /* "View.MemoryView":201
 *         info.len = self.len
 * 
 *         if flags & PyBUF_STRIDES:             # <<<<<<<<<<<<<<
 *             info.ndim = self.ndim
 *             info.shape = self._shape
*/
  __pyx_t_1 = ((__pyx_v_flags & PyBUF_STRIDES) != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":202
 * 
 *         if flags & PyBUF_STRIDES:
 *             info.ndim = self.ndim             # <<<<<<<<<<<<<<
 *             info.shape = self._shape
 *             info.strides = self._strides
*/
    __pyx_t_4 = __pyx_v_self->ndim;
    __pyx_v_info->ndim = __pyx_t_4;

    /* "View.MemoryView":203
 *         if flags & PyBUF_STRIDES:
 *             info.ndim = self.ndim
 *             info.shape = self._shape             # <<<<<<<<<<<<<<
 *             info.strides = self._strides
 *         else:
*/
    __pyx_t_5 = __pyx_v_self->_shape;
    __pyx_v_info->shape = __pyx_t_5;

    /* "View.MemoryView":204
 *             info.ndim = self.ndim
 *             info.shape = self._shape
 *             info.strides = self._strides             # <<<<<<<<<<<<<<
 *         else:
 *             info.ndim = 1
*/
    __pyx_t_5 = __pyx_v_self->_strides;
    __pyx_v_info->strides = __pyx_t_5;

    /* "View.MemoryView":201
 *         info.len = self.len
 * 
 *         if flags & PyBUF_STRIDES:             # <<<<<<<<<<<<<<
 *             info.ndim = self.ndim
 *             info.shape = self._shape
*/
    goto __pyx_L6;
  }

  /* "View.MemoryView":206
 *             info.strides = self._strides
 *         else:
 *             info.ndim = 1             # <<<<<<<<<<<<<<
 *             info.shape = &self.len if flags & PyBUF_ND else NULL
 *             info.strides = NULL
*/
  /*else*/ {
    __pyx_v_info->ndim = 1;

    /* "View.MemoryView":207
 *         else:
 *             info.ndim = 1
 *             info.shape = &self.len if flags & PyBUF_ND else NULL             # <<<<<<<<<<<<<<
 *             info.strides = NULL
 * 
*/
    __pyx_t_1 = ((__pyx_v_flags & PyBUF_ND) != 0);
    if (__pyx_t_1) {
      __pyx_t_5 = (&__pyx_v_self->len);
    } else {
      __pyx_t_5 = NULL;
    }
    __pyx_v_info->shape = __pyx_t_5;

    /* "View.MemoryView":208
 *             info.ndim = 1
 *             info.shape = &self.len if flags & PyBUF_ND else NULL
 *             info.strides = NULL             # <<<<<<<<<<<<<<
 * 
 *         info.suboffsets = NULL
*/
    __pyx_v_info->strides = NULL;
  }
  __pyx_L6:;

  /* "View.MemoryView":210
 *             info.strides = NULL
 * 
 *         info.suboffsets = NULL             # <<<<<<<<<<<<<<
 *         info.itemsize = self.itemsize
 *         info.readonly = 0
*/
  __pyx_v_info->suboffsets = NULL;

  /* "View.MemoryView":211
 * 
 *         info.suboffsets = NULL
 *         info.itemsize = self.itemsize             # <<<<<<<<<<<<<<
 *         info.readonly = 0
 *         info.format = self.format if flags & PyBUF_FORMAT else NULL
*/
  __pyx_t_3 = __pyx_v_self->itemsize;
  __pyx_v_info->itemsize = __pyx_t_3;

  /* "View.MemoryView":212
 *         info.suboffsets = NULL
 *         info.itemsize = self.itemsize
 *         info.readonly = 0             # <<<<<<<<<<<<<<
 *         info.format = self.format if flags & PyBUF_FORMAT else NULL
 *         info.obj = self
*/
  __pyx_v_info->readonly = 0;

  /* "View.MemoryView":213
 *         info.itemsize = self.itemsize
 *         info.readonly = 0
 *         info.format = self.format if flags & PyBUF_FORMAT else NULL             # <<<<<<<<<<<<<<
 *         info.obj = self
 * 
*/
  __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0);
  if (__pyx_t_1) {
    __pyx_t_2 = __pyx_v_self->format;
  } else {
    __pyx_t_2 = NULL;
  }
  __pyx_v_info->format = __pyx_t_2;

  /* "View.MemoryView":214
 *         info.readonly = 0
 *         info.format = self.format if flags & PyBUF_FORMAT else NULL
 *         info.obj = self             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(array self):
*/
  __Pyx_INCREF((PyObject *)__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self);
  __Pyx_GOTREF(__pyx_v_info->obj);
  __Pyx_DECREF(__pyx_v_info->obj);
  __pyx_v_info->obj = ((PyObject *)__pyx_v_self);

  /* "View.MemoryView":188
 *             _allocate_buffer(self)
 * 
 *     @cname('getbuffer')             # <<<<<<<<<<<<<<
 *     def __getbuffer__(self, Py_buffer *info, int flags):
 *         cdef int bufmode = -1
*/

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("View.MemoryView.array.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  if (__pyx_v_info->obj != NULL) {
    __Pyx_GOTREF(__pyx_v_info->obj);
    __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
  }
  goto __pyx_L2;
  __pyx_L0:;
  if (__pyx_v_info->obj == Py_None) {
    __Pyx_GOTREF(__pyx_v_info->obj);
    __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
  }
  __pyx_L2:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":216
 *         info.obj = self
 * 
 *     def __dealloc__(array self):             # <<<<<<<<<<<<<<
 *         if self.callback_free_data != NULL:
 *             self.callback_free_data(self.data)
*/

/* Python wrapper */
static void __pyx_array___dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_array___dealloc__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(((struct __pyx_array_obj *)__pyx_v_self));

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

static void __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(struct __pyx_array_obj *__pyx_v_self) {
  int __pyx_t_1;
  int __pyx_t_2;

  /* "View.MemoryView":217
 * 
 *     def __dealloc__(array self):
 *         if self.callback_free_data != NULL:             # <<<<<<<<<<<<<<
 *             self.callback_free_data(self.data)
 *         elif self.free_data and self.data is not NULL:
*/
  __pyx_t_1 = (__pyx_v_self->callback_free_data != NULL);
  if (__pyx_t_1) {

    /* "View.MemoryView":218
 *     def __dealloc__(array self):
 *         if self.callback_free_data != NULL:
 *             self.callback_free_data(self.data)             # <<<<<<<<<<<<<<
 *         elif self.free_data and self.data is not NULL:
 *             if self.dtype_is_object:
*/
    __pyx_v_self->callback_free_data(__pyx_v_self->data);

    /* "View.MemoryView":217
 * 
 *     def __dealloc__(array self):
 *         if self.callback_free_data != NULL:             # <<<<<<<<<<<<<<
 *             self.callback_free_data(self.data)
 *         elif self.free_data and self.data is not NULL:
*/
    goto __pyx_L3;
  }

  /* "View.MemoryView":219
 *         if self.callback_free_data != NULL:
 *             self.callback_free_data(self.data)
 *         elif self.free_data and self.data is not NULL:             # <<<<<<<<<<<<<<
 *             if self.dtype_is_object:
 *                 refcount_objects_in_slice(self.data, self._shape, self._strides, self.ndim, inc=False)
*/
  if (__pyx_v_self->free_data) {
  } else {
    __pyx_t_1 = __pyx_v_self->free_data;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_self->data != NULL);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "View.MemoryView":220
 *             self.callback_free_data(self.data)
 *         elif self.free_data and self.data is not NULL:
 *             if self.dtype_is_object:             # <<<<<<<<<<<<<<
 *                 refcount_objects_in_slice(self.data, self._shape, self._strides, self.ndim, inc=False)
 *             free(self.data)
*/
    if (__pyx_v_self->dtype_is_object) {

      /* "View.MemoryView":221
 *         elif self.free_data and self.data is not NULL:
 *             if self.dtype_is_object:
 *                 refcount_objects_in_slice(self.data, self._shape, self._strides, self.ndim, inc=False)             # <<<<<<<<<<<<<<
 *             free(self.data)
 *         PyObject_Free(self._shape)
*/
      __pyx_memoryview_refcount_objects_in_slice(__pyx_v_self->data, __pyx_v_self->_shape, __pyx_v_self->_strides, __pyx_v_self->ndim, 0);

      /* "View.MemoryView":220
 *             self.callback_free_data(self.data)
 *         elif self.free_data and self.data is not NULL:
 *             if self.dtype_is_object:             # <<<<<<<<<<<<<<
 *                 refcount_objects_in_slice(self.data, self._shape, self._strides, self.ndim, inc=False)
 *             free(self.data)
*/
    }

    /* "View.MemoryView":222
 *             if self.dtype_is_object:
 *                 refcount_objects_in_slice(self.data, self._shape, self._strides, self.ndim, inc=False)
 *             free(self.data)             # <<<<<<<<<<<<<<
 *         PyObject_Free(self._shape)
 * 
*/
    free(__pyx_v_self->data);

    /* "View.MemoryView":219
 *         if self.callback_free_data != NULL:
 *             self.callback_free_data(self.data)
 *         elif self.free_data and self.data is not NULL:             # <<<<<<<<<<<<<<
 *             if self.dtype_is_object:
 *                 refcount_objects_in_slice(self.data, self._shape, self._strides, self.ndim, inc=False)
*/
  }
  __pyx_L3:;

  /* "View.MemoryView":223
 *                 refcount_objects_in_slice(self.data, self._shape, self._strides, self.ndim, inc=False)
 *             free(self.data)
 *         PyObject_Free(self._shape)             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  PyObject_Free(__pyx_v_self->_shape);

  /* "View.MemoryView":216
 *         info.obj = self
 * 
 *     def __dealloc__(array self):             # <<<<<<<<<<<<<<
 *         if self.callback_free_data != NULL:
 *             self.callback_free_data(self.data)
*/

  /* function exit code */
}

/* "View.MemoryView":225
 *         PyObject_Free(self._shape)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def memview(self):
 *         return self.get_memview()
*/

/* Python wrapper */
static PyObject *__pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_15View_dot_MemoryView_5array_7memview___get__(((struct __pyx_array_obj *)__pyx_v_self));

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

static PyObject *__pyx_pf_15View_dot_MemoryView_5array_7memview___get__(struct __pyx_array_obj *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "View.MemoryView":227
 *     @property
 *     def memview(self):
 *         return self.get_memview()             # <<<<<<<<<<<<<<
 * 
 *     @cname('get_memview')
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_array *)__pyx_v_self->__pyx_vtab)->get_memview(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 227, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":225
 *         PyObject_Free(self._shape)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def memview(self):
 *         return self.get_memview()
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("View.MemoryView.array.memview.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":229
 *         return self.get_memview()
 * 
 *     @cname('get_memview')             # <<<<<<<<<<<<<<
 *     cdef get_memview(self):
 *         flags =  PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE
*/

static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *__pyx_v_self) {
  int __pyx_v_flags;
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_memview", 0);

  /* "View.MemoryView":231
 *     @cname('get_memview')
 *     cdef get_memview(self):
 *         flags =  PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE             # <<<<<<<<<<<<<<
 *         return  memoryview(self, flags, self.dtype_is_object)
 * 
*/
  __pyx_v_flags = ((PyBUF_ANY_CONTIGUOUS | PyBUF_FORMAT) | PyBUF_WRITABLE);

  /* "View.MemoryView":232
 *     cdef get_memview(self):
 *         flags =  PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE
 *         return  memoryview(self, flags, self.dtype_is_object)             # <<<<<<<<<<<<<<
 * 
 *     def __len__(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __pyx_t_3 = __Pyx_PyLong_From_int(__pyx_v_flags); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 232, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_self->dtype_is_object); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 232, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = 1;
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_2, ((PyObject *)__pyx_v_self), __pyx_t_3, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_memoryview_type, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 232, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_1);
  }
  __pyx_r = ((PyObject *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":229
 *         return self.get_memview()
 * 
 *     @cname('get_memview')             # <<<<<<<<<<<<<<
 *     cdef get_memview(self):
 *         flags =  PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("View.MemoryView.array.get_memview", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":234
 *         return  memoryview(self, flags, self.dtype_is_object)
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self._shape[0]
 * 
*/

/* Python wrapper */
static Py_ssize_t __pyx_array___len__(PyObject *__pyx_v_self); /*proto*/
static Py_ssize_t __pyx_array___len__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(((struct __pyx_array_obj *)__pyx_v_self));

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

static Py_ssize_t __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(struct __pyx_array_obj *__pyx_v_self) {
  Py_ssize_t __pyx_r;

  /* "View.MemoryView":235
 * 
 *     def __len__(self):
 *         return self._shape[0]             # <<<<<<<<<<<<<<
 * 
 *     def __getattr__(self, attr):
*/
  __pyx_r = (__pyx_v_self->_shape[0]);
  goto __pyx_L0;

  /* "View.MemoryView":234
 *         return  memoryview(self, flags, self.dtype_is_object)
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self._shape[0]
 * 
*/

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

/* "View.MemoryView":237
 *         return self._shape[0]
 * 
 *     def __getattr__(self, attr):             # <<<<<<<<<<<<<<
 *         return getattr(self.memview, attr)
 * 
*/

/* Python wrapper */
static PyObject *__pyx_array___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_attr); /*proto*/
static PyObject *__pyx_array___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_attr) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getattr__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_attr));

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

static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_attr) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__getattr__", 0);

  /* "View.MemoryView":238
 * 
 *     def __getattr__(self, attr):
 *         return getattr(self.memview, attr)             # <<<<<<<<<<<<<<
 * 
 *     def __getitem__(self, item):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_memview); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 238, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_GetAttr(__pyx_t_1, __pyx_v_attr); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 238, __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;

  /* "View.MemoryView":237
 *         return self._shape[0]
 * 
 *     def __getattr__(self, attr):             # <<<<<<<<<<<<<<
 *         return getattr(self.memview, attr)
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("View.MemoryView.array.__getattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":240
 *         return getattr(self.memview, attr)
 * 
 *     def __getitem__(self, item):             # <<<<<<<<<<<<<<
 *         return self.memview[item]
 * 
*/

/* Python wrapper */
static PyObject *__pyx_array___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item); /*proto*/
static PyObject *__pyx_array___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_item));

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

static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__getitem__", 0);

  /* "View.MemoryView":241
 * 
 *     def __getitem__(self, item):
 *         return self.memview[item]             # <<<<<<<<<<<<<<
 * 
 *     def __setitem__(self, item, value):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_memview); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 241, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_item); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 241, __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;

  /* "View.MemoryView":240
 *         return getattr(self.memview, attr)
 * 
 *     def __getitem__(self, item):             # <<<<<<<<<<<<<<
 *         return self.memview[item]
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("View.MemoryView.array.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":243
 *         return self.memview[item]
 * 
 *     def __setitem__(self, item, value):             # <<<<<<<<<<<<<<
 *         self.memview[item] = value
 * 
*/

/* Python wrapper */
static int __pyx_array___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value); /*proto*/
static int __pyx_array___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_12__setitem__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_item), ((PyObject *)__pyx_v_value));

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

static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_12__setitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setitem__", 0);

  /* "View.MemoryView":244
 * 
 *     def __setitem__(self, item, value):
 *         self.memview[item] = value             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_memview); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 244, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely((PyObject_SetItem(__pyx_t_1, __pyx_v_item, __pyx_v_value) < 0))) __PYX_ERR(1, 244, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "View.MemoryView":243
 *         return self.memview[item]
 * 
 *     def __setitem__(self, item, value):             # <<<<<<<<<<<<<<
 *         self.memview[item] = value
 * 
*/

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("View.MemoryView.array.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/

/* Python wrapper */
static PyObject *__pyx_pw___pyx_array_1__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_pw___pyx_array_1__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf___pyx_array___reduce_cython__(((struct __pyx_array_obj *)__pyx_v_self));

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

static PyObject *__pyx_pf___pyx_array___reduce_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("View.MemoryView.array.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/

/* Python wrapper */
static PyObject *__pyx_pw___pyx_array_3__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_pw___pyx_array_3__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(1, 3, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 3, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 3, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3, __pyx_L3_error)
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("View.MemoryView.array.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf___pyx_array_2__setstate_cython__(((struct __pyx_array_obj *)__pyx_v_self), __pyx_v___pyx_state);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf___pyx_array_2__setstate_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("View.MemoryView.array.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":253
 *         pass
 * 
 * @cname("__pyx_array_allocate_buffer")             # <<<<<<<<<<<<<<
 * cdef int _allocate_buffer(array self) except -1:
 * 
*/

static int __pyx_array_allocate_buffer(struct __pyx_array_obj *__pyx_v_self) {
  Py_ssize_t __pyx_v_i;
  PyObject **__pyx_v_p;
  int __pyx_r;
  int __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "View.MemoryView":260
 *     cdef PyObject **p
 * 
 *     self.free_data = True             # <<<<<<<<<<<<<<
 *     self.data = <char *>malloc(self.len)
 *     if not self.data:
*/
  __pyx_v_self->free_data = 1;

  /* "View.MemoryView":261
 * 
 *     self.free_data = True
 *     self.data = <char *>malloc(self.len)             # <<<<<<<<<<<<<<
 *     if not self.data:
 *         raise MemoryError, "unable to allocate array data."
*/
  __pyx_v_self->data = ((char *)malloc(__pyx_v_self->len));

  /* "View.MemoryView":262
 *     self.free_data = True
 *     self.data = <char *>malloc(self.len)
 *     if not self.data:             # <<<<<<<<<<<<<<
 *         raise MemoryError, "unable to allocate array data."
 * 
*/
  __pyx_t_1 = (!(__pyx_v_self->data != 0));
  if (unlikely(__pyx_t_1)) {

    /* "View.MemoryView":263
 *     self.data = <char *>malloc(self.len)
 *     if not self.data:
 *         raise MemoryError, "unable to allocate array data."             # <<<<<<<<<<<<<<
 * 
 *     if self.dtype_is_object:
*/
    __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_MemoryError))), __pyx_mstate_global->__pyx_kp_u_unable_to_allocate_array_data, 0, 0);
    __PYX_ERR(1, 263, __pyx_L1_error)

    /* "View.MemoryView":262
 *     self.free_data = True
 *     self.data = <char *>malloc(self.len)
 *     if not self.data:             # <<<<<<<<<<<<<<
 *         raise MemoryError, "unable to allocate array data."
 * 
*/
  }

  /* "View.MemoryView":265
 *         raise MemoryError, "unable to allocate array data."
 * 
 *     if self.dtype_is_object:             # <<<<<<<<<<<<<<
 *         p = <PyObject **> self.data
 *         for i in range(self.len // self.itemsize):
*/
  if (__pyx_v_self->dtype_is_object) {

    /* "View.MemoryView":266
 * 
 *     if self.dtype_is_object:
 *         p = <PyObject **> self.data             # <<<<<<<<<<<<<<
 *         for i in range(self.len // self.itemsize):
 *             p[i] = Py_None
*/
    __pyx_v_p = ((PyObject **)__pyx_v_self->data);

    /* "View.MemoryView":267
 *     if self.dtype_is_object:
 *         p = <PyObject **> self.data
 *         for i in range(self.len // self.itemsize):             # <<<<<<<<<<<<<<
 *             p[i] = Py_None
 *             Py_INCREF(Py_None)
*/
    if (unlikely(__pyx_v_self->itemsize == 0)) {
      PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
      __PYX_ERR(1, 267, __pyx_L1_error)
    }
    else if (sizeof(Py_ssize_t) == sizeof(long) && (!(((Py_ssize_t)-1) > 0)) && unlikely(__pyx_v_self->itemsize == (Py_ssize_t)-1)  && unlikely(__Pyx_UNARY_NEG_WOULD_OVERFLOW(__pyx_v_self->len))) {
      PyErr_SetString(PyExc_OverflowError, "value too large to perform division");
      __PYX_ERR(1, 267, __pyx_L1_error)
    }
    __pyx_t_2 = __Pyx_div_Py_ssize_t(__pyx_v_self->len, __pyx_v_self->itemsize, 0);
    __pyx_t_3 = __pyx_t_2;
    for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
      __pyx_v_i = __pyx_t_4;

      /* "View.MemoryView":268
 *         p = <PyObject **> self.data
 *         for i in range(self.len // self.itemsize):
 *             p[i] = Py_None             # <<<<<<<<<<<<<<
 *             Py_INCREF(Py_None)
 *     return 0
*/
      (__pyx_v_p[__pyx_v_i]) = Py_None;

      /* "View.MemoryView":269
 *         for i in range(self.len // self.itemsize):
 *             p[i] = Py_None
 *             Py_INCREF(Py_None)             # <<<<<<<<<<<<<<
 *     return 0
 * 
*/
      Py_INCREF(Py_None);
    }

    /* "View.MemoryView":265
 *         raise MemoryError, "unable to allocate array data."
 * 
 *     if self.dtype_is_object:             # <<<<<<<<<<<<<<
 *         p = <PyObject **> self.data
 *         for i in range(self.len // self.itemsize):
*/
  }

  /* "View.MemoryView":270
 *             p[i] = Py_None
 *             Py_INCREF(Py_None)
 *     return 0             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_r = 0;
  goto __pyx_L0;

  /* "View.MemoryView":253
 *         pass
 * 
 * @cname("__pyx_array_allocate_buffer")             # <<<<<<<<<<<<<<
 * cdef int _allocate_buffer(array self) except -1:
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("View.MemoryView._allocate_buffer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  return __pyx_r;
}

/* "View.MemoryView":273
 * 
 * 
 * @cname("__pyx_array_new")             # <<<<<<<<<<<<<<
 * cdef array array_cwrapper(tuple shape, Py_ssize_t itemsize, char *format, const char *c_mode, char *buf):
 *     cdef array result
*/

static struct __pyx_array_obj *__pyx_array_new(PyObject *__pyx_v_shape, Py_ssize_t __pyx_v_itemsize, char *__pyx_v_format, char const *__pyx_v_c_mode, char *__pyx_v_buf) {
  struct __pyx_array_obj *__pyx_v_result = 0;
  PyObject *__pyx_v_mode = 0;
  struct __pyx_array_obj *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("array_cwrapper", 0);

  /* "View.MemoryView":276
 * cdef array array_cwrapper(tuple shape, Py_ssize_t itemsize, char *format, const char *c_mode, char *buf):
 *     cdef array result
 *     cdef str mode = "fortran" if c_mode[0] == b'f' else "c"  # this often comes from a constant C string.             # <<<<<<<<<<<<<<
 * 
 *     if buf is NULL:
*/
  __pyx_t_2 = ((__pyx_v_c_mode[0]) == 'f');
  if (__pyx_t_2) {
    __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_fortran);
    __pyx_t_1 = __pyx_mstate_global->__pyx_n_u_fortran;
  } else {
    __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_c);
    __pyx_t_1 = __pyx_mstate_global->__pyx_n_u_c;
  }
  __pyx_v_mode = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "View.MemoryView":278
 *     cdef str mode = "fortran" if c_mode[0] == b'f' else "c"  # this often comes from a constant C string.
 * 
 *     if buf is NULL:             # <<<<<<<<<<<<<<
 *         result = array.__new__(array, shape, itemsize, format, mode)
 *     else:
*/
  __pyx_t_2 = (__pyx_v_buf == NULL);
  if (__pyx_t_2) {

    /* "View.MemoryView":279
 * 
 *     if buf is NULL:
 *         result = array.__new__(array, shape, itemsize, format, mode)             # <<<<<<<<<<<<<<
 *     else:
 *         result = array.__new__(array, shape, itemsize, format, mode, allocate_buffer=False)
*/
    __pyx_t_1 = PyLong_FromSsize_t(__pyx_v_itemsize); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 279, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 279, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 279, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_v_shape);
    __Pyx_GIVEREF(__pyx_v_shape);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_shape) != (0)) __PYX_ERR(1, 279, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_1);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1) != (0)) __PYX_ERR(1, 279, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_3);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3) != (0)) __PYX_ERR(1, 279, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_mode);
    __Pyx_GIVEREF(__pyx_v_mode);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_v_mode) != (0)) __PYX_ERR(1, 279, __pyx_L1_error);
    __pyx_t_1 = 0;
    __pyx_t_3 = 0;
    __pyx_t_3 = ((PyObject *)__pyx_tp_new_array(((PyTypeObject *)__pyx_mstate_global->__pyx_array_type), __pyx_t_4, NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 279, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_result = ((struct __pyx_array_obj *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "View.MemoryView":278
 *     cdef str mode = "fortran" if c_mode[0] == b'f' else "c"  # this often comes from a constant C string.
 * 
 *     if buf is NULL:             # <<<<<<<<<<<<<<
 *         result = array.__new__(array, shape, itemsize, format, mode)
 *     else:
*/
    goto __pyx_L3;
  }

  /* "View.MemoryView":281
 *         result = array.__new__(array, shape, itemsize, format, mode)
 *     else:
 *         result = array.__new__(array, shape, itemsize, format, mode, allocate_buffer=False)             # <<<<<<<<<<<<<<
 *         result.data = buf
 * 
*/
  /*else*/ {
    __pyx_t_3 = PyLong_FromSsize_t(__pyx_v_itemsize); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 281, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_v_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 281, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 281, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_shape);
    __Pyx_GIVEREF(__pyx_v_shape);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_shape) != (0)) __PYX_ERR(1, 281, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_3);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3) != (0)) __PYX_ERR(1, 281, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_4);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_4) != (0)) __PYX_ERR(1, 281, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_mode);
    __Pyx_GIVEREF(__pyx_v_mode);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_mode) != (0)) __PYX_ERR(1, 281, __pyx_L1_error);
    __pyx_t_3 = 0;
    __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 281, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_allocate_buffer, Py_False) < (0)) __PYX_ERR(1, 281, __pyx_L1_error)
    __pyx_t_3 = ((PyObject *)__pyx_tp_new_array(((PyTypeObject *)__pyx_mstate_global->__pyx_array_type), __pyx_t_1, __pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 281, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_result = ((struct __pyx_array_obj *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "View.MemoryView":282
 *     else:
 *         result = array.__new__(array, shape, itemsize, format, mode, allocate_buffer=False)
 *         result.data = buf             # <<<<<<<<<<<<<<
 * 
 *     return result
*/
    __pyx_v_result->data = __pyx_v_buf;
  }
  __pyx_L3:;

  /* "View.MemoryView":284
 *         result.data = buf
 * 
 *     return result             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "View.MemoryView":273
 * 
 * 
 * @cname("__pyx_array_new")             # <<<<<<<<<<<<<<
 * cdef array array_cwrapper(tuple shape, Py_ssize_t itemsize, char *format, const char *c_mode, char *buf):
 *     cdef array result
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("View.MemoryView.array_cwrapper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_mode);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":310
 * cdef class Enum(object):
 *     cdef object name
 *     def __init__(self, name):             # <<<<<<<<<<<<<<
 *         self.name = name
 *     def __repr__(self):
*/

/* Python wrapper */
static int __pyx_MemviewEnum___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_MemviewEnum___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_name = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_name,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(1, 310, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 310, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(1, 310, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, i); __PYX_ERR(1, 310, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 310, __pyx_L3_error)
    }
    __pyx_v_name = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 310, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("View.MemoryView.Enum.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self), __pyx_v_name);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v_name) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "View.MemoryView":311
 *     cdef object name
 *     def __init__(self, name):
 *         self.name = name             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         return self.name
*/
  __Pyx_INCREF(__pyx_v_name);
  __Pyx_GIVEREF(__pyx_v_name);
  __Pyx_GOTREF(__pyx_v_self->name);
  __Pyx_DECREF(__pyx_v_self->name);
  __pyx_v_self->name = __pyx_v_name;

  /* "View.MemoryView":310
 * cdef class Enum(object):
 *     cdef object name
 *     def __init__(self, name):             # <<<<<<<<<<<<<<
 *         self.name = name
 *     def __repr__(self):
*/

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

/* "View.MemoryView":312
 *     def __init__(self, name):
 *         self.name = name
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.name
 * 
*/

/* Python wrapper */
static PyObject *__pyx_MemviewEnum___repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_MemviewEnum___repr__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self));

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

static PyObject *__pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(struct __pyx_MemviewEnum_obj *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "View.MemoryView":313
 *         self.name = name
 *     def __repr__(self):
 *         return self.name             # <<<<<<<<<<<<<<
 * 
 * cdef generic = Enum("<strided and direct or indirect>")
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->name);
  __pyx_r = __pyx_v_self->name;
  goto __pyx_L0;

  /* "View.MemoryView":312
 *     def __init__(self, name):
 *         self.name = name
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.name
 * 
*/

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

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
*/

/* Python wrapper */
static PyObject *__pyx_pw___pyx_MemviewEnum_1__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_pw___pyx_MemviewEnum_1__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf___pyx_MemviewEnum___reduce_cython__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self));

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

static PyObject *__pyx_pf___pyx_MemviewEnum___reduce_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self.name,)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None and _dict:
*/
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_self->name);
  __Pyx_GIVEREF(__pyx_v_self->name);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->name) != (0)) __PYX_ERR(1, 5, __pyx_L1_error);
  __pyx_v_state = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self.name,)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None and _dict:
 *         state += (_dict,)
*/
  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":7
 *     state = (self.name,)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None and _dict:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
*/
  __pyx_t_3 = (__pyx_v__dict != Py_None);
  if (__pyx_t_3) {
  } else {
    __pyx_t_2 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(1, 7, __pyx_L1_error)
  __pyx_t_2 = __pyx_t_3;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None and _dict:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
*/
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict) != (0)) __PYX_ERR(1, 8, __pyx_L1_error);
    __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None and _dict:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self.name is not None
*/
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self.name,)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None and _dict:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
*/
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self.name is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_Enum, (type(self), 0x82a3537, None), state
*/
  /*else*/ {
    __pyx_t_2 = (__pyx_v_self->name != Py_None);
    __pyx_v_use_setstate = __pyx_t_2;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.name is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_Enum, (type(self), 0x82a3537, None), state
 *     else:
*/
  if (__pyx_v_use_setstate) {

    /* "(tree fragment)":13
 *         use_setstate = self.name is not None
 *     if use_setstate:
 *         return __pyx_unpickle_Enum, (type(self), 0x82a3537, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_Enum, (type(self), 0x82a3537, state)
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_Enum); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 13, __pyx_L1_error);
    __Pyx_INCREF(__pyx_mstate_global->__pyx_int_136983863);
    __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_136983863);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_136983863) != (0)) __PYX_ERR(1, 13, __pyx_L1_error);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None) != (0)) __PYX_ERR(1, 13, __pyx_L1_error);
    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_4);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4) != (0)) __PYX_ERR(1, 13, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_1);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1) != (0)) __PYX_ERR(1, 13, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 13, __pyx_L1_error);
    __pyx_t_4 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.name is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_Enum, (type(self), 0x82a3537, None), state
 *     else:
*/
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_Enum, (type(self), 0x82a3537, None), state
 *     else:
 *         return __pyx_unpickle_Enum, (type(self), 0x82a3537, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_Enum__set_state(self, __pyx_state)
*/
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_Enum); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 15, __pyx_L1_error);
    __Pyx_INCREF(__pyx_mstate_global->__pyx_int_136983863);
    __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_136983863);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_136983863) != (0)) __PYX_ERR(1, 15, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 15, __pyx_L1_error);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5) != (0)) __PYX_ERR(1, 15, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_1);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1) != (0)) __PYX_ERR(1, 15, __pyx_L1_error);
    __pyx_t_5 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("View.MemoryView.Enum.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_Enum, (type(self), 0x82a3537, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_Enum__set_state(self, __pyx_state)
*/

/* Python wrapper */
static PyObject *__pyx_pw___pyx_MemviewEnum_3__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_pw___pyx_MemviewEnum_3__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(1, 16, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 16, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 16, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error)
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 16, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("View.MemoryView.Enum.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf___pyx_MemviewEnum_2__setstate_cython__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self), __pyx_v___pyx_state);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf___pyx_MemviewEnum_2__setstate_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_Enum, (type(self), 0x82a3537, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_Enum__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
*/
  __pyx_t_1 = __pyx_v___pyx_state;
  __Pyx_INCREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 17, __pyx_L1_error)
  if (unlikely(__pyx_t_1 == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'");
    __PYX_ERR(1, 17, __pyx_L1_error)
  }
  __pyx_t_2 = __pyx_unpickle_Enum__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 17, __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;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_Enum, (type(self), 0x82a3537, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_Enum__set_state(self, __pyx_state)
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("View.MemoryView.Enum.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":356
 *     cdef const __Pyx_TypeInfo *typeinfo
 * 
 *     def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False):             # <<<<<<<<<<<<<<
 *         self.obj = obj
 *         self.flags = flags
*/

/* Python wrapper */
static int __pyx_memoryview___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_memoryview___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_obj = 0;
  int __pyx_v_flags;
  int __pyx_v_dtype_is_object;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_obj,&__pyx_mstate_global->__pyx_n_u_flags,&__pyx_mstate_global->__pyx_n_u_dtype_is_object,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(1, 356, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 356, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 356, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 356, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__cinit__", 0) < (0)) __PYX_ERR(1, 356, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, i); __PYX_ERR(1, 356, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 356, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 356, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 356, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_obj = values[0];
    __pyx_v_flags = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_flags == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 356, __pyx_L3_error)
    if (values[2]) {
      __pyx_v_dtype_is_object = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_dtype_is_object == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 356, __pyx_L3_error)
    } else {
      __pyx_v_dtype_is_object = ((int)0);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, __pyx_nargs); __PYX_ERR(1, 356, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("View.MemoryView.memoryview.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit__(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v_obj, __pyx_v_flags, __pyx_v_dtype_is_object);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_v_flags, int __pyx_v_dtype_is_object) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "View.MemoryView":357
 * 
 *     def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False):
 *         self.obj = obj             # <<<<<<<<<<<<<<
 *         self.flags = flags
 *         if type(self) is memoryview or obj is not None:
*/
  __Pyx_INCREF(__pyx_v_obj);
  __Pyx_GIVEREF(__pyx_v_obj);
  __Pyx_GOTREF(__pyx_v_self->obj);
  __Pyx_DECREF(__pyx_v_self->obj);
  __pyx_v_self->obj = __pyx_v_obj;

  /* "View.MemoryView":358
 *     def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False):
 *         self.obj = obj
 *         self.flags = flags             # <<<<<<<<<<<<<<
 *         if type(self) is memoryview or obj is not None:
 *             PyObject_GetBuffer(obj, &self.view, flags)
*/
  __pyx_v_self->flags = __pyx_v_flags;

  /* "View.MemoryView":359
 *         self.obj = obj
 *         self.flags = flags
 *         if type(self) is memoryview or obj is not None:             # <<<<<<<<<<<<<<
 *             PyObject_GetBuffer(obj, &self.view, flags)
 *             if <PyObject *> self.view.obj == NULL:
*/
  __pyx_t_2 = (((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))) == ((PyObject *)__pyx_mstate_global->__pyx_memoryview_type));
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_obj != Py_None);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "View.MemoryView":360
 *         self.flags = flags
 *         if type(self) is memoryview or obj is not None:
 *             PyObject_GetBuffer(obj, &self.view, flags)             # <<<<<<<<<<<<<<
 *             if <PyObject *> self.view.obj == NULL:
 *                 (<__pyx_buffer *> &self.view).obj = Py_None
*/
    __pyx_t_3 = PyObject_GetBuffer(__pyx_v_obj, (&__pyx_v_self->view), __pyx_v_flags); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 360, __pyx_L1_error)

    /* "View.MemoryView":361
 *         if type(self) is memoryview or obj is not None:
 *             PyObject_GetBuffer(obj, &self.view, flags)
 *             if <PyObject *> self.view.obj == NULL:             # <<<<<<<<<<<<<<
 *                 (<__pyx_buffer *> &self.view).obj = Py_None
 *                 Py_INCREF(Py_None)
*/
    __pyx_t_1 = (((PyObject *)__pyx_v_self->view.obj) == NULL);
    if (__pyx_t_1) {

      /* "View.MemoryView":362
 *             PyObject_GetBuffer(obj, &self.view, flags)
 *             if <PyObject *> self.view.obj == NULL:
 *                 (<__pyx_buffer *> &self.view).obj = Py_None             # <<<<<<<<<<<<<<
 *                 Py_INCREF(Py_None)
 * 
*/
      ((Py_buffer *)(&__pyx_v_self->view))->obj = Py_None;

      /* "View.MemoryView":363
 *             if <PyObject *> self.view.obj == NULL:
 *                 (<__pyx_buffer *> &self.view).obj = Py_None
 *                 Py_INCREF(Py_None)             # <<<<<<<<<<<<<<
 * 
 *         if not __PYX_CYTHON_ATOMICS_ENABLED():
*/
      Py_INCREF(Py_None);

      /* "View.MemoryView":361
 *         if type(self) is memoryview or obj is not None:
 *             PyObject_GetBuffer(obj, &self.view, flags)
 *             if <PyObject *> self.view.obj == NULL:             # <<<<<<<<<<<<<<
 *                 (<__pyx_buffer *> &self.view).obj = Py_None
 *                 Py_INCREF(Py_None)
*/
    }

    /* "View.MemoryView":359
 *         self.obj = obj
 *         self.flags = flags
 *         if type(self) is memoryview or obj is not None:             # <<<<<<<<<<<<<<
 *             PyObject_GetBuffer(obj, &self.view, flags)
 *             if <PyObject *> self.view.obj == NULL:
*/
  }

  /* "View.MemoryView":365
 *                 Py_INCREF(Py_None)
 * 
 *         if not __PYX_CYTHON_ATOMICS_ENABLED():             # <<<<<<<<<<<<<<
 *             global __pyx_memoryview_thread_locks_used
 *             if (__pyx_memoryview_thread_locks_used < 8 and
*/
  __pyx_t_1 = (!__PYX_CYTHON_ATOMICS_ENABLED());
  if (__pyx_t_1) {

    /* "View.MemoryView":367
 *         if not __PYX_CYTHON_ATOMICS_ENABLED():
 *             global __pyx_memoryview_thread_locks_used
 *             if (__pyx_memoryview_thread_locks_used < 8 and             # <<<<<<<<<<<<<<
 * 
 *                     not __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING()):
*/
    __pyx_t_2 = (__pyx_memoryview_thread_locks_used < 8);
    if (__pyx_t_2) {
    } else {
      __pyx_t_1 = __pyx_t_2;
      goto __pyx_L9_bool_binop_done;
    }

    /* "View.MemoryView":369
 *             if (__pyx_memoryview_thread_locks_used < 8 and
 * 
 *                     not __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING()):             # <<<<<<<<<<<<<<
 *                 self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
 *                 __pyx_memoryview_thread_locks_used += 1
*/
    __pyx_t_2 = (!__PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING());
    __pyx_t_1 = __pyx_t_2;
    __pyx_L9_bool_binop_done:;

    /* "View.MemoryView":367
 *         if not __PYX_CYTHON_ATOMICS_ENABLED():
 *             global __pyx_memoryview_thread_locks_used
 *             if (__pyx_memoryview_thread_locks_used < 8 and             # <<<<<<<<<<<<<<
 * 
 *                     not __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING()):
*/
    if (__pyx_t_1) {

      /* "View.MemoryView":370
 * 
 *                     not __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING()):
 *                 self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]             # <<<<<<<<<<<<<<
 *                 __pyx_memoryview_thread_locks_used += 1
 *             if self.lock is NULL:
*/
      __pyx_v_self->lock = (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]);

      /* "View.MemoryView":371
 *                     not __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING()):
 *                 self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
 *                 __pyx_memoryview_thread_locks_used += 1             # <<<<<<<<<<<<<<
 *             if self.lock is NULL:
 *                 self.lock = PyThread_allocate_lock()
*/
      __pyx_memoryview_thread_locks_used = (__pyx_memoryview_thread_locks_used + 1);

      /* "View.MemoryView":367
 *         if not __PYX_CYTHON_ATOMICS_ENABLED():
 *             global __pyx_memoryview_thread_locks_used
 *             if (__pyx_memoryview_thread_locks_used < 8 and             # <<<<<<<<<<<<<<
 * 
 *                     not __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING()):
*/
    }

    /* "View.MemoryView":372
 *                 self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
 *                 __pyx_memoryview_thread_locks_used += 1
 *             if self.lock is NULL:             # <<<<<<<<<<<<<<
 *                 self.lock = PyThread_allocate_lock()
 *                 if self.lock is NULL:
*/
    __pyx_t_1 = (__pyx_v_self->lock == NULL);
    if (__pyx_t_1) {

      /* "View.MemoryView":373
 *                 __pyx_memoryview_thread_locks_used += 1
 *             if self.lock is NULL:
 *                 self.lock = PyThread_allocate_lock()             # <<<<<<<<<<<<<<
 *                 if self.lock is NULL:
 *                     raise MemoryError
*/
      __pyx_v_self->lock = PyThread_allocate_lock();

      /* "View.MemoryView":374
 *             if self.lock is NULL:
 *                 self.lock = PyThread_allocate_lock()
 *                 if self.lock is NULL:             # <<<<<<<<<<<<<<
 *                     raise MemoryError
 * 
*/
      __pyx_t_1 = (__pyx_v_self->lock == NULL);
      if (unlikely(__pyx_t_1)) {

        /* "View.MemoryView":375
 *                 self.lock = PyThread_allocate_lock()
 *                 if self.lock is NULL:
 *                     raise MemoryError             # <<<<<<<<<<<<<<
 * 
 *         if flags & PyBUF_FORMAT:
*/
        PyErr_NoMemory(); __PYX_ERR(1, 375, __pyx_L1_error)

        /* "View.MemoryView":374
 *             if self.lock is NULL:
 *                 self.lock = PyThread_allocate_lock()
 *                 if self.lock is NULL:             # <<<<<<<<<<<<<<
 *                     raise MemoryError
 * 
*/
      }

      /* "View.MemoryView":372
 *                 self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
 *                 __pyx_memoryview_thread_locks_used += 1
 *             if self.lock is NULL:             # <<<<<<<<<<<<<<
 *                 self.lock = PyThread_allocate_lock()
 *                 if self.lock is NULL:
*/
    }

    /* "View.MemoryView":365
 *                 Py_INCREF(Py_None)
 * 
 *         if not __PYX_CYTHON_ATOMICS_ENABLED():             # <<<<<<<<<<<<<<
 *             global __pyx_memoryview_thread_locks_used
 *             if (__pyx_memoryview_thread_locks_used < 8 and
*/
  }

  /* "View.MemoryView":377
 *                     raise MemoryError
 * 
 *         if flags & PyBUF_FORMAT:             # <<<<<<<<<<<<<<
 *             self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0')
 *         else:
*/
  __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":378
 * 
 *         if flags & PyBUF_FORMAT:
 *             self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0')             # <<<<<<<<<<<<<<
 *         else:
 *             self.dtype_is_object = dtype_is_object
*/
    __pyx_t_2 = ((__pyx_v_self->view.format[0]) == 'O');
    if (__pyx_t_2) {
    } else {
      __pyx_t_1 = __pyx_t_2;
      goto __pyx_L14_bool_binop_done;
    }
    __pyx_t_2 = ((__pyx_v_self->view.format[1]) == '\x00');
    __pyx_t_1 = __pyx_t_2;
    __pyx_L14_bool_binop_done:;
    __pyx_v_self->dtype_is_object = __pyx_t_1;

    /* "View.MemoryView":377
 *                     raise MemoryError
 * 
 *         if flags & PyBUF_FORMAT:             # <<<<<<<<<<<<<<
 *             self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0')
 *         else:
*/
    goto __pyx_L13;
  }

  /* "View.MemoryView":380
 *             self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0')
 *         else:
 *             self.dtype_is_object = dtype_is_object             # <<<<<<<<<<<<<<
 * 
 *         with cython.cdivision(True):
*/
  /*else*/ {
    __pyx_v_self->dtype_is_object = __pyx_v_dtype_is_object;
  }
  __pyx_L13:;

  /* "View.MemoryView":383
 * 
 *         with cython.cdivision(True):
 *             assert <Py_intptr_t>(&self.acquisition_count) % sizeof(__pyx_atomic_int_type) == 0             # <<<<<<<<<<<<<<
 *         self.typeinfo = NULL
 * 
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_1 = ((((Py_intptr_t)(&__pyx_v_self->acquisition_count)) % (sizeof(__pyx_atomic_int_type))) == 0);
    if (unlikely(!__pyx_t_1)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(1, 383, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(1, 383, __pyx_L1_error)
  #endif

  /* "View.MemoryView":384
 *         with cython.cdivision(True):
 *             assert <Py_intptr_t>(&self.acquisition_count) % sizeof(__pyx_atomic_int_type) == 0
 *         self.typeinfo = NULL             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(memoryview self):
*/
  __pyx_v_self->typeinfo = NULL;

  /* "View.MemoryView":356
 *     cdef const __Pyx_TypeInfo *typeinfo
 * 
 *     def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False):             # <<<<<<<<<<<<<<
 *         self.obj = obj
 *         self.flags = flags
*/

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("View.MemoryView.memoryview.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":386
 *         self.typeinfo = NULL
 * 
 *     def __dealloc__(memoryview self):             # <<<<<<<<<<<<<<
 *         if self.obj is not None:
 *             PyBuffer_Release(&self.view)
*/

/* Python wrapper */
static void __pyx_memoryview___dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_memoryview___dealloc__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(((struct __pyx_memoryview_obj *)__pyx_v_self));

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

static void __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(struct __pyx_memoryview_obj *__pyx_v_self) {
  int __pyx_v_i;
  int __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  PyThread_type_lock __pyx_t_5;
  PyThread_type_lock __pyx_t_6;

  /* "View.MemoryView":387
 * 
 *     def __dealloc__(memoryview self):
 *         if self.obj is not None:             # <<<<<<<<<<<<<<
 *             PyBuffer_Release(&self.view)
 *         elif (<__pyx_buffer *> &self.view).obj == Py_None:
*/
  __pyx_t_1 = (__pyx_v_self->obj != Py_None);
  if (__pyx_t_1) {

    /* "View.MemoryView":388
 *     def __dealloc__(memoryview self):
 *         if self.obj is not None:
 *             PyBuffer_Release(&self.view)             # <<<<<<<<<<<<<<
 *         elif (<__pyx_buffer *> &self.view).obj == Py_None:
 * 
*/
    PyBuffer_Release((&__pyx_v_self->view));

    /* "View.MemoryView":387
 * 
 *     def __dealloc__(memoryview self):
 *         if self.obj is not None:             # <<<<<<<<<<<<<<
 *             PyBuffer_Release(&self.view)
 *         elif (<__pyx_buffer *> &self.view).obj == Py_None:
*/
    goto __pyx_L3;
  }

  /* "View.MemoryView":389
 *         if self.obj is not None:
 *             PyBuffer_Release(&self.view)
 *         elif (<__pyx_buffer *> &self.view).obj == Py_None:             # <<<<<<<<<<<<<<
 * 
 *             (<__pyx_buffer *> &self.view).obj = NULL
*/
  __pyx_t_1 = (((Py_buffer *)(&__pyx_v_self->view))->obj == Py_None);
  if (__pyx_t_1) {

    /* "View.MemoryView":391
 *         elif (<__pyx_buffer *> &self.view).obj == Py_None:
 * 
 *             (<__pyx_buffer *> &self.view).obj = NULL             # <<<<<<<<<<<<<<
 *             Py_DECREF(Py_None)
 * 
*/
    ((Py_buffer *)(&__pyx_v_self->view))->obj = NULL;

    /* "View.MemoryView":392
 * 
 *             (<__pyx_buffer *> &self.view).obj = NULL
 *             Py_DECREF(Py_None)             # <<<<<<<<<<<<<<
 * 
 *         cdef int i
*/
    Py_DECREF(Py_None);

    /* "View.MemoryView":389
 *         if self.obj is not None:
 *             PyBuffer_Release(&self.view)
 *         elif (<__pyx_buffer *> &self.view).obj == Py_None:             # <<<<<<<<<<<<<<
 * 
 *             (<__pyx_buffer *> &self.view).obj = NULL
*/
  }
  __pyx_L3:;

  /* "View.MemoryView":396
 *         cdef int i
 *         global __pyx_memoryview_thread_locks_used
 *         if self.lock != NULL:             # <<<<<<<<<<<<<<
 *             for i in range(0 if __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING() else __pyx_memoryview_thread_locks_used):
 *                 if __pyx_memoryview_thread_locks[i] is self.lock:
*/
  __pyx_t_1 = (__pyx_v_self->lock != NULL);
  if (__pyx_t_1) {

    /* "View.MemoryView":397
 *         global __pyx_memoryview_thread_locks_used
 *         if self.lock != NULL:
 *             for i in range(0 if __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING() else __pyx_memoryview_thread_locks_used):             # <<<<<<<<<<<<<<
 *                 if __pyx_memoryview_thread_locks[i] is self.lock:
 *                     __pyx_memoryview_thread_locks_used -= 1
*/
    __pyx_t_1 = __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING();
    if (__pyx_t_1) {
      __pyx_t_2 = 0;
    } else {
      __pyx_t_2 = __pyx_memoryview_thread_locks_used;
    }
    __pyx_t_3 = __pyx_t_2;
    for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
      __pyx_v_i = __pyx_t_4;

      /* "View.MemoryView":398
 *         if self.lock != NULL:
 *             for i in range(0 if __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING() else __pyx_memoryview_thread_locks_used):
 *                 if __pyx_memoryview_thread_locks[i] is self.lock:             # <<<<<<<<<<<<<<
 *                     __pyx_memoryview_thread_locks_used -= 1
 *                     if i != __pyx_memoryview_thread_locks_used:
*/
      __pyx_t_1 = ((__pyx_memoryview_thread_locks[__pyx_v_i]) == __pyx_v_self->lock);
      if (__pyx_t_1) {

        /* "View.MemoryView":399
 *             for i in range(0 if __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING() else __pyx_memoryview_thread_locks_used):
 *                 if __pyx_memoryview_thread_locks[i] is self.lock:
 *                     __pyx_memoryview_thread_locks_used -= 1             # <<<<<<<<<<<<<<
 *                     if i != __pyx_memoryview_thread_locks_used:
 *                         __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
*/
        __pyx_memoryview_thread_locks_used = (__pyx_memoryview_thread_locks_used - 1);

        /* "View.MemoryView":400
 *                 if __pyx_memoryview_thread_locks[i] is self.lock:
 *                     __pyx_memoryview_thread_locks_used -= 1
 *                     if i != __pyx_memoryview_thread_locks_used:             # <<<<<<<<<<<<<<
 *                         __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
 *                             __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
*/
        __pyx_t_1 = (__pyx_v_i != __pyx_memoryview_thread_locks_used);
        if (__pyx_t_1) {

          /* "View.MemoryView":402
 *                     if i != __pyx_memoryview_thread_locks_used:
 *                         __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
 *                             __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])             # <<<<<<<<<<<<<<
 *                     break
 *             else:
*/
          __pyx_t_5 = (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]);
          __pyx_t_6 = (__pyx_memoryview_thread_locks[__pyx_v_i]);

          /* "View.MemoryView":401
 *                     __pyx_memoryview_thread_locks_used -= 1
 *                     if i != __pyx_memoryview_thread_locks_used:
 *                         __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (             # <<<<<<<<<<<<<<
 *                             __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
 *                     break
*/
          (__pyx_memoryview_thread_locks[__pyx_v_i]) = __pyx_t_5;
          (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]) = __pyx_t_6;

          /* "View.MemoryView":400
 *                 if __pyx_memoryview_thread_locks[i] is self.lock:
 *                     __pyx_memoryview_thread_locks_used -= 1
 *                     if i != __pyx_memoryview_thread_locks_used:             # <<<<<<<<<<<<<<
 *                         __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
 *                             __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
*/
        }

        /* "View.MemoryView":403
 *                         __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
 *                             __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
 *                     break             # <<<<<<<<<<<<<<
 *             else:
 *                 PyThread_free_lock(self.lock)
*/
        goto __pyx_L6_break;

        /* "View.MemoryView":398
 *         if self.lock != NULL:
 *             for i in range(0 if __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING() else __pyx_memoryview_thread_locks_used):
 *                 if __pyx_memoryview_thread_locks[i] is self.lock:             # <<<<<<<<<<<<<<
 *                     __pyx_memoryview_thread_locks_used -= 1
 *                     if i != __pyx_memoryview_thread_locks_used:
*/
      }
    }
    /*else*/ {

      /* "View.MemoryView":405
 *                     break
 *             else:
 *                 PyThread_free_lock(self.lock)             # <<<<<<<<<<<<<<
 * 
 *     cdef char *get_item_pointer(memoryview self, object index) except NULL:
*/
      PyThread_free_lock(__pyx_v_self->lock);
    }
    __pyx_L6_break:;

    /* "View.MemoryView":396
 *         cdef int i
 *         global __pyx_memoryview_thread_locks_used
 *         if self.lock != NULL:             # <<<<<<<<<<<<<<
 *             for i in range(0 if __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING() else __pyx_memoryview_thread_locks_used):
 *                 if __pyx_memoryview_thread_locks[i] is self.lock:
*/
  }

  /* "View.MemoryView":386
 *         self.typeinfo = NULL
 * 
 *     def __dealloc__(memoryview self):             # <<<<<<<<<<<<<<
 *         if self.obj is not None:
 *             PyBuffer_Release(&self.view)
*/

  /* function exit code */
}

/* "View.MemoryView":407
 *                 PyThread_free_lock(self.lock)
 * 
 *     cdef char *get_item_pointer(memoryview self, object index) except NULL:             # <<<<<<<<<<<<<<
 *         cdef Py_ssize_t dim
 *         cdef char *itemp = <char *> self.view.buf
*/

static char *__pyx_memoryview_get_item_pointer(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index) {
  Py_ssize_t __pyx_v_dim;
  char *__pyx_v_itemp;
  PyObject *__pyx_v_idx = NULL;
  char *__pyx_r;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  char *__pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_item_pointer", 0);

  /* "View.MemoryView":409
 *     cdef char *get_item_pointer(memoryview self, object index) except NULL:
 *         cdef Py_ssize_t dim
 *         cdef char *itemp = <char *> self.view.buf             # <<<<<<<<<<<<<<
 * 
 *         for dim, idx in enumerate(index):
*/
  __pyx_v_itemp = ((char *)__pyx_v_self->view.buf);

  /* "View.MemoryView":411
 *         cdef char *itemp = <char *> self.view.buf
 * 
 *         for dim, idx in enumerate(index):             # <<<<<<<<<<<<<<
 *             itemp = pybuffer_index(&self.view, itemp, idx, dim)
 * 
*/
  __pyx_t_1 = 0;
  if (likely(PyList_CheckExact(__pyx_v_index)) || PyTuple_CheckExact(__pyx_v_index)) {
    __pyx_t_2 = __pyx_v_index; __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_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 411, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 411, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
          #if !CYTHON_ASSUME_SAFE_SIZE
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 411, __pyx_L1_error)
          #endif
          if (__pyx_t_3 >= __pyx_temp) break;
        }
        __pyx_t_5 = __Pyx_PyList_GetItemRefFast(__pyx_t_2, __pyx_t_3, __Pyx_ReferenceSharing_OwnStrongReference);
        ++__pyx_t_3;
      } else {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
          #if !CYTHON_ASSUME_SAFE_SIZE
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 411, __pyx_L1_error)
          #endif
          if (__pyx_t_3 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_5 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3));
        #else
        __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3);
        #endif
        ++__pyx_t_3;
      }
      if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 411, __pyx_L1_error)
    } else {
      __pyx_t_5 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_5)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(1, 411, __pyx_L1_error)
          PyErr_Clear();
        }
        break;
      }
    }
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_v_dim = __pyx_t_1;
    __pyx_t_1 = (__pyx_t_1 + 1);

    /* "View.MemoryView":412
 * 
 *         for dim, idx in enumerate(index):
 *             itemp = pybuffer_index(&self.view, itemp, idx, dim)             # <<<<<<<<<<<<<<
 * 
 *         return itemp
*/
    __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_v_idx); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 412, __pyx_L1_error)
    __pyx_t_7 = __pyx_pybuffer_index((&__pyx_v_self->view), __pyx_v_itemp, __pyx_t_6, __pyx_v_dim); if (unlikely(__pyx_t_7 == ((void *)NULL))) __PYX_ERR(1, 412, __pyx_L1_error)
    __pyx_v_itemp = __pyx_t_7;

    /* "View.MemoryView":411
 *         cdef char *itemp = <char *> self.view.buf
 * 
 *         for dim, idx in enumerate(index):             # <<<<<<<<<<<<<<
 *             itemp = pybuffer_index(&self.view, itemp, idx, dim)
 * 
*/
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "View.MemoryView":414
 *             itemp = pybuffer_index(&self.view, itemp, idx, dim)
 * 
 *         return itemp             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_r = __pyx_v_itemp;
  goto __pyx_L0;

  /* "View.MemoryView":407
 *                 PyThread_free_lock(self.lock)
 * 
 *     cdef char *get_item_pointer(memoryview self, object index) except NULL:             # <<<<<<<<<<<<<<
 *         cdef Py_ssize_t dim
 *         cdef char *itemp = <char *> self.view.buf
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("View.MemoryView.memoryview.get_item_pointer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_idx);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":417
 * 
 * 
 *     def __getitem__(memoryview self, object index):             # <<<<<<<<<<<<<<
 *         if index is Ellipsis:
 *             return self
*/

/* Python wrapper */
static PyObject *__pyx_memoryview___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index); /*proto*/
static PyObject *__pyx_memoryview___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((PyObject *)__pyx_v_index));

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

static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index) {
  PyObject *__pyx_v_have_slices = NULL;
  PyObject *__pyx_v_indices = NULL;
  char *__pyx_v_itemp;
  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;
  char *__pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__getitem__", 0);

  /* "View.MemoryView":418
 * 
 *     def __getitem__(memoryview self, object index):
 *         if index is Ellipsis:             # <<<<<<<<<<<<<<
 *             return self
 * 
*/
  __pyx_t_1 = (__pyx_v_index == __pyx_builtin_Ellipsis);
  if (__pyx_t_1) {

    /* "View.MemoryView":419
 *     def __getitem__(memoryview self, object index):
 *         if index is Ellipsis:
 *             return self             # <<<<<<<<<<<<<<
 * 
 *         have_slices, indices = _unellipsify(index, self.view.ndim)
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF((PyObject *)__pyx_v_self);
    __pyx_r = ((PyObject *)__pyx_v_self);
    goto __pyx_L0;

    /* "View.MemoryView":418
 * 
 *     def __getitem__(memoryview self, object index):
 *         if index is Ellipsis:             # <<<<<<<<<<<<<<
 *             return self
 * 
*/
  }

  /* "View.MemoryView":421
 *             return self
 * 
 *         have_slices, indices = _unellipsify(index, self.view.ndim)             # <<<<<<<<<<<<<<
 * 
 *         cdef char *itemp
*/
  __pyx_t_2 = _unellipsify(__pyx_v_index, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 421, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (likely(__pyx_t_2 != Py_None)) {
    PyObject* sequence = __pyx_t_2;
    Py_ssize_t size = __Pyx_PyTuple_GET_SIZE(sequence);
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(1, 421, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1);
    __Pyx_INCREF(__pyx_t_4);
    #else
    __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 421, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 421, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    #endif
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else {
    __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(1, 421, __pyx_L1_error)
  }
  __pyx_v_have_slices = __pyx_t_3;
  __pyx_t_3 = 0;
  __pyx_v_indices = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "View.MemoryView":424
 * 
 *         cdef char *itemp
 *         if have_slices:             # <<<<<<<<<<<<<<
 *             return memview_slice(self, indices)
 *         else:
*/
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_have_slices); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 424, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "View.MemoryView":425
 *         cdef char *itemp
 *         if have_slices:
 *             return memview_slice(self, indices)             # <<<<<<<<<<<<<<
 *         else:
 *             itemp = self.get_item_pointer(indices)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = ((PyObject *)__pyx_memview_slice(__pyx_v_self, __pyx_v_indices)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 425, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "View.MemoryView":424
 * 
 *         cdef char *itemp
 *         if have_slices:             # <<<<<<<<<<<<<<
 *             return memview_slice(self, indices)
 *         else:
*/
  }

  /* "View.MemoryView":427
 *             return memview_slice(self, indices)
 *         else:
 *             itemp = self.get_item_pointer(indices)             # <<<<<<<<<<<<<<
 *             return self.convert_item_to_object(itemp)
 * 
*/
  /*else*/ {
    __pyx_t_5 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->get_item_pointer(__pyx_v_self, __pyx_v_indices); if (unlikely(__pyx_t_5 == ((void *)NULL))) __PYX_ERR(1, 427, __pyx_L1_error)
    __pyx_v_itemp = __pyx_t_5;

    /* "View.MemoryView":428
 *         else:
 *             itemp = self.get_item_pointer(indices)
 *             return self.convert_item_to_object(itemp)             # <<<<<<<<<<<<<<
 * 
 *     def __setitem__(memoryview self, object index, object value):
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->convert_item_to_object(__pyx_v_self, __pyx_v_itemp); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 428, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

  /* "View.MemoryView":417
 * 
 * 
 *     def __getitem__(memoryview self, object index):             # <<<<<<<<<<<<<<
 *         if index is Ellipsis:
 *             return self
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("View.MemoryView.memoryview.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_have_slices);
  __Pyx_XDECREF(__pyx_v_indices);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":430
 *             return self.convert_item_to_object(itemp)
 * 
 *     def __setitem__(memoryview self, object index, object value):             # <<<<<<<<<<<<<<
 *         if self.view.readonly:
 *             raise TypeError, "Cannot assign to read-only memoryview"
*/

/* Python wrapper */
static int __pyx_memoryview___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /*proto*/
static int __pyx_memoryview___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setitem__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((PyObject *)__pyx_v_index), ((PyObject *)__pyx_v_value));

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

static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) {
  PyObject *__pyx_v_have_slices = NULL;
  PyObject *__pyx_v_obj = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setitem__", 0);
  __Pyx_INCREF(__pyx_v_index);

  /* "View.MemoryView":431
 * 
 *     def __setitem__(memoryview self, object index, object value):
 *         if self.view.readonly:             # <<<<<<<<<<<<<<
 *             raise TypeError, "Cannot assign to read-only memoryview"
 * 
*/
  if (unlikely(__pyx_v_self->view.readonly)) {

    /* "View.MemoryView":432
 *     def __setitem__(memoryview self, object index, object value):
 *         if self.view.readonly:
 *             raise TypeError, "Cannot assign to read-only memoryview"             # <<<<<<<<<<<<<<
 * 
 *         have_slices, index = _unellipsify(index, self.view.ndim)
*/
    __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_Cannot_assign_to_read_only_memor, 0, 0);
    __PYX_ERR(1, 432, __pyx_L1_error)

    /* "View.MemoryView":431
 * 
 *     def __setitem__(memoryview self, object index, object value):
 *         if self.view.readonly:             # <<<<<<<<<<<<<<
 *             raise TypeError, "Cannot assign to read-only memoryview"
 * 
*/
  }

  /* "View.MemoryView":434
 *             raise TypeError, "Cannot assign to read-only memoryview"
 * 
 *         have_slices, index = _unellipsify(index, self.view.ndim)             # <<<<<<<<<<<<<<
 * 
 *         if have_slices:
*/
  __pyx_t_1 = _unellipsify(__pyx_v_index, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 434, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (likely(__pyx_t_1 != Py_None)) {
    PyObject* sequence = __pyx_t_1;
    Py_ssize_t size = __Pyx_PyTuple_GET_SIZE(sequence);
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(1, 434, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1);
    __Pyx_INCREF(__pyx_t_3);
    #else
    __pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 434, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 434, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    #endif
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else {
    __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(1, 434, __pyx_L1_error)
  }
  __pyx_v_have_slices = __pyx_t_2;
  __pyx_t_2 = 0;
  __Pyx_DECREF_SET(__pyx_v_index, __pyx_t_3);
  __pyx_t_3 = 0;

  /* "View.MemoryView":436
 *         have_slices, index = _unellipsify(index, self.view.ndim)
 * 
 *         if have_slices:             # <<<<<<<<<<<<<<
 *             obj = self.is_slice(value)
 *             if obj is not None:
*/
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_have_slices); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(1, 436, __pyx_L1_error)
  if (__pyx_t_4) {

    /* "View.MemoryView":437
 * 
 *         if have_slices:
 *             obj = self.is_slice(value)             # <<<<<<<<<<<<<<
 *             if obj is not None:
 *                 self.setitem_slice_assignment(self[index], obj)
*/
    __pyx_t_1 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->is_slice(__pyx_v_self, __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 437, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_obj = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "View.MemoryView":438
 *         if have_slices:
 *             obj = self.is_slice(value)
 *             if obj is not None:             # <<<<<<<<<<<<<<
 *                 self.setitem_slice_assignment(self[index], obj)
 *             else:
*/
    __pyx_t_4 = (__pyx_v_obj != Py_None);
    if (__pyx_t_4) {

      /* "View.MemoryView":439
 *             obj = self.is_slice(value)
 *             if obj is not None:
 *                 self.setitem_slice_assignment(self[index], obj)             # <<<<<<<<<<<<<<
 *             else:
 *                 self.setitem_slice_assign_scalar(self[index], value)
*/
      __pyx_t_1 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_v_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 439, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_slice_assignment(__pyx_v_self, __pyx_t_1, __pyx_v_obj); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 439, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "View.MemoryView":438
 *         if have_slices:
 *             obj = self.is_slice(value)
 *             if obj is not None:             # <<<<<<<<<<<<<<
 *                 self.setitem_slice_assignment(self[index], obj)
 *             else:
*/
      goto __pyx_L5;
    }

    /* "View.MemoryView":441
 *                 self.setitem_slice_assignment(self[index], obj)
 *             else:
 *                 self.setitem_slice_assign_scalar(self[index], value)             # <<<<<<<<<<<<<<
 *         else:
 *             self.setitem_indexed(index, value)
*/
    /*else*/ {
      __pyx_t_3 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_v_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 441, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_memoryview_type))))) __PYX_ERR(1, 441, __pyx_L1_error)
      __pyx_t_1 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_slice_assign_scalar(__pyx_v_self, ((struct __pyx_memoryview_obj *)__pyx_t_3), __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 441, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __pyx_L5:;

    /* "View.MemoryView":436
 *         have_slices, index = _unellipsify(index, self.view.ndim)
 * 
 *         if have_slices:             # <<<<<<<<<<<<<<
 *             obj = self.is_slice(value)
 *             if obj is not None:
*/
    goto __pyx_L4;
  }

  /* "View.MemoryView":443
 *                 self.setitem_slice_assign_scalar(self[index], value)
 *         else:
 *             self.setitem_indexed(index, value)             # <<<<<<<<<<<<<<
 * 
 *     cdef is_slice(self, obj):
*/
  /*else*/ {
    __pyx_t_1 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_indexed(__pyx_v_self, __pyx_v_index, __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 443, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __pyx_L4:;

  /* "View.MemoryView":430
 *             return self.convert_item_to_object(itemp)
 * 
 *     def __setitem__(memoryview self, object index, object value):             # <<<<<<<<<<<<<<
 *         if self.view.readonly:
 *             raise TypeError, "Cannot assign to read-only memoryview"
*/

  /* 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("View.MemoryView.memoryview.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_have_slices);
  __Pyx_XDECREF(__pyx_v_obj);
  __Pyx_XDECREF(__pyx_v_index);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":445
 *             self.setitem_indexed(index, value)
 * 
 *     cdef is_slice(self, obj):             # <<<<<<<<<<<<<<
 *         if not isinstance(obj, memoryview):
 *             try:
*/

static PyObject *__pyx_memoryview_is_slice(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  size_t __pyx_t_10;
  int __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_slice", 0);
  __Pyx_INCREF(__pyx_v_obj);

  /* "View.MemoryView":446
 * 
 *     cdef is_slice(self, obj):
 *         if not isinstance(obj, memoryview):             # <<<<<<<<<<<<<<
 *             try:
 *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
*/
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_obj, __pyx_mstate_global->__pyx_memoryview_type); 
  __pyx_t_2 = (!__pyx_t_1);
  if (__pyx_t_2) {

    /* "View.MemoryView":447
 *     cdef is_slice(self, obj):
 *         if not isinstance(obj, memoryview):
 *             try:             # <<<<<<<<<<<<<<
 *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
 *                                  self.dtype_is_object)
*/
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
      __Pyx_XGOTREF(__pyx_t_3);
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_5);
      /*try:*/ {

        /* "View.MemoryView":448
 *         if not isinstance(obj, memoryview):
 *             try:
 *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,             # <<<<<<<<<<<<<<
 *                                  self.dtype_is_object)
 *             except TypeError:
*/
        __pyx_t_7 = NULL;
        __pyx_t_8 = __Pyx_PyLong_From_int(((__pyx_v_self->flags & (~PyBUF_WRITABLE)) | PyBUF_ANY_CONTIGUOUS)); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 448, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_8);

        /* "View.MemoryView":449
 *             try:
 *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
 *                                  self.dtype_is_object)             # <<<<<<<<<<<<<<
 *             except TypeError:
 *                 return None
*/
        __pyx_t_9 = __Pyx_PyBool_FromLong(__pyx_v_self->dtype_is_object); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 449, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_10 = 1;
        {
          PyObject *__pyx_callargs[4] = {__pyx_t_7, __pyx_v_obj, __pyx_t_8, __pyx_t_9};
          __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_memoryview_type, __pyx_callargs+__pyx_t_10, (4-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 448, __pyx_L4_error)
          __Pyx_GOTREF((PyObject *)__pyx_t_6);
        }
        __Pyx_DECREF_SET(__pyx_v_obj, ((PyObject *)__pyx_t_6));
        __pyx_t_6 = 0;

        /* "View.MemoryView":447
 *     cdef is_slice(self, obj):
 *         if not isinstance(obj, memoryview):
 *             try:             # <<<<<<<<<<<<<<
 *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
 *                                  self.dtype_is_object)
*/
      }
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      goto __pyx_L9_try_end;
      __pyx_L4_error:;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

      /* "View.MemoryView":450
 *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
 *                                  self.dtype_is_object)
 *             except TypeError:             # <<<<<<<<<<<<<<
 *                 return None
 * 
*/
      __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_TypeError))));
      if (__pyx_t_11) {
        __Pyx_ErrRestore(0,0,0);

        /* "View.MemoryView":451
 *                                  self.dtype_is_object)
 *             except TypeError:
 *                 return None             # <<<<<<<<<<<<<<
 * 
 *         return obj
*/
        __Pyx_XDECREF(__pyx_r);
        __pyx_r = Py_None; __Pyx_INCREF(Py_None);
        goto __pyx_L7_except_return;
      }
      goto __pyx_L6_except_error;

      /* "View.MemoryView":447
 *     cdef is_slice(self, obj):
 *         if not isinstance(obj, memoryview):
 *             try:             # <<<<<<<<<<<<<<
 *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
 *                                  self.dtype_is_object)
*/
      __pyx_L6_except_error:;
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
      goto __pyx_L1_error;
      __pyx_L7_except_return:;
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
      goto __pyx_L0;
      __pyx_L9_try_end:;
    }

    /* "View.MemoryView":446
 * 
 *     cdef is_slice(self, obj):
 *         if not isinstance(obj, memoryview):             # <<<<<<<<<<<<<<
 *             try:
 *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
*/
  }

  /* "View.MemoryView":453
 *                 return None
 * 
 *         return obj             # <<<<<<<<<<<<<<
 * 
 *     cdef setitem_slice_assignment(self, dst, src):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_obj);
  __pyx_r = __pyx_v_obj;
  goto __pyx_L0;

  /* "View.MemoryView":445
 *             self.setitem_indexed(index, value)
 * 
 *     cdef is_slice(self, obj):             # <<<<<<<<<<<<<<
 *         if not isinstance(obj, memoryview):
 *             try:
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("View.MemoryView.memoryview.is_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_obj);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":455
 *         return obj
 * 
 *     cdef setitem_slice_assignment(self, dst, src):             # <<<<<<<<<<<<<<
 *         cdef __Pyx_memviewslice dst_slice
 *         cdef __Pyx_memviewslice src_slice
*/

static PyObject *__pyx_memoryview_setitem_slice_assignment(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_dst, PyObject *__pyx_v_src) {
  __Pyx_memviewslice __pyx_v_dst_slice;
  __Pyx_memviewslice __pyx_v_src_slice;
  __Pyx_memviewslice __pyx_v_msrc;
  __Pyx_memviewslice __pyx_v_mdst;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_memviewslice *__pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("setitem_slice_assignment", 0);

  /* "View.MemoryView":458
 *         cdef __Pyx_memviewslice dst_slice
 *         cdef __Pyx_memviewslice src_slice
 *         cdef __Pyx_memviewslice msrc = get_slice_from_memview(src, &src_slice)[0]             # <<<<<<<<<<<<<<
 *         cdef __Pyx_memviewslice mdst = get_slice_from_memview(dst, &dst_slice)[0]
 * 
*/
  if (!(likely(((__pyx_v_src) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_src, __pyx_mstate_global->__pyx_memoryview_type))))) __PYX_ERR(1, 458, __pyx_L1_error)
  __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(((struct __pyx_memoryview_obj *)__pyx_v_src), (&__pyx_v_src_slice)); if (unlikely(__pyx_t_1 == ((void *)NULL))) __PYX_ERR(1, 458, __pyx_L1_error)
  __pyx_v_msrc = (__pyx_t_1[0]);

  /* "View.MemoryView":459
 *         cdef __Pyx_memviewslice src_slice
 *         cdef __Pyx_memviewslice msrc = get_slice_from_memview(src, &src_slice)[0]
 *         cdef __Pyx_memviewslice mdst = get_slice_from_memview(dst, &dst_slice)[0]             # <<<<<<<<<<<<<<
 * 
 *         memoryview_copy_contents(msrc, mdst, src.ndim, dst.ndim, self.dtype_is_object)
*/
  if (!(likely(((__pyx_v_dst) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dst, __pyx_mstate_global->__pyx_memoryview_type))))) __PYX_ERR(1, 459, __pyx_L1_error)
  __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(((struct __pyx_memoryview_obj *)__pyx_v_dst), (&__pyx_v_dst_slice)); if (unlikely(__pyx_t_1 == ((void *)NULL))) __PYX_ERR(1, 459, __pyx_L1_error)
  __pyx_v_mdst = (__pyx_t_1[0]);

  /* "View.MemoryView":461
 *         cdef __Pyx_memviewslice mdst = get_slice_from_memview(dst, &dst_slice)[0]
 * 
 *         memoryview_copy_contents(msrc, mdst, src.ndim, dst.ndim, self.dtype_is_object)             # <<<<<<<<<<<<<<
 * 
 *     cdef setitem_slice_assign_scalar(self, memoryview dst, value):
*/
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_src, __pyx_mstate_global->__pyx_n_u_ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 461, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyLong_As_int(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 461, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_dst, __pyx_mstate_global->__pyx_n_u_ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 461, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyLong_As_int(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 461, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = __pyx_memoryview_copy_contents(__pyx_v_msrc, __pyx_v_mdst, __pyx_t_3, __pyx_t_4, __pyx_v_self->dtype_is_object); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 461, __pyx_L1_error)

  /* "View.MemoryView":455
 *         return obj
 * 
 *     cdef setitem_slice_assignment(self, dst, src):             # <<<<<<<<<<<<<<
 *         cdef __Pyx_memviewslice dst_slice
 *         cdef __Pyx_memviewslice src_slice
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("View.MemoryView.memoryview.setitem_slice_assignment", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":463
 *         memoryview_copy_contents(msrc, mdst, src.ndim, dst.ndim, self.dtype_is_object)
 * 
 *     cdef setitem_slice_assign_scalar(self, memoryview dst, value):             # <<<<<<<<<<<<<<
 *         cdef int array[128]
 *         cdef void *tmp = NULL
*/

static PyObject *__pyx_memoryview_setitem_slice_assign_scalar(struct __pyx_memoryview_obj *__pyx_v_self, struct __pyx_memoryview_obj *__pyx_v_dst, PyObject *__pyx_v_value) {
  int __pyx_v_array[128];
  void *__pyx_v_tmp;
  void *__pyx_v_item;
  __Pyx_memviewslice *__pyx_v_dst_slice;
  __Pyx_memviewslice __pyx_v_tmp_slice;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_memviewslice *__pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  char const *__pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("setitem_slice_assign_scalar", 0);

  /* "View.MemoryView":465
 *     cdef setitem_slice_assign_scalar(self, memoryview dst, value):
 *         cdef int array[128]
 *         cdef void *tmp = NULL             # <<<<<<<<<<<<<<
 *         cdef void *item
 * 
*/
  __pyx_v_tmp = NULL;

  /* "View.MemoryView":470
 *         cdef __Pyx_memviewslice *dst_slice
 *         cdef __Pyx_memviewslice tmp_slice
 *         dst_slice = get_slice_from_memview(dst, &tmp_slice)             # <<<<<<<<<<<<<<
 * 
 *         if <size_t>self.view.itemsize > sizeof(array):
*/
  __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_dst, (&__pyx_v_tmp_slice)); if (unlikely(__pyx_t_1 == ((void *)NULL))) __PYX_ERR(1, 470, __pyx_L1_error)
  __pyx_v_dst_slice = __pyx_t_1;

  /* "View.MemoryView":472
 *         dst_slice = get_slice_from_memview(dst, &tmp_slice)
 * 
 *         if <size_t>self.view.itemsize > sizeof(array):             # <<<<<<<<<<<<<<
 *             tmp = PyMem_Malloc(self.view.itemsize)
 *             if tmp == NULL:
*/
  __pyx_t_2 = (((size_t)__pyx_v_self->view.itemsize) > (sizeof(__pyx_v_array)));
  if (__pyx_t_2) {

    /* "View.MemoryView":473
 * 
 *         if <size_t>self.view.itemsize > sizeof(array):
 *             tmp = PyMem_Malloc(self.view.itemsize)             # <<<<<<<<<<<<<<
 *             if tmp == NULL:
 *                 raise MemoryError
*/
    __pyx_v_tmp = PyMem_Malloc(__pyx_v_self->view.itemsize);

    /* "View.MemoryView":474
 *         if <size_t>self.view.itemsize > sizeof(array):
 *             tmp = PyMem_Malloc(self.view.itemsize)
 *             if tmp == NULL:             # <<<<<<<<<<<<<<
 *                 raise MemoryError
 *             item = tmp
*/
    __pyx_t_2 = (__pyx_v_tmp == NULL);
    if (unlikely(__pyx_t_2)) {

      /* "View.MemoryView":475
 *             tmp = PyMem_Malloc(self.view.itemsize)
 *             if tmp == NULL:
 *                 raise MemoryError             # <<<<<<<<<<<<<<
 *             item = tmp
 *         else:
*/
      PyErr_NoMemory(); __PYX_ERR(1, 475, __pyx_L1_error)

      /* "View.MemoryView":474
 *         if <size_t>self.view.itemsize > sizeof(array):
 *             tmp = PyMem_Malloc(self.view.itemsize)
 *             if tmp == NULL:             # <<<<<<<<<<<<<<
 *                 raise MemoryError
 *             item = tmp
*/
    }

    /* "View.MemoryView":476
 *             if tmp == NULL:
 *                 raise MemoryError
 *             item = tmp             # <<<<<<<<<<<<<<
 *         else:
 *             item = <void *> array
*/
    __pyx_v_item = __pyx_v_tmp;

    /* "View.MemoryView":472
 *         dst_slice = get_slice_from_memview(dst, &tmp_slice)
 * 
 *         if <size_t>self.view.itemsize > sizeof(array):             # <<<<<<<<<<<<<<
 *             tmp = PyMem_Malloc(self.view.itemsize)
 *             if tmp == NULL:
*/
    goto __pyx_L3;
  }

  /* "View.MemoryView":478
 *             item = tmp
 *         else:
 *             item = <void *> array             # <<<<<<<<<<<<<<
 * 
 *         try:
*/
  /*else*/ {
    __pyx_v_item = ((void *)__pyx_v_array);
  }
  __pyx_L3:;

  /* "View.MemoryView":480
 *             item = <void *> array
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             if self.dtype_is_object:
 *                 (<PyObject **> item)[0] = <PyObject *> value
*/
  /*try:*/ {

    /* "View.MemoryView":481
 * 
 *         try:
 *             if self.dtype_is_object:             # <<<<<<<<<<<<<<
 *                 (<PyObject **> item)[0] = <PyObject *> value
 *             else:
*/
    if (__pyx_v_self->dtype_is_object) {

      /* "View.MemoryView":482
 *         try:
 *             if self.dtype_is_object:
 *                 (<PyObject **> item)[0] = <PyObject *> value             # <<<<<<<<<<<<<<
 *             else:
 *                 self.assign_item_from_object(<char *> item, value)
*/
      (((PyObject **)__pyx_v_item)[0]) = ((PyObject *)__pyx_v_value);

      /* "View.MemoryView":481
 * 
 *         try:
 *             if self.dtype_is_object:             # <<<<<<<<<<<<<<
 *                 (<PyObject **> item)[0] = <PyObject *> value
 *             else:
*/
      goto __pyx_L8;
    }

    /* "View.MemoryView":484
 *                 (<PyObject **> item)[0] = <PyObject *> value
 *             else:
 *                 self.assign_item_from_object(<char *> item, value)             # <<<<<<<<<<<<<<
 * 
 * 
*/
    /*else*/ {
      __pyx_t_3 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->assign_item_from_object(__pyx_v_self, ((char *)__pyx_v_item), __pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 484, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __pyx_L8:;

    /* "View.MemoryView":488
 * 
 * 
 *             if self.view.suboffsets != NULL:             # <<<<<<<<<<<<<<
 *                 assert_direct_dimensions(self.view.suboffsets, self.view.ndim)
 *             slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize,
*/
    __pyx_t_2 = (__pyx_v_self->view.suboffsets != NULL);
    if (__pyx_t_2) {

      /* "View.MemoryView":489
 * 
 *             if self.view.suboffsets != NULL:
 *                 assert_direct_dimensions(self.view.suboffsets, self.view.ndim)             # <<<<<<<<<<<<<<
 *             slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize,
 *                                 item, self.dtype_is_object)
*/
      __pyx_t_4 = assert_direct_dimensions(__pyx_v_self->view.suboffsets, __pyx_v_self->view.ndim); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 489, __pyx_L6_error)

      /* "View.MemoryView":488
 * 
 * 
 *             if self.view.suboffsets != NULL:             # <<<<<<<<<<<<<<
 *                 assert_direct_dimensions(self.view.suboffsets, self.view.ndim)
 *             slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize,
*/
    }

    /* "View.MemoryView":490
 *             if self.view.suboffsets != NULL:
 *                 assert_direct_dimensions(self.view.suboffsets, self.view.ndim)
 *             slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize,             # <<<<<<<<<<<<<<
 *                                 item, self.dtype_is_object)
 *         finally:
*/
    __pyx_memoryview_slice_assign_scalar(__pyx_v_dst_slice, __pyx_v_dst->view.ndim, __pyx_v_self->view.itemsize, __pyx_v_item, __pyx_v_self->dtype_is_object);
  }

  /* "View.MemoryView":493
 *                                 item, self.dtype_is_object)
 *         finally:
 *             PyMem_Free(tmp)             # <<<<<<<<<<<<<<
 * 
 *     cdef setitem_indexed(self, index, value):
*/
  /*finally:*/ {
    /*normal exit:*/{
      PyMem_Free(__pyx_v_tmp);
      goto __pyx_L7;
    }
    __pyx_L6_error:;
    /*exception exit:*/{
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
       __Pyx_ExceptionSwap(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
      if ( unlikely(__Pyx_GetException(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9) < 0)) __Pyx_ErrFetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
      __Pyx_XGOTREF(__pyx_t_7);
      __Pyx_XGOTREF(__pyx_t_8);
      __Pyx_XGOTREF(__pyx_t_9);
      __Pyx_XGOTREF(__pyx_t_10);
      __Pyx_XGOTREF(__pyx_t_11);
      __Pyx_XGOTREF(__pyx_t_12);
      __pyx_t_4 = __pyx_lineno; __pyx_t_5 = __pyx_clineno; __pyx_t_6 = __pyx_filename;
      {
        PyMem_Free(__pyx_v_tmp);
      }
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_XGIVEREF(__pyx_t_11);
      __Pyx_XGIVEREF(__pyx_t_12);
      __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
      __Pyx_XGIVEREF(__pyx_t_7);
      __Pyx_XGIVEREF(__pyx_t_8);
      __Pyx_XGIVEREF(__pyx_t_9);
      __Pyx_ErrRestore(__pyx_t_7, __pyx_t_8, __pyx_t_9);
      __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0;
      __pyx_lineno = __pyx_t_4; __pyx_clineno = __pyx_t_5; __pyx_filename = __pyx_t_6;
      goto __pyx_L1_error;
    }
    __pyx_L7:;
  }

  /* "View.MemoryView":463
 *         memoryview_copy_contents(msrc, mdst, src.ndim, dst.ndim, self.dtype_is_object)
 * 
 *     cdef setitem_slice_assign_scalar(self, memoryview dst, value):             # <<<<<<<<<<<<<<
 *         cdef int array[128]
 *         cdef void *tmp = NULL
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("View.MemoryView.memoryview.setitem_slice_assign_scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":495
 *             PyMem_Free(tmp)
 * 
 *     cdef setitem_indexed(self, index, value):             # <<<<<<<<<<<<<<
 *         cdef char *itemp = self.get_item_pointer(index)
 *         self.assign_item_from_object(itemp, value)
*/

static PyObject *__pyx_memoryview_setitem_indexed(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) {
  char *__pyx_v_itemp;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  char *__pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("setitem_indexed", 0);

  /* "View.MemoryView":496
 * 
 *     cdef setitem_indexed(self, index, value):
 *         cdef char *itemp = self.get_item_pointer(index)             # <<<<<<<<<<<<<<
 *         self.assign_item_from_object(itemp, value)
 * 
*/
  __pyx_t_1 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->get_item_pointer(__pyx_v_self, __pyx_v_index); if (unlikely(__pyx_t_1 == ((void *)NULL))) __PYX_ERR(1, 496, __pyx_L1_error)
  __pyx_v_itemp = __pyx_t_1;

  /* "View.MemoryView":497
 *     cdef setitem_indexed(self, index, value):
 *         cdef char *itemp = self.get_item_pointer(index)
 *         self.assign_item_from_object(itemp, value)             # <<<<<<<<<<<<<<
 * 
 *     cdef convert_item_to_object(self, char *itemp):
*/
  __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->assign_item_from_object(__pyx_v_self, __pyx_v_itemp, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 497, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "View.MemoryView":495
 *             PyMem_Free(tmp)
 * 
 *     cdef setitem_indexed(self, index, value):             # <<<<<<<<<<<<<<
 *         cdef char *itemp = self.get_item_pointer(index)
 *         self.assign_item_from_object(itemp, value)
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("View.MemoryView.memoryview.setitem_indexed", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":499
 *         self.assign_item_from_object(itemp, value)
 * 
 *     cdef convert_item_to_object(self, char *itemp):             # <<<<<<<<<<<<<<
 *         """Only used if instantiated manually by the user, or if Cython doesn't
 *         know how to convert the type"""
*/

static PyObject *__pyx_memoryview_convert_item_to_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp) {
  PyObject *__pyx_v_struct = NULL;
  PyObject *__pyx_v_bytesitem = 0;
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  size_t __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("convert_item_to_object", 0);

  /* "View.MemoryView":502
 *         """Only used if instantiated manually by the user, or if Cython doesn't
 *         know how to convert the type"""
 *         import struct             # <<<<<<<<<<<<<<
 *         cdef bytes bytesitem
 * 
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_struct, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 502, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_struct = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "View.MemoryView":505
 *         cdef bytes bytesitem
 * 
 *         bytesitem = itemp[:self.view.itemsize]             # <<<<<<<<<<<<<<
 *         try:
 *             result = struct.unpack(self.view.format, bytesitem)
*/
  __pyx_t_1 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_itemp + 0, __pyx_v_self->view.itemsize - 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 505, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_bytesitem = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "View.MemoryView":506
 * 
 *         bytesitem = itemp[:self.view.itemsize]
 *         try:             # <<<<<<<<<<<<<<
 *             result = struct.unpack(self.view.format, bytesitem)
 *         except struct.error:
*/
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_4);
    /*try:*/ {

      /* "View.MemoryView":507
 *         bytesitem = itemp[:self.view.itemsize]
 *         try:
 *             result = struct.unpack(self.view.format, bytesitem)             # <<<<<<<<<<<<<<
 *         except struct.error:
 *             raise ValueError, "Unable to convert item to object"
*/
      __pyx_t_5 = __pyx_v_struct;
      __Pyx_INCREF(__pyx_t_5);
      __pyx_t_6 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 507, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_t_6, __pyx_v_bytesitem};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_unpack, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 507, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_v_result = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "View.MemoryView":506
 * 
 *         bytesitem = itemp[:self.view.itemsize]
 *         try:             # <<<<<<<<<<<<<<
 *             result = struct.unpack(self.view.format, bytesitem)
 *         except struct.error:
*/
    }

    /* "View.MemoryView":511
 *             raise ValueError, "Unable to convert item to object"
 *         else:
 *             if len(self.view.format) == 1:             # <<<<<<<<<<<<<<
 *                 return result[0]
 *             return result
*/
    /*else:*/ {
      __pyx_t_8 = __Pyx_ssize_strlen(__pyx_v_self->view.format); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(1, 511, __pyx_L5_except_error)
      __pyx_t_9 = (__pyx_t_8 == 1);
      if (__pyx_t_9) {

        /* "View.MemoryView":512
 *         else:
 *             if len(self.view.format) == 1:
 *                 return result[0]             # <<<<<<<<<<<<<<
 *             return result
 * 
*/
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_result, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 512, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_r = __pyx_t_1;
        __pyx_t_1 = 0;
        goto __pyx_L6_except_return;

        /* "View.MemoryView":511
 *             raise ValueError, "Unable to convert item to object"
 *         else:
 *             if len(self.view.format) == 1:             # <<<<<<<<<<<<<<
 *                 return result[0]
 *             return result
*/
      }

      /* "View.MemoryView":513
 *             if len(self.view.format) == 1:
 *                 return result[0]
 *             return result             # <<<<<<<<<<<<<<
 * 
 *     cdef assign_item_from_object(self, char *itemp, object value):
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_result);
      __pyx_r = __pyx_v_result;
      goto __pyx_L6_except_return;
    }
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "View.MemoryView":508
 *         try:
 *             result = struct.unpack(self.view.format, bytesitem)
 *         except struct.error:             # <<<<<<<<<<<<<<
 *             raise ValueError, "Unable to convert item to object"
 *         else:
*/
    __Pyx_ErrFetch(&__pyx_t_1, &__pyx_t_6, &__pyx_t_5);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_mstate_global->__pyx_n_u_error); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 508, __pyx_L5_except_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_11 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_1, __pyx_t_10);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_ErrRestore(__pyx_t_1, __pyx_t_6, __pyx_t_5);
    __pyx_t_1 = 0; __pyx_t_6 = 0; __pyx_t_5 = 0;
    if (__pyx_t_11) {
      __Pyx_AddTraceback("View.MemoryView.memoryview.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_1) < 0) __PYX_ERR(1, 508, __pyx_L5_except_error)
      __Pyx_XGOTREF(__pyx_t_5);
      __Pyx_XGOTREF(__pyx_t_6);
      __Pyx_XGOTREF(__pyx_t_1);

      /* "View.MemoryView":509
 *             result = struct.unpack(self.view.format, bytesitem)
 *         except struct.error:
 *             raise ValueError, "Unable to convert item to object"             # <<<<<<<<<<<<<<
 *         else:
 *             if len(self.view.format) == 1:
*/
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_ValueError))), __pyx_mstate_global->__pyx_kp_u_Unable_to_convert_item_to_object, 0, 0);
      __PYX_ERR(1, 509, __pyx_L5_except_error)
    }
    goto __pyx_L5_except_error;

    /* "View.MemoryView":506
 * 
 *         bytesitem = itemp[:self.view.itemsize]
 *         try:             # <<<<<<<<<<<<<<
 *             result = struct.unpack(self.view.format, bytesitem)
 *         except struct.error:
*/
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    goto __pyx_L1_error;
    __pyx_L6_except_return:;
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    goto __pyx_L0;
  }

  /* "View.MemoryView":499
 *         self.assign_item_from_object(itemp, value)
 * 
 *     cdef convert_item_to_object(self, char *itemp):             # <<<<<<<<<<<<<<
 *         """Only used if instantiated manually by the user, or if Cython doesn't
 *         know how to convert the type"""
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("View.MemoryView.memoryview.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_struct);
  __Pyx_XDECREF(__pyx_v_bytesitem);
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":515
 *             return result
 * 
 *     cdef assign_item_from_object(self, char *itemp, object value):             # <<<<<<<<<<<<<<
 *         """Only used if instantiated manually by the user, or if Cython doesn't
 *         know how to convert the type"""
*/

static PyObject *__pyx_memoryview_assign_item_from_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value) {
  PyObject *__pyx_v_struct = NULL;
  char __pyx_v_c;
  PyObject *__pyx_v_bytesvalue = 0;
  Py_ssize_t __pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  size_t __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  char *__pyx_t_10;
  char *__pyx_t_11;
  Py_ssize_t __pyx_t_12;
  char *__pyx_t_13;
  char *__pyx_t_14;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("assign_item_from_object", 0);

  /* "View.MemoryView":518
 *         """Only used if instantiated manually by the user, or if Cython doesn't
 *         know how to convert the type"""
 *         import struct             # <<<<<<<<<<<<<<
 *         cdef char c
 *         cdef bytes bytesvalue
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_struct, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 518, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_struct = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "View.MemoryView":523
 *         cdef Py_ssize_t i
 * 
 *         if isinstance(value, tuple):             # <<<<<<<<<<<<<<
 *             bytesvalue = struct.pack(self.view.format, *value)
 *         else:
*/
  __pyx_t_3 = PyTuple_Check(__pyx_v_value); 
  if (__pyx_t_3) {

    /* "View.MemoryView":524
 * 
 *         if isinstance(value, tuple):
 *             bytesvalue = struct.pack(self.view.format, *value)             # <<<<<<<<<<<<<<
 *         else:
 *             bytesvalue = struct.pack(self.view.format, value)
*/
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_mstate_global->__pyx_n_u_pack); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 524, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 524, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 524, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_4);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4) != (0)) __PYX_ERR(1, 524, __pyx_L1_error);
    __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_v_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 524, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = PyNumber_Add(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 524, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 524, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_4))) __PYX_ERR(1, 524, __pyx_L1_error)
    __pyx_v_bytesvalue = ((PyObject*)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "View.MemoryView":523
 *         cdef Py_ssize_t i
 * 
 *         if isinstance(value, tuple):             # <<<<<<<<<<<<<<
 *             bytesvalue = struct.pack(self.view.format, *value)
 *         else:
*/
    goto __pyx_L3;
  }

  /* "View.MemoryView":526
 *             bytesvalue = struct.pack(self.view.format, *value)
 *         else:
 *             bytesvalue = struct.pack(self.view.format, value)             # <<<<<<<<<<<<<<
 * 
 *         for i, c in enumerate(bytesvalue):
*/
  /*else*/ {
    __pyx_t_6 = __pyx_v_struct;
    __Pyx_INCREF(__pyx_t_6);
    __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 526, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_7 = 0;
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_t_1, __pyx_v_value};
      __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_pack, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 526, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_4))) __PYX_ERR(1, 526, __pyx_L1_error)
    __pyx_v_bytesvalue = ((PyObject*)__pyx_t_4);
    __pyx_t_4 = 0;
  }
  __pyx_L3:;

  /* "View.MemoryView":528
 *             bytesvalue = struct.pack(self.view.format, value)
 * 
 *         for i, c in enumerate(bytesvalue):             # <<<<<<<<<<<<<<
 *             itemp[i] = c
 * 
*/
  __pyx_t_8 = 0;
  if (unlikely(__pyx_v_bytesvalue == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' is not iterable");
    __PYX_ERR(1, 528, __pyx_L1_error)
  }
  __Pyx_INCREF(__pyx_v_bytesvalue);
  __pyx_t_9 = __pyx_v_bytesvalue;
  __pyx_t_11 = __Pyx_PyBytes_AsWritableString(__pyx_t_9); if (unlikely(__pyx_t_11 == ((char *)NULL))) __PYX_ERR(1, 528, __pyx_L1_error)
  __pyx_t_12 = __Pyx_PyBytes_GET_SIZE(__pyx_t_9); if (unlikely(__pyx_t_12 == ((Py_ssize_t)-1))) __PYX_ERR(1, 528, __pyx_L1_error)
  __pyx_t_13 = (__pyx_t_11 + __pyx_t_12);
  for (__pyx_t_14 = __pyx_t_11; __pyx_t_14 < __pyx_t_13; __pyx_t_14++) {
    __pyx_t_10 = __pyx_t_14;
    __pyx_v_c = (__pyx_t_10[0]);

    /* "View.MemoryView":529
 * 
 *         for i, c in enumerate(bytesvalue):
 *             itemp[i] = c             # <<<<<<<<<<<<<<
 * 
 *     @cname('getbuffer')
*/
    __pyx_v_i = __pyx_t_8;

    /* "View.MemoryView":528
 *             bytesvalue = struct.pack(self.view.format, value)
 * 
 *         for i, c in enumerate(bytesvalue):             # <<<<<<<<<<<<<<
 *             itemp[i] = c
 * 
*/
    __pyx_t_8 = (__pyx_t_8 + 1);

    /* "View.MemoryView":529
 * 
 *         for i, c in enumerate(bytesvalue):
 *             itemp[i] = c             # <<<<<<<<<<<<<<
 * 
 *     @cname('getbuffer')
*/
    (__pyx_v_itemp[__pyx_v_i]) = __pyx_v_c;
  }
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "View.MemoryView":515
 *             return result
 * 
 *     cdef assign_item_from_object(self, char *itemp, object value):             # <<<<<<<<<<<<<<
 *         """Only used if instantiated manually by the user, or if Cython doesn't
 *         know how to convert the type"""
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("View.MemoryView.memoryview.assign_item_from_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_struct);
  __Pyx_XDECREF(__pyx_v_bytesvalue);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":531
 *             itemp[i] = c
 * 
 *     @cname('getbuffer')             # <<<<<<<<<<<<<<
 *     def __getbuffer__(self, Py_buffer *info, int flags):
 *         if flags & PyBUF_WRITABLE and self.view.readonly:
*/

/* Python wrapper */
CYTHON_UNUSED static int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
CYTHON_UNUSED static int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbuffer__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags));

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

static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbuffer__(struct __pyx_memoryview_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  Py_ssize_t *__pyx_t_3;
  char *__pyx_t_4;
  void *__pyx_t_5;
  int __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  if (unlikely(__pyx_v_info == NULL)) {
    PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete");
    return -1;
  }
  __Pyx_RefNannySetupContext("__getbuffer__", 0);
  __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(__pyx_v_info->obj);

  /* "View.MemoryView":533
 *     @cname('getbuffer')
 *     def __getbuffer__(self, Py_buffer *info, int flags):
 *         if flags & PyBUF_WRITABLE and self.view.readonly:             # <<<<<<<<<<<<<<
 *             raise ValueError, "Cannot create writable memory view from read-only memoryview"
 * 
*/
  __pyx_t_2 = ((__pyx_v_flags & PyBUF_WRITABLE) != 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_1 = __pyx_v_self->view.readonly;
  __pyx_L4_bool_binop_done:;
  if (unlikely(__pyx_t_1)) {

    /* "View.MemoryView":534
 *     def __getbuffer__(self, Py_buffer *info, int flags):
 *         if flags & PyBUF_WRITABLE and self.view.readonly:
 *             raise ValueError, "Cannot create writable memory view from read-only memoryview"             # <<<<<<<<<<<<<<
 * 
 *         if flags & PyBUF_ND:
*/
    __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_ValueError))), __pyx_mstate_global->__pyx_kp_u_Cannot_create_writable_memory_vi, 0, 0);
    __PYX_ERR(1, 534, __pyx_L1_error)

    /* "View.MemoryView":533
 *     @cname('getbuffer')
 *     def __getbuffer__(self, Py_buffer *info, int flags):
 *         if flags & PyBUF_WRITABLE and self.view.readonly:             # <<<<<<<<<<<<<<
 *             raise ValueError, "Cannot create writable memory view from read-only memoryview"
 * 
*/
  }

  /* "View.MemoryView":536
 *             raise ValueError, "Cannot create writable memory view from read-only memoryview"
 * 
 *         if flags & PyBUF_ND:             # <<<<<<<<<<<<<<
 *             info.shape = self.view.shape
 *         else:
*/
  __pyx_t_1 = ((__pyx_v_flags & PyBUF_ND) != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":537
 * 
 *         if flags & PyBUF_ND:
 *             info.shape = self.view.shape             # <<<<<<<<<<<<<<
 *         else:
 *             info.shape = NULL
*/
    __pyx_t_3 = __pyx_v_self->view.shape;
    __pyx_v_info->shape = __pyx_t_3;

    /* "View.MemoryView":536
 *             raise ValueError, "Cannot create writable memory view from read-only memoryview"
 * 
 *         if flags & PyBUF_ND:             # <<<<<<<<<<<<<<
 *             info.shape = self.view.shape
 *         else:
*/
    goto __pyx_L6;
  }

  /* "View.MemoryView":539
 *             info.shape = self.view.shape
 *         else:
 *             info.shape = NULL             # <<<<<<<<<<<<<<
 * 
 *         if flags & PyBUF_STRIDES:
*/
  /*else*/ {
    __pyx_v_info->shape = NULL;
  }
  __pyx_L6:;

  /* "View.MemoryView":541
 *             info.shape = NULL
 * 
 *         if flags & PyBUF_STRIDES:             # <<<<<<<<<<<<<<
 *             info.strides = self.view.strides
 *         else:
*/
  __pyx_t_1 = ((__pyx_v_flags & PyBUF_STRIDES) != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":542
 * 
 *         if flags & PyBUF_STRIDES:
 *             info.strides = self.view.strides             # <<<<<<<<<<<<<<
 *         else:
 *             info.strides = NULL
*/
    __pyx_t_3 = __pyx_v_self->view.strides;
    __pyx_v_info->strides = __pyx_t_3;

    /* "View.MemoryView":541
 *             info.shape = NULL
 * 
 *         if flags & PyBUF_STRIDES:             # <<<<<<<<<<<<<<
 *             info.strides = self.view.strides
 *         else:
*/
    goto __pyx_L7;
  }

  /* "View.MemoryView":544
 *             info.strides = self.view.strides
 *         else:
 *             info.strides = NULL             # <<<<<<<<<<<<<<
 * 
 *         if flags & PyBUF_INDIRECT:
*/
  /*else*/ {
    __pyx_v_info->strides = NULL;
  }
  __pyx_L7:;

  /* "View.MemoryView":546
 *             info.strides = NULL
 * 
 *         if flags & PyBUF_INDIRECT:             # <<<<<<<<<<<<<<
 *             info.suboffsets = self.view.suboffsets
 *         else:
*/
  __pyx_t_1 = ((__pyx_v_flags & PyBUF_INDIRECT) != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":547
 * 
 *         if flags & PyBUF_INDIRECT:
 *             info.suboffsets = self.view.suboffsets             # <<<<<<<<<<<<<<
 *         else:
 *             info.suboffsets = NULL
*/
    __pyx_t_3 = __pyx_v_self->view.suboffsets;
    __pyx_v_info->suboffsets = __pyx_t_3;

    /* "View.MemoryView":546
 *             info.strides = NULL
 * 
 *         if flags & PyBUF_INDIRECT:             # <<<<<<<<<<<<<<
 *             info.suboffsets = self.view.suboffsets
 *         else:
*/
    goto __pyx_L8;
  }

  /* "View.MemoryView":549
 *             info.suboffsets = self.view.suboffsets
 *         else:
 *             info.suboffsets = NULL             # <<<<<<<<<<<<<<
 * 
 *         if flags & PyBUF_FORMAT:
*/
  /*else*/ {
    __pyx_v_info->suboffsets = NULL;
  }
  __pyx_L8:;

  /* "View.MemoryView":551
 *             info.suboffsets = NULL
 * 
 *         if flags & PyBUF_FORMAT:             # <<<<<<<<<<<<<<
 *             info.format = self.view.format
 *         else:
*/
  __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":552
 * 
 *         if flags & PyBUF_FORMAT:
 *             info.format = self.view.format             # <<<<<<<<<<<<<<
 *         else:
 *             info.format = NULL
*/
    __pyx_t_4 = __pyx_v_self->view.format;
    __pyx_v_info->format = __pyx_t_4;

    /* "View.MemoryView":551
 *             info.suboffsets = NULL
 * 
 *         if flags & PyBUF_FORMAT:             # <<<<<<<<<<<<<<
 *             info.format = self.view.format
 *         else:
*/
    goto __pyx_L9;
  }

  /* "View.MemoryView":554
 *             info.format = self.view.format
 *         else:
 *             info.format = NULL             # <<<<<<<<<<<<<<
 * 
 *         info.buf = self.view.buf
*/
  /*else*/ {
    __pyx_v_info->format = NULL;
  }
  __pyx_L9:;

  /* "View.MemoryView":556
 *             info.format = NULL
 * 
 *         info.buf = self.view.buf             # <<<<<<<<<<<<<<
 *         info.ndim = self.view.ndim
 *         info.itemsize = self.view.itemsize
*/
  __pyx_t_5 = __pyx_v_self->view.buf;
  __pyx_v_info->buf = __pyx_t_5;

  /* "View.MemoryView":557
 * 
 *         info.buf = self.view.buf
 *         info.ndim = self.view.ndim             # <<<<<<<<<<<<<<
 *         info.itemsize = self.view.itemsize
 *         info.len = self.view.len
*/
  __pyx_t_6 = __pyx_v_self->view.ndim;
  __pyx_v_info->ndim = __pyx_t_6;

  /* "View.MemoryView":558
 *         info.buf = self.view.buf
 *         info.ndim = self.view.ndim
 *         info.itemsize = self.view.itemsize             # <<<<<<<<<<<<<<
 *         info.len = self.view.len
 *         info.readonly = self.view.readonly
*/
  __pyx_t_7 = __pyx_v_self->view.itemsize;
  __pyx_v_info->itemsize = __pyx_t_7;

  /* "View.MemoryView":559
 *         info.ndim = self.view.ndim
 *         info.itemsize = self.view.itemsize
 *         info.len = self.view.len             # <<<<<<<<<<<<<<
 *         info.readonly = self.view.readonly
 *         info.obj = self
*/
  __pyx_t_7 = __pyx_v_self->view.len;
  __pyx_v_info->len = __pyx_t_7;

  /* "View.MemoryView":560
 *         info.itemsize = self.view.itemsize
 *         info.len = self.view.len
 *         info.readonly = self.view.readonly             # <<<<<<<<<<<<<<
 *         info.obj = self
 * 
*/
  __pyx_t_1 = __pyx_v_self->view.readonly;
  __pyx_v_info->readonly = __pyx_t_1;

  /* "View.MemoryView":561
 *         info.len = self.view.len
 *         info.readonly = self.view.readonly
 *         info.obj = self             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_INCREF((PyObject *)__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self);
  __Pyx_GOTREF(__pyx_v_info->obj);
  __Pyx_DECREF(__pyx_v_info->obj);
  __pyx_v_info->obj = ((PyObject *)__pyx_v_self);

  /* "View.MemoryView":531
 *             itemp[i] = c
 * 
 *     @cname('getbuffer')             # <<<<<<<<<<<<<<
 *     def __getbuffer__(self, Py_buffer *info, int flags):
 *         if flags & PyBUF_WRITABLE and self.view.readonly:
*/

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("View.MemoryView.memoryview.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  if (__pyx_v_info->obj != NULL) {
    __Pyx_GOTREF(__pyx_v_info->obj);
    __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
  }
  goto __pyx_L2;
  __pyx_L0:;
  if (__pyx_v_info->obj == Py_None) {
    __Pyx_GOTREF(__pyx_v_info->obj);
    __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
  }
  __pyx_L2:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":564
 * 
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def T(self):
 *         cdef _memoryviewslice result = memoryview_copy(self)
*/

/* Python wrapper */
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_1T_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_1T_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));

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

static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
  struct __pyx_memoryviewslice_obj *__pyx_v_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "View.MemoryView":566
 *     @property
 *     def T(self):
 *         cdef _memoryviewslice result = memoryview_copy(self)             # <<<<<<<<<<<<<<
 *         transpose_memslice(&result.from_slice)
 *         return result
*/
  __pyx_t_1 = __pyx_memoryview_copy_object(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 566, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_memoryviewslice_type))))) __PYX_ERR(1, 566, __pyx_L1_error)
  __pyx_v_result = ((struct __pyx_memoryviewslice_obj *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "View.MemoryView":567
 *     def T(self):
 *         cdef _memoryviewslice result = memoryview_copy(self)
 *         transpose_memslice(&result.from_slice)             # <<<<<<<<<<<<<<
 *         return result
 * 
*/
  __pyx_t_2 = __pyx_memslice_transpose((&__pyx_v_result->from_slice)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(1, 567, __pyx_L1_error)

  /* "View.MemoryView":568
 *         cdef _memoryviewslice result = memoryview_copy(self)
 *         transpose_memslice(&result.from_slice)
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_result);
  __pyx_r = ((PyObject *)__pyx_v_result);
  goto __pyx_L0;

  /* "View.MemoryView":564
 * 
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def T(self):
 *         cdef _memoryviewslice result = memoryview_copy(self)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("View.MemoryView.memoryview.T.__get__", __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;
}

/* "View.MemoryView":570
 *         return result
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def base(self):
 *         return self._get_base()
*/

/* Python wrapper */
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4base_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4base_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));

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

static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "View.MemoryView":572
 *     @property
 *     def base(self):
 *         return self._get_base()             # <<<<<<<<<<<<<<
 * 
 *     cdef _get_base(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->_get_base(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 572, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":570
 *         return result
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def base(self):
 *         return self._get_base()
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("View.MemoryView.memoryview.base.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":574
 *         return self._get_base()
 * 
 *     cdef _get_base(self):             # <<<<<<<<<<<<<<
 *         return self.obj
 * 
*/

static PyObject *__pyx_memoryview__get_base(struct __pyx_memoryview_obj *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_get_base", 0);

  /* "View.MemoryView":575
 * 
 *     cdef _get_base(self):
 *         return self.obj             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->obj);
  __pyx_r = __pyx_v_self->obj;
  goto __pyx_L0;

  /* "View.MemoryView":574
 *         return self._get_base()
 * 
 *     cdef _get_base(self):             # <<<<<<<<<<<<<<
 *         return self.obj
 * 
*/

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

/* "View.MemoryView":577
 *         return self.obj
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def shape(self):
 *         return tuple([length for length in self.view.shape[:self.view.ndim]])
*/

/* Python wrapper */
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_5shape_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_5shape_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));

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

static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
  Py_ssize_t __pyx_7genexpr__pyx_v_length;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t *__pyx_t_2;
  Py_ssize_t *__pyx_t_3;
  Py_ssize_t *__pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "View.MemoryView":579
 *     @property
 *     def shape(self):
 *         return tuple([length for length in self.view.shape[:self.view.ndim]])             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  { /* enter inner scope */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 579, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = (__pyx_v_self->view.shape + __pyx_v_self->view.ndim);
    for (__pyx_t_4 = __pyx_v_self->view.shape; __pyx_t_4 < __pyx_t_3; __pyx_t_4++) {
      __pyx_t_2 = __pyx_t_4;
      __pyx_7genexpr__pyx_v_length = (__pyx_t_2[0]);
      __pyx_t_5 = PyLong_FromSsize_t(__pyx_7genexpr__pyx_v_length); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 579, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(1, 579, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  } /* exit inner scope */
  __pyx_t_5 = PyList_AsTuple(((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 579, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":577
 *         return self.obj
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def shape(self):
 *         return tuple([length for length in self.view.shape[:self.view.ndim]])
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("View.MemoryView.memoryview.shape.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":581
 *         return tuple([length for length in self.view.shape[:self.view.ndim]])
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def strides(self):
 *         if self.view.strides == NULL:
*/

/* Python wrapper */
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_7strides_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_7strides_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));

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

static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
  Py_ssize_t __pyx_8genexpr1__pyx_v_stride;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t *__pyx_t_3;
  Py_ssize_t *__pyx_t_4;
  Py_ssize_t *__pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "View.MemoryView":583
 *     @property
 *     def strides(self):
 *         if self.view.strides == NULL:             # <<<<<<<<<<<<<<
 * 
 *             raise ValueError, "Buffer view does not expose strides"
*/
  __pyx_t_1 = (__pyx_v_self->view.strides == NULL);
  if (unlikely(__pyx_t_1)) {

    /* "View.MemoryView":585
 *         if self.view.strides == NULL:
 * 
 *             raise ValueError, "Buffer view does not expose strides"             # <<<<<<<<<<<<<<
 * 
 *         return tuple([stride for stride in self.view.strides[:self.view.ndim]])
*/
    __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_ValueError))), __pyx_mstate_global->__pyx_kp_u_Buffer_view_does_not_expose_stri, 0, 0);
    __PYX_ERR(1, 585, __pyx_L1_error)

    /* "View.MemoryView":583
 *     @property
 *     def strides(self):
 *         if self.view.strides == NULL:             # <<<<<<<<<<<<<<
 * 
 *             raise ValueError, "Buffer view does not expose strides"
*/
  }

  /* "View.MemoryView":587
 *             raise ValueError, "Buffer view does not expose strides"
 * 
 *         return tuple([stride for stride in self.view.strides[:self.view.ndim]])             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  { /* enter inner scope */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 587, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = (__pyx_v_self->view.strides + __pyx_v_self->view.ndim);
    for (__pyx_t_5 = __pyx_v_self->view.strides; __pyx_t_5 < __pyx_t_4; __pyx_t_5++) {
      __pyx_t_3 = __pyx_t_5;
      __pyx_8genexpr1__pyx_v_stride = (__pyx_t_3[0]);
      __pyx_t_6 = PyLong_FromSsize_t(__pyx_8genexpr1__pyx_v_stride); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 587, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_6))) __PYX_ERR(1, 587, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
  } /* exit inner scope */
  __pyx_t_6 = PyList_AsTuple(((PyObject*)__pyx_t_2)); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 587, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_6;
  __pyx_t_6 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":581
 *         return tuple([length for length in self.view.shape[:self.view.ndim]])
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def strides(self):
 *         if self.view.strides == NULL:
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("View.MemoryView.memoryview.strides.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":589
 *         return tuple([stride for stride in self.view.strides[:self.view.ndim]])
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def suboffsets(self):
 *         if self.view.suboffsets == NULL:
*/

/* Python wrapper */
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_10suboffsets_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_10suboffsets_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));

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

static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
  Py_ssize_t __pyx_8genexpr2__pyx_v_suboffset;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t *__pyx_t_3;
  Py_ssize_t *__pyx_t_4;
  Py_ssize_t *__pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "View.MemoryView":591
 *     @property
 *     def suboffsets(self):
 *         if self.view.suboffsets == NULL:             # <<<<<<<<<<<<<<
 *             return (-1,) * self.view.ndim
 * 
*/
  __pyx_t_1 = (__pyx_v_self->view.suboffsets == NULL);
  if (__pyx_t_1) {

    /* "View.MemoryView":592
 *     def suboffsets(self):
 *         if self.view.suboffsets == NULL:
 *             return (-1,) * self.view.ndim             # <<<<<<<<<<<<<<
 * 
 *         return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]])
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PySequence_Multiply(__pyx_mstate_global->__pyx_tuple[0], __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 592, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "View.MemoryView":591
 *     @property
 *     def suboffsets(self):
 *         if self.view.suboffsets == NULL:             # <<<<<<<<<<<<<<
 *             return (-1,) * self.view.ndim
 * 
*/
  }

  /* "View.MemoryView":594
 *             return (-1,) * self.view.ndim
 * 
 *         return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]])             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  { /* enter inner scope */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 594, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = (__pyx_v_self->view.suboffsets + __pyx_v_self->view.ndim);
    for (__pyx_t_5 = __pyx_v_self->view.suboffsets; __pyx_t_5 < __pyx_t_4; __pyx_t_5++) {
      __pyx_t_3 = __pyx_t_5;
      __pyx_8genexpr2__pyx_v_suboffset = (__pyx_t_3[0]);
      __pyx_t_6 = PyLong_FromSsize_t(__pyx_8genexpr2__pyx_v_suboffset); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 594, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_6))) __PYX_ERR(1, 594, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
  } /* exit inner scope */
  __pyx_t_6 = PyList_AsTuple(((PyObject*)__pyx_t_2)); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 594, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_6;
  __pyx_t_6 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":589
 *         return tuple([stride for stride in self.view.strides[:self.view.ndim]])
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def suboffsets(self):
 *         if self.view.suboffsets == NULL:
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("View.MemoryView.memoryview.suboffsets.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":596
 *         return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]])
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def ndim(self):
 *         return self.view.ndim
*/

/* Python wrapper */
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4ndim_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4ndim_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));

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

static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "View.MemoryView":598
 *     @property
 *     def ndim(self):
 *         return self.view.ndim             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_self->view.ndim); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 598, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":596
 *         return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]])
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def ndim(self):
 *         return self.view.ndim
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("View.MemoryView.memoryview.ndim.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":600
 *         return self.view.ndim
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def itemsize(self):
 *         return self.view.itemsize
*/

/* Python wrapper */
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_8itemsize_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_8itemsize_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));

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

static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "View.MemoryView":602
 *     @property
 *     def itemsize(self):
 *         return self.view.itemsize             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyLong_FromSsize_t(__pyx_v_self->view.itemsize); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 602, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":600
 *         return self.view.ndim
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def itemsize(self):
 *         return self.view.itemsize
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("View.MemoryView.memoryview.itemsize.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":604
 *         return self.view.itemsize
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def nbytes(self):
 *         return self.size * self.view.itemsize
*/

/* Python wrapper */
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_6nbytes_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_6nbytes_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));

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

static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "View.MemoryView":606
 *     @property
 *     def nbytes(self):
 *         return self.size * self.view.itemsize             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 606, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyLong_FromSsize_t(__pyx_v_self->view.itemsize); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 606, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_Multiply(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 606, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":604
 *         return self.view.itemsize
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def nbytes(self):
 *         return self.size * self.view.itemsize
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("View.MemoryView.memoryview.nbytes.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":608
 *         return self.size * self.view.itemsize
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def size(self):
 *         if self._size is None:
*/

/* Python wrapper */
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4size_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4size_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));

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

static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_v_length = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  Py_ssize_t *__pyx_t_2;
  Py_ssize_t *__pyx_t_3;
  Py_ssize_t *__pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "View.MemoryView":610
 *     @property
 *     def size(self):
 *         if self._size is None:             # <<<<<<<<<<<<<<
 *             result = 1
 * 
*/
  __pyx_t_1 = (__pyx_v_self->_size == Py_None);
  if (__pyx_t_1) {

    /* "View.MemoryView":611
 *     def size(self):
 *         if self._size is None:
 *             result = 1             # <<<<<<<<<<<<<<
 * 
 *             for length in self.view.shape[:self.view.ndim]:
*/
    __Pyx_INCREF(__pyx_mstate_global->__pyx_int_1);
    __pyx_v_result = __pyx_mstate_global->__pyx_int_1;

    /* "View.MemoryView":613
 *             result = 1
 * 
 *             for length in self.view.shape[:self.view.ndim]:             # <<<<<<<<<<<<<<
 *                 result *= length
 * 
*/
    __pyx_t_3 = (__pyx_v_self->view.shape + __pyx_v_self->view.ndim);
    for (__pyx_t_4 = __pyx_v_self->view.shape; __pyx_t_4 < __pyx_t_3; __pyx_t_4++) {
      __pyx_t_2 = __pyx_t_4;
      __pyx_t_5 = PyLong_FromSsize_t((__pyx_t_2[0])); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 613, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_XDECREF_SET(__pyx_v_length, __pyx_t_5);
      __pyx_t_5 = 0;

      /* "View.MemoryView":614
 * 
 *             for length in self.view.shape[:self.view.ndim]:
 *                 result *= length             # <<<<<<<<<<<<<<
 * 
 *             self._size = result
*/
      __pyx_t_5 = PyNumber_InPlaceMultiply(__pyx_v_result, __pyx_v_length); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 614, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_5);
      __pyx_t_5 = 0;
    }

    /* "View.MemoryView":616
 *                 result *= length
 * 
 *             self._size = result             # <<<<<<<<<<<<<<
 * 
 *         return self._size
*/
    __Pyx_INCREF(__pyx_v_result);
    __Pyx_GIVEREF(__pyx_v_result);
    __Pyx_GOTREF(__pyx_v_self->_size);
    __Pyx_DECREF(__pyx_v_self->_size);
    __pyx_v_self->_size = __pyx_v_result;

    /* "View.MemoryView":610
 *     @property
 *     def size(self):
 *         if self._size is None:             # <<<<<<<<<<<<<<
 *             result = 1
 * 
*/
  }

  /* "View.MemoryView":618
 *             self._size = result
 * 
 *         return self._size             # <<<<<<<<<<<<<<
 * 
 *     def __len__(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->_size);
  __pyx_r = __pyx_v_self->_size;
  goto __pyx_L0;

  /* "View.MemoryView":608
 *         return self.size * self.view.itemsize
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def size(self):
 *         if self._size is None:
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("View.MemoryView.memoryview.size.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_length);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":620
 *         return self._size
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         if self.view.ndim >= 1:
 *             return self.view.shape[0]
*/

/* Python wrapper */
static Py_ssize_t __pyx_memoryview___len__(PyObject *__pyx_v_self); /*proto*/
static Py_ssize_t __pyx_memoryview___len__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(((struct __pyx_memoryview_obj *)__pyx_v_self));

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

static Py_ssize_t __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(struct __pyx_memoryview_obj *__pyx_v_self) {
  Py_ssize_t __pyx_r;
  int __pyx_t_1;

  /* "View.MemoryView":621
 * 
 *     def __len__(self):
 *         if self.view.ndim >= 1:             # <<<<<<<<<<<<<<
 *             return self.view.shape[0]
 * 
*/
  __pyx_t_1 = (__pyx_v_self->view.ndim >= 1);
  if (__pyx_t_1) {

    /* "View.MemoryView":622
 *     def __len__(self):
 *         if self.view.ndim >= 1:
 *             return self.view.shape[0]             # <<<<<<<<<<<<<<
 * 
 *         return 0
*/
    __pyx_r = (__pyx_v_self->view.shape[0]);
    goto __pyx_L0;

    /* "View.MemoryView":621
 * 
 *     def __len__(self):
 *         if self.view.ndim >= 1:             # <<<<<<<<<<<<<<
 *             return self.view.shape[0]
 * 
*/
  }

  /* "View.MemoryView":624
 *             return self.view.shape[0]
 * 
 *         return 0             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
*/
  __pyx_r = 0;
  goto __pyx_L0;

  /* "View.MemoryView":620
 *         return self._size
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         if self.view.ndim >= 1:
 *             return self.view.shape[0]
*/

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

/* "View.MemoryView":626
 *         return 0
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__,
 *                                                id(self))
*/

/* Python wrapper */
static PyObject *__pyx_memoryview___repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_memoryview___repr__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(((struct __pyx_memoryview_obj *)__pyx_v_self));

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

static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(struct __pyx_memoryview_obj *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4[5];
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "View.MemoryView":627
 * 
 *     def __repr__(self):
 *         return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__,             # <<<<<<<<<<<<<<
 *                                                id(self))
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_base); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 627, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 627, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 627, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_1), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 627, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "View.MemoryView":628
 *     def __repr__(self):
 *         return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__,
 *                                                id(self))             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
*/
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 628, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_Format(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_x); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 628, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4[0] = __pyx_mstate_global->__pyx_kp_u_MemoryView_of;
  __pyx_t_4[1] = __pyx_t_2;
  __pyx_t_4[2] = __pyx_mstate_global->__pyx_kp_u_at_0x;
  __pyx_t_4[3] = __pyx_t_3;
  __pyx_t_4[4] = __pyx_mstate_global->__pyx_kp_u__3;

  /* "View.MemoryView":627
 * 
 *     def __repr__(self):
 *         return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__,             # <<<<<<<<<<<<<<
 *                                                id(self))
 * 
*/
  __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_4, 5, 15 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + 6 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3));
  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 627, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":626
 *         return 0
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__,
 *                                                id(self))
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("View.MemoryView.memoryview.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":630
 *                                                id(self))
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "<MemoryView of %r object>" % (self.base.__class__.__name__,)
 * 
*/

/* Python wrapper */
static PyObject *__pyx_memoryview___str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_memoryview___str__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(((struct __pyx_memoryview_obj *)__pyx_v_self));

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

static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(struct __pyx_memoryview_obj *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3[3];
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "View.MemoryView":631
 * 
 *     def __str__(self):
 *         return "<MemoryView of %r object>" % (self.base.__class__.__name__,)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_base); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 631, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 631, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 631, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_1), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 631, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3[0] = __pyx_mstate_global->__pyx_kp_u_MemoryView_of;
  __pyx_t_3[1] = __pyx_t_2;
  __pyx_t_3[2] = __pyx_mstate_global->__pyx_kp_u_object_2;
  __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_3, 3, 15 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + 8, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2));
  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 631, __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;

  /* "View.MemoryView":630
 *                                                id(self))
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "<MemoryView of %r object>" % (self.base.__class__.__name__,)
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("View.MemoryView.memoryview.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":634
 * 
 * 
 *     def is_c_contig(self):             # <<<<<<<<<<<<<<
 *         cdef __Pyx_memviewslice *mslice
 *         cdef __Pyx_memviewslice tmp
*/

/* Python wrapper */
static PyObject *__pyx_memoryview_is_c_contig(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_memoryview_is_c_contig(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_c_contig (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("is_c_contig", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("is_c_contig", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(((struct __pyx_memoryview_obj *)__pyx_v_self));

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

static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(struct __pyx_memoryview_obj *__pyx_v_self) {
  __Pyx_memviewslice *__pyx_v_mslice;
  __Pyx_memviewslice __pyx_v_tmp;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_memviewslice *__pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_c_contig", 0);

  /* "View.MemoryView":637
 *         cdef __Pyx_memviewslice *mslice
 *         cdef __Pyx_memviewslice tmp
 *         mslice = get_slice_from_memview(self, &tmp)             # <<<<<<<<<<<<<<
 *         return slice_is_contig(mslice[0], 'C', self.view.ndim)
 * 
*/
  __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_self, (&__pyx_v_tmp)); if (unlikely(__pyx_t_1 == ((void *)NULL))) __PYX_ERR(1, 637, __pyx_L1_error)
  __pyx_v_mslice = __pyx_t_1;

  /* "View.MemoryView":638
 *         cdef __Pyx_memviewslice tmp
 *         mslice = get_slice_from_memview(self, &tmp)
 *         return slice_is_contig(mslice[0], 'C', self.view.ndim)             # <<<<<<<<<<<<<<
 * 
 *     def is_f_contig(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_memviewslice_is_contig((__pyx_v_mslice[0]), 'C', __pyx_v_self->view.ndim)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 638, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":634
 * 
 * 
 *     def is_c_contig(self):             # <<<<<<<<<<<<<<
 *         cdef __Pyx_memviewslice *mslice
 *         cdef __Pyx_memviewslice tmp
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("View.MemoryView.memoryview.is_c_contig", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":640
 *         return slice_is_contig(mslice[0], 'C', self.view.ndim)
 * 
 *     def is_f_contig(self):             # <<<<<<<<<<<<<<
 *         cdef __Pyx_memviewslice *mslice
 *         cdef __Pyx_memviewslice tmp
*/

/* Python wrapper */
static PyObject *__pyx_memoryview_is_f_contig(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_memoryview_is_f_contig(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_f_contig (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("is_f_contig", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("is_f_contig", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(((struct __pyx_memoryview_obj *)__pyx_v_self));

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

static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(struct __pyx_memoryview_obj *__pyx_v_self) {
  __Pyx_memviewslice *__pyx_v_mslice;
  __Pyx_memviewslice __pyx_v_tmp;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_memviewslice *__pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_f_contig", 0);

  /* "View.MemoryView":643
 *         cdef __Pyx_memviewslice *mslice
 *         cdef __Pyx_memviewslice tmp
 *         mslice = get_slice_from_memview(self, &tmp)             # <<<<<<<<<<<<<<
 *         return slice_is_contig(mslice[0], 'F', self.view.ndim)
 * 
*/
  __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_self, (&__pyx_v_tmp)); if (unlikely(__pyx_t_1 == ((void *)NULL))) __PYX_ERR(1, 643, __pyx_L1_error)
  __pyx_v_mslice = __pyx_t_1;

  /* "View.MemoryView":644
 *         cdef __Pyx_memviewslice tmp
 *         mslice = get_slice_from_memview(self, &tmp)
 *         return slice_is_contig(mslice[0], 'F', self.view.ndim)             # <<<<<<<<<<<<<<
 * 
 *     def copy(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_memviewslice_is_contig((__pyx_v_mslice[0]), 'F', __pyx_v_self->view.ndim)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 644, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":640
 *         return slice_is_contig(mslice[0], 'C', self.view.ndim)
 * 
 *     def is_f_contig(self):             # <<<<<<<<<<<<<<
 *         cdef __Pyx_memviewslice *mslice
 *         cdef __Pyx_memviewslice tmp
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("View.MemoryView.memoryview.is_f_contig", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":646
 *         return slice_is_contig(mslice[0], 'F', self.view.ndim)
 * 
 *     def copy(self):             # <<<<<<<<<<<<<<
 *         cdef __Pyx_memviewslice mslice
 *         cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS
*/

/* Python wrapper */
static PyObject *__pyx_memoryview_copy(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_memoryview_copy(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("copy (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("copy", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("copy", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(((struct __pyx_memoryview_obj *)__pyx_v_self));

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

static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(struct __pyx_memoryview_obj *__pyx_v_self) {
  __Pyx_memviewslice __pyx_v_mslice;
  int __pyx_v_flags;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_memviewslice __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("copy", 0);

  /* "View.MemoryView":648
 *     def copy(self):
 *         cdef __Pyx_memviewslice mslice
 *         cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS             # <<<<<<<<<<<<<<
 * 
 *         slice_copy(self, &mslice)
*/
  __pyx_v_flags = (__pyx_v_self->flags & (~PyBUF_F_CONTIGUOUS));

  /* "View.MemoryView":650
 *         cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS
 * 
 *         slice_copy(self, &mslice)             # <<<<<<<<<<<<<<
 *         mslice = slice_copy_contig(&mslice, "c", self.view.ndim,
 *                                    self.view.itemsize,
*/
  __pyx_memoryview_slice_copy(__pyx_v_self, (&__pyx_v_mslice));

  /* "View.MemoryView":651
 * 
 *         slice_copy(self, &mslice)
 *         mslice = slice_copy_contig(&mslice, "c", self.view.ndim,             # <<<<<<<<<<<<<<
 *                                    self.view.itemsize,
 *                                    flags|PyBUF_C_CONTIGUOUS,
*/
  __pyx_t_1 = __pyx_memoryview_copy_new_contig((&__pyx_v_mslice), __pyx_k_c, __pyx_v_self->view.ndim, __pyx_v_self->view.itemsize, (__pyx_v_flags | PyBUF_C_CONTIGUOUS), __pyx_v_self->dtype_is_object); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 651, __pyx_L1_error)
  __pyx_v_mslice = __pyx_t_1;

  /* "View.MemoryView":656
 *                                    self.dtype_is_object)
 * 
 *         return memoryview_copy_from_slice(self, &mslice)             # <<<<<<<<<<<<<<
 * 
 *     def copy_fortran(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_memoryview_copy_object_from_slice(__pyx_v_self, (&__pyx_v_mslice)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 656, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":646
 *         return slice_is_contig(mslice[0], 'F', self.view.ndim)
 * 
 *     def copy(self):             # <<<<<<<<<<<<<<
 *         cdef __Pyx_memviewslice mslice
 *         cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("View.MemoryView.memoryview.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":658
 *         return memoryview_copy_from_slice(self, &mslice)
 * 
 *     def copy_fortran(self):             # <<<<<<<<<<<<<<
 *         cdef __Pyx_memviewslice src, dst
 *         cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS
*/

/* Python wrapper */
static PyObject *__pyx_memoryview_copy_fortran(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_memoryview_copy_fortran(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("copy_fortran (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("copy_fortran", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("copy_fortran", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(((struct __pyx_memoryview_obj *)__pyx_v_self));

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

static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(struct __pyx_memoryview_obj *__pyx_v_self) {
  __Pyx_memviewslice __pyx_v_src;
  __Pyx_memviewslice __pyx_v_dst;
  int __pyx_v_flags;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_memviewslice __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("copy_fortran", 0);

  /* "View.MemoryView":660
 *     def copy_fortran(self):
 *         cdef __Pyx_memviewslice src, dst
 *         cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS             # <<<<<<<<<<<<<<
 * 
 *         slice_copy(self, &src)
*/
  __pyx_v_flags = (__pyx_v_self->flags & (~PyBUF_C_CONTIGUOUS));

  /* "View.MemoryView":662
 *         cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS
 * 
 *         slice_copy(self, &src)             # <<<<<<<<<<<<<<
 *         dst = slice_copy_contig(&src, "fortran", self.view.ndim,
 *                                 self.view.itemsize,
*/
  __pyx_memoryview_slice_copy(__pyx_v_self, (&__pyx_v_src));

  /* "View.MemoryView":663
 * 
 *         slice_copy(self, &src)
 *         dst = slice_copy_contig(&src, "fortran", self.view.ndim,             # <<<<<<<<<<<<<<
 *                                 self.view.itemsize,
 *                                 flags|PyBUF_F_CONTIGUOUS,
*/
  __pyx_t_1 = __pyx_memoryview_copy_new_contig((&__pyx_v_src), __pyx_k_fortran, __pyx_v_self->view.ndim, __pyx_v_self->view.itemsize, (__pyx_v_flags | PyBUF_F_CONTIGUOUS), __pyx_v_self->dtype_is_object); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 663, __pyx_L1_error)
  __pyx_v_dst = __pyx_t_1;

  /* "View.MemoryView":668
 *                                 self.dtype_is_object)
 * 
 *         return memoryview_copy_from_slice(self, &dst)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_memoryview_copy_object_from_slice(__pyx_v_self, (&__pyx_v_dst)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 668, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":658
 *         return memoryview_copy_from_slice(self, &mslice)
 * 
 *     def copy_fortran(self):             # <<<<<<<<<<<<<<
 *         cdef __Pyx_memviewslice src, dst
 *         cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("View.MemoryView.memoryview.copy_fortran", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/

/* Python wrapper */
static PyObject *__pyx_pw___pyx_memoryview_1__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_pw___pyx_memoryview_1__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf___pyx_memoryview___reduce_cython__(((struct __pyx_memoryview_obj *)__pyx_v_self));

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

static PyObject *__pyx_pf___pyx_memoryview___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("View.MemoryView.memoryview.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/

/* Python wrapper */
static PyObject *__pyx_pw___pyx_memoryview_3__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_pw___pyx_memoryview_3__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(1, 3, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 3, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 3, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3, __pyx_L3_error)
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("View.MemoryView.memoryview.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf___pyx_memoryview_2__setstate_cython__(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v___pyx_state);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf___pyx_memoryview_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("View.MemoryView.memoryview.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":671
 * 
 * 
 * @cname('__pyx_memoryview_new')             # <<<<<<<<<<<<<<
 * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, const __Pyx_TypeInfo *typeinfo):
 *     cdef memoryview result = memoryview(o, flags, dtype_is_object)
*/

static PyObject *__pyx_memoryview_new(PyObject *__pyx_v_o, int __pyx_v_flags, int __pyx_v_dtype_is_object, __Pyx_TypeInfo const *__pyx_v_typeinfo) {
  struct __pyx_memoryview_obj *__pyx_v_result = 0;
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("memoryview_cwrapper", 0);

  /* "View.MemoryView":673
 * @cname('__pyx_memoryview_new')
 * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, const __Pyx_TypeInfo *typeinfo):
 *     cdef memoryview result = memoryview(o, flags, dtype_is_object)             # <<<<<<<<<<<<<<
 *     result.typeinfo = typeinfo
 *     return result
*/
  __pyx_t_2 = NULL;
  __pyx_t_3 = __Pyx_PyLong_From_int(__pyx_v_flags); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 673, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_dtype_is_object); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 673, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = 1;
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_2, __pyx_v_o, __pyx_t_3, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_memoryview_type, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 673, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_1);
  }
  __pyx_v_result = ((struct __pyx_memoryview_obj *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "View.MemoryView":674
 * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, const __Pyx_TypeInfo *typeinfo):
 *     cdef memoryview result = memoryview(o, flags, dtype_is_object)
 *     result.typeinfo = typeinfo             # <<<<<<<<<<<<<<
 *     return result
 * 
*/
  __pyx_v_result->typeinfo = __pyx_v_typeinfo;

  /* "View.MemoryView":675
 *     cdef memoryview result = memoryview(o, flags, dtype_is_object)
 *     result.typeinfo = typeinfo
 *     return result             # <<<<<<<<<<<<<<
 * 
 * @cname('__pyx_memoryview_check')
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_result);
  __pyx_r = ((PyObject *)__pyx_v_result);
  goto __pyx_L0;

  /* "View.MemoryView":671
 * 
 * 
 * @cname('__pyx_memoryview_new')             # <<<<<<<<<<<<<<
 * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, const __Pyx_TypeInfo *typeinfo):
 *     cdef memoryview result = memoryview(o, flags, dtype_is_object)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("View.MemoryView.memoryview_cwrapper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":677
 *     return result
 * 
 * @cname('__pyx_memoryview_check')             # <<<<<<<<<<<<<<
 * cdef inline bint memoryview_check(object o) noexcept:
 *     return isinstance(o, memoryview)
*/

static CYTHON_INLINE int __pyx_memoryview_check(PyObject *__pyx_v_o) {
  int __pyx_r;
  int __pyx_t_1;

  /* "View.MemoryView":679
 * @cname('__pyx_memoryview_check')
 * cdef inline bint memoryview_check(object o) noexcept:
 *     return isinstance(o, memoryview)             # <<<<<<<<<<<<<<
 * 
 * cdef tuple _unellipsify(object index, int ndim):
*/
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_o, __pyx_mstate_global->__pyx_memoryview_type); 
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "View.MemoryView":677
 *     return result
 * 
 * @cname('__pyx_memoryview_check')             # <<<<<<<<<<<<<<
 * cdef inline bint memoryview_check(object o) noexcept:
 *     return isinstance(o, memoryview)
*/

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

/* "View.MemoryView":681
 *     return isinstance(o, memoryview)
 * 
 * cdef tuple _unellipsify(object index, int ndim):             # <<<<<<<<<<<<<<
 *     """
 *     Replace all ellipses with full slices and fill incomplete indices with
*/

static PyObject *_unellipsify(PyObject *__pyx_v_index, int __pyx_v_ndim) {
  Py_ssize_t __pyx_v_idx;
  PyObject *__pyx_v_tup = NULL;
  PyObject *__pyx_v_result = NULL;
  int __pyx_v_have_slices;
  int __pyx_v_seen_ellipsis;
  PyObject *__pyx_v_item = NULL;
  Py_ssize_t __pyx_v_nslices;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6[3];
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_unellipsify", 0);

  /* "View.MemoryView":687
 *     """
 *     cdef Py_ssize_t idx
 *     tup = <tuple>index if isinstance(index, tuple) else (index,)             # <<<<<<<<<<<<<<
 * 
 *     result = [slice(None)] * ndim
*/
  __pyx_t_2 = PyTuple_Check(__pyx_v_index); 
  if (__pyx_t_2) {
    __Pyx_INCREF(((PyObject*)__pyx_v_index));
    __pyx_t_1 = __pyx_v_index;
  } else {
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 687, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_index);
    __Pyx_GIVEREF(__pyx_v_index);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_index) != (0)) __PYX_ERR(1, 687, __pyx_L1_error);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  }
  __pyx_v_tup = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "View.MemoryView":689
 *     tup = <tuple>index if isinstance(index, tuple) else (index,)
 * 
 *     result = [slice(None)] * ndim             # <<<<<<<<<<<<<<
 *     have_slices = False
 *     seen_ellipsis = False
*/
  __pyx_t_1 = PyList_New(1 * ((__pyx_v_ndim<0) ? 0:__pyx_v_ndim)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 689, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  { Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < __pyx_v_ndim; __pyx_temp++) {
      __Pyx_INCREF(__pyx_mstate_global->__pyx_slice[0]);
      __Pyx_GIVEREF(__pyx_mstate_global->__pyx_slice[0]);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_1, __pyx_temp, __pyx_mstate_global->__pyx_slice[0]) != (0)) __PYX_ERR(1, 689, __pyx_L1_error);
    }
  }
  __pyx_v_result = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "View.MemoryView":690
 * 
 *     result = [slice(None)] * ndim
 *     have_slices = False             # <<<<<<<<<<<<<<
 *     seen_ellipsis = False
 *     idx = 0
*/
  __pyx_v_have_slices = 0;

  /* "View.MemoryView":691
 *     result = [slice(None)] * ndim
 *     have_slices = False
 *     seen_ellipsis = False             # <<<<<<<<<<<<<<
 *     idx = 0
 *     for item in tup:
*/
  __pyx_v_seen_ellipsis = 0;

  /* "View.MemoryView":692
 *     have_slices = False
 *     seen_ellipsis = False
 *     idx = 0             # <<<<<<<<<<<<<<
 *     for item in tup:
 *         if item is Ellipsis:
*/
  __pyx_v_idx = 0;

  /* "View.MemoryView":693
 *     seen_ellipsis = False
 *     idx = 0
 *     for item in tup:             # <<<<<<<<<<<<<<
 *         if item is Ellipsis:
 *             if not seen_ellipsis:
*/
  if (unlikely(__pyx_v_tup == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(1, 693, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_v_tup; __Pyx_INCREF(__pyx_t_1);
  __pyx_t_4 = 0;
  for (;;) {
    {
      Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
      #if !CYTHON_ASSUME_SAFE_SIZE
      if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 693, __pyx_L1_error)
      #endif
      if (__pyx_t_4 >= __pyx_temp) break;
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_3 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4));
    #else
    __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_4);
    #endif
    ++__pyx_t_4;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 693, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "View.MemoryView":694
 *     idx = 0
 *     for item in tup:
 *         if item is Ellipsis:             # <<<<<<<<<<<<<<
 *             if not seen_ellipsis:
 *                 idx += ndim - len(tup)
*/
    __pyx_t_2 = (__pyx_v_item == __pyx_builtin_Ellipsis);
    if (__pyx_t_2) {

      /* "View.MemoryView":695
 *     for item in tup:
 *         if item is Ellipsis:
 *             if not seen_ellipsis:             # <<<<<<<<<<<<<<
 *                 idx += ndim - len(tup)
 *                 seen_ellipsis = True
*/
      __pyx_t_2 = (!__pyx_v_seen_ellipsis);
      if (__pyx_t_2) {

        /* "View.MemoryView":696
 *         if item is Ellipsis:
 *             if not seen_ellipsis:
 *                 idx += ndim - len(tup)             # <<<<<<<<<<<<<<
 *                 seen_ellipsis = True
 *             have_slices = True
*/
        if (unlikely(__pyx_v_tup == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
          __PYX_ERR(1, 696, __pyx_L1_error)
        }
        __pyx_t_5 = __Pyx_PyTuple_GET_SIZE(__pyx_v_tup); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(1, 696, __pyx_L1_error)
        __pyx_v_idx = (__pyx_v_idx + (__pyx_v_ndim - __pyx_t_5));

        /* "View.MemoryView":697
 *             if not seen_ellipsis:
 *                 idx += ndim - len(tup)
 *                 seen_ellipsis = True             # <<<<<<<<<<<<<<
 *             have_slices = True
 *         else:
*/
        __pyx_v_seen_ellipsis = 1;

        /* "View.MemoryView":695
 *     for item in tup:
 *         if item is Ellipsis:
 *             if not seen_ellipsis:             # <<<<<<<<<<<<<<
 *                 idx += ndim - len(tup)
 *                 seen_ellipsis = True
*/
      }

      /* "View.MemoryView":698
 *                 idx += ndim - len(tup)
 *                 seen_ellipsis = True
 *             have_slices = True             # <<<<<<<<<<<<<<
 *         else:
 *             if isinstance(item, slice):
*/
      __pyx_v_have_slices = 1;

      /* "View.MemoryView":694
 *     idx = 0
 *     for item in tup:
 *         if item is Ellipsis:             # <<<<<<<<<<<<<<
 *             if not seen_ellipsis:
 *                 idx += ndim - len(tup)
*/
      goto __pyx_L5;
    }

    /* "View.MemoryView":700
 *             have_slices = True
 *         else:
 *             if isinstance(item, slice):             # <<<<<<<<<<<<<<
 *                 have_slices = True
 *             elif not PyIndex_Check(item):
*/
    /*else*/ {
      __pyx_t_2 = PySlice_Check(__pyx_v_item); 
      if (__pyx_t_2) {

        /* "View.MemoryView":701
 *         else:
 *             if isinstance(item, slice):
 *                 have_slices = True             # <<<<<<<<<<<<<<
 *             elif not PyIndex_Check(item):
 *                 raise TypeError, f"Cannot index with type '{type(item)}'"
*/
        __pyx_v_have_slices = 1;

        /* "View.MemoryView":700
 *             have_slices = True
 *         else:
 *             if isinstance(item, slice):             # <<<<<<<<<<<<<<
 *                 have_slices = True
 *             elif not PyIndex_Check(item):
*/
        goto __pyx_L7;
      }

      /* "View.MemoryView":702
 *             if isinstance(item, slice):
 *                 have_slices = True
 *             elif not PyIndex_Check(item):             # <<<<<<<<<<<<<<
 *                 raise TypeError, f"Cannot index with type '{type(item)}'"
 *             result[idx] = item
*/
      __pyx_t_2 = (!(PyIndex_Check(__pyx_v_item) != 0));
      if (unlikely(__pyx_t_2)) {

        /* "View.MemoryView":703
 *                 have_slices = True
 *             elif not PyIndex_Check(item):
 *                 raise TypeError, f"Cannot index with type '{type(item)}'"             # <<<<<<<<<<<<<<
 *             result[idx] = item
 *         idx += 1
*/
        __pyx_t_3 = __Pyx_PyObject_FormatSimple(((PyObject *)Py_TYPE(__pyx_v_item)), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 703, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_6[0] = __pyx_mstate_global->__pyx_kp_u_Cannot_index_with_type;
        __pyx_t_6[1] = __pyx_t_3;
        __pyx_t_6[2] = __pyx_mstate_global->__pyx_kp_u__4;
        __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_6, 3, 24 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3));
        if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 703, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_t_7, 0, 0);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __PYX_ERR(1, 703, __pyx_L1_error)

        /* "View.MemoryView":702
 *             if isinstance(item, slice):
 *                 have_slices = True
 *             elif not PyIndex_Check(item):             # <<<<<<<<<<<<<<
 *                 raise TypeError, f"Cannot index with type '{type(item)}'"
 *             result[idx] = item
*/
      }
      __pyx_L7:;

      /* "View.MemoryView":704
 *             elif not PyIndex_Check(item):
 *                 raise TypeError, f"Cannot index with type '{type(item)}'"
 *             result[idx] = item             # <<<<<<<<<<<<<<
 *         idx += 1
 * 
*/
      if (unlikely((__Pyx_SetItemInt(__pyx_v_result, __pyx_v_idx, __pyx_v_item, Py_ssize_t, 1, PyLong_FromSsize_t, 1, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference) < 0))) __PYX_ERR(1, 704, __pyx_L1_error)
    }
    __pyx_L5:;

    /* "View.MemoryView":705
 *                 raise TypeError, f"Cannot index with type '{type(item)}'"
 *             result[idx] = item
 *         idx += 1             # <<<<<<<<<<<<<<
 * 
 *     nslices = ndim - idx
*/
    __pyx_v_idx = (__pyx_v_idx + 1);

    /* "View.MemoryView":693
 *     seen_ellipsis = False
 *     idx = 0
 *     for item in tup:             # <<<<<<<<<<<<<<
 *         if item is Ellipsis:
 *             if not seen_ellipsis:
*/
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "View.MemoryView":707
 *         idx += 1
 * 
 *     nslices = ndim - idx             # <<<<<<<<<<<<<<
 *     return have_slices or nslices, tuple(result)
 * 
*/
  __pyx_v_nslices = (__pyx_v_ndim - __pyx_v_idx);

  /* "View.MemoryView":708
 * 
 *     nslices = ndim - idx
 *     return have_slices or nslices, tuple(result)             # <<<<<<<<<<<<<<
 * 
 * cdef int assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim) except -1:
*/
  __Pyx_XDECREF(__pyx_r);
  if (!__pyx_v_have_slices) {
  } else {
    __pyx_t_7 = __Pyx_PyBool_FromLong(__pyx_v_have_slices); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 708, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_1 = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L9_bool_binop_done;
  }
  __pyx_t_7 = PyLong_FromSsize_t(__pyx_v_nslices); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 708, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_1 = __pyx_t_7;
  __pyx_t_7 = 0;
  __pyx_L9_bool_binop_done:;
  __pyx_t_7 = PyList_AsTuple(__pyx_v_result); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 708, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 708, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1) != (0)) __PYX_ERR(1, 708, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_7);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_7) != (0)) __PYX_ERR(1, 708, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_7 = 0;
  __pyx_r = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":681
 *     return isinstance(o, memoryview)
 * 
 * cdef tuple _unellipsify(object index, int ndim):             # <<<<<<<<<<<<<<
 *     """
 *     Replace all ellipses with full slices and fill incomplete indices with
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("View.MemoryView._unellipsify", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_tup);
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_item);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":710
 *     return have_slices or nslices, tuple(result)
 * 
 * cdef int assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim) except -1:             # <<<<<<<<<<<<<<
 *     for suboffset in suboffsets[:ndim]:
 *         if suboffset >= 0:
*/

static int assert_direct_dimensions(Py_ssize_t *__pyx_v_suboffsets, int __pyx_v_ndim) {
  Py_ssize_t __pyx_v_suboffset;
  int __pyx_r;
  Py_ssize_t *__pyx_t_1;
  Py_ssize_t *__pyx_t_2;
  Py_ssize_t *__pyx_t_3;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "View.MemoryView":711
 * 
 * cdef int assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim) except -1:
 *     for suboffset in suboffsets[:ndim]:             # <<<<<<<<<<<<<<
 *         if suboffset >= 0:
 *             raise ValueError, "Indirect dimensions not supported"
*/
  __pyx_t_2 = (__pyx_v_suboffsets + __pyx_v_ndim);
  for (__pyx_t_3 = __pyx_v_suboffsets; __pyx_t_3 < __pyx_t_2; __pyx_t_3++) {
    __pyx_t_1 = __pyx_t_3;
    __pyx_v_suboffset = (__pyx_t_1[0]);

    /* "View.MemoryView":712
 * cdef int assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim) except -1:
 *     for suboffset in suboffsets[:ndim]:
 *         if suboffset >= 0:             # <<<<<<<<<<<<<<
 *             raise ValueError, "Indirect dimensions not supported"
 *     return 0  # return type just used as an error flag
*/
    __pyx_t_4 = (__pyx_v_suboffset >= 0);
    if (unlikely(__pyx_t_4)) {

      /* "View.MemoryView":713
 *     for suboffset in suboffsets[:ndim]:
 *         if suboffset >= 0:
 *             raise ValueError, "Indirect dimensions not supported"             # <<<<<<<<<<<<<<
 *     return 0  # return type just used as an error flag
 * 
*/
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_ValueError))), __pyx_mstate_global->__pyx_kp_u_Indirect_dimensions_not_supporte, 0, 0);
      __PYX_ERR(1, 713, __pyx_L1_error)

      /* "View.MemoryView":712
 * cdef int assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim) except -1:
 *     for suboffset in suboffsets[:ndim]:
 *         if suboffset >= 0:             # <<<<<<<<<<<<<<
 *             raise ValueError, "Indirect dimensions not supported"
 *     return 0  # return type just used as an error flag
*/
    }
  }

  /* "View.MemoryView":714
 *         if suboffset >= 0:
 *             raise ValueError, "Indirect dimensions not supported"
 *     return 0  # return type just used as an error flag             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_r = 0;
  goto __pyx_L0;

  /* "View.MemoryView":710
 *     return have_slices or nslices, tuple(result)
 * 
 * cdef int assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim) except -1:             # <<<<<<<<<<<<<<
 *     for suboffset in suboffsets[:ndim]:
 *         if suboffset >= 0:
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("View.MemoryView.assert_direct_dimensions", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  return __pyx_r;
}

/* "View.MemoryView":720
 * 
 * 
 * @cname('__pyx_memview_slice')             # <<<<<<<<<<<<<<
 * cdef memoryview memview_slice(memoryview memview, object indices):
 *     cdef int new_ndim = 0, suboffset_dim = -1, dim
*/

static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_obj *__pyx_v_memview, PyObject *__pyx_v_indices) {
  int __pyx_v_new_ndim;
  int __pyx_v_suboffset_dim;
  int __pyx_v_dim;
  __Pyx_memviewslice __pyx_v_src;
  __Pyx_memviewslice __pyx_v_dst;
  __Pyx_memviewslice *__pyx_v_p_src;
  struct __pyx_memoryviewslice_obj *__pyx_v_memviewsliceobj = 0;
  __Pyx_memviewslice *__pyx_v_p_dst;
  int *__pyx_v_p_suboffset_dim;
  Py_ssize_t __pyx_v_start;
  Py_ssize_t __pyx_v_stop;
  Py_ssize_t __pyx_v_step;
  Py_ssize_t __pyx_v_cindex;
  int __pyx_v_have_start;
  int __pyx_v_have_stop;
  int __pyx_v_have_step;
  PyObject *__pyx_v_index = NULL;
  struct __pyx_memoryview_obj *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  struct __pyx_memoryview_obj *__pyx_t_3;
  char *__pyx_t_4;
  int __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  PyObject *(*__pyx_t_7)(PyObject *);
  PyObject *__pyx_t_8 = NULL;
  Py_ssize_t __pyx_t_9;
  int __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("memview_slice", 0);

  /* "View.MemoryView":722
 * @cname('__pyx_memview_slice')
 * cdef memoryview memview_slice(memoryview memview, object indices):
 *     cdef int new_ndim = 0, suboffset_dim = -1, dim             # <<<<<<<<<<<<<<
 *     cdef bint negative_step
 *     cdef __Pyx_memviewslice src, dst
*/
  __pyx_v_new_ndim = 0;
  __pyx_v_suboffset_dim = -1;

  /* "View.MemoryView":729
 * 
 * 
 *     memset(&dst, 0, sizeof(dst))             # <<<<<<<<<<<<<<
 * 
 *     cdef _memoryviewslice memviewsliceobj
*/
  (void)(memset((&__pyx_v_dst), 0, (sizeof(__pyx_v_dst))));

  /* "View.MemoryView":733
 *     cdef _memoryviewslice memviewsliceobj
 * 
 *     assert memview.view.ndim > 0             # <<<<<<<<<<<<<<
 * 
 *     if isinstance(memview, _memoryviewslice):
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_1 = (__pyx_v_memview->view.ndim > 0);
    if (unlikely(!__pyx_t_1)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(1, 733, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(1, 733, __pyx_L1_error)
  #endif

  /* "View.MemoryView":735
 *     assert memview.view.ndim > 0
 * 
 *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
 *         memviewsliceobj = memview
 *         p_src = &memviewsliceobj.from_slice
*/
  __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_mstate_global->__pyx_memoryviewslice_type); 
  if (__pyx_t_1) {

    /* "View.MemoryView":736
 * 
 *     if isinstance(memview, _memoryviewslice):
 *         memviewsliceobj = memview             # <<<<<<<<<<<<<<
 *         p_src = &memviewsliceobj.from_slice
 *     else:
*/
    __pyx_t_2 = ((PyObject *)__pyx_v_memview);
    __Pyx_INCREF(__pyx_t_2);
    if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_memoryviewslice_type))))) __PYX_ERR(1, 736, __pyx_L1_error)
    __pyx_v_memviewsliceobj = ((struct __pyx_memoryviewslice_obj *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "View.MemoryView":737
 *     if isinstance(memview, _memoryviewslice):
 *         memviewsliceobj = memview
 *         p_src = &memviewsliceobj.from_slice             # <<<<<<<<<<<<<<
 *     else:
 *         slice_copy(memview, &src)
*/
    __pyx_v_p_src = (&__pyx_v_memviewsliceobj->from_slice);

    /* "View.MemoryView":735
 *     assert memview.view.ndim > 0
 * 
 *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
 *         memviewsliceobj = memview
 *         p_src = &memviewsliceobj.from_slice
*/
    goto __pyx_L3;
  }

  /* "View.MemoryView":739
 *         p_src = &memviewsliceobj.from_slice
 *     else:
 *         slice_copy(memview, &src)             # <<<<<<<<<<<<<<
 *         p_src = &src
 * 
*/
  /*else*/ {
    __pyx_memoryview_slice_copy(__pyx_v_memview, (&__pyx_v_src));

    /* "View.MemoryView":740
 *     else:
 *         slice_copy(memview, &src)
 *         p_src = &src             # <<<<<<<<<<<<<<
 * 
 * 
*/
    __pyx_v_p_src = (&__pyx_v_src);
  }
  __pyx_L3:;

  /* "View.MemoryView":746
 * 
 * 
 *     dst.memview = p_src.memview             # <<<<<<<<<<<<<<
 *     dst.data = p_src.data
 * 
*/
  __pyx_t_3 = __pyx_v_p_src->memview;
  __pyx_v_dst.memview = __pyx_t_3;

  /* "View.MemoryView":747
 * 
 *     dst.memview = p_src.memview
 *     dst.data = p_src.data             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_t_4 = __pyx_v_p_src->data;
  __pyx_v_dst.data = __pyx_t_4;

  /* "View.MemoryView":752
 * 
 * 
 *     cdef __Pyx_memviewslice *p_dst = &dst             # <<<<<<<<<<<<<<
 *     cdef int *p_suboffset_dim = &suboffset_dim
 *     cdef Py_ssize_t start, stop, step, cindex
*/
  __pyx_v_p_dst = (&__pyx_v_dst);

  /* "View.MemoryView":753
 * 
 *     cdef __Pyx_memviewslice *p_dst = &dst
 *     cdef int *p_suboffset_dim = &suboffset_dim             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t start, stop, step, cindex
 *     cdef bint have_start, have_stop, have_step
*/
  __pyx_v_p_suboffset_dim = (&__pyx_v_suboffset_dim);

  /* "View.MemoryView":757
 *     cdef bint have_start, have_stop, have_step
 * 
 *     for dim, index in enumerate(indices):             # <<<<<<<<<<<<<<
 *         if PyIndex_Check(index):
 *             cindex = index
*/
  __pyx_t_5 = 0;
  if (likely(PyList_CheckExact(__pyx_v_indices)) || PyTuple_CheckExact(__pyx_v_indices)) {
    __pyx_t_2 = __pyx_v_indices; __Pyx_INCREF(__pyx_t_2);
    __pyx_t_6 = 0;
    __pyx_t_7 = NULL;
  } else {
    __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_indices); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 757, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 757, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_7)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
          #if !CYTHON_ASSUME_SAFE_SIZE
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 757, __pyx_L1_error)
          #endif
          if (__pyx_t_6 >= __pyx_temp) break;
        }
        __pyx_t_8 = __Pyx_PyList_GetItemRefFast(__pyx_t_2, __pyx_t_6, __Pyx_ReferenceSharing_OwnStrongReference);
        ++__pyx_t_6;
      } else {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
          #if !CYTHON_ASSUME_SAFE_SIZE
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 757, __pyx_L1_error)
          #endif
          if (__pyx_t_6 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_8 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_6));
        #else
        __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_6);
        #endif
        ++__pyx_t_6;
      }
      if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 757, __pyx_L1_error)
    } else {
      __pyx_t_8 = __pyx_t_7(__pyx_t_2);
      if (unlikely(!__pyx_t_8)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(1, 757, __pyx_L1_error)
          PyErr_Clear();
        }
        break;
      }
    }
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_XDECREF_SET(__pyx_v_index, __pyx_t_8);
    __pyx_t_8 = 0;
    __pyx_v_dim = __pyx_t_5;
    __pyx_t_5 = (__pyx_t_5 + 1);

    /* "View.MemoryView":758
 * 
 *     for dim, index in enumerate(indices):
 *         if PyIndex_Check(index):             # <<<<<<<<<<<<<<
 *             cindex = index
 *             slice_memviewslice(
*/
    __pyx_t_1 = (PyIndex_Check(__pyx_v_index) != 0);
    if (__pyx_t_1) {

      /* "View.MemoryView":759
 *     for dim, index in enumerate(indices):
 *         if PyIndex_Check(index):
 *             cindex = index             # <<<<<<<<<<<<<<
 *             slice_memviewslice(
 *                 p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
*/
      __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_v_index); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 759, __pyx_L1_error)
      __pyx_v_cindex = __pyx_t_9;

      /* "View.MemoryView":760
 *         if PyIndex_Check(index):
 *             cindex = index
 *             slice_memviewslice(             # <<<<<<<<<<<<<<
 *                 p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
 *                 dim, new_ndim, p_suboffset_dim,
*/
      __pyx_t_10 = __pyx_memoryview_slice_memviewslice(__pyx_v_p_dst, (__pyx_v_p_src->shape[__pyx_v_dim]), (__pyx_v_p_src->strides[__pyx_v_dim]), (__pyx_v_p_src->suboffsets[__pyx_v_dim]), __pyx_v_dim, __pyx_v_new_ndim, __pyx_v_p_suboffset_dim, __pyx_v_cindex, 0, 0, 0, 0, 0, 0); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(1, 760, __pyx_L1_error)

      /* "View.MemoryView":758
 * 
 *     for dim, index in enumerate(indices):
 *         if PyIndex_Check(index):             # <<<<<<<<<<<<<<
 *             cindex = index
 *             slice_memviewslice(
*/
      goto __pyx_L6;
    }

    /* "View.MemoryView":766
 *                 0, 0, 0, # have_{start,stop,step}
 *                 False)
 *         elif index is None:             # <<<<<<<<<<<<<<
 *             p_dst.shape[new_ndim] = 1
 *             p_dst.strides[new_ndim] = 0
*/
    __pyx_t_1 = (__pyx_v_index == Py_None);
    if (__pyx_t_1) {

      /* "View.MemoryView":767
 *                 False)
 *         elif index is None:
 *             p_dst.shape[new_ndim] = 1             # <<<<<<<<<<<<<<
 *             p_dst.strides[new_ndim] = 0
 *             p_dst.suboffsets[new_ndim] = -1
*/
      (__pyx_v_p_dst->shape[__pyx_v_new_ndim]) = 1;

      /* "View.MemoryView":768
 *         elif index is None:
 *             p_dst.shape[new_ndim] = 1
 *             p_dst.strides[new_ndim] = 0             # <<<<<<<<<<<<<<
 *             p_dst.suboffsets[new_ndim] = -1
 *             new_ndim += 1
*/
      (__pyx_v_p_dst->strides[__pyx_v_new_ndim]) = 0;

      /* "View.MemoryView":769
 *             p_dst.shape[new_ndim] = 1
 *             p_dst.strides[new_ndim] = 0
 *             p_dst.suboffsets[new_ndim] = -1             # <<<<<<<<<<<<<<
 *             new_ndim += 1
 *         else:
*/
      (__pyx_v_p_dst->suboffsets[__pyx_v_new_ndim]) = -1L;

      /* "View.MemoryView":770
 *             p_dst.strides[new_ndim] = 0
 *             p_dst.suboffsets[new_ndim] = -1
 *             new_ndim += 1             # <<<<<<<<<<<<<<
 *         else:
 *             start = index.start or 0
*/
      __pyx_v_new_ndim = (__pyx_v_new_ndim + 1);

      /* "View.MemoryView":766
 *                 0, 0, 0, # have_{start,stop,step}
 *                 False)
 *         elif index is None:             # <<<<<<<<<<<<<<
 *             p_dst.shape[new_ndim] = 1
 *             p_dst.strides[new_ndim] = 0
*/
      goto __pyx_L6;
    }

    /* "View.MemoryView":772
 *             new_ndim += 1
 *         else:
 *             start = index.start or 0             # <<<<<<<<<<<<<<
 *             stop = index.stop or 0
 *             step = index.step or 0
*/
    /*else*/ {
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_mstate_global->__pyx_n_u_start); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 772, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 772, __pyx_L1_error)
      if (!__pyx_t_1) {
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      } else {
        __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 772, __pyx_L1_error)
        __pyx_t_9 = __pyx_t_11;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        goto __pyx_L7_bool_binop_done;
      }
      __pyx_t_9 = 0;
      __pyx_L7_bool_binop_done:;
      __pyx_v_start = __pyx_t_9;

      /* "View.MemoryView":773
 *         else:
 *             start = index.start or 0
 *             stop = index.stop or 0             # <<<<<<<<<<<<<<
 *             step = index.step or 0
 * 
*/
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_mstate_global->__pyx_n_u_stop); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 773, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 773, __pyx_L1_error)
      if (!__pyx_t_1) {
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      } else {
        __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 773, __pyx_L1_error)
        __pyx_t_9 = __pyx_t_11;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        goto __pyx_L9_bool_binop_done;
      }
      __pyx_t_9 = 0;
      __pyx_L9_bool_binop_done:;
      __pyx_v_stop = __pyx_t_9;

      /* "View.MemoryView":774
 *             start = index.start or 0
 *             stop = index.stop or 0
 *             step = index.step or 0             # <<<<<<<<<<<<<<
 * 
 *             have_start = index.start is not None
*/
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_mstate_global->__pyx_n_u_step); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 774, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 774, __pyx_L1_error)
      if (!__pyx_t_1) {
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      } else {
        __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 774, __pyx_L1_error)
        __pyx_t_9 = __pyx_t_11;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        goto __pyx_L11_bool_binop_done;
      }
      __pyx_t_9 = 0;
      __pyx_L11_bool_binop_done:;
      __pyx_v_step = __pyx_t_9;

      /* "View.MemoryView":776
 *             step = index.step or 0
 * 
 *             have_start = index.start is not None             # <<<<<<<<<<<<<<
 *             have_stop = index.stop is not None
 *             have_step = index.step is not None
*/
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_mstate_global->__pyx_n_u_start); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 776, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_1 = (__pyx_t_8 != Py_None);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_v_have_start = __pyx_t_1;

      /* "View.MemoryView":777
 * 
 *             have_start = index.start is not None
 *             have_stop = index.stop is not None             # <<<<<<<<<<<<<<
 *             have_step = index.step is not None
 * 
*/
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_mstate_global->__pyx_n_u_stop); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 777, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_1 = (__pyx_t_8 != Py_None);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_v_have_stop = __pyx_t_1;

      /* "View.MemoryView":778
 *             have_start = index.start is not None
 *             have_stop = index.stop is not None
 *             have_step = index.step is not None             # <<<<<<<<<<<<<<
 * 
 *             slice_memviewslice(
*/
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_mstate_global->__pyx_n_u_step); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 778, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_1 = (__pyx_t_8 != Py_None);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_v_have_step = __pyx_t_1;

      /* "View.MemoryView":780
 *             have_step = index.step is not None
 * 
 *             slice_memviewslice(             # <<<<<<<<<<<<<<
 *                 p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
 *                 dim, new_ndim, p_suboffset_dim,
*/
      __pyx_t_10 = __pyx_memoryview_slice_memviewslice(__pyx_v_p_dst, (__pyx_v_p_src->shape[__pyx_v_dim]), (__pyx_v_p_src->strides[__pyx_v_dim]), (__pyx_v_p_src->suboffsets[__pyx_v_dim]), __pyx_v_dim, __pyx_v_new_ndim, __pyx_v_p_suboffset_dim, __pyx_v_start, __pyx_v_stop, __pyx_v_step, __pyx_v_have_start, __pyx_v_have_stop, __pyx_v_have_step, 1); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(1, 780, __pyx_L1_error)

      /* "View.MemoryView":786
 *                 have_start, have_stop, have_step,
 *                 True)
 *             new_ndim += 1             # <<<<<<<<<<<<<<
 * 
 *     if isinstance(memview, _memoryviewslice):
*/
      __pyx_v_new_ndim = (__pyx_v_new_ndim + 1);
    }
    __pyx_L6:;

    /* "View.MemoryView":757
 *     cdef bint have_start, have_stop, have_step
 * 
 *     for dim, index in enumerate(indices):             # <<<<<<<<<<<<<<
 *         if PyIndex_Check(index):
 *             cindex = index
*/
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "View.MemoryView":788
 *             new_ndim += 1
 * 
 *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
 *         return memoryview_fromslice(dst, new_ndim,
 *                                     memviewsliceobj.to_object_func,
*/
  __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_mstate_global->__pyx_memoryviewslice_type); 
  if (__pyx_t_1) {

    /* "View.MemoryView":789
 * 
 *     if isinstance(memview, _memoryviewslice):
 *         return memoryview_fromslice(dst, new_ndim,             # <<<<<<<<<<<<<<
 *                                     memviewsliceobj.to_object_func,
 *                                     memviewsliceobj.to_dtype_func,
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);

    /* "View.MemoryView":790
 *     if isinstance(memview, _memoryviewslice):
 *         return memoryview_fromslice(dst, new_ndim,
 *                                     memviewsliceobj.to_object_func,             # <<<<<<<<<<<<<<
 *                                     memviewsliceobj.to_dtype_func,
 *                                     memview.dtype_is_object)
*/
    if (unlikely(!__pyx_v_memviewsliceobj)) { __Pyx_RaiseUnboundLocalError("memviewsliceobj"); __PYX_ERR(1, 790, __pyx_L1_error) }

    /* "View.MemoryView":791
 *         return memoryview_fromslice(dst, new_ndim,
 *                                     memviewsliceobj.to_object_func,
 *                                     memviewsliceobj.to_dtype_func,             # <<<<<<<<<<<<<<
 *                                     memview.dtype_is_object)
 *     else:
*/
    if (unlikely(!__pyx_v_memviewsliceobj)) { __Pyx_RaiseUnboundLocalError("memviewsliceobj"); __PYX_ERR(1, 791, __pyx_L1_error) }

    /* "View.MemoryView":789
 * 
 *     if isinstance(memview, _memoryviewslice):
 *         return memoryview_fromslice(dst, new_ndim,             # <<<<<<<<<<<<<<
 *                                     memviewsliceobj.to_object_func,
 *                                     memviewsliceobj.to_dtype_func,
*/
    __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_v_dst, __pyx_v_new_ndim, __pyx_v_memviewsliceobj->to_object_func, __pyx_v_memviewsliceobj->to_dtype_func, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 789, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_memoryview_type))))) __PYX_ERR(1, 789, __pyx_L1_error)
    __pyx_r = ((struct __pyx_memoryview_obj *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "View.MemoryView":788
 *             new_ndim += 1
 * 
 *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
 *         return memoryview_fromslice(dst, new_ndim,
 *                                     memviewsliceobj.to_object_func,
*/
  }

  /* "View.MemoryView":794
 *                                     memview.dtype_is_object)
 *     else:
 *         return memoryview_fromslice(dst, new_ndim, NULL, NULL,             # <<<<<<<<<<<<<<
 *                                     memview.dtype_is_object)
 * 
*/
  /*else*/ {
    __Pyx_XDECREF((PyObject *)__pyx_r);

    /* "View.MemoryView":795
 *     else:
 *         return memoryview_fromslice(dst, new_ndim, NULL, NULL,
 *                                     memview.dtype_is_object)             # <<<<<<<<<<<<<<
 * 
 * 
*/
    __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_v_dst, __pyx_v_new_ndim, NULL, NULL, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 794, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);

    /* "View.MemoryView":794
 *                                     memview.dtype_is_object)
 *     else:
 *         return memoryview_fromslice(dst, new_ndim, NULL, NULL,             # <<<<<<<<<<<<<<
 *                                     memview.dtype_is_object)
 * 
*/
    if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_memoryview_type))))) __PYX_ERR(1, 794, __pyx_L1_error)
    __pyx_r = ((struct __pyx_memoryview_obj *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

  /* "View.MemoryView":720
 * 
 * 
 * @cname('__pyx_memview_slice')             # <<<<<<<<<<<<<<
 * cdef memoryview memview_slice(memoryview memview, object indices):
 *     cdef int new_ndim = 0, suboffset_dim = -1, dim
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("View.MemoryView.memview_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_memviewsliceobj);
  __Pyx_XDECREF(__pyx_v_index);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":801
 * 
 * 
 * @cname('__pyx_pybuffer_index')             # <<<<<<<<<<<<<<
 * cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index,
 *                           Py_ssize_t dim) except NULL:
*/

static char *__pyx_pybuffer_index(Py_buffer *__pyx_v_view, char *__pyx_v_bufp, Py_ssize_t __pyx_v_index, Py_ssize_t __pyx_v_dim) {
  Py_ssize_t __pyx_v_shape;
  Py_ssize_t __pyx_v_stride;
  Py_ssize_t __pyx_v_suboffset;
  Py_ssize_t __pyx_v_itemsize;
  char *__pyx_v_resultp;
  char *__pyx_r;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4[3];
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("pybuffer_index", 0);

  /* "View.MemoryView":804
 * cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index,
 *                           Py_ssize_t dim) except NULL:
 *     cdef Py_ssize_t shape, stride, suboffset = -1             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t itemsize = view.itemsize
 *     cdef char *resultp
*/
  __pyx_v_suboffset = -1L;

  /* "View.MemoryView":805
 *                           Py_ssize_t dim) except NULL:
 *     cdef Py_ssize_t shape, stride, suboffset = -1
 *     cdef Py_ssize_t itemsize = view.itemsize             # <<<<<<<<<<<<<<
 *     cdef char *resultp
 * 
*/
  __pyx_t_1 = __pyx_v_view->itemsize;
  __pyx_v_itemsize = __pyx_t_1;

  /* "View.MemoryView":808
 *     cdef char *resultp
 * 
 *     if view.ndim == 0:             # <<<<<<<<<<<<<<
 *         shape = view.len // itemsize
 *         stride = itemsize
*/
  __pyx_t_2 = (__pyx_v_view->ndim == 0);
  if (__pyx_t_2) {

    /* "View.MemoryView":809
 * 
 *     if view.ndim == 0:
 *         shape = view.len // itemsize             # <<<<<<<<<<<<<<
 *         stride = itemsize
 *     else:
*/
    if (unlikely(__pyx_v_itemsize == 0)) {
      PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
      __PYX_ERR(1, 809, __pyx_L1_error)
    }
    else if (sizeof(Py_ssize_t) == sizeof(long) && (!(((Py_ssize_t)-1) > 0)) && unlikely(__pyx_v_itemsize == (Py_ssize_t)-1)  && unlikely(__Pyx_UNARY_NEG_WOULD_OVERFLOW(__pyx_v_view->len))) {
      PyErr_SetString(PyExc_OverflowError, "value too large to perform division");
      __PYX_ERR(1, 809, __pyx_L1_error)
    }
    __pyx_v_shape = __Pyx_div_Py_ssize_t(__pyx_v_view->len, __pyx_v_itemsize, 0);

    /* "View.MemoryView":810
 *     if view.ndim == 0:
 *         shape = view.len // itemsize
 *         stride = itemsize             # <<<<<<<<<<<<<<
 *     else:
 *         shape = view.shape[dim]
*/
    __pyx_v_stride = __pyx_v_itemsize;

    /* "View.MemoryView":808
 *     cdef char *resultp
 * 
 *     if view.ndim == 0:             # <<<<<<<<<<<<<<
 *         shape = view.len // itemsize
 *         stride = itemsize
*/
    goto __pyx_L3;
  }

  /* "View.MemoryView":812
 *         stride = itemsize
 *     else:
 *         shape = view.shape[dim]             # <<<<<<<<<<<<<<
 *         stride = view.strides[dim]
 *         if view.suboffsets != NULL:
*/
  /*else*/ {
    __pyx_v_shape = (__pyx_v_view->shape[__pyx_v_dim]);

    /* "View.MemoryView":813
 *     else:
 *         shape = view.shape[dim]
 *         stride = view.strides[dim]             # <<<<<<<<<<<<<<
 *         if view.suboffsets != NULL:
 *             suboffset = view.suboffsets[dim]
*/
    __pyx_v_stride = (__pyx_v_view->strides[__pyx_v_dim]);

    /* "View.MemoryView":814
 *         shape = view.shape[dim]
 *         stride = view.strides[dim]
 *         if view.suboffsets != NULL:             # <<<<<<<<<<<<<<
 *             suboffset = view.suboffsets[dim]
 * 
*/
    __pyx_t_2 = (__pyx_v_view->suboffsets != NULL);
    if (__pyx_t_2) {

      /* "View.MemoryView":815
 *         stride = view.strides[dim]
 *         if view.suboffsets != NULL:
 *             suboffset = view.suboffsets[dim]             # <<<<<<<<<<<<<<
 * 
 *     if index < 0:
*/
      __pyx_v_suboffset = (__pyx_v_view->suboffsets[__pyx_v_dim]);

      /* "View.MemoryView":814
 *         shape = view.shape[dim]
 *         stride = view.strides[dim]
 *         if view.suboffsets != NULL:             # <<<<<<<<<<<<<<
 *             suboffset = view.suboffsets[dim]
 * 
*/
    }
  }
  __pyx_L3:;

  /* "View.MemoryView":817
 *             suboffset = view.suboffsets[dim]
 * 
 *     if index < 0:             # <<<<<<<<<<<<<<
 *         index += view.shape[dim]
 *         if index < 0:
*/
  __pyx_t_2 = (__pyx_v_index < 0);
  if (__pyx_t_2) {

    /* "View.MemoryView":818
 * 
 *     if index < 0:
 *         index += view.shape[dim]             # <<<<<<<<<<<<<<
 *         if index < 0:
 *             raise IndexError, f"Out of bounds on buffer access (axis {dim})"
*/
    __pyx_v_index = (__pyx_v_index + (__pyx_v_view->shape[__pyx_v_dim]));

    /* "View.MemoryView":819
 *     if index < 0:
 *         index += view.shape[dim]
 *         if index < 0:             # <<<<<<<<<<<<<<
 *             raise IndexError, f"Out of bounds on buffer access (axis {dim})"
 * 
*/
    __pyx_t_2 = (__pyx_v_index < 0);
    if (unlikely(__pyx_t_2)) {

      /* "View.MemoryView":820
 *         index += view.shape[dim]
 *         if index < 0:
 *             raise IndexError, f"Out of bounds on buffer access (axis {dim})"             # <<<<<<<<<<<<<<
 * 
 *     if index >= shape:
*/
      __pyx_t_3 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_dim, 0, ' ', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 820, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4[0] = __pyx_mstate_global->__pyx_kp_u_Out_of_bounds_on_buffer_access_a;
      __pyx_t_4[1] = __pyx_t_3;
      __pyx_t_4[2] = __pyx_mstate_global->__pyx_kp_u__5;
      __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_4, 3, 37 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 1, 127);
      if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 820, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_IndexError))), __pyx_t_5, 0, 0);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __PYX_ERR(1, 820, __pyx_L1_error)

      /* "View.MemoryView":819
 *     if index < 0:
 *         index += view.shape[dim]
 *         if index < 0:             # <<<<<<<<<<<<<<
 *             raise IndexError, f"Out of bounds on buffer access (axis {dim})"
 * 
*/
    }

    /* "View.MemoryView":817
 *             suboffset = view.suboffsets[dim]
 * 
 *     if index < 0:             # <<<<<<<<<<<<<<
 *         index += view.shape[dim]
 *         if index < 0:
*/
  }

  /* "View.MemoryView":822
 *             raise IndexError, f"Out of bounds on buffer access (axis {dim})"
 * 
 *     if index >= shape:             # <<<<<<<<<<<<<<
 *         raise IndexError, f"Out of bounds on buffer access (axis {dim})"
 * 
*/
  __pyx_t_2 = (__pyx_v_index >= __pyx_v_shape);
  if (unlikely(__pyx_t_2)) {

    /* "View.MemoryView":823
 * 
 *     if index >= shape:
 *         raise IndexError, f"Out of bounds on buffer access (axis {dim})"             # <<<<<<<<<<<<<<
 * 
 *     resultp = bufp + index * stride
*/
    __pyx_t_5 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_dim, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 823, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4[0] = __pyx_mstate_global->__pyx_kp_u_Out_of_bounds_on_buffer_access_a;
    __pyx_t_4[1] = __pyx_t_5;
    __pyx_t_4[2] = __pyx_mstate_global->__pyx_kp_u__5;
    __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_4, 3, 37 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + 1, 127);
    if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 823, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_IndexError))), __pyx_t_3, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(1, 823, __pyx_L1_error)

    /* "View.MemoryView":822
 *             raise IndexError, f"Out of bounds on buffer access (axis {dim})"
 * 
 *     if index >= shape:             # <<<<<<<<<<<<<<
 *         raise IndexError, f"Out of bounds on buffer access (axis {dim})"
 * 
*/
  }

  /* "View.MemoryView":825
 *         raise IndexError, f"Out of bounds on buffer access (axis {dim})"
 * 
 *     resultp = bufp + index * stride             # <<<<<<<<<<<<<<
 *     if suboffset >= 0:
 *         resultp = (<char **> resultp)[0] + suboffset
*/
  __pyx_v_resultp = (__pyx_v_bufp + (__pyx_v_index * __pyx_v_stride));

  /* "View.MemoryView":826
 * 
 *     resultp = bufp + index * stride
 *     if suboffset >= 0:             # <<<<<<<<<<<<<<
 *         resultp = (<char **> resultp)[0] + suboffset
 * 
*/
  __pyx_t_2 = (__pyx_v_suboffset >= 0);
  if (__pyx_t_2) {

    /* "View.MemoryView":827
 *     resultp = bufp + index * stride
 *     if suboffset >= 0:
 *         resultp = (<char **> resultp)[0] + suboffset             # <<<<<<<<<<<<<<
 * 
 *     return resultp
*/
    __pyx_v_resultp = ((((char **)__pyx_v_resultp)[0]) + __pyx_v_suboffset);

    /* "View.MemoryView":826
 * 
 *     resultp = bufp + index * stride
 *     if suboffset >= 0:             # <<<<<<<<<<<<<<
 *         resultp = (<char **> resultp)[0] + suboffset
 * 
*/
  }

  /* "View.MemoryView":829
 *         resultp = (<char **> resultp)[0] + suboffset
 * 
 *     return resultp             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_r = __pyx_v_resultp;
  goto __pyx_L0;

  /* "View.MemoryView":801
 * 
 * 
 * @cname('__pyx_pybuffer_index')             # <<<<<<<<<<<<<<
 * cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index,
 *                           Py_ssize_t dim) except NULL:
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("View.MemoryView.pybuffer_index", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":834
 * 
 * 
 * @cname('__pyx_memslice_transpose')             # <<<<<<<<<<<<<<
 * cdef int transpose_memslice(__Pyx_memviewslice *memslice) except -1 nogil:
 *     cdef int ndim = memslice.memview.view.ndim
*/

static int __pyx_memslice_transpose(__Pyx_memviewslice *__pyx_v_memslice) {
  int __pyx_v_ndim;
  Py_ssize_t *__pyx_v_shape;
  Py_ssize_t *__pyx_v_strides;
  int __pyx_v_i;
  int __pyx_v_j;
  int __pyx_r;
  int __pyx_t_1;
  Py_ssize_t *__pyx_t_2;
  long __pyx_t_3;
  long __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyGILState_STATE __pyx_gilstate_save;

  /* "View.MemoryView":836
 * @cname('__pyx_memslice_transpose')
 * cdef int transpose_memslice(__Pyx_memviewslice *memslice) except -1 nogil:
 *     cdef int ndim = memslice.memview.view.ndim             # <<<<<<<<<<<<<<
 * 
 *     cdef Py_ssize_t *shape = memslice.shape
*/
  __pyx_t_1 = __pyx_v_memslice->memview->view.ndim;
  __pyx_v_ndim = __pyx_t_1;

  /* "View.MemoryView":838
 *     cdef int ndim = memslice.memview.view.ndim
 * 
 *     cdef Py_ssize_t *shape = memslice.shape             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t *strides = memslice.strides
 * 
*/
  __pyx_t_2 = __pyx_v_memslice->shape;
  __pyx_v_shape = __pyx_t_2;

  /* "View.MemoryView":839
 * 
 *     cdef Py_ssize_t *shape = memslice.shape
 *     cdef Py_ssize_t *strides = memslice.strides             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_t_2 = __pyx_v_memslice->strides;
  __pyx_v_strides = __pyx_t_2;

  /* "View.MemoryView":843
 * 
 *     cdef int i, j
 *     for i in range(ndim // 2):             # <<<<<<<<<<<<<<
 *         j = ndim - 1 - i
 *         strides[i], strides[j] = strides[j], strides[i]
*/
  __pyx_t_3 = __Pyx_div_long(__pyx_v_ndim, 2, 1);
  __pyx_t_4 = __pyx_t_3;
  for (__pyx_t_1 = 0; __pyx_t_1 < __pyx_t_4; __pyx_t_1+=1) {
    __pyx_v_i = __pyx_t_1;

    /* "View.MemoryView":844
 *     cdef int i, j
 *     for i in range(ndim // 2):
 *         j = ndim - 1 - i             # <<<<<<<<<<<<<<
 *         strides[i], strides[j] = strides[j], strides[i]
 *         shape[i], shape[j] = shape[j], shape[i]
*/
    __pyx_v_j = ((__pyx_v_ndim - 1) - __pyx_v_i);

    /* "View.MemoryView":845
 *     for i in range(ndim // 2):
 *         j = ndim - 1 - i
 *         strides[i], strides[j] = strides[j], strides[i]             # <<<<<<<<<<<<<<
 *         shape[i], shape[j] = shape[j], shape[i]
 * 
*/
    __pyx_t_5 = (__pyx_v_strides[__pyx_v_j]);
    __pyx_t_6 = (__pyx_v_strides[__pyx_v_i]);
    (__pyx_v_strides[__pyx_v_i]) = __pyx_t_5;
    (__pyx_v_strides[__pyx_v_j]) = __pyx_t_6;

    /* "View.MemoryView":846
 *         j = ndim - 1 - i
 *         strides[i], strides[j] = strides[j], strides[i]
 *         shape[i], shape[j] = shape[j], shape[i]             # <<<<<<<<<<<<<<
 * 
 *         if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0:
*/
    __pyx_t_6 = (__pyx_v_shape[__pyx_v_j]);
    __pyx_t_5 = (__pyx_v_shape[__pyx_v_i]);
    (__pyx_v_shape[__pyx_v_i]) = __pyx_t_6;
    (__pyx_v_shape[__pyx_v_j]) = __pyx_t_5;

    /* "View.MemoryView":848
 *         shape[i], shape[j] = shape[j], shape[i]
 * 
 *         if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0:             # <<<<<<<<<<<<<<
 *             _err(PyExc_ValueError, "Cannot transpose memoryview with indirect dimensions")
 * 
*/
    __pyx_t_8 = ((__pyx_v_memslice->suboffsets[__pyx_v_i]) >= 0);
    if (!__pyx_t_8) {
    } else {
      __pyx_t_7 = __pyx_t_8;
      goto __pyx_L6_bool_binop_done;
    }
    __pyx_t_8 = ((__pyx_v_memslice->suboffsets[__pyx_v_j]) >= 0);
    __pyx_t_7 = __pyx_t_8;
    __pyx_L6_bool_binop_done:;
    if (__pyx_t_7) {

      /* "View.MemoryView":849
 * 
 *         if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0:
 *             _err(PyExc_ValueError, "Cannot transpose memoryview with indirect dimensions")             # <<<<<<<<<<<<<<
 * 
 *     return 0
*/
      __pyx_t_9 = __pyx_memoryview_err(PyExc_ValueError, __pyx_mstate_global->__pyx_kp_u_Cannot_transpose_memoryview_with); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(1, 849, __pyx_L1_error)

      /* "View.MemoryView":848
 *         shape[i], shape[j] = shape[j], shape[i]
 * 
 *         if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0:             # <<<<<<<<<<<<<<
 *             _err(PyExc_ValueError, "Cannot transpose memoryview with indirect dimensions")
 * 
*/
    }
  }

  /* "View.MemoryView":851
 *             _err(PyExc_ValueError, "Cannot transpose memoryview with indirect dimensions")
 * 
 *     return 0             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_r = 0;
  goto __pyx_L0;

  /* "View.MemoryView":834
 * 
 * 
 * @cname('__pyx_memslice_transpose')             # <<<<<<<<<<<<<<
 * cdef int transpose_memslice(__Pyx_memviewslice *memslice) except -1 nogil:
 *     cdef int ndim = memslice.memview.view.ndim
*/

  /* function exit code */
  __pyx_L1_error:;
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  __Pyx_AddTraceback("View.MemoryView.transpose_memslice", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  __pyx_L0:;
  return __pyx_r;
}

/* "View.MemoryView":869
 *     cdef int (*to_dtype_func)(char *, object) except 0
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         __PYX_XCLEAR_MEMVIEW(&self.from_slice, 1)
 * 
*/

/* Python wrapper */
static void __pyx_memoryviewslice___dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_memoryviewslice___dealloc__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self));

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

static void __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(struct __pyx_memoryviewslice_obj *__pyx_v_self) {

  /* "View.MemoryView":870
 * 
 *     def __dealloc__(self):
 *         __PYX_XCLEAR_MEMVIEW(&self.from_slice, 1)             # <<<<<<<<<<<<<<
 * 
 *     cdef convert_item_to_object(self, char *itemp):
*/
  __PYX_XCLEAR_MEMVIEW((&__pyx_v_self->from_slice), 1);

  /* "View.MemoryView":869
 *     cdef int (*to_dtype_func)(char *, object) except 0
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         __PYX_XCLEAR_MEMVIEW(&self.from_slice, 1)
 * 
*/

  /* function exit code */
}

/* "View.MemoryView":872
 *         __PYX_XCLEAR_MEMVIEW(&self.from_slice, 1)
 * 
 *     cdef convert_item_to_object(self, char *itemp):             # <<<<<<<<<<<<<<
 *         if self.to_object_func != NULL:
 *             return self.to_object_func(itemp)
*/

static PyObject *__pyx_memoryviewslice_convert_item_to_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("convert_item_to_object", 0);

  /* "View.MemoryView":873
 * 
 *     cdef convert_item_to_object(self, char *itemp):
 *         if self.to_object_func != NULL:             # <<<<<<<<<<<<<<
 *             return self.to_object_func(itemp)
 *         else:
*/
  __pyx_t_1 = (__pyx_v_self->to_object_func != NULL);
  if (__pyx_t_1) {

    /* "View.MemoryView":874
 *     cdef convert_item_to_object(self, char *itemp):
 *         if self.to_object_func != NULL:
 *             return self.to_object_func(itemp)             # <<<<<<<<<<<<<<
 *         else:
 *             return memoryview.convert_item_to_object(self, itemp)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_v_self->to_object_func(__pyx_v_itemp); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 874, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "View.MemoryView":873
 * 
 *     cdef convert_item_to_object(self, char *itemp):
 *         if self.to_object_func != NULL:             # <<<<<<<<<<<<<<
 *             return self.to_object_func(itemp)
 *         else:
*/
  }

  /* "View.MemoryView":876
 *             return self.to_object_func(itemp)
 *         else:
 *             return memoryview.convert_item_to_object(self, itemp)             # <<<<<<<<<<<<<<
 * 
 *     cdef assign_item_from_object(self, char *itemp, object value):
*/
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_memoryview_convert_item_to_object(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v_itemp); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 876, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

  /* "View.MemoryView":872
 *         __PYX_XCLEAR_MEMVIEW(&self.from_slice, 1)
 * 
 *     cdef convert_item_to_object(self, char *itemp):             # <<<<<<<<<<<<<<
 *         if self.to_object_func != NULL:
 *             return self.to_object_func(itemp)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("View.MemoryView._memoryviewslice.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":878
 *             return memoryview.convert_item_to_object(self, itemp)
 * 
 *     cdef assign_item_from_object(self, char *itemp, object value):             # <<<<<<<<<<<<<<
 *         if self.to_dtype_func != NULL:
 *             self.to_dtype_func(itemp, value)
*/

static PyObject *__pyx_memoryviewslice_assign_item_from_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("assign_item_from_object", 0);

  /* "View.MemoryView":879
 * 
 *     cdef assign_item_from_object(self, char *itemp, object value):
 *         if self.to_dtype_func != NULL:             # <<<<<<<<<<<<<<
 *             self.to_dtype_func(itemp, value)
 *         else:
*/
  __pyx_t_1 = (__pyx_v_self->to_dtype_func != NULL);
  if (__pyx_t_1) {

    /* "View.MemoryView":880
 *     cdef assign_item_from_object(self, char *itemp, object value):
 *         if self.to_dtype_func != NULL:
 *             self.to_dtype_func(itemp, value)             # <<<<<<<<<<<<<<
 *         else:
 *             memoryview.assign_item_from_object(self, itemp, value)
*/
    __pyx_t_2 = __pyx_v_self->to_dtype_func(__pyx_v_itemp, __pyx_v_value); if (unlikely(__pyx_t_2 == ((int)0))) __PYX_ERR(1, 880, __pyx_L1_error)

    /* "View.MemoryView":879
 * 
 *     cdef assign_item_from_object(self, char *itemp, object value):
 *         if self.to_dtype_func != NULL:             # <<<<<<<<<<<<<<
 *             self.to_dtype_func(itemp, value)
 *         else:
*/
    goto __pyx_L3;
  }

  /* "View.MemoryView":882
 *             self.to_dtype_func(itemp, value)
 *         else:
 *             memoryview.assign_item_from_object(self, itemp, value)             # <<<<<<<<<<<<<<
 * 
 *     cdef _get_base(self):
*/
  /*else*/ {
    __pyx_t_3 = __pyx_memoryview_assign_item_from_object(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v_itemp, __pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 882, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_L3:;

  /* "View.MemoryView":878
 *             return memoryview.convert_item_to_object(self, itemp)
 * 
 *     cdef assign_item_from_object(self, char *itemp, object value):             # <<<<<<<<<<<<<<
 *         if self.to_dtype_func != NULL:
 *             self.to_dtype_func(itemp, value)
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("View.MemoryView._memoryviewslice.assign_item_from_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":884
 *             memoryview.assign_item_from_object(self, itemp, value)
 * 
 *     cdef _get_base(self):             # <<<<<<<<<<<<<<
 *         return self.from_object
 * 
*/

static PyObject *__pyx_memoryviewslice__get_base(struct __pyx_memoryviewslice_obj *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_get_base", 0);

  /* "View.MemoryView":885
 * 
 *     cdef _get_base(self):
 *         return self.from_object             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->from_object);
  __pyx_r = __pyx_v_self->from_object;
  goto __pyx_L0;

  /* "View.MemoryView":884
 *             memoryview.assign_item_from_object(self, itemp, value)
 * 
 *     cdef _get_base(self):             # <<<<<<<<<<<<<<
 *         return self.from_object
 * 
*/

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

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/

/* Python wrapper */
static PyObject *__pyx_pw___pyx_memoryviewslice_1__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_pw___pyx_memoryviewslice_1__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf___pyx_memoryviewslice___reduce_cython__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self));

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

static PyObject *__pyx_pf___pyx_memoryviewslice___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("View.MemoryView._memoryviewslice.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/

/* Python wrapper */
static PyObject *__pyx_pw___pyx_memoryviewslice_3__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_pw___pyx_memoryviewslice_3__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(1, 3, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 3, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 3, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3, __pyx_L3_error)
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("View.MemoryView._memoryviewslice.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf___pyx_memoryviewslice_2__setstate_cython__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self), __pyx_v___pyx_state);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf___pyx_memoryviewslice_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("View.MemoryView._memoryviewslice.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":904
 *     pass  # ignore failure, it's a minor issue
 * 
 * @cname('__pyx_memoryview_fromslice')             # <<<<<<<<<<<<<<
 * cdef memoryview_fromslice(__Pyx_memviewslice memviewslice,
 *                           int ndim,
*/

static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice __pyx_v_memviewslice, int __pyx_v_ndim, PyObject *(*__pyx_v_to_object_func)(char *), int (*__pyx_v_to_dtype_func)(char *, PyObject *), int __pyx_v_dtype_is_object) {
  struct __pyx_memoryviewslice_obj *__pyx_v_result = 0;
  Py_ssize_t __pyx_v_suboffset;
  PyObject *__pyx_v_length = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_TypeInfo const *__pyx_t_4;
  Py_buffer __pyx_t_5;
  Py_ssize_t *__pyx_t_6;
  Py_ssize_t *__pyx_t_7;
  Py_ssize_t *__pyx_t_8;
  Py_ssize_t __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("memoryview_fromslice", 0);

  /* "View.MemoryView":913
 *     cdef _memoryviewslice result
 * 
 *     if <PyObject *> memviewslice.memview == Py_None:             # <<<<<<<<<<<<<<
 *         return None
 * 
*/
  __pyx_t_1 = (((PyObject *)__pyx_v_memviewslice.memview) == Py_None);
  if (__pyx_t_1) {

    /* "View.MemoryView":914
 * 
 *     if <PyObject *> memviewslice.memview == Py_None:
 *         return None             # <<<<<<<<<<<<<<
 * 
 * 
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "View.MemoryView":913
 *     cdef _memoryviewslice result
 * 
 *     if <PyObject *> memviewslice.memview == Py_None:             # <<<<<<<<<<<<<<
 *         return None
 * 
*/
  }

  /* "View.MemoryView":919
 * 
 * 
 *     result = _memoryviewslice.__new__(_memoryviewslice, None, 0, dtype_is_object)             # <<<<<<<<<<<<<<
 * 
 *     result.from_slice = memviewslice
*/
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 919, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 919, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, Py_None) != (0)) __PYX_ERR(1, 919, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_0);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_mstate_global->__pyx_int_0) != (0)) __PYX_ERR(1, 919, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2) != (0)) __PYX_ERR(1, 919, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_t_2 = ((PyObject *)__pyx_tp_new__memoryviewslice(((PyTypeObject *)__pyx_mstate_global->__pyx_memoryviewslice_type), __pyx_t_3, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 919, __pyx_L1_error)
  __Pyx_GOTREF((PyObject *)__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_result = ((struct __pyx_memoryviewslice_obj *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "View.MemoryView":921
 *     result = _memoryviewslice.__new__(_memoryviewslice, None, 0, dtype_is_object)
 * 
 *     result.from_slice = memviewslice             # <<<<<<<<<<<<<<
 *     __PYX_INC_MEMVIEW(&memviewslice, 1)
 * 
*/
  __pyx_v_result->from_slice = __pyx_v_memviewslice;

  /* "View.MemoryView":922
 * 
 *     result.from_slice = memviewslice
 *     __PYX_INC_MEMVIEW(&memviewslice, 1)             # <<<<<<<<<<<<<<
 * 
 *     result.from_object = (<memoryview> memviewslice.memview)._get_base()
*/
  __PYX_INC_MEMVIEW((&__pyx_v_memviewslice), 1);

  /* "View.MemoryView":924
 *     __PYX_INC_MEMVIEW(&memviewslice, 1)
 * 
 *     result.from_object = (<memoryview> memviewslice.memview)._get_base()             # <<<<<<<<<<<<<<
 *     result.typeinfo = memviewslice.memview.typeinfo
 * 
*/
  __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)((struct __pyx_memoryview_obj *)__pyx_v_memviewslice.memview)->__pyx_vtab)->_get_base(((struct __pyx_memoryview_obj *)__pyx_v_memviewslice.memview)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 924, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_result->from_object);
  __Pyx_DECREF(__pyx_v_result->from_object);
  __pyx_v_result->from_object = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "View.MemoryView":925
 * 
 *     result.from_object = (<memoryview> memviewslice.memview)._get_base()
 *     result.typeinfo = memviewslice.memview.typeinfo             # <<<<<<<<<<<<<<
 * 
 *     result.view = memviewslice.memview.view
*/
  __pyx_t_4 = __pyx_v_memviewslice.memview->typeinfo;
  __pyx_v_result->__pyx_base.typeinfo = __pyx_t_4;

  /* "View.MemoryView":927
 *     result.typeinfo = memviewslice.memview.typeinfo
 * 
 *     result.view = memviewslice.memview.view             # <<<<<<<<<<<<<<
 *     result.view.buf = <void *> memviewslice.data
 *     result.view.ndim = ndim
*/
  __pyx_t_5 = __pyx_v_memviewslice.memview->view;
  __pyx_v_result->__pyx_base.view = __pyx_t_5;

  /* "View.MemoryView":928
 * 
 *     result.view = memviewslice.memview.view
 *     result.view.buf = <void *> memviewslice.data             # <<<<<<<<<<<<<<
 *     result.view.ndim = ndim
 *     (<__pyx_buffer *> &result.view).obj = Py_None
*/
  __pyx_v_result->__pyx_base.view.buf = ((void *)__pyx_v_memviewslice.data);

  /* "View.MemoryView":929
 *     result.view = memviewslice.memview.view
 *     result.view.buf = <void *> memviewslice.data
 *     result.view.ndim = ndim             # <<<<<<<<<<<<<<
 *     (<__pyx_buffer *> &result.view).obj = Py_None
 *     Py_INCREF(Py_None)
*/
  __pyx_v_result->__pyx_base.view.ndim = __pyx_v_ndim;

  /* "View.MemoryView":930
 *     result.view.buf = <void *> memviewslice.data
 *     result.view.ndim = ndim
 *     (<__pyx_buffer *> &result.view).obj = Py_None             # <<<<<<<<<<<<<<
 *     Py_INCREF(Py_None)
 * 
*/
  ((Py_buffer *)(&__pyx_v_result->__pyx_base.view))->obj = Py_None;

  /* "View.MemoryView":931
 *     result.view.ndim = ndim
 *     (<__pyx_buffer *> &result.view).obj = Py_None
 *     Py_INCREF(Py_None)             # <<<<<<<<<<<<<<
 * 
 *     if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE:
*/
  Py_INCREF(Py_None);

  /* "View.MemoryView":933
 *     Py_INCREF(Py_None)
 * 
 *     if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE:             # <<<<<<<<<<<<<<
 *         result.flags = PyBUF_RECORDS
 *     else:
*/
  __pyx_t_1 = ((((struct __pyx_memoryview_obj *)__pyx_v_memviewslice.memview)->flags & PyBUF_WRITABLE) != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":934
 * 
 *     if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE:
 *         result.flags = PyBUF_RECORDS             # <<<<<<<<<<<<<<
 *     else:
 *         result.flags = PyBUF_RECORDS_RO
*/
    __pyx_v_result->__pyx_base.flags = PyBUF_RECORDS;

    /* "View.MemoryView":933
 *     Py_INCREF(Py_None)
 * 
 *     if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE:             # <<<<<<<<<<<<<<
 *         result.flags = PyBUF_RECORDS
 *     else:
*/
    goto __pyx_L4;
  }

  /* "View.MemoryView":936
 *         result.flags = PyBUF_RECORDS
 *     else:
 *         result.flags = PyBUF_RECORDS_RO             # <<<<<<<<<<<<<<
 * 
 *     result.view.shape = <Py_ssize_t *> result.from_slice.shape
*/
  /*else*/ {
    __pyx_v_result->__pyx_base.flags = PyBUF_RECORDS_RO;
  }
  __pyx_L4:;

  /* "View.MemoryView":938
 *         result.flags = PyBUF_RECORDS_RO
 * 
 *     result.view.shape = <Py_ssize_t *> result.from_slice.shape             # <<<<<<<<<<<<<<
 *     result.view.strides = <Py_ssize_t *> result.from_slice.strides
 * 
*/
  __pyx_v_result->__pyx_base.view.shape = ((Py_ssize_t *)__pyx_v_result->from_slice.shape);

  /* "View.MemoryView":939
 * 
 *     result.view.shape = <Py_ssize_t *> result.from_slice.shape
 *     result.view.strides = <Py_ssize_t *> result.from_slice.strides             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_v_result->__pyx_base.view.strides = ((Py_ssize_t *)__pyx_v_result->from_slice.strides);

  /* "View.MemoryView":942
 * 
 * 
 *     result.view.suboffsets = NULL             # <<<<<<<<<<<<<<
 *     for suboffset in result.from_slice.suboffsets[:ndim]:
 *         if suboffset >= 0:
*/
  __pyx_v_result->__pyx_base.view.suboffsets = NULL;

  /* "View.MemoryView":943
 * 
 *     result.view.suboffsets = NULL
 *     for suboffset in result.from_slice.suboffsets[:ndim]:             # <<<<<<<<<<<<<<
 *         if suboffset >= 0:
 *             result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets
*/
  __pyx_t_7 = (__pyx_v_result->from_slice.suboffsets + __pyx_v_ndim);
  for (__pyx_t_8 = __pyx_v_result->from_slice.suboffsets; __pyx_t_8 < __pyx_t_7; __pyx_t_8++) {
    __pyx_t_6 = __pyx_t_8;
    __pyx_v_suboffset = (__pyx_t_6[0]);

    /* "View.MemoryView":944
 *     result.view.suboffsets = NULL
 *     for suboffset in result.from_slice.suboffsets[:ndim]:
 *         if suboffset >= 0:             # <<<<<<<<<<<<<<
 *             result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets
 *             break
*/
    __pyx_t_1 = (__pyx_v_suboffset >= 0);
    if (__pyx_t_1) {

      /* "View.MemoryView":945
 *     for suboffset in result.from_slice.suboffsets[:ndim]:
 *         if suboffset >= 0:
 *             result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets             # <<<<<<<<<<<<<<
 *             break
 * 
*/
      __pyx_v_result->__pyx_base.view.suboffsets = ((Py_ssize_t *)__pyx_v_result->from_slice.suboffsets);

      /* "View.MemoryView":946
 *         if suboffset >= 0:
 *             result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets
 *             break             # <<<<<<<<<<<<<<
 * 
 *     result.view.len = result.view.itemsize
*/
      goto __pyx_L6_break;

      /* "View.MemoryView":944
 *     result.view.suboffsets = NULL
 *     for suboffset in result.from_slice.suboffsets[:ndim]:
 *         if suboffset >= 0:             # <<<<<<<<<<<<<<
 *             result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets
 *             break
*/
    }
  }
  __pyx_L6_break:;

  /* "View.MemoryView":948
 *             break
 * 
 *     result.view.len = result.view.itemsize             # <<<<<<<<<<<<<<
 *     for length in result.view.shape[:ndim]:
 *         result.view.len *= length
*/
  __pyx_t_9 = __pyx_v_result->__pyx_base.view.itemsize;
  __pyx_v_result->__pyx_base.view.len = __pyx_t_9;

  /* "View.MemoryView":949
 * 
 *     result.view.len = result.view.itemsize
 *     for length in result.view.shape[:ndim]:             # <<<<<<<<<<<<<<
 *         result.view.len *= length
 * 
*/
  __pyx_t_7 = (__pyx_v_result->__pyx_base.view.shape + __pyx_v_ndim);
  for (__pyx_t_8 = __pyx_v_result->__pyx_base.view.shape; __pyx_t_8 < __pyx_t_7; __pyx_t_8++) {
    __pyx_t_6 = __pyx_t_8;
    __pyx_t_2 = PyLong_FromSsize_t((__pyx_t_6[0])); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 949, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_XDECREF_SET(__pyx_v_length, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "View.MemoryView":950
 *     result.view.len = result.view.itemsize
 *     for length in result.view.shape[:ndim]:
 *         result.view.len *= length             # <<<<<<<<<<<<<<
 * 
 *     result.to_object_func = to_object_func
*/
    __pyx_t_2 = PyLong_FromSsize_t(__pyx_v_result->__pyx_base.view.len); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 950, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyNumber_InPlaceMultiply(__pyx_t_2, __pyx_v_length); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 950, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 950, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_result->__pyx_base.view.len = __pyx_t_9;
  }

  /* "View.MemoryView":952
 *         result.view.len *= length
 * 
 *     result.to_object_func = to_object_func             # <<<<<<<<<<<<<<
 *     result.to_dtype_func = to_dtype_func
 * 
*/
  __pyx_v_result->to_object_func = __pyx_v_to_object_func;

  /* "View.MemoryView":953
 * 
 *     result.to_object_func = to_object_func
 *     result.to_dtype_func = to_dtype_func             # <<<<<<<<<<<<<<
 * 
 *     return result
*/
  __pyx_v_result->to_dtype_func = __pyx_v_to_dtype_func;

  /* "View.MemoryView":955
 *     result.to_dtype_func = to_dtype_func
 * 
 *     return result             # <<<<<<<<<<<<<<
 * 
 * @cname('__pyx_memoryview_get_slice_from_memoryview')
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_result);
  __pyx_r = ((PyObject *)__pyx_v_result);
  goto __pyx_L0;

  /* "View.MemoryView":904
 *     pass  # ignore failure, it's a minor issue
 * 
 * @cname('__pyx_memoryview_fromslice')             # <<<<<<<<<<<<<<
 * cdef memoryview_fromslice(__Pyx_memviewslice memviewslice,
 *                           int ndim,
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("View.MemoryView.memoryview_fromslice", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_length);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":957
 *     return result
 * 
 * @cname('__pyx_memoryview_get_slice_from_memoryview')             # <<<<<<<<<<<<<<
 * cdef __Pyx_memviewslice *get_slice_from_memview(memoryview memview,
 *                                                    __Pyx_memviewslice *mslice) except NULL:
*/

static __Pyx_memviewslice *__pyx_memoryview_get_slice_from_memoryview(struct __pyx_memoryview_obj *__pyx_v_memview, __Pyx_memviewslice *__pyx_v_mslice) {
  struct __pyx_memoryviewslice_obj *__pyx_v_obj = 0;
  __Pyx_memviewslice *__pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_slice_from_memview", 0);

  /* "View.MemoryView":961
 *                                                    __Pyx_memviewslice *mslice) except NULL:
 *     cdef _memoryviewslice obj
 *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
 *         obj = memview
 *         return &obj.from_slice
*/
  __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_mstate_global->__pyx_memoryviewslice_type); 
  if (__pyx_t_1) {

    /* "View.MemoryView":962
 *     cdef _memoryviewslice obj
 *     if isinstance(memview, _memoryviewslice):
 *         obj = memview             # <<<<<<<<<<<<<<
 *         return &obj.from_slice
 *     else:
*/
    __pyx_t_2 = ((PyObject *)__pyx_v_memview);
    __Pyx_INCREF(__pyx_t_2);
    if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_memoryviewslice_type))))) __PYX_ERR(1, 962, __pyx_L1_error)
    __pyx_v_obj = ((struct __pyx_memoryviewslice_obj *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "View.MemoryView":963
 *     if isinstance(memview, _memoryviewslice):
 *         obj = memview
 *         return &obj.from_slice             # <<<<<<<<<<<<<<
 *     else:
 *         slice_copy(memview, mslice)
*/
    __pyx_r = (&__pyx_v_obj->from_slice);
    goto __pyx_L0;

    /* "View.MemoryView":961
 *                                                    __Pyx_memviewslice *mslice) except NULL:
 *     cdef _memoryviewslice obj
 *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
 *         obj = memview
 *         return &obj.from_slice
*/
  }

  /* "View.MemoryView":965
 *         return &obj.from_slice
 *     else:
 *         slice_copy(memview, mslice)             # <<<<<<<<<<<<<<
 *         return mslice
 * 
*/
  /*else*/ {
    __pyx_memoryview_slice_copy(__pyx_v_memview, __pyx_v_mslice);

    /* "View.MemoryView":966
 *     else:
 *         slice_copy(memview, mslice)
 *         return mslice             # <<<<<<<<<<<<<<
 * 
 * @cname('__pyx_memoryview_slice_copy')
*/
    __pyx_r = __pyx_v_mslice;
    goto __pyx_L0;
  }

  /* "View.MemoryView":957
 *     return result
 * 
 * @cname('__pyx_memoryview_get_slice_from_memoryview')             # <<<<<<<<<<<<<<
 * cdef __Pyx_memviewslice *get_slice_from_memview(memoryview memview,
 *                                                    __Pyx_memviewslice *mslice) except NULL:
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("View.MemoryView.get_slice_from_memview", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_obj);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":968
 *         return mslice
 * 
 * @cname('__pyx_memoryview_slice_copy')             # <<<<<<<<<<<<<<
 * cdef void slice_copy(memoryview memview, __Pyx_memviewslice *dst) noexcept:
 *     cdef int dim
*/

static void __pyx_memoryview_slice_copy(struct __pyx_memoryview_obj *__pyx_v_memview, __Pyx_memviewslice *__pyx_v_dst) {
  int __pyx_v_dim;
  Py_ssize_t *__pyx_v_shape;
  Py_ssize_t *__pyx_v_strides;
  Py_ssize_t *__pyx_v_suboffsets;
  Py_ssize_t *__pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  int __pyx_t_6;

  /* "View.MemoryView":973
 *     cdef (Py_ssize_t*) shape, strides, suboffsets
 * 
 *     shape = memview.view.shape             # <<<<<<<<<<<<<<
 *     strides = memview.view.strides
 *     suboffsets = memview.view.suboffsets
*/
  __pyx_t_1 = __pyx_v_memview->view.shape;
  __pyx_v_shape = __pyx_t_1;

  /* "View.MemoryView":974
 * 
 *     shape = memview.view.shape
 *     strides = memview.view.strides             # <<<<<<<<<<<<<<
 *     suboffsets = memview.view.suboffsets
 * 
*/
  __pyx_t_1 = __pyx_v_memview->view.strides;
  __pyx_v_strides = __pyx_t_1;

  /* "View.MemoryView":975
 *     shape = memview.view.shape
 *     strides = memview.view.strides
 *     suboffsets = memview.view.suboffsets             # <<<<<<<<<<<<<<
 * 
 *     dst.memview = <__pyx_memoryview *> memview
*/
  __pyx_t_1 = __pyx_v_memview->view.suboffsets;
  __pyx_v_suboffsets = __pyx_t_1;

  /* "View.MemoryView":977
 *     suboffsets = memview.view.suboffsets
 * 
 *     dst.memview = <__pyx_memoryview *> memview             # <<<<<<<<<<<<<<
 *     dst.data = <char *> memview.view.buf
 * 
*/
  __pyx_v_dst->memview = ((struct __pyx_memoryview_obj *)__pyx_v_memview);

  /* "View.MemoryView":978
 * 
 *     dst.memview = <__pyx_memoryview *> memview
 *     dst.data = <char *> memview.view.buf             # <<<<<<<<<<<<<<
 * 
 *     for dim in range(memview.view.ndim):
*/
  __pyx_v_dst->data = ((char *)__pyx_v_memview->view.buf);

  /* "View.MemoryView":980
 *     dst.data = <char *> memview.view.buf
 * 
 *     for dim in range(memview.view.ndim):             # <<<<<<<<<<<<<<
 *         dst.shape[dim] = shape[dim]
 *         dst.strides[dim] = strides[dim]
*/
  __pyx_t_2 = __pyx_v_memview->view.ndim;
  __pyx_t_3 = __pyx_t_2;
  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
    __pyx_v_dim = __pyx_t_4;

    /* "View.MemoryView":981
 * 
 *     for dim in range(memview.view.ndim):
 *         dst.shape[dim] = shape[dim]             # <<<<<<<<<<<<<<
 *         dst.strides[dim] = strides[dim]
 *         dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1
*/
    (__pyx_v_dst->shape[__pyx_v_dim]) = (__pyx_v_shape[__pyx_v_dim]);

    /* "View.MemoryView":982
 *     for dim in range(memview.view.ndim):
 *         dst.shape[dim] = shape[dim]
 *         dst.strides[dim] = strides[dim]             # <<<<<<<<<<<<<<
 *         dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1
 * 
*/
    (__pyx_v_dst->strides[__pyx_v_dim]) = (__pyx_v_strides[__pyx_v_dim]);

    /* "View.MemoryView":983
 *         dst.shape[dim] = shape[dim]
 *         dst.strides[dim] = strides[dim]
 *         dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1             # <<<<<<<<<<<<<<
 * 
 * @cname('__pyx_memoryview_copy_object')
*/
    __pyx_t_6 = (__pyx_v_suboffsets != 0);
    if (__pyx_t_6) {
      __pyx_t_5 = (__pyx_v_suboffsets[__pyx_v_dim]);
    } else {
      __pyx_t_5 = -1L;
    }
    (__pyx_v_dst->suboffsets[__pyx_v_dim]) = __pyx_t_5;
  }

  /* "View.MemoryView":968
 *         return mslice
 * 
 * @cname('__pyx_memoryview_slice_copy')             # <<<<<<<<<<<<<<
 * cdef void slice_copy(memoryview memview, __Pyx_memviewslice *dst) noexcept:
 *     cdef int dim
*/

  /* function exit code */
}

/* "View.MemoryView":985
 *         dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1
 * 
 * @cname('__pyx_memoryview_copy_object')             # <<<<<<<<<<<<<<
 * cdef memoryview_copy(memoryview memview):
 *     "Create a new memoryview object"
*/

static PyObject *__pyx_memoryview_copy_object(struct __pyx_memoryview_obj *__pyx_v_memview) {
  __Pyx_memviewslice __pyx_v_memviewslice;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("memoryview_copy", 0);

  /* "View.MemoryView":989
 *     "Create a new memoryview object"
 *     cdef __Pyx_memviewslice memviewslice
 *     slice_copy(memview, &memviewslice)             # <<<<<<<<<<<<<<
 *     return memoryview_copy_from_slice(memview, &memviewslice)
 * 
*/
  __pyx_memoryview_slice_copy(__pyx_v_memview, (&__pyx_v_memviewslice));

  /* "View.MemoryView":990
 *     cdef __Pyx_memviewslice memviewslice
 *     slice_copy(memview, &memviewslice)
 *     return memoryview_copy_from_slice(memview, &memviewslice)             # <<<<<<<<<<<<<<
 * 
 * @cname('__pyx_memoryview_copy_object_from_slice')
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_memoryview_copy_object_from_slice(__pyx_v_memview, (&__pyx_v_memviewslice)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 990, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":985
 *         dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1
 * 
 * @cname('__pyx_memoryview_copy_object')             # <<<<<<<<<<<<<<
 * cdef memoryview_copy(memoryview memview):
 *     "Create a new memoryview object"
*/

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

/* "View.MemoryView":992
 *     return memoryview_copy_from_slice(memview, &memviewslice)
 * 
 * @cname('__pyx_memoryview_copy_object_from_slice')             # <<<<<<<<<<<<<<
 * cdef memoryview_copy_from_slice(memoryview memview, __Pyx_memviewslice *memviewslice):
 *     """
*/

static PyObject *__pyx_memoryview_copy_object_from_slice(struct __pyx_memoryview_obj *__pyx_v_memview, __Pyx_memviewslice *__pyx_v_memviewslice) {
  PyObject *(*__pyx_v_to_object_func)(char *);
  int (*__pyx_v_to_dtype_func)(char *, PyObject *);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *(*__pyx_t_2)(char *);
  int (*__pyx_t_3)(char *, PyObject *);
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("memoryview_copy_from_slice", 0);

  /* "View.MemoryView":1000
 *     cdef int (*to_dtype_func)(char *, object) except 0
 * 
 *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
 *         to_object_func = (<_memoryviewslice> memview).to_object_func
 *         to_dtype_func = (<_memoryviewslice> memview).to_dtype_func
*/
  __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_mstate_global->__pyx_memoryviewslice_type); 
  if (__pyx_t_1) {

    /* "View.MemoryView":1001
 * 
 *     if isinstance(memview, _memoryviewslice):
 *         to_object_func = (<_memoryviewslice> memview).to_object_func             # <<<<<<<<<<<<<<
 *         to_dtype_func = (<_memoryviewslice> memview).to_dtype_func
 *     else:
*/
    __pyx_t_2 = ((struct __pyx_memoryviewslice_obj *)__pyx_v_memview)->to_object_func;
    __pyx_v_to_object_func = __pyx_t_2;

    /* "View.MemoryView":1002
 *     if isinstance(memview, _memoryviewslice):
 *         to_object_func = (<_memoryviewslice> memview).to_object_func
 *         to_dtype_func = (<_memoryviewslice> memview).to_dtype_func             # <<<<<<<<<<<<<<
 *     else:
 *         to_object_func = NULL
*/
    __pyx_t_3 = ((struct __pyx_memoryviewslice_obj *)__pyx_v_memview)->to_dtype_func;
    __pyx_v_to_dtype_func = __pyx_t_3;

    /* "View.MemoryView":1000
 *     cdef int (*to_dtype_func)(char *, object) except 0
 * 
 *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
 *         to_object_func = (<_memoryviewslice> memview).to_object_func
 *         to_dtype_func = (<_memoryviewslice> memview).to_dtype_func
*/
    goto __pyx_L3;
  }

  /* "View.MemoryView":1004
 *         to_dtype_func = (<_memoryviewslice> memview).to_dtype_func
 *     else:
 *         to_object_func = NULL             # <<<<<<<<<<<<<<
 *         to_dtype_func = NULL
 * 
*/
  /*else*/ {
    __pyx_v_to_object_func = NULL;

    /* "View.MemoryView":1005
 *     else:
 *         to_object_func = NULL
 *         to_dtype_func = NULL             # <<<<<<<<<<<<<<
 * 
 *     return memoryview_fromslice(memviewslice[0], memview.view.ndim,
*/
    __pyx_v_to_dtype_func = NULL;
  }
  __pyx_L3:;

  /* "View.MemoryView":1007
 *         to_dtype_func = NULL
 * 
 *     return memoryview_fromslice(memviewslice[0], memview.view.ndim,             # <<<<<<<<<<<<<<
 *                                 to_object_func, to_dtype_func,
 *                                 memview.dtype_is_object)
*/
  __Pyx_XDECREF(__pyx_r);

  /* "View.MemoryView":1009
 *     return memoryview_fromslice(memviewslice[0], memview.view.ndim,
 *                                 to_object_func, to_dtype_func,
 *                                 memview.dtype_is_object)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_t_4 = __pyx_memoryview_fromslice((__pyx_v_memviewslice[0]), __pyx_v_memview->view.ndim, __pyx_v_to_object_func, __pyx_v_to_dtype_func, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1007, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":992
 *     return memoryview_copy_from_slice(memview, &memviewslice)
 * 
 * @cname('__pyx_memoryview_copy_object_from_slice')             # <<<<<<<<<<<<<<
 * cdef memoryview_copy_from_slice(memoryview memview, __Pyx_memviewslice *memviewslice):
 *     """
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("View.MemoryView.memoryview_copy_from_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":1015
 * 
 * 
 * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) noexcept nogil:             # <<<<<<<<<<<<<<
 *     return -arg if arg < 0 else arg
 * 
*/

static Py_ssize_t abs_py_ssize_t(Py_ssize_t __pyx_v_arg) {
  Py_ssize_t __pyx_r;
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;

  /* "View.MemoryView":1016
 * 
 * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) noexcept nogil:
 *     return -arg if arg < 0 else arg             # <<<<<<<<<<<<<<
 * 
 * @cname('__pyx_get_best_slice_order')
*/
  __pyx_t_2 = (__pyx_v_arg < 0);
  if (__pyx_t_2) {
    __pyx_t_1 = (-__pyx_v_arg);
  } else {
    __pyx_t_1 = __pyx_v_arg;
  }
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "View.MemoryView":1015
 * 
 * 
 * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) noexcept nogil:             # <<<<<<<<<<<<<<
 *     return -arg if arg < 0 else arg
 * 
*/

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

/* "View.MemoryView":1018
 *     return -arg if arg < 0 else arg
 * 
 * @cname('__pyx_get_best_slice_order')             # <<<<<<<<<<<<<<
 * cdef char get_best_order(__Pyx_memviewslice *mslice, int ndim) noexcept nogil:
 *     """
*/

static char __pyx_get_best_slice_order(__Pyx_memviewslice *__pyx_v_mslice, int __pyx_v_ndim) {
  int __pyx_v_i;
  Py_ssize_t __pyx_v_c_stride;
  Py_ssize_t __pyx_v_f_stride;
  char __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;

  /* "View.MemoryView":1024
 *     """
 *     cdef int i
 *     cdef Py_ssize_t c_stride = 0             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t f_stride = 0
 * 
*/
  __pyx_v_c_stride = 0;

  /* "View.MemoryView":1025
 *     cdef int i
 *     cdef Py_ssize_t c_stride = 0
 *     cdef Py_ssize_t f_stride = 0             # <<<<<<<<<<<<<<
 * 
 *     for i in range(ndim - 1, -1, -1):
*/
  __pyx_v_f_stride = 0;

  /* "View.MemoryView":1027
 *     cdef Py_ssize_t f_stride = 0
 * 
 *     for i in range(ndim - 1, -1, -1):             # <<<<<<<<<<<<<<
 *         if mslice.shape[i] > 1:
 *             c_stride = mslice.strides[i]
*/
  for (__pyx_t_1 = (__pyx_v_ndim - 1); __pyx_t_1 > -1; __pyx_t_1-=1) {
    __pyx_v_i = __pyx_t_1;

    /* "View.MemoryView":1028
 * 
 *     for i in range(ndim - 1, -1, -1):
 *         if mslice.shape[i] > 1:             # <<<<<<<<<<<<<<
 *             c_stride = mslice.strides[i]
 *             break
*/
    __pyx_t_2 = ((__pyx_v_mslice->shape[__pyx_v_i]) > 1);
    if (__pyx_t_2) {

      /* "View.MemoryView":1029
 *     for i in range(ndim - 1, -1, -1):
 *         if mslice.shape[i] > 1:
 *             c_stride = mslice.strides[i]             # <<<<<<<<<<<<<<
 *             break
 * 
*/
      __pyx_v_c_stride = (__pyx_v_mslice->strides[__pyx_v_i]);

      /* "View.MemoryView":1030
 *         if mslice.shape[i] > 1:
 *             c_stride = mslice.strides[i]
 *             break             # <<<<<<<<<<<<<<
 * 
 *     for i in range(ndim):
*/
      goto __pyx_L4_break;

      /* "View.MemoryView":1028
 * 
 *     for i in range(ndim - 1, -1, -1):
 *         if mslice.shape[i] > 1:             # <<<<<<<<<<<<<<
 *             c_stride = mslice.strides[i]
 *             break
*/
    }
  }
  __pyx_L4_break:;

  /* "View.MemoryView":1032
 *             break
 * 
 *     for i in range(ndim):             # <<<<<<<<<<<<<<
 *         if mslice.shape[i] > 1:
 *             f_stride = mslice.strides[i]
*/
  __pyx_t_1 = __pyx_v_ndim;
  __pyx_t_3 = __pyx_t_1;
  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
    __pyx_v_i = __pyx_t_4;

    /* "View.MemoryView":1033
 * 
 *     for i in range(ndim):
 *         if mslice.shape[i] > 1:             # <<<<<<<<<<<<<<
 *             f_stride = mslice.strides[i]
 *             break
*/
    __pyx_t_2 = ((__pyx_v_mslice->shape[__pyx_v_i]) > 1);
    if (__pyx_t_2) {

      /* "View.MemoryView":1034
 *     for i in range(ndim):
 *         if mslice.shape[i] > 1:
 *             f_stride = mslice.strides[i]             # <<<<<<<<<<<<<<
 *             break
 * 
*/
      __pyx_v_f_stride = (__pyx_v_mslice->strides[__pyx_v_i]);

      /* "View.MemoryView":1035
 *         if mslice.shape[i] > 1:
 *             f_stride = mslice.strides[i]
 *             break             # <<<<<<<<<<<<<<
 * 
 *     if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride):
*/
      goto __pyx_L7_break;

      /* "View.MemoryView":1033
 * 
 *     for i in range(ndim):
 *         if mslice.shape[i] > 1:             # <<<<<<<<<<<<<<
 *             f_stride = mslice.strides[i]
 *             break
*/
    }
  }
  __pyx_L7_break:;

  /* "View.MemoryView":1037
 *             break
 * 
 *     if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride):             # <<<<<<<<<<<<<<
 *         return 'C'
 *     else:
*/
  __pyx_t_2 = (abs_py_ssize_t(__pyx_v_c_stride) <= abs_py_ssize_t(__pyx_v_f_stride));
  if (__pyx_t_2) {

    /* "View.MemoryView":1038
 * 
 *     if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride):
 *         return 'C'             # <<<<<<<<<<<<<<
 *     else:
 *         return 'F'
*/
    __pyx_r = 'C';
    goto __pyx_L0;

    /* "View.MemoryView":1037
 *             break
 * 
 *     if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride):             # <<<<<<<<<<<<<<
 *         return 'C'
 *     else:
*/
  }

  /* "View.MemoryView":1040
 *         return 'C'
 *     else:
 *         return 'F'             # <<<<<<<<<<<<<<
 * 
 * @cython.cdivision(True)
*/
  /*else*/ {
    __pyx_r = 'F';
    goto __pyx_L0;
  }

  /* "View.MemoryView":1018
 *     return -arg if arg < 0 else arg
 * 
 * @cname('__pyx_get_best_slice_order')             # <<<<<<<<<<<<<<
 * cdef char get_best_order(__Pyx_memviewslice *mslice, int ndim) noexcept nogil:
 *     """
*/

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

/* "View.MemoryView":1042
 *         return 'F'
 * 
 * @cython.cdivision(True)             # <<<<<<<<<<<<<<
 * cdef void _copy_strided_to_strided(char *src_data, Py_ssize_t *src_strides,
 *                                    char *dst_data, Py_ssize_t *dst_strides,
*/

static void _copy_strided_to_strided(char *__pyx_v_src_data, Py_ssize_t *__pyx_v_src_strides, char *__pyx_v_dst_data, Py_ssize_t *__pyx_v_dst_strides, Py_ssize_t *__pyx_v_src_shape, Py_ssize_t *__pyx_v_dst_shape, int __pyx_v_ndim, size_t __pyx_v_itemsize) {
  CYTHON_UNUSED Py_ssize_t __pyx_v_i;
  CYTHON_UNUSED Py_ssize_t __pyx_v_src_extent;
  Py_ssize_t __pyx_v_dst_extent;
  Py_ssize_t __pyx_v_src_stride;
  Py_ssize_t __pyx_v_dst_stride;
  int __pyx_t_1;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  Py_ssize_t __pyx_t_5;

  /* "View.MemoryView":1050
 * 
 *     cdef Py_ssize_t i
 *     cdef Py_ssize_t src_extent = src_shape[0]             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t dst_extent = dst_shape[0]
 *     cdef Py_ssize_t src_stride = src_strides[0]
*/
  __pyx_v_src_extent = (__pyx_v_src_shape[0]);

  /* "View.MemoryView":1051
 *     cdef Py_ssize_t i
 *     cdef Py_ssize_t src_extent = src_shape[0]
 *     cdef Py_ssize_t dst_extent = dst_shape[0]             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t src_stride = src_strides[0]
 *     cdef Py_ssize_t dst_stride = dst_strides[0]
*/
  __pyx_v_dst_extent = (__pyx_v_dst_shape[0]);

  /* "View.MemoryView":1052
 *     cdef Py_ssize_t src_extent = src_shape[0]
 *     cdef Py_ssize_t dst_extent = dst_shape[0]
 *     cdef Py_ssize_t src_stride = src_strides[0]             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t dst_stride = dst_strides[0]
 * 
*/
  __pyx_v_src_stride = (__pyx_v_src_strides[0]);

  /* "View.MemoryView":1053
 *     cdef Py_ssize_t dst_extent = dst_shape[0]
 *     cdef Py_ssize_t src_stride = src_strides[0]
 *     cdef Py_ssize_t dst_stride = dst_strides[0]             # <<<<<<<<<<<<<<
 * 
 *     if ndim == 1:
*/
  __pyx_v_dst_stride = (__pyx_v_dst_strides[0]);

  /* "View.MemoryView":1055
 *     cdef Py_ssize_t dst_stride = dst_strides[0]
 * 
 *     if ndim == 1:             # <<<<<<<<<<<<<<
 *         if (src_stride > 0 and dst_stride > 0 and
 *                 <size_t> src_stride == itemsize == <size_t> dst_stride):
*/
  __pyx_t_1 = (__pyx_v_ndim == 1);
  if (__pyx_t_1) {

    /* "View.MemoryView":1056
 * 
 *     if ndim == 1:
 *         if (src_stride > 0 and dst_stride > 0 and             # <<<<<<<<<<<<<<
 *                 <size_t> src_stride == itemsize == <size_t> dst_stride):
 *             memcpy(dst_data, src_data, itemsize * dst_extent)
*/
    __pyx_t_2 = (__pyx_v_src_stride > 0);
    if (__pyx_t_2) {
    } else {
      __pyx_t_1 = __pyx_t_2;
      goto __pyx_L5_bool_binop_done;
    }
    __pyx_t_2 = (__pyx_v_dst_stride > 0);
    if (__pyx_t_2) {
    } else {
      __pyx_t_1 = __pyx_t_2;
      goto __pyx_L5_bool_binop_done;
    }

    /* "View.MemoryView":1057
 *     if ndim == 1:
 *         if (src_stride > 0 and dst_stride > 0 and
 *                 <size_t> src_stride == itemsize == <size_t> dst_stride):             # <<<<<<<<<<<<<<
 *             memcpy(dst_data, src_data, itemsize * dst_extent)
 *         else:
*/
    __pyx_t_2 = (((size_t)__pyx_v_src_stride) == __pyx_v_itemsize);
    if (__pyx_t_2) {
      __pyx_t_2 = (__pyx_v_itemsize == ((size_t)__pyx_v_dst_stride));
    }
    __pyx_t_1 = __pyx_t_2;
    __pyx_L5_bool_binop_done:;

    /* "View.MemoryView":1056
 * 
 *     if ndim == 1:
 *         if (src_stride > 0 and dst_stride > 0 and             # <<<<<<<<<<<<<<
 *                 <size_t> src_stride == itemsize == <size_t> dst_stride):
 *             memcpy(dst_data, src_data, itemsize * dst_extent)
*/
    if (__pyx_t_1) {

      /* "View.MemoryView":1058
 *         if (src_stride > 0 and dst_stride > 0 and
 *                 <size_t> src_stride == itemsize == <size_t> dst_stride):
 *             memcpy(dst_data, src_data, itemsize * dst_extent)             # <<<<<<<<<<<<<<
 *         else:
 *             for i in range(dst_extent):
*/
      (void)(memcpy(__pyx_v_dst_data, __pyx_v_src_data, (__pyx_v_itemsize * __pyx_v_dst_extent)));

      /* "View.MemoryView":1056
 * 
 *     if ndim == 1:
 *         if (src_stride > 0 and dst_stride > 0 and             # <<<<<<<<<<<<<<
 *                 <size_t> src_stride == itemsize == <size_t> dst_stride):
 *             memcpy(dst_data, src_data, itemsize * dst_extent)
*/
      goto __pyx_L4;
    }

    /* "View.MemoryView":1060
 *             memcpy(dst_data, src_data, itemsize * dst_extent)
 *         else:
 *             for i in range(dst_extent):             # <<<<<<<<<<<<<<
 *                 memcpy(dst_data, src_data, itemsize)
 *                 src_data += src_stride
*/
    /*else*/ {
      __pyx_t_3 = __pyx_v_dst_extent;
      __pyx_t_4 = __pyx_t_3;
      for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
        __pyx_v_i = __pyx_t_5;

        /* "View.MemoryView":1061
 *         else:
 *             for i in range(dst_extent):
 *                 memcpy(dst_data, src_data, itemsize)             # <<<<<<<<<<<<<<
 *                 src_data += src_stride
 *                 dst_data += dst_stride
*/
        (void)(memcpy(__pyx_v_dst_data, __pyx_v_src_data, __pyx_v_itemsize));

        /* "View.MemoryView":1062
 *             for i in range(dst_extent):
 *                 memcpy(dst_data, src_data, itemsize)
 *                 src_data += src_stride             # <<<<<<<<<<<<<<
 *                 dst_data += dst_stride
 *     else:
*/
        __pyx_v_src_data = (__pyx_v_src_data + __pyx_v_src_stride);

        /* "View.MemoryView":1063
 *                 memcpy(dst_data, src_data, itemsize)
 *                 src_data += src_stride
 *                 dst_data += dst_stride             # <<<<<<<<<<<<<<
 *     else:
 *         for i in range(dst_extent):
*/
        __pyx_v_dst_data = (__pyx_v_dst_data + __pyx_v_dst_stride);
      }
    }
    __pyx_L4:;

    /* "View.MemoryView":1055
 *     cdef Py_ssize_t dst_stride = dst_strides[0]
 * 
 *     if ndim == 1:             # <<<<<<<<<<<<<<
 *         if (src_stride > 0 and dst_stride > 0 and
 *                 <size_t> src_stride == itemsize == <size_t> dst_stride):
*/
    goto __pyx_L3;
  }

  /* "View.MemoryView":1065
 *                 dst_data += dst_stride
 *     else:
 *         for i in range(dst_extent):             # <<<<<<<<<<<<<<
 *             _copy_strided_to_strided(src_data, src_strides + 1,
 *                                      dst_data, dst_strides + 1,
*/
  /*else*/ {
    __pyx_t_3 = __pyx_v_dst_extent;
    __pyx_t_4 = __pyx_t_3;
    for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
      __pyx_v_i = __pyx_t_5;

      /* "View.MemoryView":1066
 *     else:
 *         for i in range(dst_extent):
 *             _copy_strided_to_strided(src_data, src_strides + 1,             # <<<<<<<<<<<<<<
 *                                      dst_data, dst_strides + 1,
 *                                      src_shape + 1, dst_shape + 1,
*/
      _copy_strided_to_strided(__pyx_v_src_data, (__pyx_v_src_strides + 1), __pyx_v_dst_data, (__pyx_v_dst_strides + 1), (__pyx_v_src_shape + 1), (__pyx_v_dst_shape + 1), (__pyx_v_ndim - 1), __pyx_v_itemsize);

      /* "View.MemoryView":1070
 *                                      src_shape + 1, dst_shape + 1,
 *                                      ndim - 1, itemsize)
 *             src_data += src_stride             # <<<<<<<<<<<<<<
 *             dst_data += dst_stride
 * 
*/
      __pyx_v_src_data = (__pyx_v_src_data + __pyx_v_src_stride);

      /* "View.MemoryView":1071
 *                                      ndim - 1, itemsize)
 *             src_data += src_stride
 *             dst_data += dst_stride             # <<<<<<<<<<<<<<
 * 
 * cdef void copy_strided_to_strided(__Pyx_memviewslice *src,
*/
      __pyx_v_dst_data = (__pyx_v_dst_data + __pyx_v_dst_stride);
    }
  }
  __pyx_L3:;

  /* "View.MemoryView":1042
 *         return 'F'
 * 
 * @cython.cdivision(True)             # <<<<<<<<<<<<<<
 * cdef void _copy_strided_to_strided(char *src_data, Py_ssize_t *src_strides,
 *                                    char *dst_data, Py_ssize_t *dst_strides,
*/

  /* function exit code */
}

/* "View.MemoryView":1073
 *             dst_data += dst_stride
 * 
 * cdef void copy_strided_to_strided(__Pyx_memviewslice *src,             # <<<<<<<<<<<<<<
 *                                   __Pyx_memviewslice *dst,
 *                                   int ndim, size_t itemsize) noexcept nogil:
*/

static void copy_strided_to_strided(__Pyx_memviewslice *__pyx_v_src, __Pyx_memviewslice *__pyx_v_dst, int __pyx_v_ndim, size_t __pyx_v_itemsize) {

  /* "View.MemoryView":1076
 *                                   __Pyx_memviewslice *dst,
 *                                   int ndim, size_t itemsize) noexcept nogil:
 *     _copy_strided_to_strided(src.data, src.strides, dst.data, dst.strides,             # <<<<<<<<<<<<<<
 *                              src.shape, dst.shape, ndim, itemsize)
 * 
*/
  _copy_strided_to_strided(__pyx_v_src->data, __pyx_v_src->strides, __pyx_v_dst->data, __pyx_v_dst->strides, __pyx_v_src->shape, __pyx_v_dst->shape, __pyx_v_ndim, __pyx_v_itemsize);

  /* "View.MemoryView":1073
 *             dst_data += dst_stride
 * 
 * cdef void copy_strided_to_strided(__Pyx_memviewslice *src,             # <<<<<<<<<<<<<<
 *                                   __Pyx_memviewslice *dst,
 *                                   int ndim, size_t itemsize) noexcept nogil:
*/

  /* function exit code */
}

/* "View.MemoryView":1079
 *                              src.shape, dst.shape, ndim, itemsize)
 * 
 * @cname('__pyx_memoryview_slice_get_size')             # <<<<<<<<<<<<<<
 * cdef Py_ssize_t slice_get_size(__Pyx_memviewslice *src, int ndim) noexcept nogil:
 *     "Return the size of the memory occupied by the slice in number of bytes"
*/

static Py_ssize_t __pyx_memoryview_slice_get_size(__Pyx_memviewslice *__pyx_v_src, int __pyx_v_ndim) {
  Py_ssize_t __pyx_v_shape;
  Py_ssize_t __pyx_v_size;
  Py_ssize_t __pyx_r;
  Py_ssize_t __pyx_t_1;
  Py_ssize_t *__pyx_t_2;
  Py_ssize_t *__pyx_t_3;
  Py_ssize_t *__pyx_t_4;

  /* "View.MemoryView":1082
 * cdef Py_ssize_t slice_get_size(__Pyx_memviewslice *src, int ndim) noexcept nogil:
 *     "Return the size of the memory occupied by the slice in number of bytes"
 *     cdef Py_ssize_t shape, size = src.memview.view.itemsize             # <<<<<<<<<<<<<<
 * 
 *     for shape in src.shape[:ndim]:
*/
  __pyx_t_1 = __pyx_v_src->memview->view.itemsize;
  __pyx_v_size = __pyx_t_1;

  /* "View.MemoryView":1084
 *     cdef Py_ssize_t shape, size = src.memview.view.itemsize
 * 
 *     for shape in src.shape[:ndim]:             # <<<<<<<<<<<<<<
 *         size *= shape
 * 
*/
  __pyx_t_3 = (__pyx_v_src->shape + __pyx_v_ndim);
  for (__pyx_t_4 = __pyx_v_src->shape; __pyx_t_4 < __pyx_t_3; __pyx_t_4++) {
    __pyx_t_2 = __pyx_t_4;
    __pyx_v_shape = (__pyx_t_2[0]);

    /* "View.MemoryView":1085
 * 
 *     for shape in src.shape[:ndim]:
 *         size *= shape             # <<<<<<<<<<<<<<
 * 
 *     return size
*/
    __pyx_v_size = (__pyx_v_size * __pyx_v_shape);
  }

  /* "View.MemoryView":1087
 *         size *= shape
 * 
 *     return size             # <<<<<<<<<<<<<<
 * 
 * @cname('__pyx_fill_contig_strides_array')
*/
  __pyx_r = __pyx_v_size;
  goto __pyx_L0;

  /* "View.MemoryView":1079
 *                              src.shape, dst.shape, ndim, itemsize)
 * 
 * @cname('__pyx_memoryview_slice_get_size')             # <<<<<<<<<<<<<<
 * cdef Py_ssize_t slice_get_size(__Pyx_memviewslice *src, int ndim) noexcept nogil:
 *     "Return the size of the memory occupied by the slice in number of bytes"
*/

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

/* "View.MemoryView":1089
 *     return size
 * 
 * @cname('__pyx_fill_contig_strides_array')             # <<<<<<<<<<<<<<
 * cdef Py_ssize_t fill_contig_strides_array(
 *                 Py_ssize_t *shape, Py_ssize_t *strides, Py_ssize_t stride,
*/

static Py_ssize_t __pyx_fill_contig_strides_array(Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, Py_ssize_t __pyx_v_stride, int __pyx_v_ndim, char __pyx_v_order) {
  int __pyx_v_idx;
  Py_ssize_t __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;

  /* "View.MemoryView":1099
 *     cdef int idx
 * 
 *     if order == 'F':             # <<<<<<<<<<<<<<
 *         for idx in range(ndim):
 *             strides[idx] = stride
*/
  __pyx_t_1 = (__pyx_v_order == 'F');
  if (__pyx_t_1) {

    /* "View.MemoryView":1100
 * 
 *     if order == 'F':
 *         for idx in range(ndim):             # <<<<<<<<<<<<<<
 *             strides[idx] = stride
 *             stride *= shape[idx]
*/
    __pyx_t_2 = __pyx_v_ndim;
    __pyx_t_3 = __pyx_t_2;
    for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
      __pyx_v_idx = __pyx_t_4;

      /* "View.MemoryView":1101
 *     if order == 'F':
 *         for idx in range(ndim):
 *             strides[idx] = stride             # <<<<<<<<<<<<<<
 *             stride *= shape[idx]
 *     else:
*/
      (__pyx_v_strides[__pyx_v_idx]) = __pyx_v_stride;

      /* "View.MemoryView":1102
 *         for idx in range(ndim):
 *             strides[idx] = stride
 *             stride *= shape[idx]             # <<<<<<<<<<<<<<
 *     else:
 *         for idx in range(ndim - 1, -1, -1):
*/
      __pyx_v_stride = (__pyx_v_stride * (__pyx_v_shape[__pyx_v_idx]));
    }

    /* "View.MemoryView":1099
 *     cdef int idx
 * 
 *     if order == 'F':             # <<<<<<<<<<<<<<
 *         for idx in range(ndim):
 *             strides[idx] = stride
*/
    goto __pyx_L3;
  }

  /* "View.MemoryView":1104
 *             stride *= shape[idx]
 *     else:
 *         for idx in range(ndim - 1, -1, -1):             # <<<<<<<<<<<<<<
 *             strides[idx] = stride
 *             stride *= shape[idx]
*/
  /*else*/ {
    for (__pyx_t_2 = (__pyx_v_ndim - 1); __pyx_t_2 > -1; __pyx_t_2-=1) {
      __pyx_v_idx = __pyx_t_2;

      /* "View.MemoryView":1105
 *     else:
 *         for idx in range(ndim - 1, -1, -1):
 *             strides[idx] = stride             # <<<<<<<<<<<<<<
 *             stride *= shape[idx]
 * 
*/
      (__pyx_v_strides[__pyx_v_idx]) = __pyx_v_stride;

      /* "View.MemoryView":1106
 *         for idx in range(ndim - 1, -1, -1):
 *             strides[idx] = stride
 *             stride *= shape[idx]             # <<<<<<<<<<<<<<
 * 
 *     return stride
*/
      __pyx_v_stride = (__pyx_v_stride * (__pyx_v_shape[__pyx_v_idx]));
    }
  }
  __pyx_L3:;

  /* "View.MemoryView":1108
 *             stride *= shape[idx]
 * 
 *     return stride             # <<<<<<<<<<<<<<
 * 
 * @cname('__pyx_memoryview_copy_data_to_temp')
*/
  __pyx_r = __pyx_v_stride;
  goto __pyx_L0;

  /* "View.MemoryView":1089
 *     return size
 * 
 * @cname('__pyx_fill_contig_strides_array')             # <<<<<<<<<<<<<<
 * cdef Py_ssize_t fill_contig_strides_array(
 *                 Py_ssize_t *shape, Py_ssize_t *strides, Py_ssize_t stride,
*/

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

/* "View.MemoryView":1110
 *     return stride
 * 
 * @cname('__pyx_memoryview_copy_data_to_temp')             # <<<<<<<<<<<<<<
 * cdef void *copy_data_to_temp(__Pyx_memviewslice *src,
 *                              __Pyx_memviewslice *tmpslice,
*/

static void *__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice *__pyx_v_src, __Pyx_memviewslice *__pyx_v_tmpslice, char __pyx_v_order, int __pyx_v_ndim) {
  int __pyx_v_i;
  void *__pyx_v_result;
  size_t __pyx_v_itemsize;
  size_t __pyx_v_size;
  void *__pyx_r;
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  struct __pyx_memoryview_obj *__pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyGILState_STATE __pyx_gilstate_save;

  /* "View.MemoryView":1122
 *     cdef void *result
 * 
 *     cdef size_t itemsize = src.memview.view.itemsize             # <<<<<<<<<<<<<<
 *     cdef size_t size = slice_get_size(src, ndim)
 * 
*/
  __pyx_t_1 = __pyx_v_src->memview->view.itemsize;
  __pyx_v_itemsize = __pyx_t_1;

  /* "View.MemoryView":1123
 * 
 *     cdef size_t itemsize = src.memview.view.itemsize
 *     cdef size_t size = slice_get_size(src, ndim)             # <<<<<<<<<<<<<<
 * 
 *     result = malloc(size)
*/
  __pyx_v_size = __pyx_memoryview_slice_get_size(__pyx_v_src, __pyx_v_ndim);

  /* "View.MemoryView":1125
 *     cdef size_t size = slice_get_size(src, ndim)
 * 
 *     result = malloc(size)             # <<<<<<<<<<<<<<
 *     if not result:
 *         _err_no_memory()
*/
  __pyx_v_result = malloc(__pyx_v_size);

  /* "View.MemoryView":1126
 * 
 *     result = malloc(size)
 *     if not result:             # <<<<<<<<<<<<<<
 *         _err_no_memory()
 * 
*/
  __pyx_t_2 = (!(__pyx_v_result != 0));
  if (__pyx_t_2) {

    /* "View.MemoryView":1127
 *     result = malloc(size)
 *     if not result:
 *         _err_no_memory()             # <<<<<<<<<<<<<<
 * 
 * 
*/
    __pyx_t_3 = __pyx_memoryview_err_no_memory(); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 1127, __pyx_L1_error)

    /* "View.MemoryView":1126
 * 
 *     result = malloc(size)
 *     if not result:             # <<<<<<<<<<<<<<
 *         _err_no_memory()
 * 
*/
  }

  /* "View.MemoryView":1130
 * 
 * 
 *     tmpslice.data = <char *> result             # <<<<<<<<<<<<<<
 *     tmpslice.memview = src.memview
 *     for i in range(ndim):
*/
  __pyx_v_tmpslice->data = ((char *)__pyx_v_result);

  /* "View.MemoryView":1131
 * 
 *     tmpslice.data = <char *> result
 *     tmpslice.memview = src.memview             # <<<<<<<<<<<<<<
 *     for i in range(ndim):
 *         tmpslice.shape[i] = src.shape[i]
*/
  __pyx_t_4 = __pyx_v_src->memview;
  __pyx_v_tmpslice->memview = __pyx_t_4;

  /* "View.MemoryView":1132
 *     tmpslice.data = <char *> result
 *     tmpslice.memview = src.memview
 *     for i in range(ndim):             # <<<<<<<<<<<<<<
 *         tmpslice.shape[i] = src.shape[i]
 *         tmpslice.suboffsets[i] = -1
*/
  __pyx_t_3 = __pyx_v_ndim;
  __pyx_t_5 = __pyx_t_3;
  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
    __pyx_v_i = __pyx_t_6;

    /* "View.MemoryView":1133
 *     tmpslice.memview = src.memview
 *     for i in range(ndim):
 *         tmpslice.shape[i] = src.shape[i]             # <<<<<<<<<<<<<<
 *         tmpslice.suboffsets[i] = -1
 * 
*/
    (__pyx_v_tmpslice->shape[__pyx_v_i]) = (__pyx_v_src->shape[__pyx_v_i]);

    /* "View.MemoryView":1134
 *     for i in range(ndim):
 *         tmpslice.shape[i] = src.shape[i]
 *         tmpslice.suboffsets[i] = -1             # <<<<<<<<<<<<<<
 * 
 *     fill_contig_strides_array(&tmpslice.shape[0], &tmpslice.strides[0], itemsize, ndim, order)
*/
    (__pyx_v_tmpslice->suboffsets[__pyx_v_i]) = -1L;
  }

  /* "View.MemoryView":1136
 *         tmpslice.suboffsets[i] = -1
 * 
 *     fill_contig_strides_array(&tmpslice.shape[0], &tmpslice.strides[0], itemsize, ndim, order)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  (void)(__pyx_fill_contig_strides_array((&(__pyx_v_tmpslice->shape[0])), (&(__pyx_v_tmpslice->strides[0])), __pyx_v_itemsize, __pyx_v_ndim, __pyx_v_order));

  /* "View.MemoryView":1139
 * 
 * 
 *     for i in range(ndim):             # <<<<<<<<<<<<<<
 *         if tmpslice.shape[i] == 1:
 *             tmpslice.strides[i] = 0
*/
  __pyx_t_3 = __pyx_v_ndim;
  __pyx_t_5 = __pyx_t_3;
  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
    __pyx_v_i = __pyx_t_6;

    /* "View.MemoryView":1140
 * 
 *     for i in range(ndim):
 *         if tmpslice.shape[i] == 1:             # <<<<<<<<<<<<<<
 *             tmpslice.strides[i] = 0
 * 
*/
    __pyx_t_2 = ((__pyx_v_tmpslice->shape[__pyx_v_i]) == 1);
    if (__pyx_t_2) {

      /* "View.MemoryView":1141
 *     for i in range(ndim):
 *         if tmpslice.shape[i] == 1:
 *             tmpslice.strides[i] = 0             # <<<<<<<<<<<<<<
 * 
 *     if slice_is_contig(src[0], order, ndim):
*/
      (__pyx_v_tmpslice->strides[__pyx_v_i]) = 0;

      /* "View.MemoryView":1140
 * 
 *     for i in range(ndim):
 *         if tmpslice.shape[i] == 1:             # <<<<<<<<<<<<<<
 *             tmpslice.strides[i] = 0
 * 
*/
    }
  }

  /* "View.MemoryView":1143
 *             tmpslice.strides[i] = 0
 * 
 *     if slice_is_contig(src[0], order, ndim):             # <<<<<<<<<<<<<<
 *         memcpy(result, src.data, size)
 *     else:
*/
  __pyx_t_2 = __pyx_memviewslice_is_contig((__pyx_v_src[0]), __pyx_v_order, __pyx_v_ndim);
  if (__pyx_t_2) {

    /* "View.MemoryView":1144
 * 
 *     if slice_is_contig(src[0], order, ndim):
 *         memcpy(result, src.data, size)             # <<<<<<<<<<<<<<
 *     else:
 *         copy_strided_to_strided(src, tmpslice, ndim, itemsize)
*/
    (void)(memcpy(__pyx_v_result, __pyx_v_src->data, __pyx_v_size));

    /* "View.MemoryView":1143
 *             tmpslice.strides[i] = 0
 * 
 *     if slice_is_contig(src[0], order, ndim):             # <<<<<<<<<<<<<<
 *         memcpy(result, src.data, size)
 *     else:
*/
    goto __pyx_L9;
  }

  /* "View.MemoryView":1146
 *         memcpy(result, src.data, size)
 *     else:
 *         copy_strided_to_strided(src, tmpslice, ndim, itemsize)             # <<<<<<<<<<<<<<
 * 
 *     return result
*/
  /*else*/ {
    copy_strided_to_strided(__pyx_v_src, __pyx_v_tmpslice, __pyx_v_ndim, __pyx_v_itemsize);
  }
  __pyx_L9:;

  /* "View.MemoryView":1148
 *         copy_strided_to_strided(src, tmpslice, ndim, itemsize)
 * 
 *     return result             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "View.MemoryView":1110
 *     return stride
 * 
 * @cname('__pyx_memoryview_copy_data_to_temp')             # <<<<<<<<<<<<<<
 * cdef void *copy_data_to_temp(__Pyx_memviewslice *src,
 *                              __Pyx_memviewslice *tmpslice,
*/

  /* function exit code */
  __pyx_L1_error:;
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  __Pyx_AddTraceback("View.MemoryView.copy_data_to_temp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  __pyx_L0:;
  return __pyx_r;
}

/* "View.MemoryView":1152
 * 
 * 
 * @cname('__pyx_memoryview_err_extents')             # <<<<<<<<<<<<<<
 * cdef int _err_extents(int i, Py_ssize_t extent1,
 *                              Py_ssize_t extent2) except -1 with gil:
*/

static int __pyx_memoryview_err_extents(int __pyx_v_i, Py_ssize_t __pyx_v_extent1, Py_ssize_t __pyx_v_extent2) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4[7];
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  __Pyx_RefNannySetupContext("_err_extents", 0);

  /* "View.MemoryView":1155
 * cdef int _err_extents(int i, Py_ssize_t extent1,
 *                              Py_ssize_t extent2) except -1 with gil:
 *     raise ValueError, f"got differing extents in dimension {i} (got {extent1} and {extent2})"             # <<<<<<<<<<<<<<
 * 
 * @cname('__pyx_memoryview_err_dim')
*/
  __pyx_t_1 = __Pyx_PyUnicode_From_int(__pyx_v_i, 0, ' ', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_extent1, 0, ' ', 'd'); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_extent2, 0, ' ', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4[0] = __pyx_mstate_global->__pyx_kp_u_got_differing_extents_in_dimensi;
  __pyx_t_4[1] = __pyx_t_1;
  __pyx_t_4[2] = __pyx_mstate_global->__pyx_kp_u_got;
  __pyx_t_4[3] = __pyx_t_2;
  __pyx_t_4[4] = __pyx_mstate_global->__pyx_kp_u_and;
  __pyx_t_4[5] = __pyx_t_3;
  __pyx_t_4[6] = __pyx_mstate_global->__pyx_kp_u__5;
  __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_4, 7, 35 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + 6 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + 5 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 1, 127);
  if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_ValueError))), __pyx_t_5, 0, 0);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __PYX_ERR(1, 1155, __pyx_L1_error)

  /* "View.MemoryView":1152
 * 
 * 
 * @cname('__pyx_memoryview_err_extents')             # <<<<<<<<<<<<<<
 * cdef int _err_extents(int i, Py_ssize_t extent1,
 *                              Py_ssize_t extent2) except -1 with gil:
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("View.MemoryView._err_extents", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __Pyx_RefNannyFinishContext();
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  return __pyx_r;
}

/* "View.MemoryView":1157
 *     raise ValueError, f"got differing extents in dimension {i} (got {extent1} and {extent2})"
 * 
 * @cname('__pyx_memoryview_err_dim')             # <<<<<<<<<<<<<<
 * cdef int _err_dim(PyObject *error, str msg, int dim) except -1 with gil:
 *     raise <object>error, msg % dim
*/

static int __pyx_memoryview_err_dim(PyObject *__pyx_v_error, PyObject *__pyx_v_msg, int __pyx_v_dim) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  __Pyx_RefNannySetupContext("_err_dim", 0);
  __Pyx_INCREF(__pyx_v_msg);

  /* "View.MemoryView":1159
 * @cname('__pyx_memoryview_err_dim')
 * cdef int _err_dim(PyObject *error, str msg, int dim) except -1 with gil:
 *     raise <object>error, msg % dim             # <<<<<<<<<<<<<<
 * 
 * @cname('__pyx_memoryview_err')
*/
  __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_dim); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyUnicode_FormatSafe(__pyx_v_msg, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_Raise(((PyObject *)__pyx_v_error), __pyx_t_2, 0, 0);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __PYX_ERR(1, 1159, __pyx_L1_error)

  /* "View.MemoryView":1157
 *     raise ValueError, f"got differing extents in dimension {i} (got {extent1} and {extent2})"
 * 
 * @cname('__pyx_memoryview_err_dim')             # <<<<<<<<<<<<<<
 * cdef int _err_dim(PyObject *error, str msg, int dim) except -1 with gil:
 *     raise <object>error, msg % dim
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("View.MemoryView._err_dim", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __Pyx_XDECREF(__pyx_v_msg);
  __Pyx_RefNannyFinishContext();
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  return __pyx_r;
}

/* "View.MemoryView":1161
 *     raise <object>error, msg % dim
 * 
 * @cname('__pyx_memoryview_err')             # <<<<<<<<<<<<<<
 * cdef int _err(PyObject *error, str msg) except -1 with gil:
 *     raise <object>error, msg
*/

static int __pyx_memoryview_err(PyObject *__pyx_v_error, PyObject *__pyx_v_msg) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  __Pyx_RefNannySetupContext("_err", 0);
  __Pyx_INCREF(__pyx_v_msg);

  /* "View.MemoryView":1163
 * @cname('__pyx_memoryview_err')
 * cdef int _err(PyObject *error, str msg) except -1 with gil:
 *     raise <object>error, msg             # <<<<<<<<<<<<<<
 * 
 * @cname('__pyx_memoryview_err_no_memory')
*/
  __Pyx_Raise(((PyObject *)__pyx_v_error), __pyx_v_msg, 0, 0);
  __PYX_ERR(1, 1163, __pyx_L1_error)

  /* "View.MemoryView":1161
 *     raise <object>error, msg % dim
 * 
 * @cname('__pyx_memoryview_err')             # <<<<<<<<<<<<<<
 * cdef int _err(PyObject *error, str msg) except -1 with gil:
 *     raise <object>error, msg
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("View.MemoryView._err", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __Pyx_XDECREF(__pyx_v_msg);
  __Pyx_RefNannyFinishContext();
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  return __pyx_r;
}

/* "View.MemoryView":1165
 *     raise <object>error, msg
 * 
 * @cname('__pyx_memoryview_err_no_memory')             # <<<<<<<<<<<<<<
 * cdef int _err_no_memory() except -1 with gil:
 *     raise MemoryError
*/

static int __pyx_memoryview_err_no_memory(void) {
  int __pyx_r;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();

  /* "View.MemoryView":1167
 * @cname('__pyx_memoryview_err_no_memory')
 * cdef int _err_no_memory() except -1 with gil:
 *     raise MemoryError             # <<<<<<<<<<<<<<
 * 
 * 
*/
  PyErr_NoMemory(); __PYX_ERR(1, 1167, __pyx_L1_error)

  /* "View.MemoryView":1165
 *     raise <object>error, msg
 * 
 * @cname('__pyx_memoryview_err_no_memory')             # <<<<<<<<<<<<<<
 * cdef int _err_no_memory() except -1 with gil:
 *     raise MemoryError
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("View.MemoryView._err_no_memory", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  return __pyx_r;
}

/* "View.MemoryView":1170
 * 
 * 
 * @cname('__pyx_memoryview_copy_contents')             # <<<<<<<<<<<<<<
 * cdef int memoryview_copy_contents(__Pyx_memviewslice src,
 *                                   __Pyx_memviewslice dst,
*/

static int __pyx_memoryview_copy_contents(__Pyx_memviewslice __pyx_v_src, __Pyx_memviewslice __pyx_v_dst, int __pyx_v_src_ndim, int __pyx_v_dst_ndim, int __pyx_v_dtype_is_object) {
  void *__pyx_v_tmpdata;
  size_t __pyx_v_itemsize;
  int __pyx_v_i;
  char __pyx_v_order;
  int __pyx_v_broadcasting;
  int __pyx_v_direct_copy;
  __Pyx_memviewslice __pyx_v_tmp;
  int __pyx_v_ndim;
  int __pyx_r;
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  void *__pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyGILState_STATE __pyx_gilstate_save;

  /* "View.MemoryView":1179
 *     Check for overlapping memory and verify the shapes.
 *     """
 *     cdef void *tmpdata = NULL             # <<<<<<<<<<<<<<
 *     cdef size_t itemsize = src.memview.view.itemsize
 *     cdef int i
*/
  __pyx_v_tmpdata = NULL;

  /* "View.MemoryView":1180
 *     """
 *     cdef void *tmpdata = NULL
 *     cdef size_t itemsize = src.memview.view.itemsize             # <<<<<<<<<<<<<<
 *     cdef int i
 *     cdef char order = get_best_order(&src, src_ndim)
*/
  __pyx_t_1 = __pyx_v_src.memview->view.itemsize;
  __pyx_v_itemsize = __pyx_t_1;

  /* "View.MemoryView":1182
 *     cdef size_t itemsize = src.memview.view.itemsize
 *     cdef int i
 *     cdef char order = get_best_order(&src, src_ndim)             # <<<<<<<<<<<<<<
 *     cdef bint broadcasting = False
 *     cdef bint direct_copy = False
*/
  __pyx_v_order = __pyx_get_best_slice_order((&__pyx_v_src), __pyx_v_src_ndim);

  /* "View.MemoryView":1183
 *     cdef int i
 *     cdef char order = get_best_order(&src, src_ndim)
 *     cdef bint broadcasting = False             # <<<<<<<<<<<<<<
 *     cdef bint direct_copy = False
 *     cdef __Pyx_memviewslice tmp
*/
  __pyx_v_broadcasting = 0;

  /* "View.MemoryView":1184
 *     cdef char order = get_best_order(&src, src_ndim)
 *     cdef bint broadcasting = False
 *     cdef bint direct_copy = False             # <<<<<<<<<<<<<<
 *     cdef __Pyx_memviewslice tmp
 * 
*/
  __pyx_v_direct_copy = 0;

  /* "View.MemoryView":1187
 *     cdef __Pyx_memviewslice tmp
 * 
 *     if src_ndim < dst_ndim:             # <<<<<<<<<<<<<<
 *         broadcast_leading(&src, src_ndim, dst_ndim)
 *     elif dst_ndim < src_ndim:
*/
  __pyx_t_2 = (__pyx_v_src_ndim < __pyx_v_dst_ndim);
  if (__pyx_t_2) {

    /* "View.MemoryView":1188
 * 
 *     if src_ndim < dst_ndim:
 *         broadcast_leading(&src, src_ndim, dst_ndim)             # <<<<<<<<<<<<<<
 *     elif dst_ndim < src_ndim:
 *         broadcast_leading(&dst, dst_ndim, src_ndim)
*/
    __pyx_memoryview_broadcast_leading((&__pyx_v_src), __pyx_v_src_ndim, __pyx_v_dst_ndim);

    /* "View.MemoryView":1187
 *     cdef __Pyx_memviewslice tmp
 * 
 *     if src_ndim < dst_ndim:             # <<<<<<<<<<<<<<
 *         broadcast_leading(&src, src_ndim, dst_ndim)
 *     elif dst_ndim < src_ndim:
*/
    goto __pyx_L3;
  }

  /* "View.MemoryView":1189
 *     if src_ndim < dst_ndim:
 *         broadcast_leading(&src, src_ndim, dst_ndim)
 *     elif dst_ndim < src_ndim:             # <<<<<<<<<<<<<<
 *         broadcast_leading(&dst, dst_ndim, src_ndim)
 * 
*/
  __pyx_t_2 = (__pyx_v_dst_ndim < __pyx_v_src_ndim);
  if (__pyx_t_2) {

    /* "View.MemoryView":1190
 *         broadcast_leading(&src, src_ndim, dst_ndim)
 *     elif dst_ndim < src_ndim:
 *         broadcast_leading(&dst, dst_ndim, src_ndim)             # <<<<<<<<<<<<<<
 * 
 *     cdef int ndim = max(src_ndim, dst_ndim)
*/
    __pyx_memoryview_broadcast_leading((&__pyx_v_dst), __pyx_v_dst_ndim, __pyx_v_src_ndim);

    /* "View.MemoryView":1189
 *     if src_ndim < dst_ndim:
 *         broadcast_leading(&src, src_ndim, dst_ndim)
 *     elif dst_ndim < src_ndim:             # <<<<<<<<<<<<<<
 *         broadcast_leading(&dst, dst_ndim, src_ndim)
 * 
*/
  }
  __pyx_L3:;

  /* "View.MemoryView":1192
 *         broadcast_leading(&dst, dst_ndim, src_ndim)
 * 
 *     cdef int ndim = max(src_ndim, dst_ndim)             # <<<<<<<<<<<<<<
 * 
 *     for i in range(ndim):
*/
  __pyx_t_3 = __pyx_v_dst_ndim;
  __pyx_t_4 = __pyx_v_src_ndim;
  __pyx_t_2 = (__pyx_t_3 > __pyx_t_4);
  if (__pyx_t_2) {
    __pyx_t_5 = __pyx_t_3;
  } else {
    __pyx_t_5 = __pyx_t_4;
  }
  __pyx_v_ndim = __pyx_t_5;

  /* "View.MemoryView":1194
 *     cdef int ndim = max(src_ndim, dst_ndim)
 * 
 *     for i in range(ndim):             # <<<<<<<<<<<<<<
 *         if src.shape[i] != dst.shape[i]:
 *             if src.shape[i] == 1:
*/
  __pyx_t_5 = __pyx_v_ndim;
  __pyx_t_3 = __pyx_t_5;
  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
    __pyx_v_i = __pyx_t_4;

    /* "View.MemoryView":1195
 * 
 *     for i in range(ndim):
 *         if src.shape[i] != dst.shape[i]:             # <<<<<<<<<<<<<<
 *             if src.shape[i] == 1:
 *                 broadcasting = True
*/
    __pyx_t_2 = ((__pyx_v_src.shape[__pyx_v_i]) != (__pyx_v_dst.shape[__pyx_v_i]));
    if (__pyx_t_2) {

      /* "View.MemoryView":1196
 *     for i in range(ndim):
 *         if src.shape[i] != dst.shape[i]:
 *             if src.shape[i] == 1:             # <<<<<<<<<<<<<<
 *                 broadcasting = True
 *                 src.strides[i] = 0
*/
      __pyx_t_2 = ((__pyx_v_src.shape[__pyx_v_i]) == 1);
      if (__pyx_t_2) {

        /* "View.MemoryView":1197
 *         if src.shape[i] != dst.shape[i]:
 *             if src.shape[i] == 1:
 *                 broadcasting = True             # <<<<<<<<<<<<<<
 *                 src.strides[i] = 0
 *             else:
*/
        __pyx_v_broadcasting = 1;

        /* "View.MemoryView":1198
 *             if src.shape[i] == 1:
 *                 broadcasting = True
 *                 src.strides[i] = 0             # <<<<<<<<<<<<<<
 *             else:
 *                 _err_extents(i, dst.shape[i], src.shape[i])
*/
        (__pyx_v_src.strides[__pyx_v_i]) = 0;

        /* "View.MemoryView":1196
 *     for i in range(ndim):
 *         if src.shape[i] != dst.shape[i]:
 *             if src.shape[i] == 1:             # <<<<<<<<<<<<<<
 *                 broadcasting = True
 *                 src.strides[i] = 0
*/
        goto __pyx_L7;
      }

      /* "View.MemoryView":1200
 *                 src.strides[i] = 0
 *             else:
 *                 _err_extents(i, dst.shape[i], src.shape[i])             # <<<<<<<<<<<<<<
 * 
 *         if src.suboffsets[i] >= 0:
*/
      /*else*/ {
        __pyx_t_6 = __pyx_memoryview_err_extents(__pyx_v_i, (__pyx_v_dst.shape[__pyx_v_i]), (__pyx_v_src.shape[__pyx_v_i])); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(1, 1200, __pyx_L1_error)
      }
      __pyx_L7:;

      /* "View.MemoryView":1195
 * 
 *     for i in range(ndim):
 *         if src.shape[i] != dst.shape[i]:             # <<<<<<<<<<<<<<
 *             if src.shape[i] == 1:
 *                 broadcasting = True
*/
    }

    /* "View.MemoryView":1202
 *                 _err_extents(i, dst.shape[i], src.shape[i])
 * 
 *         if src.suboffsets[i] >= 0:             # <<<<<<<<<<<<<<
 *             _err_dim(PyExc_ValueError, "Dimension %d is not direct", i)
 * 
*/
    __pyx_t_2 = ((__pyx_v_src.suboffsets[__pyx_v_i]) >= 0);
    if (__pyx_t_2) {

      /* "View.MemoryView":1203
 * 
 *         if src.suboffsets[i] >= 0:
 *             _err_dim(PyExc_ValueError, "Dimension %d is not direct", i)             # <<<<<<<<<<<<<<
 * 
 *     if slices_overlap(&src, &dst, ndim, itemsize):
*/
      __pyx_t_6 = __pyx_memoryview_err_dim(PyExc_ValueError, __pyx_mstate_global->__pyx_kp_u_Dimension_d_is_not_direct, __pyx_v_i); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(1, 1203, __pyx_L1_error)

      /* "View.MemoryView":1202
 *                 _err_extents(i, dst.shape[i], src.shape[i])
 * 
 *         if src.suboffsets[i] >= 0:             # <<<<<<<<<<<<<<
 *             _err_dim(PyExc_ValueError, "Dimension %d is not direct", i)
 * 
*/
    }
  }

  /* "View.MemoryView":1205
 *             _err_dim(PyExc_ValueError, "Dimension %d is not direct", i)
 * 
 *     if slices_overlap(&src, &dst, ndim, itemsize):             # <<<<<<<<<<<<<<
 * 
 *         if not slice_is_contig(src, order, ndim):
*/
  __pyx_t_2 = __pyx_slices_overlap((&__pyx_v_src), (&__pyx_v_dst), __pyx_v_ndim, __pyx_v_itemsize);
  if (__pyx_t_2) {

    /* "View.MemoryView":1207
 *     if slices_overlap(&src, &dst, ndim, itemsize):
 * 
 *         if not slice_is_contig(src, order, ndim):             # <<<<<<<<<<<<<<
 *             order = get_best_order(&dst, ndim)
 * 
*/
    __pyx_t_2 = (!__pyx_memviewslice_is_contig(__pyx_v_src, __pyx_v_order, __pyx_v_ndim));
    if (__pyx_t_2) {

      /* "View.MemoryView":1208
 * 
 *         if not slice_is_contig(src, order, ndim):
 *             order = get_best_order(&dst, ndim)             # <<<<<<<<<<<<<<
 * 
 *         tmpdata = copy_data_to_temp(&src, &tmp, order, ndim)
*/
      __pyx_v_order = __pyx_get_best_slice_order((&__pyx_v_dst), __pyx_v_ndim);

      /* "View.MemoryView":1207
 *     if slices_overlap(&src, &dst, ndim, itemsize):
 * 
 *         if not slice_is_contig(src, order, ndim):             # <<<<<<<<<<<<<<
 *             order = get_best_order(&dst, ndim)
 * 
*/
    }

    /* "View.MemoryView":1210
 *             order = get_best_order(&dst, ndim)
 * 
 *         tmpdata = copy_data_to_temp(&src, &tmp, order, ndim)             # <<<<<<<<<<<<<<
 *         src = tmp
 * 
*/
    __pyx_t_7 = __pyx_memoryview_copy_data_to_temp((&__pyx_v_src), (&__pyx_v_tmp), __pyx_v_order, __pyx_v_ndim); if (unlikely(__pyx_t_7 == ((void *)NULL))) __PYX_ERR(1, 1210, __pyx_L1_error)
    __pyx_v_tmpdata = __pyx_t_7;

    /* "View.MemoryView":1211
 * 
 *         tmpdata = copy_data_to_temp(&src, &tmp, order, ndim)
 *         src = tmp             # <<<<<<<<<<<<<<
 * 
 *     if not broadcasting:
*/
    __pyx_v_src = __pyx_v_tmp;

    /* "View.MemoryView":1205
 *             _err_dim(PyExc_ValueError, "Dimension %d is not direct", i)
 * 
 *     if slices_overlap(&src, &dst, ndim, itemsize):             # <<<<<<<<<<<<<<
 * 
 *         if not slice_is_contig(src, order, ndim):
*/
  }

  /* "View.MemoryView":1213
 *         src = tmp
 * 
 *     if not broadcasting:             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_t_2 = (!__pyx_v_broadcasting);
  if (__pyx_t_2) {

    /* "View.MemoryView":1216
 * 
 * 
 *         if slice_is_contig(src, 'C', ndim):             # <<<<<<<<<<<<<<
 *             direct_copy = slice_is_contig(dst, 'C', ndim)
 *         elif slice_is_contig(src, 'F', ndim):
*/
    __pyx_t_2 = __pyx_memviewslice_is_contig(__pyx_v_src, 'C', __pyx_v_ndim);
    if (__pyx_t_2) {

      /* "View.MemoryView":1217
 * 
 *         if slice_is_contig(src, 'C', ndim):
 *             direct_copy = slice_is_contig(dst, 'C', ndim)             # <<<<<<<<<<<<<<
 *         elif slice_is_contig(src, 'F', ndim):
 *             direct_copy = slice_is_contig(dst, 'F', ndim)
*/
      __pyx_v_direct_copy = __pyx_memviewslice_is_contig(__pyx_v_dst, 'C', __pyx_v_ndim);

      /* "View.MemoryView":1216
 * 
 * 
 *         if slice_is_contig(src, 'C', ndim):             # <<<<<<<<<<<<<<
 *             direct_copy = slice_is_contig(dst, 'C', ndim)
 *         elif slice_is_contig(src, 'F', ndim):
*/
      goto __pyx_L12;
    }

    /* "View.MemoryView":1218
 *         if slice_is_contig(src, 'C', ndim):
 *             direct_copy = slice_is_contig(dst, 'C', ndim)
 *         elif slice_is_contig(src, 'F', ndim):             # <<<<<<<<<<<<<<
 *             direct_copy = slice_is_contig(dst, 'F', ndim)
 * 
*/
    __pyx_t_2 = __pyx_memviewslice_is_contig(__pyx_v_src, 'F', __pyx_v_ndim);
    if (__pyx_t_2) {

      /* "View.MemoryView":1219
 *             direct_copy = slice_is_contig(dst, 'C', ndim)
 *         elif slice_is_contig(src, 'F', ndim):
 *             direct_copy = slice_is_contig(dst, 'F', ndim)             # <<<<<<<<<<<<<<
 * 
 *         if direct_copy:
*/
      __pyx_v_direct_copy = __pyx_memviewslice_is_contig(__pyx_v_dst, 'F', __pyx_v_ndim);

      /* "View.MemoryView":1218
 *         if slice_is_contig(src, 'C', ndim):
 *             direct_copy = slice_is_contig(dst, 'C', ndim)
 *         elif slice_is_contig(src, 'F', ndim):             # <<<<<<<<<<<<<<
 *             direct_copy = slice_is_contig(dst, 'F', ndim)
 * 
*/
    }
    __pyx_L12:;

    /* "View.MemoryView":1221
 *             direct_copy = slice_is_contig(dst, 'F', ndim)
 * 
 *         if direct_copy:             # <<<<<<<<<<<<<<
 * 
 *             refcount_copying(&dst, dtype_is_object, ndim, inc=False)
*/
    if (__pyx_v_direct_copy) {

      /* "View.MemoryView":1223
 *         if direct_copy:
 * 
 *             refcount_copying(&dst, dtype_is_object, ndim, inc=False)             # <<<<<<<<<<<<<<
 *             memcpy(dst.data, src.data, slice_get_size(&src, ndim))
 *             refcount_copying(&dst, dtype_is_object, ndim, inc=True)
*/
      __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 0);

      /* "View.MemoryView":1224
 * 
 *             refcount_copying(&dst, dtype_is_object, ndim, inc=False)
 *             memcpy(dst.data, src.data, slice_get_size(&src, ndim))             # <<<<<<<<<<<<<<
 *             refcount_copying(&dst, dtype_is_object, ndim, inc=True)
 *             free(tmpdata)
*/
      (void)(memcpy(__pyx_v_dst.data, __pyx_v_src.data, __pyx_memoryview_slice_get_size((&__pyx_v_src), __pyx_v_ndim)));

      /* "View.MemoryView":1225
 *             refcount_copying(&dst, dtype_is_object, ndim, inc=False)
 *             memcpy(dst.data, src.data, slice_get_size(&src, ndim))
 *             refcount_copying(&dst, dtype_is_object, ndim, inc=True)             # <<<<<<<<<<<<<<
 *             free(tmpdata)
 *             return 0
*/
      __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 1);

      /* "View.MemoryView":1226
 *             memcpy(dst.data, src.data, slice_get_size(&src, ndim))
 *             refcount_copying(&dst, dtype_is_object, ndim, inc=True)
 *             free(tmpdata)             # <<<<<<<<<<<<<<
 *             return 0
 * 
*/
      free(__pyx_v_tmpdata);

      /* "View.MemoryView":1227
 *             refcount_copying(&dst, dtype_is_object, ndim, inc=True)
 *             free(tmpdata)
 *             return 0             # <<<<<<<<<<<<<<
 * 
 *     if order == 'F' == get_best_order(&dst, ndim):
*/
      __pyx_r = 0;
      goto __pyx_L0;

      /* "View.MemoryView":1221
 *             direct_copy = slice_is_contig(dst, 'F', ndim)
 * 
 *         if direct_copy:             # <<<<<<<<<<<<<<
 * 
 *             refcount_copying(&dst, dtype_is_object, ndim, inc=False)
*/
    }

    /* "View.MemoryView":1213
 *         src = tmp
 * 
 *     if not broadcasting:             # <<<<<<<<<<<<<<
 * 
 * 
*/
  }

  /* "View.MemoryView":1229
 *             return 0
 * 
 *     if order == 'F' == get_best_order(&dst, ndim):             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_t_2 = (__pyx_v_order == 'F');
  if (__pyx_t_2) {
    __pyx_t_2 = ('F' == __pyx_get_best_slice_order((&__pyx_v_dst), __pyx_v_ndim));
  }
  if (__pyx_t_2) {

    /* "View.MemoryView":1232
 * 
 * 
 *         transpose_memslice(&src)             # <<<<<<<<<<<<<<
 *         transpose_memslice(&dst)
 * 
*/
    __pyx_t_5 = __pyx_memslice_transpose((&__pyx_v_src)); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 1232, __pyx_L1_error)

    /* "View.MemoryView":1233
 * 
 *         transpose_memslice(&src)
 *         transpose_memslice(&dst)             # <<<<<<<<<<<<<<
 * 
 *     refcount_copying(&dst, dtype_is_object, ndim, inc=False)
*/
    __pyx_t_5 = __pyx_memslice_transpose((&__pyx_v_dst)); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 1233, __pyx_L1_error)

    /* "View.MemoryView":1229
 *             return 0
 * 
 *     if order == 'F' == get_best_order(&dst, ndim):             # <<<<<<<<<<<<<<
 * 
 * 
*/
  }

  /* "View.MemoryView":1235
 *         transpose_memslice(&dst)
 * 
 *     refcount_copying(&dst, dtype_is_object, ndim, inc=False)             # <<<<<<<<<<<<<<
 *     copy_strided_to_strided(&src, &dst, ndim, itemsize)
 *     refcount_copying(&dst, dtype_is_object, ndim, inc=True)
*/
  __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 0);

  /* "View.MemoryView":1236
 * 
 *     refcount_copying(&dst, dtype_is_object, ndim, inc=False)
 *     copy_strided_to_strided(&src, &dst, ndim, itemsize)             # <<<<<<<<<<<<<<
 *     refcount_copying(&dst, dtype_is_object, ndim, inc=True)
 * 
*/
  copy_strided_to_strided((&__pyx_v_src), (&__pyx_v_dst), __pyx_v_ndim, __pyx_v_itemsize);

  /* "View.MemoryView":1237
 *     refcount_copying(&dst, dtype_is_object, ndim, inc=False)
 *     copy_strided_to_strided(&src, &dst, ndim, itemsize)
 *     refcount_copying(&dst, dtype_is_object, ndim, inc=True)             # <<<<<<<<<<<<<<
 * 
 *     free(tmpdata)
*/
  __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 1);

  /* "View.MemoryView":1239
 *     refcount_copying(&dst, dtype_is_object, ndim, inc=True)
 * 
 *     free(tmpdata)             # <<<<<<<<<<<<<<
 *     return 0
 * 
*/
  free(__pyx_v_tmpdata);

  /* "View.MemoryView":1240
 * 
 *     free(tmpdata)
 *     return 0             # <<<<<<<<<<<<<<
 * 
 * @cname('__pyx_memoryview_broadcast_leading')
*/
  __pyx_r = 0;
  goto __pyx_L0;

  /* "View.MemoryView":1170
 * 
 * 
 * @cname('__pyx_memoryview_copy_contents')             # <<<<<<<<<<<<<<
 * cdef int memoryview_copy_contents(__Pyx_memviewslice src,
 *                                   __Pyx_memviewslice dst,
*/

  /* function exit code */
  __pyx_L1_error:;
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  __Pyx_AddTraceback("View.MemoryView.memoryview_copy_contents", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  __pyx_L0:;
  return __pyx_r;
}

/* "View.MemoryView":1242
 *     return 0
 * 
 * @cname('__pyx_memoryview_broadcast_leading')             # <<<<<<<<<<<<<<
 * cdef void broadcast_leading(__Pyx_memviewslice *mslice,
 *                             int ndim,
*/

static void __pyx_memoryview_broadcast_leading(__Pyx_memviewslice *__pyx_v_mslice, int __pyx_v_ndim, int __pyx_v_ndim_other) {
  int __pyx_v_i;
  int __pyx_v_offset;
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;

  /* "View.MemoryView":1247
 *                             int ndim_other) noexcept nogil:
 *     cdef int i
 *     cdef int offset = ndim_other - ndim             # <<<<<<<<<<<<<<
 * 
 *     for i in range(ndim - 1, -1, -1):
*/
  __pyx_v_offset = (__pyx_v_ndim_other - __pyx_v_ndim);

  /* "View.MemoryView":1249
 *     cdef int offset = ndim_other - ndim
 * 
 *     for i in range(ndim - 1, -1, -1):             # <<<<<<<<<<<<<<
 *         mslice.shape[i + offset] = mslice.shape[i]
 *         mslice.strides[i + offset] = mslice.strides[i]
*/
  for (__pyx_t_1 = (__pyx_v_ndim - 1); __pyx_t_1 > -1; __pyx_t_1-=1) {
    __pyx_v_i = __pyx_t_1;

    /* "View.MemoryView":1250
 * 
 *     for i in range(ndim - 1, -1, -1):
 *         mslice.shape[i + offset] = mslice.shape[i]             # <<<<<<<<<<<<<<
 *         mslice.strides[i + offset] = mslice.strides[i]
 *         mslice.suboffsets[i + offset] = mslice.suboffsets[i]
*/
    (__pyx_v_mslice->shape[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->shape[__pyx_v_i]);

    /* "View.MemoryView":1251
 *     for i in range(ndim - 1, -1, -1):
 *         mslice.shape[i + offset] = mslice.shape[i]
 *         mslice.strides[i + offset] = mslice.strides[i]             # <<<<<<<<<<<<<<
 *         mslice.suboffsets[i + offset] = mslice.suboffsets[i]
 * 
*/
    (__pyx_v_mslice->strides[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->strides[__pyx_v_i]);

    /* "View.MemoryView":1252
 *         mslice.shape[i + offset] = mslice.shape[i]
 *         mslice.strides[i + offset] = mslice.strides[i]
 *         mslice.suboffsets[i + offset] = mslice.suboffsets[i]             # <<<<<<<<<<<<<<
 * 
 *     for i in range(offset):
*/
    (__pyx_v_mslice->suboffsets[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->suboffsets[__pyx_v_i]);
  }

  /* "View.MemoryView":1254
 *         mslice.suboffsets[i + offset] = mslice.suboffsets[i]
 * 
 *     for i in range(offset):             # <<<<<<<<<<<<<<
 *         mslice.shape[i] = 1
 *         mslice.strides[i] = mslice.strides[0]
*/
  __pyx_t_1 = __pyx_v_offset;
  __pyx_t_2 = __pyx_t_1;
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
    __pyx_v_i = __pyx_t_3;

    /* "View.MemoryView":1255
 * 
 *     for i in range(offset):
 *         mslice.shape[i] = 1             # <<<<<<<<<<<<<<
 *         mslice.strides[i] = mslice.strides[0]
 *         mslice.suboffsets[i] = -1
*/
    (__pyx_v_mslice->shape[__pyx_v_i]) = 1;

    /* "View.MemoryView":1256
 *     for i in range(offset):
 *         mslice.shape[i] = 1
 *         mslice.strides[i] = mslice.strides[0]             # <<<<<<<<<<<<<<
 *         mslice.suboffsets[i] = -1
 * 
*/
    (__pyx_v_mslice->strides[__pyx_v_i]) = (__pyx_v_mslice->strides[0]);

    /* "View.MemoryView":1257
 *         mslice.shape[i] = 1
 *         mslice.strides[i] = mslice.strides[0]
 *         mslice.suboffsets[i] = -1             # <<<<<<<<<<<<<<
 * 
 * 
*/
    (__pyx_v_mslice->suboffsets[__pyx_v_i]) = -1L;
  }

  /* "View.MemoryView":1242
 *     return 0
 * 
 * @cname('__pyx_memoryview_broadcast_leading')             # <<<<<<<<<<<<<<
 * cdef void broadcast_leading(__Pyx_memviewslice *mslice,
 *                             int ndim,
*/

  /* function exit code */
}

/* "View.MemoryView":1264
 * 
 * 
 * @cname('__pyx_memoryview_refcount_copying')             # <<<<<<<<<<<<<<
 * cdef void refcount_copying(__Pyx_memviewslice *dst, bint dtype_is_object, int ndim, bint inc) noexcept nogil:
 * 
*/

static void __pyx_memoryview_refcount_copying(__Pyx_memviewslice *__pyx_v_dst, int __pyx_v_dtype_is_object, int __pyx_v_ndim, int __pyx_v_inc) {

  /* "View.MemoryView":1267
 * cdef void refcount_copying(__Pyx_memviewslice *dst, bint dtype_is_object, int ndim, bint inc) noexcept nogil:
 * 
 *     if dtype_is_object:             # <<<<<<<<<<<<<<
 *         refcount_objects_in_slice_with_gil(dst.data, dst.shape, dst.strides, ndim, inc)
 * 
*/
  if (__pyx_v_dtype_is_object) {

    /* "View.MemoryView":1268
 * 
 *     if dtype_is_object:
 *         refcount_objects_in_slice_with_gil(dst.data, dst.shape, dst.strides, ndim, inc)             # <<<<<<<<<<<<<<
 * 
 * @cname('__pyx_memoryview_refcount_objects_in_slice_with_gil')
*/
    __pyx_memoryview_refcount_objects_in_slice_with_gil(__pyx_v_dst->data, __pyx_v_dst->shape, __pyx_v_dst->strides, __pyx_v_ndim, __pyx_v_inc);

    /* "View.MemoryView":1267
 * cdef void refcount_copying(__Pyx_memviewslice *dst, bint dtype_is_object, int ndim, bint inc) noexcept nogil:
 * 
 *     if dtype_is_object:             # <<<<<<<<<<<<<<
 *         refcount_objects_in_slice_with_gil(dst.data, dst.shape, dst.strides, ndim, inc)
 * 
*/
  }

  /* "View.MemoryView":1264
 * 
 * 
 * @cname('__pyx_memoryview_refcount_copying')             # <<<<<<<<<<<<<<
 * cdef void refcount_copying(__Pyx_memviewslice *dst, bint dtype_is_object, int ndim, bint inc) noexcept nogil:
 * 
*/

  /* function exit code */
}

/* "View.MemoryView":1270
 *         refcount_objects_in_slice_with_gil(dst.data, dst.shape, dst.strides, ndim, inc)
 * 
 * @cname('__pyx_memoryview_refcount_objects_in_slice_with_gil')             # <<<<<<<<<<<<<<
 * cdef void refcount_objects_in_slice_with_gil(char *data, Py_ssize_t *shape,
 *                                              Py_ssize_t *strides, int ndim,
*/

static void __pyx_memoryview_refcount_objects_in_slice_with_gil(char *__pyx_v_data, Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, int __pyx_v_ndim, int __pyx_v_inc) {
  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();

  /* "View.MemoryView":1274
 *                                              Py_ssize_t *strides, int ndim,
 *                                              bint inc) noexcept with gil:
 *     refcount_objects_in_slice(data, shape, strides, ndim, inc)             # <<<<<<<<<<<<<<
 * 
 * @cname('__pyx_memoryview_refcount_objects_in_slice')
*/
  __pyx_memoryview_refcount_objects_in_slice(__pyx_v_data, __pyx_v_shape, __pyx_v_strides, __pyx_v_ndim, __pyx_v_inc);

  /* "View.MemoryView":1270
 *         refcount_objects_in_slice_with_gil(dst.data, dst.shape, dst.strides, ndim, inc)
 * 
 * @cname('__pyx_memoryview_refcount_objects_in_slice_with_gil')             # <<<<<<<<<<<<<<
 * cdef void refcount_objects_in_slice_with_gil(char *data, Py_ssize_t *shape,
 *                                              Py_ssize_t *strides, int ndim,
*/

  /* function exit code */
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
}

/* "View.MemoryView":1276
 *     refcount_objects_in_slice(data, shape, strides, ndim, inc)
 * 
 * @cname('__pyx_memoryview_refcount_objects_in_slice')             # <<<<<<<<<<<<<<
 * cdef void refcount_objects_in_slice(char *data, Py_ssize_t *shape,
 *                                     Py_ssize_t *strides, int ndim, bint inc) noexcept:
*/

static void __pyx_memoryview_refcount_objects_in_slice(char *__pyx_v_data, Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, int __pyx_v_ndim, int __pyx_v_inc) {
  CYTHON_UNUSED Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_stride;
  Py_ssize_t __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;

  /* "View.MemoryView":1280
 *                                     Py_ssize_t *strides, int ndim, bint inc) noexcept:
 *     cdef Py_ssize_t i
 *     cdef Py_ssize_t stride = strides[0]             # <<<<<<<<<<<<<<
 * 
 *     for i in range(shape[0]):
*/
  __pyx_v_stride = (__pyx_v_strides[0]);

  /* "View.MemoryView":1282
 *     cdef Py_ssize_t stride = strides[0]
 * 
 *     for i in range(shape[0]):             # <<<<<<<<<<<<<<
 *         if ndim == 1:
 *             if inc:
*/
  __pyx_t_1 = (__pyx_v_shape[0]);
  __pyx_t_2 = __pyx_t_1;
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
    __pyx_v_i = __pyx_t_3;

    /* "View.MemoryView":1283
 * 
 *     for i in range(shape[0]):
 *         if ndim == 1:             # <<<<<<<<<<<<<<
 *             if inc:
 *                 Py_INCREF((<PyObject **> data)[0])
*/
    __pyx_t_4 = (__pyx_v_ndim == 1);
    if (__pyx_t_4) {

      /* "View.MemoryView":1284
 *     for i in range(shape[0]):
 *         if ndim == 1:
 *             if inc:             # <<<<<<<<<<<<<<
 *                 Py_INCREF((<PyObject **> data)[0])
 *             else:
*/
      if (__pyx_v_inc) {

        /* "View.MemoryView":1285
 *         if ndim == 1:
 *             if inc:
 *                 Py_INCREF((<PyObject **> data)[0])             # <<<<<<<<<<<<<<
 *             else:
 *                 Py_DECREF((<PyObject **> data)[0])
*/
        Py_INCREF((((PyObject **)__pyx_v_data)[0]));

        /* "View.MemoryView":1284
 *     for i in range(shape[0]):
 *         if ndim == 1:
 *             if inc:             # <<<<<<<<<<<<<<
 *                 Py_INCREF((<PyObject **> data)[0])
 *             else:
*/
        goto __pyx_L6;
      }

      /* "View.MemoryView":1287
 *                 Py_INCREF((<PyObject **> data)[0])
 *             else:
 *                 Py_DECREF((<PyObject **> data)[0])             # <<<<<<<<<<<<<<
 *         else:
 *             refcount_objects_in_slice(data, shape + 1, strides + 1, ndim - 1, inc)
*/
      /*else*/ {
        Py_DECREF((((PyObject **)__pyx_v_data)[0]));
      }
      __pyx_L6:;

      /* "View.MemoryView":1283
 * 
 *     for i in range(shape[0]):
 *         if ndim == 1:             # <<<<<<<<<<<<<<
 *             if inc:
 *                 Py_INCREF((<PyObject **> data)[0])
*/
      goto __pyx_L5;
    }

    /* "View.MemoryView":1289
 *                 Py_DECREF((<PyObject **> data)[0])
 *         else:
 *             refcount_objects_in_slice(data, shape + 1, strides + 1, ndim - 1, inc)             # <<<<<<<<<<<<<<
 * 
 *         data += stride
*/
    /*else*/ {
      __pyx_memoryview_refcount_objects_in_slice(__pyx_v_data, (__pyx_v_shape + 1), (__pyx_v_strides + 1), (__pyx_v_ndim - 1), __pyx_v_inc);
    }
    __pyx_L5:;

    /* "View.MemoryView":1291
 *             refcount_objects_in_slice(data, shape + 1, strides + 1, ndim - 1, inc)
 * 
 *         data += stride             # <<<<<<<<<<<<<<
 * 
 * 
*/
    __pyx_v_data = (__pyx_v_data + __pyx_v_stride);
  }

  /* "View.MemoryView":1276
 *     refcount_objects_in_slice(data, shape, strides, ndim, inc)
 * 
 * @cname('__pyx_memoryview_refcount_objects_in_slice')             # <<<<<<<<<<<<<<
 * cdef void refcount_objects_in_slice(char *data, Py_ssize_t *shape,
 *                                     Py_ssize_t *strides, int ndim, bint inc) noexcept:
*/

  /* function exit code */
}

/* "View.MemoryView":1296
 * 
 * 
 * @cname('__pyx_memoryview_slice_assign_scalar')             # <<<<<<<<<<<<<<
 * cdef void slice_assign_scalar(__Pyx_memviewslice *dst, int ndim,
 *                               size_t itemsize, void *item,
*/

static void __pyx_memoryview_slice_assign_scalar(__Pyx_memviewslice *__pyx_v_dst, int __pyx_v_ndim, size_t __pyx_v_itemsize, void *__pyx_v_item, int __pyx_v_dtype_is_object) {

  /* "View.MemoryView":1300
 *                               size_t itemsize, void *item,
 *                               bint dtype_is_object) noexcept nogil:
 *     refcount_copying(dst, dtype_is_object, ndim, inc=False)             # <<<<<<<<<<<<<<
 *     _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim, itemsize, item)
 *     refcount_copying(dst, dtype_is_object, ndim, inc=True)
*/
  __pyx_memoryview_refcount_copying(__pyx_v_dst, __pyx_v_dtype_is_object, __pyx_v_ndim, 0);

  /* "View.MemoryView":1301
 *                               bint dtype_is_object) noexcept nogil:
 *     refcount_copying(dst, dtype_is_object, ndim, inc=False)
 *     _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim, itemsize, item)             # <<<<<<<<<<<<<<
 *     refcount_copying(dst, dtype_is_object, ndim, inc=True)
 * 
*/
  __pyx_memoryview__slice_assign_scalar(__pyx_v_dst->data, __pyx_v_dst->shape, __pyx_v_dst->strides, __pyx_v_ndim, __pyx_v_itemsize, __pyx_v_item);

  /* "View.MemoryView":1302
 *     refcount_copying(dst, dtype_is_object, ndim, inc=False)
 *     _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim, itemsize, item)
 *     refcount_copying(dst, dtype_is_object, ndim, inc=True)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_memoryview_refcount_copying(__pyx_v_dst, __pyx_v_dtype_is_object, __pyx_v_ndim, 1);

  /* "View.MemoryView":1296
 * 
 * 
 * @cname('__pyx_memoryview_slice_assign_scalar')             # <<<<<<<<<<<<<<
 * cdef void slice_assign_scalar(__Pyx_memviewslice *dst, int ndim,
 *                               size_t itemsize, void *item,
*/

  /* function exit code */
}

/* "View.MemoryView":1305
 * 
 * 
 * @cname('__pyx_memoryview__slice_assign_scalar')             # <<<<<<<<<<<<<<
 * cdef void _slice_assign_scalar(char *data, Py_ssize_t *shape,
 *                               Py_ssize_t *strides, int ndim,
*/

static void __pyx_memoryview__slice_assign_scalar(char *__pyx_v_data, Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, int __pyx_v_ndim, size_t __pyx_v_itemsize, void *__pyx_v_item) {
  CYTHON_UNUSED Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_stride;
  Py_ssize_t __pyx_v_extent;
  int __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  Py_ssize_t __pyx_t_4;

  /* "View.MemoryView":1310
 *                               size_t itemsize, void *item) noexcept nogil:
 *     cdef Py_ssize_t i
 *     cdef Py_ssize_t stride = strides[0]             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t extent = shape[0]
 * 
*/
  __pyx_v_stride = (__pyx_v_strides[0]);

  /* "View.MemoryView":1311
 *     cdef Py_ssize_t i
 *     cdef Py_ssize_t stride = strides[0]
 *     cdef Py_ssize_t extent = shape[0]             # <<<<<<<<<<<<<<
 * 
 *     if ndim == 1:
*/
  __pyx_v_extent = (__pyx_v_shape[0]);

  /* "View.MemoryView":1313
 *     cdef Py_ssize_t extent = shape[0]
 * 
 *     if ndim == 1:             # <<<<<<<<<<<<<<
 *         for i in range(extent):
 *             memcpy(data, item, itemsize)
*/
  __pyx_t_1 = (__pyx_v_ndim == 1);
  if (__pyx_t_1) {

    /* "View.MemoryView":1314
 * 
 *     if ndim == 1:
 *         for i in range(extent):             # <<<<<<<<<<<<<<
 *             memcpy(data, item, itemsize)
 *             data += stride
*/
    __pyx_t_2 = __pyx_v_extent;
    __pyx_t_3 = __pyx_t_2;
    for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
      __pyx_v_i = __pyx_t_4;

      /* "View.MemoryView":1315
 *     if ndim == 1:
 *         for i in range(extent):
 *             memcpy(data, item, itemsize)             # <<<<<<<<<<<<<<
 *             data += stride
 *     else:
*/
      (void)(memcpy(__pyx_v_data, __pyx_v_item, __pyx_v_itemsize));

      /* "View.MemoryView":1316
 *         for i in range(extent):
 *             memcpy(data, item, itemsize)
 *             data += stride             # <<<<<<<<<<<<<<
 *     else:
 *         for i in range(extent):
*/
      __pyx_v_data = (__pyx_v_data + __pyx_v_stride);
    }

    /* "View.MemoryView":1313
 *     cdef Py_ssize_t extent = shape[0]
 * 
 *     if ndim == 1:             # <<<<<<<<<<<<<<
 *         for i in range(extent):
 *             memcpy(data, item, itemsize)
*/
    goto __pyx_L3;
  }

  /* "View.MemoryView":1318
 *             data += stride
 *     else:
 *         for i in range(extent):             # <<<<<<<<<<<<<<
 *             _slice_assign_scalar(data, shape + 1, strides + 1, ndim - 1, itemsize, item)
 *             data += stride
*/
  /*else*/ {
    __pyx_t_2 = __pyx_v_extent;
    __pyx_t_3 = __pyx_t_2;
    for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
      __pyx_v_i = __pyx_t_4;

      /* "View.MemoryView":1319
 *     else:
 *         for i in range(extent):
 *             _slice_assign_scalar(data, shape + 1, strides + 1, ndim - 1, itemsize, item)             # <<<<<<<<<<<<<<
 *             data += stride
 * 
*/
      __pyx_memoryview__slice_assign_scalar(__pyx_v_data, (__pyx_v_shape + 1), (__pyx_v_strides + 1), (__pyx_v_ndim - 1), __pyx_v_itemsize, __pyx_v_item);

      /* "View.MemoryView":1320
 *         for i in range(extent):
 *             _slice_assign_scalar(data, shape + 1, strides + 1, ndim - 1, itemsize, item)
 *             data += stride             # <<<<<<<<<<<<<<
 * 
*/
      __pyx_v_data = (__pyx_v_data + __pyx_v_stride);
    }
  }
  __pyx_L3:;

  /* "View.MemoryView":1305
 * 
 * 
 * @cname('__pyx_memoryview__slice_assign_scalar')             # <<<<<<<<<<<<<<
 * cdef void _slice_assign_scalar(char *data, Py_ssize_t *shape,
 *                               Py_ssize_t *strides, int ndim,
*/

  /* function exit code */
}

/* "(tree fragment)":4
 *     int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1
 *     int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1
 * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_result
 *     __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x82a3537, 0x6ae9995, 0xb068931, b'name')
*/

/* Python wrapper */
static PyObject *__pyx_pw_15View_dot_MemoryView_1__pyx_unpickle_Enum(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_15View_dot_MemoryView_1__pyx_unpickle_Enum = {"__pyx_unpickle_Enum", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_15View_dot_MemoryView_1__pyx_unpickle_Enum, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_15View_dot_MemoryView_1__pyx_unpickle_Enum(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_Enum (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(1, 4, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle_Enum", 0) < (0)) __PYX_ERR(1, 4, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Enum", 1, 3, 3, i); __PYX_ERR(1, 4, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error)
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 4, __pyx_L3_error)
    __pyx_v___pyx_state = ((PyObject*)values[2]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Enum", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 4, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("View.MemoryView.__pyx_unpickle_Enum", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(1, 4, __pyx_L1_error)
  __pyx_r = __pyx_pf_15View_dot_MemoryView___pyx_unpickle_Enum(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_15View_dot_MemoryView___pyx_unpickle_Enum(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_Enum", 0);

  /* "(tree fragment)":6
 * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, tuple __pyx_state):
 *     cdef object __pyx_result
 *     __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x82a3537, 0x6ae9995, 0xb068931, b'name')             # <<<<<<<<<<<<<<
 *     __pyx_result = Enum.__new__(__pyx_type)
 *     if __pyx_state is not None:
*/
  __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0x82a3537, 0x6ae9995, 0xb068931, __pyx_k_name); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 6, __pyx_L1_error)

  /* "(tree fragment)":7
 *     cdef object __pyx_result
 *     __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x82a3537, 0x6ae9995, 0xb068931, b'name')
 *     __pyx_result = Enum.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
*/
  __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_MemviewEnum_type);
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type};
    __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  __pyx_v___pyx_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":8
 *     __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x82a3537, 0x6ae9995, 0xb068931, b'name')
 *     __pyx_result = Enum.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
 *     return __pyx_result
*/
  __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None));
  if (__pyx_t_5) {

    /* "(tree fragment)":9
 *     __pyx_result = Enum.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, __pyx_state: tuple):
*/
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'");
      __PYX_ERR(1, 9, __pyx_L1_error)
    }
    __pyx_t_2 = __pyx_unpickle_Enum__set_state(((struct __pyx_MemviewEnum_obj *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "(tree fragment)":8
 *     __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x82a3537, 0x6ae9995, 0xb068931, b'name')
 *     __pyx_result = Enum.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
 *     return __pyx_result
*/
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, __pyx_state: tuple):
 *     __pyx_result.name = __pyx_state[0]
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":4
 *     int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1
 *     int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1
 * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_result
 *     __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x82a3537, 0x6ae9995, 0xb068931, b'name')
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("View.MemoryView.__pyx_unpickle_Enum", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, __pyx_state: tuple):             # <<<<<<<<<<<<<<
 *     __pyx_result.name = __pyx_state[0]
 *     __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 1)
*/

static PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_Enum__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, __pyx_state: tuple):
 *     __pyx_result.name = __pyx_state[0]             # <<<<<<<<<<<<<<
 *     __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 1)
*/
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->name);
  __Pyx_DECREF(__pyx_v___pyx_result->name);
  __pyx_v___pyx_result->name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, __pyx_state: tuple):
 *     __pyx_result.name = __pyx_state[0]
 *     __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 1)             # <<<<<<<<<<<<<<
*/
  __pyx_t_2 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)

  /* "(tree fragment)":11
 *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, __pyx_state: tuple):             # <<<<<<<<<<<<<<
 *     __pyx_result.name = __pyx_state[0]
 *     __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 1)
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("View.MemoryView.__pyx_unpickle_Enum__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vector.from_py":51
 *     cdef Py_ssize_t __Pyx_PyObject_LengthHint(object o, Py_ssize_t defaultval) except -1
 * 
 * @cname("__pyx_convert_vector_from_py_int")             # <<<<<<<<<<<<<<
 * cdef vector[X] __pyx_convert_vector_from_py_int(object o) except *:
 * 
*/

static std::vector<int>  __pyx_convert_vector_from_py_int(PyObject *__pyx_v_o) {
  std::vector<int>  __pyx_v_v;
  Py_ssize_t __pyx_v_s;
  PyObject *__pyx_v_item = NULL;
  std::vector<int>  __pyx_r;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *(*__pyx_t_4)(PyObject *);
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_convert_vector_from_py_int", 0);

  /* "vector.from_py":55
 * 
 *     cdef vector[X] v
 *     cdef Py_ssize_t s = __Pyx_PyObject_LengthHint(o, 0)             # <<<<<<<<<<<<<<
 * 
 *     if s > 0:
*/
  __pyx_t_1 = __Pyx_PyObject_LengthHint(__pyx_v_o, 0); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1L))) __PYX_ERR(1, 55, __pyx_L1_error)
  __pyx_v_s = __pyx_t_1;

  /* "vector.from_py":57
 *     cdef Py_ssize_t s = __Pyx_PyObject_LengthHint(o, 0)
 * 
 *     if s > 0:             # <<<<<<<<<<<<<<
 *         v.reserve(<size_t> s)
 * 
*/
  __pyx_t_2 = (__pyx_v_s > 0);
  if (__pyx_t_2) {

    /* "vector.from_py":58
 * 
 *     if s > 0:
 *         v.reserve(<size_t> s)             # <<<<<<<<<<<<<<
 * 
 *     for item in o:
*/
    try {
      __pyx_v_v.reserve(((size_t)__pyx_v_s));
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(1, 58, __pyx_L1_error)
    }

    /* "vector.from_py":57
 *     cdef Py_ssize_t s = __Pyx_PyObject_LengthHint(o, 0)
 * 
 *     if s > 0:             # <<<<<<<<<<<<<<
 *         v.reserve(<size_t> s)
 * 
*/
  }

  /* "vector.from_py":60
 *         v.reserve(<size_t> s)
 * 
 *     for item in o:             # <<<<<<<<<<<<<<
 *         v.push_back(<X>item)
 * 
*/
  if (likely(PyList_CheckExact(__pyx_v_o)) || PyTuple_CheckExact(__pyx_v_o)) {
    __pyx_t_3 = __pyx_v_o; __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_1 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_o); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 60, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 60, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_3))) {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3);
          #if !CYTHON_ASSUME_SAFE_SIZE
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 60, __pyx_L1_error)
          #endif
          if (__pyx_t_1 >= __pyx_temp) break;
        }
        __pyx_t_5 = __Pyx_PyList_GetItemRefFast(__pyx_t_3, __pyx_t_1, __Pyx_ReferenceSharing_OwnStrongReference);
        ++__pyx_t_1;
      } else {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3);
          #if !CYTHON_ASSUME_SAFE_SIZE
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 60, __pyx_L1_error)
          #endif
          if (__pyx_t_1 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_5 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_1));
        #else
        __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_1);
        #endif
        ++__pyx_t_1;
      }
      if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 60, __pyx_L1_error)
    } else {
      __pyx_t_5 = __pyx_t_4(__pyx_t_3);
      if (unlikely(!__pyx_t_5)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(1, 60, __pyx_L1_error)
          PyErr_Clear();
        }
        break;
      }
    }
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "vector.from_py":61
 * 
 *     for item in o:
 *         v.push_back(<X>item)             # <<<<<<<<<<<<<<
 * 
 *     return v
*/
    __pyx_t_6 = __Pyx_PyLong_As_int(__pyx_v_item); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 61, __pyx_L1_error)
    try {
      __pyx_v_v.push_back(((int)__pyx_t_6));
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(1, 61, __pyx_L1_error)
    }

    /* "vector.from_py":60
 *         v.reserve(<size_t> s)
 * 
 *     for item in o:             # <<<<<<<<<<<<<<
 *         v.push_back(<X>item)
 * 
*/
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "vector.from_py":63
 *         v.push_back(<X>item)
 * 
 *     return v             # <<<<<<<<<<<<<<
 * 
*/
  __pyx_r = __pyx_v_v;
  goto __pyx_L0;

  /* "vector.from_py":51
 *     cdef Py_ssize_t __Pyx_PyObject_LengthHint(object o, Py_ssize_t defaultval) except -1
 * 
 * @cname("__pyx_convert_vector_from_py_int")             # <<<<<<<<<<<<<<
 * cdef vector[X] __pyx_convert_vector_from_py_int(object o) except *:
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("vector.from_py.__pyx_convert_vector_from_py_int", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_pretend_to_initialize(&__pyx_r);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_item);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cpython/complex.pxd":20
 * 
 *         # unavailable in limited API
 *         @property             # <<<<<<<<<<<<<<
 *         @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API")
 *         cdef inline double real(self) noexcept:
*/

#if !CYTHON_COMPILING_IN_LIMITED_API
static CYTHON_INLINE double __pyx_f_7cpython_7complex_7complex_4real_real(PyComplexObject *__pyx_v_self) {
  double __pyx_r;

  /* "cpython/complex.pxd":23
 *         @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API")
 *         cdef inline double real(self) noexcept:
 *             return self.cval.real             # <<<<<<<<<<<<<<
 * 
 *         # unavailable in limited API
*/
  __pyx_r = __pyx_v_self->cval.real;
  goto __pyx_L0;

  /* "cpython/complex.pxd":20
 * 
 *         # unavailable in limited API
 *         @property             # <<<<<<<<<<<<<<
 *         @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API")
 *         cdef inline double real(self) noexcept:
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}
#endif /*!(#if !CYTHON_COMPILING_IN_LIMITED_API)*/

/* "cpython/complex.pxd":26
 * 
 *         # unavailable in limited API
 *         @property             # <<<<<<<<<<<<<<
 *         @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API")
 *         cdef inline double imag(self) noexcept:
*/

#if !CYTHON_COMPILING_IN_LIMITED_API
static CYTHON_INLINE double __pyx_f_7cpython_7complex_7complex_4imag_imag(PyComplexObject *__pyx_v_self) {
  double __pyx_r;

  /* "cpython/complex.pxd":29
 *         @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API")
 *         cdef inline double imag(self) noexcept:
 *             return self.cval.imag             # <<<<<<<<<<<<<<
 * 
 *     # PyTypeObject PyComplex_Type
*/
  __pyx_r = __pyx_v_self->cval.imag;
  goto __pyx_L0;

  /* "cpython/complex.pxd":26
 * 
 *         # unavailable in limited API
 *         @property             # <<<<<<<<<<<<<<
 *         @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API")
 *         cdef inline double imag(self) noexcept:
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}
#endif /*!(#if !CYTHON_COMPILING_IN_LIMITED_API)*/

/* "cpython/contextvars.pxd":115
 * 
 * 
 * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API")             # <<<<<<<<<<<<<<
 * cdef inline object get_value(var, default_value=None):
 *     """Return a new reference to the value of the context variable,
*/

#if !CYTHON_COMPILING_IN_LIMITED_API
static CYTHON_INLINE PyObject *__pyx_f_7cpython_11contextvars_get_value(PyObject *__pyx_v_var, struct __pyx_opt_args_7cpython_11contextvars_get_value *__pyx_optional_args) {

  /* "cpython/contextvars.pxd":116
 * 
 * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API")
 * cdef inline object get_value(var, default_value=None):             # <<<<<<<<<<<<<<
 *     """Return a new reference to the value of the context variable,
 *     or the default value of the context variable,
*/
  PyObject *__pyx_v_default_value = ((PyObject *)Py_None);
  PyObject *__pyx_v_value;
  PyObject *__pyx_v_pyvalue = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_value", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_default_value = __pyx_optional_args->default_value;
    }
  }

  /* "cpython/contextvars.pxd":121
 *     or None if no such value or default was found.
 *     """
 *     cdef PyObject *value = NULL             # <<<<<<<<<<<<<<
 *     PyContextVar_Get(var, NULL, &value)
 *     if value is NULL:
*/
  __pyx_v_value = NULL;

  /* "cpython/contextvars.pxd":122
 *     """
 *     cdef PyObject *value = NULL
 *     PyContextVar_Get(var, NULL, &value)             # <<<<<<<<<<<<<<
 *     if value is NULL:
 *         # context variable does not have a default
*/
  __pyx_t_1 = PyContextVar_Get(__pyx_v_var, NULL, (&__pyx_v_value)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(2, 122, __pyx_L1_error)

  /* "cpython/contextvars.pxd":123
 *     cdef PyObject *value = NULL
 *     PyContextVar_Get(var, NULL, &value)
 *     if value is NULL:             # <<<<<<<<<<<<<<
 *         # context variable does not have a default
 *         pyvalue = default_value
*/
  __pyx_t_2 = (__pyx_v_value == NULL);
  if (__pyx_t_2) {

    /* "cpython/contextvars.pxd":125
 *     if value is NULL:
 *         # context variable does not have a default
 *         pyvalue = default_value             # <<<<<<<<<<<<<<
 *     else:
 *         # value or default value of context variable
*/
    __Pyx_INCREF(__pyx_v_default_value);
    __pyx_v_pyvalue = __pyx_v_default_value;

    /* "cpython/contextvars.pxd":123
 *     cdef PyObject *value = NULL
 *     PyContextVar_Get(var, NULL, &value)
 *     if value is NULL:             # <<<<<<<<<<<<<<
 *         # context variable does not have a default
 *         pyvalue = default_value
*/
    goto __pyx_L3;
  }

  /* "cpython/contextvars.pxd":128
 *     else:
 *         # value or default value of context variable
 *         pyvalue = <object>value             # <<<<<<<<<<<<<<
 *         Py_XDECREF(value)  # PyContextVar_Get() returned an owned reference as 'PyObject*'
 *     return pyvalue
*/
  /*else*/ {
    __pyx_t_3 = ((PyObject *)__pyx_v_value);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_v_pyvalue = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cpython/contextvars.pxd":129
 *         # value or default value of context variable
 *         pyvalue = <object>value
 *         Py_XDECREF(value)  # PyContextVar_Get() returned an owned reference as 'PyObject*'             # <<<<<<<<<<<<<<
 *     return pyvalue
 * 
*/
    Py_XDECREF(__pyx_v_value);
  }
  __pyx_L3:;

  /* "cpython/contextvars.pxd":130
 *         pyvalue = <object>value
 *         Py_XDECREF(value)  # PyContextVar_Get() returned an owned reference as 'PyObject*'
 *     return pyvalue             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_pyvalue);
  __pyx_r = __pyx_v_pyvalue;
  goto __pyx_L0;

  /* "cpython/contextvars.pxd":115
 * 
 * 
 * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API")             # <<<<<<<<<<<<<<
 * cdef inline object get_value(var, default_value=None):
 *     """Return a new reference to the value of the context variable,
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cpython.contextvars.get_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pyvalue);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
#endif /*!(#if !CYTHON_COMPILING_IN_LIMITED_API)*/

/* "cpython/contextvars.pxd":133
 * 
 * 
 * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API")             # <<<<<<<<<<<<<<
 * cdef inline object get_value_no_default(var, default_value=None):
 *     """Return a new reference to the value of the context variable,
*/

#if !CYTHON_COMPILING_IN_LIMITED_API
static CYTHON_INLINE PyObject *__pyx_f_7cpython_11contextvars_get_value_no_default(PyObject *__pyx_v_var, struct __pyx_opt_args_7cpython_11contextvars_get_value_no_default *__pyx_optional_args) {

  /* "cpython/contextvars.pxd":134
 * 
 * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API")
 * cdef inline object get_value_no_default(var, default_value=None):             # <<<<<<<<<<<<<<
 *     """Return a new reference to the value of the context variable,
 *     or the provided default value if no such value was found.
*/
  PyObject *__pyx_v_default_value = ((PyObject *)Py_None);
  PyObject *__pyx_v_value;
  PyObject *__pyx_v_pyvalue = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_value_no_default", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_default_value = __pyx_optional_args->default_value;
    }
  }

  /* "cpython/contextvars.pxd":140
 *     Ignores the default value of the context variable, if any.
 *     """
 *     cdef PyObject *value = NULL             # <<<<<<<<<<<<<<
 *     PyContextVar_Get(var, <PyObject*>default_value, &value)
 *     # value of context variable or 'default_value'
*/
  __pyx_v_value = NULL;

  /* "cpython/contextvars.pxd":141
 *     """
 *     cdef PyObject *value = NULL
 *     PyContextVar_Get(var, <PyObject*>default_value, &value)             # <<<<<<<<<<<<<<
 *     # value of context variable or 'default_value'
 *     pyvalue = <object>value
*/
  __pyx_t_1 = PyContextVar_Get(__pyx_v_var, ((PyObject *)__pyx_v_default_value), (&__pyx_v_value)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(2, 141, __pyx_L1_error)

  /* "cpython/contextvars.pxd":143
 *     PyContextVar_Get(var, <PyObject*>default_value, &value)
 *     # value of context variable or 'default_value'
 *     pyvalue = <object>value             # <<<<<<<<<<<<<<
 *     Py_XDECREF(value)  # PyContextVar_Get() returned an owned reference as 'PyObject*'
 *     return pyvalue
*/
  __pyx_t_2 = ((PyObject *)__pyx_v_value);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_v_pyvalue = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "cpython/contextvars.pxd":144
 *     # value of context variable or 'default_value'
 *     pyvalue = <object>value
 *     Py_XDECREF(value)  # PyContextVar_Get() returned an owned reference as 'PyObject*'             # <<<<<<<<<<<<<<
 *     return pyvalue
*/
  Py_XDECREF(__pyx_v_value);

  /* "cpython/contextvars.pxd":145
 *     pyvalue = <object>value
 *     Py_XDECREF(value)  # PyContextVar_Get() returned an owned reference as 'PyObject*'
 *     return pyvalue             # <<<<<<<<<<<<<<
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_pyvalue);
  __pyx_r = __pyx_v_pyvalue;
  goto __pyx_L0;

  /* "cpython/contextvars.pxd":133
 * 
 * 
 * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API")             # <<<<<<<<<<<<<<
 * cdef inline object get_value_no_default(var, default_value=None):
 *     """Return a new reference to the value of the context variable,
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cpython.contextvars.get_value_no_default", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pyvalue);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
#endif /*!(#if !CYTHON_COMPILING_IN_LIMITED_API)*/

/* "symengine/lib/symengine_wrapper.pyx":38
 *     pass
 * 
 * cpdef object capsule_to_basic(object capsule):             # <<<<<<<<<<<<<<
 *     cdef CRCPBasic *p = <CRCPBasic*>PyCapsule_GetPointer(capsule, NULL)
 *     return c2py(p.m)
*/

static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_1capsule_to_basic(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_9symengine_3lib_17symengine_wrapper_capsule_to_basic(PyObject *__pyx_v_capsule, CYTHON_UNUSED int __pyx_skip_dispatch) {
  struct __pyx_t_9symengine_CRCPBasic *__pyx_v_p;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  void *__pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("capsule_to_basic", 0);

  /* "symengine/lib/symengine_wrapper.pyx":39
 * 
 * cpdef object capsule_to_basic(object capsule):
 *     cdef CRCPBasic *p = <CRCPBasic*>PyCapsule_GetPointer(capsule, NULL)             # <<<<<<<<<<<<<<
 *     return c2py(p.m)
 * 
*/
  __pyx_t_1 = PyCapsule_GetPointer(__pyx_v_capsule, NULL); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 39, __pyx_L1_error)
  __pyx_v_p = ((struct __pyx_t_9symengine_CRCPBasic *)__pyx_t_1);

  /* "symengine/lib/symengine_wrapper.pyx":40
 * cpdef object capsule_to_basic(object capsule):
 *     cdef CRCPBasic *p = <CRCPBasic*>PyCapsule_GetPointer(capsule, NULL)
 *     return c2py(p.m)             # <<<<<<<<<<<<<<
 * 
 * cpdef void assign_to_capsule(object capsule, object value):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(__pyx_v_p->m); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 40, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":38
 *     pass
 * 
 * cpdef object capsule_to_basic(object capsule):             # <<<<<<<<<<<<<<
 *     cdef CRCPBasic *p = <CRCPBasic*>PyCapsule_GetPointer(capsule, NULL)
 *     return c2py(p.m)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.capsule_to_basic", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_1capsule_to_basic(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_1capsule_to_basic = {"capsule_to_basic", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_1capsule_to_basic, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_1capsule_to_basic(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_capsule = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("capsule_to_basic (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_capsule,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 38, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 38, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "capsule_to_basic", 0) < (0)) __PYX_ERR(0, 38, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("capsule_to_basic", 1, 1, 1, i); __PYX_ERR(0, 38, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 38, __pyx_L3_error)
    }
    __pyx_v_capsule = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("capsule_to_basic", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 38, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.capsule_to_basic", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_capsule_to_basic(__pyx_self, __pyx_v_capsule);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_capsule_to_basic(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_capsule) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("capsule_to_basic", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_capsule_to_basic(__pyx_v_capsule, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 38, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.capsule_to_basic", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":42
 *     return c2py(p.m)
 * 
 * cpdef void assign_to_capsule(object capsule, object value):             # <<<<<<<<<<<<<<
 *     cdef CRCPBasic *p_cap = <CRCPBasic*>PyCapsule_GetPointer(capsule, NULL)
 *     cdef Basic v = sympify(value)
*/

static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3assign_to_capsule(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static void __pyx_f_9symengine_3lib_17symengine_wrapper_assign_to_capsule(PyObject *__pyx_v_capsule, PyObject *__pyx_v_value, CYTHON_UNUSED int __pyx_skip_dispatch) {
  struct __pyx_t_9symengine_CRCPBasic *__pyx_v_p_cap;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_v = 0;
  __Pyx_RefNannyDeclarations
  void *__pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  SymEngine::RCP<const SymEngine::Basic> __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("assign_to_capsule", 0);

  /* "symengine/lib/symengine_wrapper.pyx":43
 * 
 * cpdef void assign_to_capsule(object capsule, object value):
 *     cdef CRCPBasic *p_cap = <CRCPBasic*>PyCapsule_GetPointer(capsule, NULL)             # <<<<<<<<<<<<<<
 *     cdef Basic v = sympify(value)
 *     p_cap.m = v.thisptr
*/
  __pyx_t_1 = PyCapsule_GetPointer(__pyx_v_capsule, NULL); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 43, __pyx_L1_error)
  __pyx_v_p_cap = ((struct __pyx_t_9symengine_CRCPBasic *)__pyx_t_1);

  /* "symengine/lib/symengine_wrapper.pyx":44
 * cpdef void assign_to_capsule(object capsule, object value):
 *     cdef CRCPBasic *p_cap = <CRCPBasic*>PyCapsule_GetPointer(capsule, NULL)
 *     cdef Basic v = sympify(value)             # <<<<<<<<<<<<<<
 *     p_cap.m = v.thisptr
 * 
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 44, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_value};
    __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 44, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 44, __pyx_L1_error)
  __pyx_v_v = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":45
 *     cdef CRCPBasic *p_cap = <CRCPBasic*>PyCapsule_GetPointer(capsule, NULL)
 *     cdef Basic v = sympify(value)
 *     p_cap.m = v.thisptr             # <<<<<<<<<<<<<<
 * 
 * cdef object c2py(rcp_const_basic o):
*/
  __pyx_t_6 = __pyx_v_v->thisptr;
  __pyx_v_p_cap->m = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_6);

  /* "symengine/lib/symengine_wrapper.pyx":42
 *     return c2py(p.m)
 * 
 * cpdef void assign_to_capsule(object capsule, object value):             # <<<<<<<<<<<<<<
 *     cdef CRCPBasic *p_cap = <CRCPBasic*>PyCapsule_GetPointer(capsule, NULL)
 *     cdef Basic v = sympify(value)
*/

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.assign_to_capsule", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_v);
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3assign_to_capsule(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_3assign_to_capsule = {"assign_to_capsule", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_3assign_to_capsule, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3assign_to_capsule(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_capsule = 0;
  PyObject *__pyx_v_value = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("assign_to_capsule (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_capsule,&__pyx_mstate_global->__pyx_n_u_value,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 42, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 42, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 42, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "assign_to_capsule", 0) < (0)) __PYX_ERR(0, 42, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("assign_to_capsule", 1, 2, 2, i); __PYX_ERR(0, 42, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 42, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 42, __pyx_L3_error)
    }
    __pyx_v_capsule = values[0];
    __pyx_v_value = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("assign_to_capsule", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 42, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.assign_to_capsule", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_2assign_to_capsule(__pyx_self, __pyx_v_capsule, __pyx_v_value);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_2assign_to_capsule(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_capsule, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("assign_to_capsule", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_f_9symengine_3lib_17symengine_wrapper_assign_to_capsule(__pyx_v_capsule, __pyx_v_value, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 42, __pyx_L1_error)
  __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 42, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.assign_to_capsule", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":47
 *     p_cap.m = v.thisptr
 * 
 * cdef object c2py(rcp_const_basic o):             # <<<<<<<<<<<<<<
 *     cdef Basic r
 *     cdef PyObject *obj
*/

static PyObject *__pyx_f_9symengine_3lib_17symengine_wrapper_c2py(SymEngine::RCP<const SymEngine::Basic> __pyx_v_o) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_r = 0;
  PyObject *__pyx_v_obj;
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  bool __pyx_t_6;
  SymEngine::RCP<SymEngine::PySymbol const >  __pyx_t_7;
  PyObject *__pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("c2py", 0);

  /* "symengine/lib/symengine_wrapper.pyx":50
 *     cdef Basic r
 *     cdef PyObject *obj
 *     if (symengine.is_a[symengine.Add](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Expr.__new__(Add)
 *     elif (symengine.is_a[symengine.Mul](deref(o))):
*/
  __pyx_t_1 = (SymEngine::is_a<SymEngine::Add>((*__pyx_v_o)) != 0);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":51
 *     cdef PyObject *obj
 *     if (symengine.is_a[symengine.Add](deref(o))):
 *         r = Expr.__new__(Add)             # <<<<<<<<<<<<<<
 *     elif (symengine.is_a[symengine.Mul](deref(o))):
 *         r = Expr.__new__(Mul)
*/
    __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Expr);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Add); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 51, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 51, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 51, __pyx_L1_error)
    __pyx_v_r = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":50
 *     cdef Basic r
 *     cdef PyObject *obj
 *     if (symengine.is_a[symengine.Add](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Expr.__new__(Add)
 *     elif (symengine.is_a[symengine.Mul](deref(o))):
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":52
 *     if (symengine.is_a[symengine.Add](deref(o))):
 *         r = Expr.__new__(Add)
 *     elif (symengine.is_a[symengine.Mul](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Expr.__new__(Mul)
 *     elif (symengine.is_a[symengine.Pow](deref(o))):
*/
  __pyx_t_1 = (SymEngine::is_a<SymEngine::Mul>((*__pyx_v_o)) != 0);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":53
 *         r = Expr.__new__(Add)
 *     elif (symengine.is_a[symengine.Mul](deref(o))):
 *         r = Expr.__new__(Mul)             # <<<<<<<<<<<<<<
 *     elif (symengine.is_a[symengine.Pow](deref(o))):
 *         r = Expr.__new__(Pow)
*/
    __pyx_t_4 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Expr);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Mul); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 53, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
      __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 53, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 53, __pyx_L1_error)
    __pyx_v_r = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":52
 *     if (symengine.is_a[symengine.Add](deref(o))):
 *         r = Expr.__new__(Add)
 *     elif (symengine.is_a[symengine.Mul](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Expr.__new__(Mul)
 *     elif (symengine.is_a[symengine.Pow](deref(o))):
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":54
 *     elif (symengine.is_a[symengine.Mul](deref(o))):
 *         r = Expr.__new__(Mul)
 *     elif (symengine.is_a[symengine.Pow](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Expr.__new__(Pow)
 *     elif (symengine.is_a[symengine.Integer](deref(o))):
*/
  __pyx_t_1 = (SymEngine::is_a<SymEngine::Pow>((*__pyx_v_o)) != 0);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":55
 *         r = Expr.__new__(Mul)
 *     elif (symengine.is_a[symengine.Pow](deref(o))):
 *         r = Expr.__new__(Pow)             # <<<<<<<<<<<<<<
 *     elif (symengine.is_a[symengine.Integer](deref(o))):
 *         if (deref(symengine.rcp_static_cast_Integer(o)).is_zero()):
*/
    __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Expr);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Pow); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 55, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 55, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 55, __pyx_L1_error)
    __pyx_v_r = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":54
 *     elif (symengine.is_a[symengine.Mul](deref(o))):
 *         r = Expr.__new__(Mul)
 *     elif (symengine.is_a[symengine.Pow](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Expr.__new__(Pow)
 *     elif (symengine.is_a[symengine.Integer](deref(o))):
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":56
 *     elif (symengine.is_a[symengine.Pow](deref(o))):
 *         r = Expr.__new__(Pow)
 *     elif (symengine.is_a[symengine.Integer](deref(o))):             # <<<<<<<<<<<<<<
 *         if (deref(symengine.rcp_static_cast_Integer(o)).is_zero()):
 *             return S.Zero
*/
  __pyx_t_1 = (SymEngine::is_a<SymEngine::Integer>((*__pyx_v_o)) != 0);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":57
 *         r = Expr.__new__(Pow)
 *     elif (symengine.is_a[symengine.Integer](deref(o))):
 *         if (deref(symengine.rcp_static_cast_Integer(o)).is_zero()):             # <<<<<<<<<<<<<<
 *             return S.Zero
 *         elif (deref(symengine.rcp_static_cast_Integer(o)).is_one()):
*/
    __pyx_t_1 = ((*SymEngine::rcp_static_cast<const SymEngine::Integer>(__pyx_v_o)).is_zero() != 0);
    if (__pyx_t_1) {

      /* "symengine/lib/symengine_wrapper.pyx":58
 *     elif (symengine.is_a[symengine.Integer](deref(o))):
 *         if (deref(symengine.rcp_static_cast_Integer(o)).is_zero()):
 *             return S.Zero             # <<<<<<<<<<<<<<
 *         elif (deref(symengine.rcp_static_cast_Integer(o)).is_one()):
 *             return S.One
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_S); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 58, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Zero); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 58, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L0;

      /* "symengine/lib/symengine_wrapper.pyx":57
 *         r = Expr.__new__(Pow)
 *     elif (symengine.is_a[symengine.Integer](deref(o))):
 *         if (deref(symengine.rcp_static_cast_Integer(o)).is_zero()):             # <<<<<<<<<<<<<<
 *             return S.Zero
 *         elif (deref(symengine.rcp_static_cast_Integer(o)).is_one()):
*/
    }

    /* "symengine/lib/symengine_wrapper.pyx":59
 *         if (deref(symengine.rcp_static_cast_Integer(o)).is_zero()):
 *             return S.Zero
 *         elif (deref(symengine.rcp_static_cast_Integer(o)).is_one()):             # <<<<<<<<<<<<<<
 *             return S.One
 *         elif (deref(symengine.rcp_static_cast_Integer(o)).is_minus_one()):
*/
    __pyx_t_1 = ((*SymEngine::rcp_static_cast<const SymEngine::Integer>(__pyx_v_o)).is_one() != 0);
    if (__pyx_t_1) {

      /* "symengine/lib/symengine_wrapper.pyx":60
 *             return S.Zero
 *         elif (deref(symengine.rcp_static_cast_Integer(o)).is_one()):
 *             return S.One             # <<<<<<<<<<<<<<
 *         elif (deref(symengine.rcp_static_cast_Integer(o)).is_minus_one()):
 *             return S.NegativeOne
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_S); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 60, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_One); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 60, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

      /* "symengine/lib/symengine_wrapper.pyx":59
 *         if (deref(symengine.rcp_static_cast_Integer(o)).is_zero()):
 *             return S.Zero
 *         elif (deref(symengine.rcp_static_cast_Integer(o)).is_one()):             # <<<<<<<<<<<<<<
 *             return S.One
 *         elif (deref(symengine.rcp_static_cast_Integer(o)).is_minus_one()):
*/
    }

    /* "symengine/lib/symengine_wrapper.pyx":61
 *         elif (deref(symengine.rcp_static_cast_Integer(o)).is_one()):
 *             return S.One
 *         elif (deref(symengine.rcp_static_cast_Integer(o)).is_minus_one()):             # <<<<<<<<<<<<<<
 *             return S.NegativeOne
 *         r = Number.__new__(Integer)
*/
    __pyx_t_1 = ((*SymEngine::rcp_static_cast<const SymEngine::Integer>(__pyx_v_o)).is_minus_one() != 0);
    if (__pyx_t_1) {

      /* "symengine/lib/symengine_wrapper.pyx":62
 *             return S.One
 *         elif (deref(symengine.rcp_static_cast_Integer(o)).is_minus_one()):
 *             return S.NegativeOne             # <<<<<<<<<<<<<<
 *         r = Number.__new__(Integer)
 *     elif (symengine.is_a[symengine.Rational](deref(o))):
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_S); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 62, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_NegativeOne); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 62, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L0;

      /* "symengine/lib/symengine_wrapper.pyx":61
 *         elif (deref(symengine.rcp_static_cast_Integer(o)).is_one()):
 *             return S.One
 *         elif (deref(symengine.rcp_static_cast_Integer(o)).is_minus_one()):             # <<<<<<<<<<<<<<
 *             return S.NegativeOne
 *         r = Number.__new__(Integer)
*/
    }

    /* "symengine/lib/symengine_wrapper.pyx":63
 *         elif (deref(symengine.rcp_static_cast_Integer(o)).is_minus_one()):
 *             return S.NegativeOne
 *         r = Number.__new__(Integer)             # <<<<<<<<<<<<<<
 *     elif (symengine.is_a[symengine.Rational](deref(o))):
 *         r = S.Half
*/
    __pyx_t_2 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Number);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Integer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 63, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
      __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 63, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 63, __pyx_L1_error)
    __pyx_v_r = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":56
 *     elif (symengine.is_a[symengine.Pow](deref(o))):
 *         r = Expr.__new__(Pow)
 *     elif (symengine.is_a[symengine.Integer](deref(o))):             # <<<<<<<<<<<<<<
 *         if (deref(symengine.rcp_static_cast_Integer(o)).is_zero()):
 *             return S.Zero
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":64
 *             return S.NegativeOne
 *         r = Number.__new__(Integer)
 *     elif (symengine.is_a[symengine.Rational](deref(o))):             # <<<<<<<<<<<<<<
 *         r = S.Half
 *         if (symengine.eq(deref(o), deref(r.thisptr))):
*/
  __pyx_t_1 = (SymEngine::is_a<SymEngine::Rational>((*__pyx_v_o)) != 0);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":65
 *         r = Number.__new__(Integer)
 *     elif (symengine.is_a[symengine.Rational](deref(o))):
 *         r = S.Half             # <<<<<<<<<<<<<<
 *         if (symengine.eq(deref(o), deref(r.thisptr))):
 *             return S.Half
*/
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_S); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 65, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Half); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 65, __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_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 65, __pyx_L1_error)
    __pyx_v_r = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":66
 *     elif (symengine.is_a[symengine.Rational](deref(o))):
 *         r = S.Half
 *         if (symengine.eq(deref(o), deref(r.thisptr))):             # <<<<<<<<<<<<<<
 *             return S.Half
 *         r = Number.__new__(Rational)
*/
    try {
      __pyx_t_6 = SymEngine::eq((*__pyx_v_o), (*__pyx_v_r->thisptr));
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(0, 66, __pyx_L1_error)
    }
    __pyx_t_1 = (__pyx_t_6 != 0);
    if (__pyx_t_1) {

      /* "symengine/lib/symengine_wrapper.pyx":67
 *         r = S.Half
 *         if (symengine.eq(deref(o), deref(r.thisptr))):
 *             return S.Half             # <<<<<<<<<<<<<<
 *         r = Number.__new__(Rational)
 *     elif (symengine.is_a[symengine.Complex](deref(o))):
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_S); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 67, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Half); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 67, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L0;

      /* "symengine/lib/symengine_wrapper.pyx":66
 *     elif (symengine.is_a[symengine.Rational](deref(o))):
 *         r = S.Half
 *         if (symengine.eq(deref(o), deref(r.thisptr))):             # <<<<<<<<<<<<<<
 *             return S.Half
 *         r = Number.__new__(Rational)
*/
    }

    /* "symengine/lib/symengine_wrapper.pyx":68
 *         if (symengine.eq(deref(o), deref(r.thisptr))):
 *             return S.Half
 *         r = Number.__new__(Rational)             # <<<<<<<<<<<<<<
 *     elif (symengine.is_a[symengine.Complex](deref(o))):
 *         r = S.ImaginaryUnit
*/
    __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Number);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Rational); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 68, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_2};
      __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 68, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 68, __pyx_L1_error)
    __Pyx_DECREF_SET(__pyx_v_r, ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":64
 *             return S.NegativeOne
 *         r = Number.__new__(Integer)
 *     elif (symengine.is_a[symengine.Rational](deref(o))):             # <<<<<<<<<<<<<<
 *         r = S.Half
 *         if (symengine.eq(deref(o), deref(r.thisptr))):
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":69
 *             return S.Half
 *         r = Number.__new__(Rational)
 *     elif (symengine.is_a[symengine.Complex](deref(o))):             # <<<<<<<<<<<<<<
 *         r = S.ImaginaryUnit
 *         if (symengine.eq(deref(o), deref(r.thisptr))):
*/
  __pyx_t_1 = (SymEngine::is_a<SymEngine::Complex>((*__pyx_v_o)) != 0);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":70
 *         r = Number.__new__(Rational)
 *     elif (symengine.is_a[symengine.Complex](deref(o))):
 *         r = S.ImaginaryUnit             # <<<<<<<<<<<<<<
 *         if (symengine.eq(deref(o), deref(r.thisptr))):
 *             return S.ImaginaryUnit
*/
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_S); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 70, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ImaginaryUnit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 70, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 70, __pyx_L1_error)
    __pyx_v_r = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":71
 *     elif (symengine.is_a[symengine.Complex](deref(o))):
 *         r = S.ImaginaryUnit
 *         if (symengine.eq(deref(o), deref(r.thisptr))):             # <<<<<<<<<<<<<<
 *             return S.ImaginaryUnit
 *         r = Complex.__new__(Complex)
*/
    try {
      __pyx_t_6 = SymEngine::eq((*__pyx_v_o), (*__pyx_v_r->thisptr));
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(0, 71, __pyx_L1_error)
    }
    __pyx_t_1 = (__pyx_t_6 != 0);
    if (__pyx_t_1) {

      /* "symengine/lib/symengine_wrapper.pyx":72
 *         r = S.ImaginaryUnit
 *         if (symengine.eq(deref(o), deref(r.thisptr))):
 *             return S.ImaginaryUnit             # <<<<<<<<<<<<<<
 *         r = Complex.__new__(Complex)
 *     elif (symengine.is_a[symengine.Dummy](deref(o))):
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_S); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 72, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_ImaginaryUnit); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 72, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L0;

      /* "symengine/lib/symengine_wrapper.pyx":71
 *     elif (symengine.is_a[symengine.Complex](deref(o))):
 *         r = S.ImaginaryUnit
 *         if (symengine.eq(deref(o), deref(r.thisptr))):             # <<<<<<<<<<<<<<
 *             return S.ImaginaryUnit
 *         r = Complex.__new__(Complex)
*/
    }

    /* "symengine/lib/symengine_wrapper.pyx":73
 *         if (symengine.eq(deref(o), deref(r.thisptr))):
 *             return S.ImaginaryUnit
 *         r = Complex.__new__(Complex)             # <<<<<<<<<<<<<<
 *     elif (symengine.is_a[symengine.Dummy](deref(o))):
 *         r = Dummy.__new__(Dummy)
*/
    __pyx_t_4 = ((PyObject *)__pyx_tp_new_9symengine_3lib_17symengine_wrapper_Basic(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Complex), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 73, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_4);
    if (!(likely(__Pyx_TypeTest(((PyObject *)__pyx_t_4), __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic)))) __PYX_ERR(0, 73, __pyx_L1_error)
    __Pyx_DECREF_SET(__pyx_v_r, ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":69
 *             return S.Half
 *         r = Number.__new__(Rational)
 *     elif (symengine.is_a[symengine.Complex](deref(o))):             # <<<<<<<<<<<<<<
 *         r = S.ImaginaryUnit
 *         if (symengine.eq(deref(o), deref(r.thisptr))):
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":74
 *             return S.ImaginaryUnit
 *         r = Complex.__new__(Complex)
 *     elif (symengine.is_a[symengine.Dummy](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Dummy.__new__(Dummy)
 *     elif (symengine.is_a[symengine.Symbol](deref(o))):
*/
  __pyx_t_1 = (SymEngine::is_a<SymEngine::Dummy>((*__pyx_v_o)) != 0);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":75
 *         r = Complex.__new__(Complex)
 *     elif (symengine.is_a[symengine.Dummy](deref(o))):
 *         r = Dummy.__new__(Dummy)             # <<<<<<<<<<<<<<
 *     elif (symengine.is_a[symengine.Symbol](deref(o))):
 *         if (symengine.is_a_sub[symengine.PySymbol](deref(o))):
*/
    __pyx_t_4 = ((PyObject *)__pyx_tp_new_9symengine_3lib_17symengine_wrapper_Basic(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Dummy), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 75, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_4);
    if (!(likely(__Pyx_TypeTest(((PyObject *)__pyx_t_4), __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic)))) __PYX_ERR(0, 75, __pyx_L1_error)
    __pyx_v_r = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":74
 *             return S.ImaginaryUnit
 *         r = Complex.__new__(Complex)
 *     elif (symengine.is_a[symengine.Dummy](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Dummy.__new__(Dummy)
 *     elif (symengine.is_a[symengine.Symbol](deref(o))):
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":76
 *     elif (symengine.is_a[symengine.Dummy](deref(o))):
 *         r = Dummy.__new__(Dummy)
 *     elif (symengine.is_a[symengine.Symbol](deref(o))):             # <<<<<<<<<<<<<<
 *         if (symengine.is_a_sub[symengine.PySymbol](deref(o))):
 *             obj = deref(symengine.rcp_static_cast_PySymbol(o)).get_py_object()
*/
  __pyx_t_1 = (SymEngine::is_a<SymEngine::Symbol>((*__pyx_v_o)) != 0);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":77
 *         r = Dummy.__new__(Dummy)
 *     elif (symengine.is_a[symengine.Symbol](deref(o))):
 *         if (symengine.is_a_sub[symengine.PySymbol](deref(o))):             # <<<<<<<<<<<<<<
 *             obj = deref(symengine.rcp_static_cast_PySymbol(o)).get_py_object()
 *             result = <object>(obj)
*/
    __pyx_t_1 = (SymEngine::is_a_sub<SymEngine::PySymbol>((*__pyx_v_o)) != 0);
    if (__pyx_t_1) {

      /* "symengine/lib/symengine_wrapper.pyx":78
 *     elif (symengine.is_a[symengine.Symbol](deref(o))):
 *         if (symengine.is_a_sub[symengine.PySymbol](deref(o))):
 *             obj = deref(symengine.rcp_static_cast_PySymbol(o)).get_py_object()             # <<<<<<<<<<<<<<
 *             result = <object>(obj)
 *             Py_XDECREF(obj);
*/
      try {
        __pyx_t_7 = SymEngine::rcp_static_cast<const SymEngine::PySymbol>(__pyx_v_o);
      } catch(...) {
        __Pyx_CppExn2PyErr();
        __PYX_ERR(0, 78, __pyx_L1_error)
      }
      try {
        __pyx_t_8 = (*__pyx_t_7).get_py_object();
      } catch(...) {
        __Pyx_CppExn2PyErr();
        __PYX_ERR(0, 78, __pyx_L1_error)
      }
      __pyx_v_obj = __pyx_t_8;

      /* "symengine/lib/symengine_wrapper.pyx":79
 *         if (symengine.is_a_sub[symengine.PySymbol](deref(o))):
 *             obj = deref(symengine.rcp_static_cast_PySymbol(o)).get_py_object()
 *             result = <object>(obj)             # <<<<<<<<<<<<<<
 *             Py_XDECREF(obj);
 *             return result
*/
      __pyx_t_4 = ((PyObject *)__pyx_v_obj);
      __Pyx_INCREF(__pyx_t_4);
      __pyx_v_result = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "symengine/lib/symengine_wrapper.pyx":80
 *             obj = deref(symengine.rcp_static_cast_PySymbol(o)).get_py_object()
 *             result = <object>(obj)
 *             Py_XDECREF(obj);             # <<<<<<<<<<<<<<
 *             return result
 *         r = Symbol.__new__(Symbol)
*/
      Py_XDECREF(__pyx_v_obj);

      /* "symengine/lib/symengine_wrapper.pyx":81
 *             result = <object>(obj)
 *             Py_XDECREF(obj);
 *             return result             # <<<<<<<<<<<<<<
 *         r = Symbol.__new__(Symbol)
 *     elif (symengine.is_a[symengine.Constant](deref(o))):
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_result);
      __pyx_r = __pyx_v_result;
      goto __pyx_L0;

      /* "symengine/lib/symengine_wrapper.pyx":77
 *         r = Dummy.__new__(Dummy)
 *     elif (symengine.is_a[symengine.Symbol](deref(o))):
 *         if (symengine.is_a_sub[symengine.PySymbol](deref(o))):             # <<<<<<<<<<<<<<
 *             obj = deref(symengine.rcp_static_cast_PySymbol(o)).get_py_object()
 *             result = <object>(obj)
*/
    }

    /* "symengine/lib/symengine_wrapper.pyx":82
 *             Py_XDECREF(obj);
 *             return result
 *         r = Symbol.__new__(Symbol)             # <<<<<<<<<<<<<<
 *     elif (symengine.is_a[symengine.Constant](deref(o))):
 *         r = S.Pi
*/
    __pyx_t_4 = ((PyObject *)__pyx_tp_new_9symengine_3lib_17symengine_wrapper_Basic(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Symbol), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 82, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_4);
    if (!(likely(__Pyx_TypeTest(((PyObject *)__pyx_t_4), __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic)))) __PYX_ERR(0, 82, __pyx_L1_error)
    __pyx_v_r = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":76
 *     elif (symengine.is_a[symengine.Dummy](deref(o))):
 *         r = Dummy.__new__(Dummy)
 *     elif (symengine.is_a[symengine.Symbol](deref(o))):             # <<<<<<<<<<<<<<
 *         if (symengine.is_a_sub[symengine.PySymbol](deref(o))):
 *             obj = deref(symengine.rcp_static_cast_PySymbol(o)).get_py_object()
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":83
 *             return result
 *         r = Symbol.__new__(Symbol)
 *     elif (symengine.is_a[symengine.Constant](deref(o))):             # <<<<<<<<<<<<<<
 *         r = S.Pi
 *         if (symengine.eq(deref(o), deref(r.thisptr))):
*/
  __pyx_t_1 = (SymEngine::is_a<SymEngine::Constant>((*__pyx_v_o)) != 0);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":84
 *         r = Symbol.__new__(Symbol)
 *     elif (symengine.is_a[symengine.Constant](deref(o))):
 *         r = S.Pi             # <<<<<<<<<<<<<<
 *         if (symengine.eq(deref(o), deref(r.thisptr))):
 *             return S.Pi
*/
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_S); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 84, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Pi); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 84, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 84, __pyx_L1_error)
    __pyx_v_r = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":85
 *     elif (symengine.is_a[symengine.Constant](deref(o))):
 *         r = S.Pi
 *         if (symengine.eq(deref(o), deref(r.thisptr))):             # <<<<<<<<<<<<<<
 *             return S.Pi
 *         r = S.Exp1
*/
    try {
      __pyx_t_6 = SymEngine::eq((*__pyx_v_o), (*__pyx_v_r->thisptr));
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(0, 85, __pyx_L1_error)
    }
    __pyx_t_1 = (__pyx_t_6 != 0);
    if (__pyx_t_1) {

      /* "symengine/lib/symengine_wrapper.pyx":86
 *         r = S.Pi
 *         if (symengine.eq(deref(o), deref(r.thisptr))):
 *             return S.Pi             # <<<<<<<<<<<<<<
 *         r = S.Exp1
 *         if (symengine.eq(deref(o), deref(r.thisptr))):
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_S); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 86, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Pi); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 86, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L0;

      /* "symengine/lib/symengine_wrapper.pyx":85
 *     elif (symengine.is_a[symengine.Constant](deref(o))):
 *         r = S.Pi
 *         if (symengine.eq(deref(o), deref(r.thisptr))):             # <<<<<<<<<<<<<<
 *             return S.Pi
 *         r = S.Exp1
*/
    }

    /* "symengine/lib/symengine_wrapper.pyx":87
 *         if (symengine.eq(deref(o), deref(r.thisptr))):
 *             return S.Pi
 *         r = S.Exp1             # <<<<<<<<<<<<<<
 *         if (symengine.eq(deref(o), deref(r.thisptr))):
 *             return S.Exp1
*/
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_S); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 87, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Exp1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 87, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 87, __pyx_L1_error)
    __Pyx_DECREF_SET(__pyx_v_r, ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":88
 *             return S.Pi
 *         r = S.Exp1
 *         if (symengine.eq(deref(o), deref(r.thisptr))):             # <<<<<<<<<<<<<<
 *             return S.Exp1
 *         r = S.GoldenRatio
*/
    try {
      __pyx_t_6 = SymEngine::eq((*__pyx_v_o), (*__pyx_v_r->thisptr));
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(0, 88, __pyx_L1_error)
    }
    __pyx_t_1 = (__pyx_t_6 != 0);
    if (__pyx_t_1) {

      /* "symengine/lib/symengine_wrapper.pyx":89
 *         r = S.Exp1
 *         if (symengine.eq(deref(o), deref(r.thisptr))):
 *             return S.Exp1             # <<<<<<<<<<<<<<
 *         r = S.GoldenRatio
 *         if (symengine.eq(deref(o), deref(r.thisptr))):
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_S); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 89, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Exp1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 89, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L0;

      /* "symengine/lib/symengine_wrapper.pyx":88
 *             return S.Pi
 *         r = S.Exp1
 *         if (symengine.eq(deref(o), deref(r.thisptr))):             # <<<<<<<<<<<<<<
 *             return S.Exp1
 *         r = S.GoldenRatio
*/
    }

    /* "symengine/lib/symengine_wrapper.pyx":90
 *         if (symengine.eq(deref(o), deref(r.thisptr))):
 *             return S.Exp1
 *         r = S.GoldenRatio             # <<<<<<<<<<<<<<
 *         if (symengine.eq(deref(o), deref(r.thisptr))):
 *             return S.GoldenRatio
*/
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_S); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 90, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_GoldenRatio); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 90, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 90, __pyx_L1_error)
    __Pyx_DECREF_SET(__pyx_v_r, ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":91
 *             return S.Exp1
 *         r = S.GoldenRatio
 *         if (symengine.eq(deref(o), deref(r.thisptr))):             # <<<<<<<<<<<<<<
 *             return S.GoldenRatio
 *         r = S.Catalan
*/
    try {
      __pyx_t_6 = SymEngine::eq((*__pyx_v_o), (*__pyx_v_r->thisptr));
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(0, 91, __pyx_L1_error)
    }
    __pyx_t_1 = (__pyx_t_6 != 0);
    if (__pyx_t_1) {

      /* "symengine/lib/symengine_wrapper.pyx":92
 *         r = S.GoldenRatio
 *         if (symengine.eq(deref(o), deref(r.thisptr))):
 *             return S.GoldenRatio             # <<<<<<<<<<<<<<
 *         r = S.Catalan
 *         if (symengine.eq(deref(o), deref(r.thisptr))):
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_S); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 92, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_GoldenRatio); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 92, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L0;

      /* "symengine/lib/symengine_wrapper.pyx":91
 *             return S.Exp1
 *         r = S.GoldenRatio
 *         if (symengine.eq(deref(o), deref(r.thisptr))):             # <<<<<<<<<<<<<<
 *             return S.GoldenRatio
 *         r = S.Catalan
*/
    }

    /* "symengine/lib/symengine_wrapper.pyx":93
 *         if (symengine.eq(deref(o), deref(r.thisptr))):
 *             return S.GoldenRatio
 *         r = S.Catalan             # <<<<<<<<<<<<<<
 *         if (symengine.eq(deref(o), deref(r.thisptr))):
 *             return S.Catalan
*/
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_S); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 93, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Catalan); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 93, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 93, __pyx_L1_error)
    __Pyx_DECREF_SET(__pyx_v_r, ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":94
 *             return S.GoldenRatio
 *         r = S.Catalan
 *         if (symengine.eq(deref(o), deref(r.thisptr))):             # <<<<<<<<<<<<<<
 *             return S.Catalan
 *         r = S.EulerGamma
*/
    try {
      __pyx_t_6 = SymEngine::eq((*__pyx_v_o), (*__pyx_v_r->thisptr));
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(0, 94, __pyx_L1_error)
    }
    __pyx_t_1 = (__pyx_t_6 != 0);
    if (__pyx_t_1) {

      /* "symengine/lib/symengine_wrapper.pyx":95
 *         r = S.Catalan
 *         if (symengine.eq(deref(o), deref(r.thisptr))):
 *             return S.Catalan             # <<<<<<<<<<<<<<
 *         r = S.EulerGamma
 *         if (symengine.eq(deref(o), deref(r.thisptr))):
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_S); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 95, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Catalan); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 95, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L0;

      /* "symengine/lib/symengine_wrapper.pyx":94
 *             return S.GoldenRatio
 *         r = S.Catalan
 *         if (symengine.eq(deref(o), deref(r.thisptr))):             # <<<<<<<<<<<<<<
 *             return S.Catalan
 *         r = S.EulerGamma
*/
    }

    /* "symengine/lib/symengine_wrapper.pyx":96
 *         if (symengine.eq(deref(o), deref(r.thisptr))):
 *             return S.Catalan
 *         r = S.EulerGamma             # <<<<<<<<<<<<<<
 *         if (symengine.eq(deref(o), deref(r.thisptr))):
 *             return S.EulerGamma
*/
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_S); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 96, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_EulerGamma); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 96, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 96, __pyx_L1_error)
    __Pyx_DECREF_SET(__pyx_v_r, ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":97
 *             return S.Catalan
 *         r = S.EulerGamma
 *         if (symengine.eq(deref(o), deref(r.thisptr))):             # <<<<<<<<<<<<<<
 *             return S.EulerGamma
 *         r = Constant.__new__(Constant)
*/
    try {
      __pyx_t_6 = SymEngine::eq((*__pyx_v_o), (*__pyx_v_r->thisptr));
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(0, 97, __pyx_L1_error)
    }
    __pyx_t_1 = (__pyx_t_6 != 0);
    if (__pyx_t_1) {

      /* "symengine/lib/symengine_wrapper.pyx":98
 *         r = S.EulerGamma
 *         if (symengine.eq(deref(o), deref(r.thisptr))):
 *             return S.EulerGamma             # <<<<<<<<<<<<<<
 *         r = Constant.__new__(Constant)
 *     elif (symengine.is_a[symengine.Infty](deref(o))):
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_S); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 98, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_EulerGamma); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 98, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L0;

      /* "symengine/lib/symengine_wrapper.pyx":97
 *             return S.Catalan
 *         r = S.EulerGamma
 *         if (symengine.eq(deref(o), deref(r.thisptr))):             # <<<<<<<<<<<<<<
 *             return S.EulerGamma
 *         r = Constant.__new__(Constant)
*/
    }

    /* "symengine/lib/symengine_wrapper.pyx":99
 *         if (symengine.eq(deref(o), deref(r.thisptr))):
 *             return S.EulerGamma
 *         r = Constant.__new__(Constant)             # <<<<<<<<<<<<<<
 *     elif (symengine.is_a[symengine.Infty](deref(o))):
 *         if (deref(symengine.rcp_static_cast_Infty(o)).is_positive()):
*/
    __pyx_t_4 = ((PyObject *)__pyx_tp_new_9symengine_3lib_17symengine_wrapper_Constant(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Constant), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 99, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_4);
    if (!(likely(__Pyx_TypeTest(((PyObject *)__pyx_t_4), __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic)))) __PYX_ERR(0, 99, __pyx_L1_error)
    __Pyx_DECREF_SET(__pyx_v_r, ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":83
 *             return result
 *         r = Symbol.__new__(Symbol)
 *     elif (symengine.is_a[symengine.Constant](deref(o))):             # <<<<<<<<<<<<<<
 *         r = S.Pi
 *         if (symengine.eq(deref(o), deref(r.thisptr))):
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":100
 *             return S.EulerGamma
 *         r = Constant.__new__(Constant)
 *     elif (symengine.is_a[symengine.Infty](deref(o))):             # <<<<<<<<<<<<<<
 *         if (deref(symengine.rcp_static_cast_Infty(o)).is_positive()):
 *             return S.Infinity
*/
  __pyx_t_1 = (SymEngine::is_a<SymEngine::Infty>((*__pyx_v_o)) != 0);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":101
 *         r = Constant.__new__(Constant)
 *     elif (symengine.is_a[symengine.Infty](deref(o))):
 *         if (deref(symengine.rcp_static_cast_Infty(o)).is_positive()):             # <<<<<<<<<<<<<<
 *             return S.Infinity
 *         elif (deref(symengine.rcp_static_cast_Infty(o)).is_negative()):
*/
    __pyx_t_1 = ((*SymEngine::rcp_static_cast<const SymEngine::Infty>(__pyx_v_o)).is_positive() != 0);
    if (__pyx_t_1) {

      /* "symengine/lib/symengine_wrapper.pyx":102
 *     elif (symengine.is_a[symengine.Infty](deref(o))):
 *         if (deref(symengine.rcp_static_cast_Infty(o)).is_positive()):
 *             return S.Infinity             # <<<<<<<<<<<<<<
 *         elif (deref(symengine.rcp_static_cast_Infty(o)).is_negative()):
 *             return S.NegativeInfinity
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_S); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 102, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Infinity); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 102, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

      /* "symengine/lib/symengine_wrapper.pyx":101
 *         r = Constant.__new__(Constant)
 *     elif (symengine.is_a[symengine.Infty](deref(o))):
 *         if (deref(symengine.rcp_static_cast_Infty(o)).is_positive()):             # <<<<<<<<<<<<<<
 *             return S.Infinity
 *         elif (deref(symengine.rcp_static_cast_Infty(o)).is_negative()):
*/
    }

    /* "symengine/lib/symengine_wrapper.pyx":103
 *         if (deref(symengine.rcp_static_cast_Infty(o)).is_positive()):
 *             return S.Infinity
 *         elif (deref(symengine.rcp_static_cast_Infty(o)).is_negative()):             # <<<<<<<<<<<<<<
 *             return S.NegativeInfinity
 *         return S.ComplexInfinity
*/
    __pyx_t_1 = ((*SymEngine::rcp_static_cast<const SymEngine::Infty>(__pyx_v_o)).is_negative() != 0);
    if (__pyx_t_1) {

      /* "symengine/lib/symengine_wrapper.pyx":104
 *             return S.Infinity
 *         elif (deref(symengine.rcp_static_cast_Infty(o)).is_negative()):
 *             return S.NegativeInfinity             # <<<<<<<<<<<<<<
 *         return S.ComplexInfinity
 *     elif (symengine.is_a[symengine.NaN](deref(o))):
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_S); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 104, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_NegativeInfinity); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 104, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L0;

      /* "symengine/lib/symengine_wrapper.pyx":103
 *         if (deref(symengine.rcp_static_cast_Infty(o)).is_positive()):
 *             return S.Infinity
 *         elif (deref(symengine.rcp_static_cast_Infty(o)).is_negative()):             # <<<<<<<<<<<<<<
 *             return S.NegativeInfinity
 *         return S.ComplexInfinity
*/
    }

    /* "symengine/lib/symengine_wrapper.pyx":105
 *         elif (deref(symengine.rcp_static_cast_Infty(o)).is_negative()):
 *             return S.NegativeInfinity
 *         return S.ComplexInfinity             # <<<<<<<<<<<<<<
 *     elif (symengine.is_a[symengine.NaN](deref(o))):
 *         return S.NaN
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_S); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 105, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ComplexInfinity); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 105, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":100
 *             return S.EulerGamma
 *         r = Constant.__new__(Constant)
 *     elif (symengine.is_a[symengine.Infty](deref(o))):             # <<<<<<<<<<<<<<
 *         if (deref(symengine.rcp_static_cast_Infty(o)).is_positive()):
 *             return S.Infinity
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":106
 *             return S.NegativeInfinity
 *         return S.ComplexInfinity
 *     elif (symengine.is_a[symengine.NaN](deref(o))):             # <<<<<<<<<<<<<<
 *         return S.NaN
 *     elif (symengine.is_a[symengine.PyFunction](deref(o))):
*/
  __pyx_t_1 = (SymEngine::is_a<SymEngine::NaN>((*__pyx_v_o)) != 0);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":107
 *         return S.ComplexInfinity
 *     elif (symengine.is_a[symengine.NaN](deref(o))):
 *         return S.NaN             # <<<<<<<<<<<<<<
 *     elif (symengine.is_a[symengine.PyFunction](deref(o))):
 *         r = PyFunction.__new__(PyFunction)
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_S); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 107, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_NaN); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 107, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":106
 *             return S.NegativeInfinity
 *         return S.ComplexInfinity
 *     elif (symengine.is_a[symengine.NaN](deref(o))):             # <<<<<<<<<<<<<<
 *         return S.NaN
 *     elif (symengine.is_a[symengine.PyFunction](deref(o))):
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":108
 *     elif (symengine.is_a[symengine.NaN](deref(o))):
 *         return S.NaN
 *     elif (symengine.is_a[symengine.PyFunction](deref(o))):             # <<<<<<<<<<<<<<
 *         r = PyFunction.__new__(PyFunction)
 *     elif (symengine.is_a[symengine.FunctionSymbol](deref(o))):
*/
  __pyx_t_1 = (SymEngine::is_a<SymEngine::PyFunction>((*__pyx_v_o)) != 0);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":109
 *         return S.NaN
 *     elif (symengine.is_a[symengine.PyFunction](deref(o))):
 *         r = PyFunction.__new__(PyFunction)             # <<<<<<<<<<<<<<
 *     elif (symengine.is_a[symengine.FunctionSymbol](deref(o))):
 *         r = FunctionSymbol.__new__(FunctionSymbol)
*/
    __pyx_t_2 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_PyFunction); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 109, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_new); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 109, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_PyFunction); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 109, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_9);
      assert(__pyx_t_2);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_9, __pyx__function);
      __pyx_t_5 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 109, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 109, __pyx_L1_error)
    __pyx_v_r = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":108
 *     elif (symengine.is_a[symengine.NaN](deref(o))):
 *         return S.NaN
 *     elif (symengine.is_a[symengine.PyFunction](deref(o))):             # <<<<<<<<<<<<<<
 *         r = PyFunction.__new__(PyFunction)
 *     elif (symengine.is_a[symengine.FunctionSymbol](deref(o))):
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":110
 *     elif (symengine.is_a[symengine.PyFunction](deref(o))):
 *         r = PyFunction.__new__(PyFunction)
 *     elif (symengine.is_a[symengine.FunctionSymbol](deref(o))):             # <<<<<<<<<<<<<<
 *         r = FunctionSymbol.__new__(FunctionSymbol)
 *     elif (symengine.is_a[symengine.Abs](deref(o))):
*/
  __pyx_t_1 = (SymEngine::is_a<SymEngine::FunctionSymbol>((*__pyx_v_o)) != 0);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":111
 *         r = PyFunction.__new__(PyFunction)
 *     elif (symengine.is_a[symengine.FunctionSymbol](deref(o))):
 *         r = FunctionSymbol.__new__(FunctionSymbol)             # <<<<<<<<<<<<<<
 *     elif (symengine.is_a[symengine.Abs](deref(o))):
 *         r = Function.__new__(Abs)
*/
    __pyx_t_9 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_FunctionSymbol); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 111, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 111, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_FunctionSymbol); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 111, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
      assert(__pyx_t_9);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
      __pyx_t_5 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_3};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 111, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 111, __pyx_L1_error)
    __pyx_v_r = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":110
 *     elif (symengine.is_a[symengine.PyFunction](deref(o))):
 *         r = PyFunction.__new__(PyFunction)
 *     elif (symengine.is_a[symengine.FunctionSymbol](deref(o))):             # <<<<<<<<<<<<<<
 *         r = FunctionSymbol.__new__(FunctionSymbol)
 *     elif (symengine.is_a[symengine.Abs](deref(o))):
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":112
 *     elif (symengine.is_a[symengine.FunctionSymbol](deref(o))):
 *         r = FunctionSymbol.__new__(FunctionSymbol)
 *     elif (symengine.is_a[symengine.Abs](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(Abs)
 *     elif (symengine.is_a[symengine.Max](deref(o))):
*/
  __pyx_t_1 = (SymEngine::is_a<SymEngine::Abs>((*__pyx_v_o)) != 0);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":113
 *         r = FunctionSymbol.__new__(FunctionSymbol)
 *     elif (symengine.is_a[symengine.Abs](deref(o))):
 *         r = Function.__new__(Abs)             # <<<<<<<<<<<<<<
 *     elif (symengine.is_a[symengine.Max](deref(o))):
 *         r = Function.__new__(Max)
*/
    __pyx_t_2 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Function); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 113, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_new); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 113, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Abs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 113, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_9);
      assert(__pyx_t_2);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_9, __pyx__function);
      __pyx_t_5 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 113, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 113, __pyx_L1_error)
    __pyx_v_r = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":112
 *     elif (symengine.is_a[symengine.FunctionSymbol](deref(o))):
 *         r = FunctionSymbol.__new__(FunctionSymbol)
 *     elif (symengine.is_a[symengine.Abs](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(Abs)
 *     elif (symengine.is_a[symengine.Max](deref(o))):
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":114
 *     elif (symengine.is_a[symengine.Abs](deref(o))):
 *         r = Function.__new__(Abs)
 *     elif (symengine.is_a[symengine.Max](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(Max)
 *     elif (symengine.is_a[symengine.Min](deref(o))):
*/
  __pyx_t_1 = (SymEngine::is_a<SymEngine::Max>((*__pyx_v_o)) != 0);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":115
 *         r = Function.__new__(Abs)
 *     elif (symengine.is_a[symengine.Max](deref(o))):
 *         r = Function.__new__(Max)             # <<<<<<<<<<<<<<
 *     elif (symengine.is_a[symengine.Min](deref(o))):
 *         r = Function.__new__(Min)
*/
    __pyx_t_9 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Function); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 115, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 115, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Max); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 115, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
      assert(__pyx_t_9);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
      __pyx_t_5 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_3};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 115, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 115, __pyx_L1_error)
    __pyx_v_r = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":114
 *     elif (symengine.is_a[symengine.Abs](deref(o))):
 *         r = Function.__new__(Abs)
 *     elif (symengine.is_a[symengine.Max](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(Max)
 *     elif (symengine.is_a[symengine.Min](deref(o))):
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":116
 *     elif (symengine.is_a[symengine.Max](deref(o))):
 *         r = Function.__new__(Max)
 *     elif (symengine.is_a[symengine.Min](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(Min)
 *     elif (symengine.is_a[symengine.BooleanAtom](deref(o))):
*/
  __pyx_t_1 = (SymEngine::is_a<SymEngine::Min>((*__pyx_v_o)) != 0);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":117
 *         r = Function.__new__(Max)
 *     elif (symengine.is_a[symengine.Min](deref(o))):
 *         r = Function.__new__(Min)             # <<<<<<<<<<<<<<
 *     elif (symengine.is_a[symengine.BooleanAtom](deref(o))):
 *         if (deref(symengine.rcp_static_cast_BooleanAtom(o)).get_val()):
*/
    __pyx_t_2 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Function); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 117, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_new); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 117, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Min); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 117, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_9);
      assert(__pyx_t_2);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_9, __pyx__function);
      __pyx_t_5 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 117, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 117, __pyx_L1_error)
    __pyx_v_r = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":116
 *     elif (symengine.is_a[symengine.Max](deref(o))):
 *         r = Function.__new__(Max)
 *     elif (symengine.is_a[symengine.Min](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(Min)
 *     elif (symengine.is_a[symengine.BooleanAtom](deref(o))):
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":118
 *     elif (symengine.is_a[symengine.Min](deref(o))):
 *         r = Function.__new__(Min)
 *     elif (symengine.is_a[symengine.BooleanAtom](deref(o))):             # <<<<<<<<<<<<<<
 *         if (deref(symengine.rcp_static_cast_BooleanAtom(o)).get_val()):
 *             return S.true
*/
  __pyx_t_1 = (SymEngine::is_a<SymEngine::BooleanAtom>((*__pyx_v_o)) != 0);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":119
 *         r = Function.__new__(Min)
 *     elif (symengine.is_a[symengine.BooleanAtom](deref(o))):
 *         if (deref(symengine.rcp_static_cast_BooleanAtom(o)).get_val()):             # <<<<<<<<<<<<<<
 *             return S.true
 *         return S.false
*/
    __pyx_t_1 = ((*SymEngine::rcp_static_cast<const SymEngine::BooleanAtom>(__pyx_v_o)).get_val() != 0);
    if (__pyx_t_1) {

      /* "symengine/lib/symengine_wrapper.pyx":120
 *     elif (symengine.is_a[symengine.BooleanAtom](deref(o))):
 *         if (deref(symengine.rcp_static_cast_BooleanAtom(o)).get_val()):
 *             return S.true             # <<<<<<<<<<<<<<
 *         return S.false
 *     elif (symengine.is_a[symengine.Equality](deref(o))):
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_S); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 120, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_true); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 120, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_r = __pyx_t_9;
      __pyx_t_9 = 0;
      goto __pyx_L0;

      /* "symengine/lib/symengine_wrapper.pyx":119
 *         r = Function.__new__(Min)
 *     elif (symengine.is_a[symengine.BooleanAtom](deref(o))):
 *         if (deref(symengine.rcp_static_cast_BooleanAtom(o)).get_val()):             # <<<<<<<<<<<<<<
 *             return S.true
 *         return S.false
*/
    }

    /* "symengine/lib/symengine_wrapper.pyx":121
 *         if (deref(symengine.rcp_static_cast_BooleanAtom(o)).get_val()):
 *             return S.true
 *         return S.false             # <<<<<<<<<<<<<<
 *     elif (symengine.is_a[symengine.Equality](deref(o))):
 *         r = Relational.__new__(Equality)
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_S); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 121, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_false); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 121, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":118
 *     elif (symengine.is_a[symengine.Min](deref(o))):
 *         r = Function.__new__(Min)
 *     elif (symengine.is_a[symengine.BooleanAtom](deref(o))):             # <<<<<<<<<<<<<<
 *         if (deref(symengine.rcp_static_cast_BooleanAtom(o)).get_val()):
 *             return S.true
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":122
 *             return S.true
 *         return S.false
 *     elif (symengine.is_a[symengine.Equality](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Relational.__new__(Equality)
 *     elif (symengine.is_a[symengine.Unequality](deref(o))):
*/
  __pyx_t_1 = (SymEngine::is_a<SymEngine::Equality>((*__pyx_v_o)) != 0);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":123
 *         return S.false
 *     elif (symengine.is_a[symengine.Equality](deref(o))):
 *         r = Relational.__new__(Equality)             # <<<<<<<<<<<<<<
 *     elif (symengine.is_a[symengine.Unequality](deref(o))):
 *         r = Relational.__new__(Unequality)
*/
    __pyx_t_9 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Relational); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 123, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 123, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Equality); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 123, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
      assert(__pyx_t_9);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
      __pyx_t_5 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_3};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 123, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 123, __pyx_L1_error)
    __pyx_v_r = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":122
 *             return S.true
 *         return S.false
 *     elif (symengine.is_a[symengine.Equality](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Relational.__new__(Equality)
 *     elif (symengine.is_a[symengine.Unequality](deref(o))):
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":124
 *     elif (symengine.is_a[symengine.Equality](deref(o))):
 *         r = Relational.__new__(Equality)
 *     elif (symengine.is_a[symengine.Unequality](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Relational.__new__(Unequality)
 *     elif (symengine.is_a[symengine.LessThan](deref(o))):
*/
  __pyx_t_1 = (SymEngine::is_a<SymEngine::Unequality>((*__pyx_v_o)) != 0);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":125
 *         r = Relational.__new__(Equality)
 *     elif (symengine.is_a[symengine.Unequality](deref(o))):
 *         r = Relational.__new__(Unequality)             # <<<<<<<<<<<<<<
 *     elif (symengine.is_a[symengine.LessThan](deref(o))):
 *         r = Relational.__new__(LessThan)
*/
    __pyx_t_2 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Relational); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 125, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_new); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 125, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Unequality); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 125, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_9);
      assert(__pyx_t_2);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_9, __pyx__function);
      __pyx_t_5 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 125, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 125, __pyx_L1_error)
    __pyx_v_r = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":124
 *     elif (symengine.is_a[symengine.Equality](deref(o))):
 *         r = Relational.__new__(Equality)
 *     elif (symengine.is_a[symengine.Unequality](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Relational.__new__(Unequality)
 *     elif (symengine.is_a[symengine.LessThan](deref(o))):
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":126
 *     elif (symengine.is_a[symengine.Unequality](deref(o))):
 *         r = Relational.__new__(Unequality)
 *     elif (symengine.is_a[symengine.LessThan](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Relational.__new__(LessThan)
 *     elif (symengine.is_a[symengine.StrictLessThan](deref(o))):
*/
  __pyx_t_1 = (SymEngine::is_a<SymEngine::LessThan>((*__pyx_v_o)) != 0);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":127
 *         r = Relational.__new__(Unequality)
 *     elif (symengine.is_a[symengine.LessThan](deref(o))):
 *         r = Relational.__new__(LessThan)             # <<<<<<<<<<<<<<
 *     elif (symengine.is_a[symengine.StrictLessThan](deref(o))):
 *         r = Relational.__new__(StrictLessThan)
*/
    __pyx_t_9 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Relational); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 127, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 127, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_LessThan); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 127, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
      assert(__pyx_t_9);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
      __pyx_t_5 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_3};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 127, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 127, __pyx_L1_error)
    __pyx_v_r = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":126
 *     elif (symengine.is_a[symengine.Unequality](deref(o))):
 *         r = Relational.__new__(Unequality)
 *     elif (symengine.is_a[symengine.LessThan](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Relational.__new__(LessThan)
 *     elif (symengine.is_a[symengine.StrictLessThan](deref(o))):
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":128
 *     elif (symengine.is_a[symengine.LessThan](deref(o))):
 *         r = Relational.__new__(LessThan)
 *     elif (symengine.is_a[symengine.StrictLessThan](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Relational.__new__(StrictLessThan)
 *     elif (symengine.is_a[symengine.Gamma](deref(o))):
*/
  __pyx_t_1 = (SymEngine::is_a<SymEngine::StrictLessThan>((*__pyx_v_o)) != 0);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":129
 *         r = Relational.__new__(LessThan)
 *     elif (symengine.is_a[symengine.StrictLessThan](deref(o))):
 *         r = Relational.__new__(StrictLessThan)             # <<<<<<<<<<<<<<
 *     elif (symengine.is_a[symengine.Gamma](deref(o))):
 *         r = Function.__new__(Gamma)
*/
    __pyx_t_2 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Relational); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 129, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_new); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 129, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_StrictLessThan); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 129, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_9);
      assert(__pyx_t_2);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_9, __pyx__function);
      __pyx_t_5 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 129, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 129, __pyx_L1_error)
    __pyx_v_r = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":128
 *     elif (symengine.is_a[symengine.LessThan](deref(o))):
 *         r = Relational.__new__(LessThan)
 *     elif (symengine.is_a[symengine.StrictLessThan](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Relational.__new__(StrictLessThan)
 *     elif (symengine.is_a[symengine.Gamma](deref(o))):
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":130
 *     elif (symengine.is_a[symengine.StrictLessThan](deref(o))):
 *         r = Relational.__new__(StrictLessThan)
 *     elif (symengine.is_a[symengine.Gamma](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(Gamma)
 *     elif (symengine.is_a[symengine.Derivative](deref(o))):
*/
  __pyx_t_1 = (SymEngine::is_a<SymEngine::Gamma>((*__pyx_v_o)) != 0);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":131
 *         r = Relational.__new__(StrictLessThan)
 *     elif (symengine.is_a[symengine.Gamma](deref(o))):
 *         r = Function.__new__(Gamma)             # <<<<<<<<<<<<<<
 *     elif (symengine.is_a[symengine.Derivative](deref(o))):
 *         r = Expr.__new__(Derivative)
*/
    __pyx_t_9 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Function); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 131, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 131, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Gamma); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 131, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
      assert(__pyx_t_9);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
      __pyx_t_5 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_3};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 131, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 131, __pyx_L1_error)
    __pyx_v_r = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":130
 *     elif (symengine.is_a[symengine.StrictLessThan](deref(o))):
 *         r = Relational.__new__(StrictLessThan)
 *     elif (symengine.is_a[symengine.Gamma](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(Gamma)
 *     elif (symengine.is_a[symengine.Derivative](deref(o))):
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":132
 *     elif (symengine.is_a[symengine.Gamma](deref(o))):
 *         r = Function.__new__(Gamma)
 *     elif (symengine.is_a[symengine.Derivative](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Expr.__new__(Derivative)
 *     elif (symengine.is_a[symengine.Subs](deref(o))):
*/
  __pyx_t_1 = (SymEngine::is_a<SymEngine::Derivative>((*__pyx_v_o)) != 0);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":133
 *         r = Function.__new__(Gamma)
 *     elif (symengine.is_a[symengine.Derivative](deref(o))):
 *         r = Expr.__new__(Derivative)             # <<<<<<<<<<<<<<
 *     elif (symengine.is_a[symengine.Subs](deref(o))):
 *         r = Expr.__new__(Subs)
*/
    __pyx_t_2 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Expr);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Derivative); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 133, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
      __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 133, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 133, __pyx_L1_error)
    __pyx_v_r = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":132
 *     elif (symengine.is_a[symengine.Gamma](deref(o))):
 *         r = Function.__new__(Gamma)
 *     elif (symengine.is_a[symengine.Derivative](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Expr.__new__(Derivative)
 *     elif (symengine.is_a[symengine.Subs](deref(o))):
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":134
 *     elif (symengine.is_a[symengine.Derivative](deref(o))):
 *         r = Expr.__new__(Derivative)
 *     elif (symengine.is_a[symengine.Subs](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Expr.__new__(Subs)
 *     elif (symengine.is_a[symengine.RealDouble](deref(o))):
*/
  __pyx_t_1 = (SymEngine::is_a<SymEngine::Subs>((*__pyx_v_o)) != 0);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":135
 *         r = Expr.__new__(Derivative)
 *     elif (symengine.is_a[symengine.Subs](deref(o))):
 *         r = Expr.__new__(Subs)             # <<<<<<<<<<<<<<
 *     elif (symengine.is_a[symengine.RealDouble](deref(o))):
 *         r = Number.__new__(RealDouble)
*/
    __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Expr);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Subs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 135, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_2};
      __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 135, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 135, __pyx_L1_error)
    __pyx_v_r = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":134
 *     elif (symengine.is_a[symengine.Derivative](deref(o))):
 *         r = Expr.__new__(Derivative)
 *     elif (symengine.is_a[symengine.Subs](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Expr.__new__(Subs)
 *     elif (symengine.is_a[symengine.RealDouble](deref(o))):
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":136
 *     elif (symengine.is_a[symengine.Subs](deref(o))):
 *         r = Expr.__new__(Subs)
 *     elif (symengine.is_a[symengine.RealDouble](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Number.__new__(RealDouble)
 *     elif (symengine.is_a[symengine.ComplexDouble](deref(o))):
*/
  __pyx_t_1 = (SymEngine::is_a<SymEngine::RealDouble>((*__pyx_v_o)) != 0);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":137
 *         r = Expr.__new__(Subs)
 *     elif (symengine.is_a[symengine.RealDouble](deref(o))):
 *         r = Number.__new__(RealDouble)             # <<<<<<<<<<<<<<
 *     elif (symengine.is_a[symengine.ComplexDouble](deref(o))):
 *         r = ComplexDouble.__new__(ComplexDouble)
*/
    __pyx_t_2 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Number);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_RealDouble); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 137, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
      __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 137, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 137, __pyx_L1_error)
    __pyx_v_r = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":136
 *     elif (symengine.is_a[symengine.Subs](deref(o))):
 *         r = Expr.__new__(Subs)
 *     elif (symengine.is_a[symengine.RealDouble](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Number.__new__(RealDouble)
 *     elif (symengine.is_a[symengine.ComplexDouble](deref(o))):
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":138
 *     elif (symengine.is_a[symengine.RealDouble](deref(o))):
 *         r = Number.__new__(RealDouble)
 *     elif (symengine.is_a[symengine.ComplexDouble](deref(o))):             # <<<<<<<<<<<<<<
 *         r = ComplexDouble.__new__(ComplexDouble)
 *     elif (symengine.is_a[symengine.RealMPFR](deref(o))):
*/
  __pyx_t_1 = (SymEngine::is_a<SymEngine::ComplexDouble>((*__pyx_v_o)) != 0);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":139
 *         r = Number.__new__(RealDouble)
 *     elif (symengine.is_a[symengine.ComplexDouble](deref(o))):
 *         r = ComplexDouble.__new__(ComplexDouble)             # <<<<<<<<<<<<<<
 *     elif (symengine.is_a[symengine.RealMPFR](deref(o))):
 *         r = Number.__new__(RealMPFR)
*/
    __pyx_t_4 = ((PyObject *)__pyx_tp_new_9symengine_3lib_17symengine_wrapper_ComplexDouble(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ComplexDouble), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 139, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_4);
    if (!(likely(__Pyx_TypeTest(((PyObject *)__pyx_t_4), __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic)))) __PYX_ERR(0, 139, __pyx_L1_error)
    __pyx_v_r = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":138
 *     elif (symengine.is_a[symengine.RealDouble](deref(o))):
 *         r = Number.__new__(RealDouble)
 *     elif (symengine.is_a[symengine.ComplexDouble](deref(o))):             # <<<<<<<<<<<<<<
 *         r = ComplexDouble.__new__(ComplexDouble)
 *     elif (symengine.is_a[symengine.RealMPFR](deref(o))):
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":140
 *     elif (symengine.is_a[symengine.ComplexDouble](deref(o))):
 *         r = ComplexDouble.__new__(ComplexDouble)
 *     elif (symengine.is_a[symengine.RealMPFR](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Number.__new__(RealMPFR)
 *     elif (symengine.is_a[symengine.ComplexMPC](deref(o))):
*/
  __pyx_t_1 = (SymEngine::is_a<SymEngine::RealMPFR>((*__pyx_v_o)) != 0);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":141
 *         r = ComplexDouble.__new__(ComplexDouble)
 *     elif (symengine.is_a[symengine.RealMPFR](deref(o))):
 *         r = Number.__new__(RealMPFR)             # <<<<<<<<<<<<<<
 *     elif (symengine.is_a[symengine.ComplexMPC](deref(o))):
 *         r = ComplexMPC.__new__(ComplexMPC)
*/
    __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Number);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_RealMPFR); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 141, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_2};
      __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 141, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 141, __pyx_L1_error)
    __pyx_v_r = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":140
 *     elif (symengine.is_a[symengine.ComplexDouble](deref(o))):
 *         r = ComplexDouble.__new__(ComplexDouble)
 *     elif (symengine.is_a[symengine.RealMPFR](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Number.__new__(RealMPFR)
 *     elif (symengine.is_a[symengine.ComplexMPC](deref(o))):
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":142
 *     elif (symengine.is_a[symengine.RealMPFR](deref(o))):
 *         r = Number.__new__(RealMPFR)
 *     elif (symengine.is_a[symengine.ComplexMPC](deref(o))):             # <<<<<<<<<<<<<<
 *         r = ComplexMPC.__new__(ComplexMPC)
 *     elif (symengine.is_a[symengine.Log](deref(o))):
*/
  __pyx_t_1 = (SymEngine::is_a<SymEngine::ComplexMPC>((*__pyx_v_o)) != 0);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":143
 *         r = Number.__new__(RealMPFR)
 *     elif (symengine.is_a[symengine.ComplexMPC](deref(o))):
 *         r = ComplexMPC.__new__(ComplexMPC)             # <<<<<<<<<<<<<<
 *     elif (symengine.is_a[symengine.Log](deref(o))):
 *         r = Function.__new__(Log)
*/
    __pyx_t_4 = ((PyObject *)__pyx_tp_new_9symengine_3lib_17symengine_wrapper_ComplexMPC(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ComplexMPC), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 143, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_4);
    if (!(likely(__Pyx_TypeTest(((PyObject *)__pyx_t_4), __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic)))) __PYX_ERR(0, 143, __pyx_L1_error)
    __pyx_v_r = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":142
 *     elif (symengine.is_a[symengine.RealMPFR](deref(o))):
 *         r = Number.__new__(RealMPFR)
 *     elif (symengine.is_a[symengine.ComplexMPC](deref(o))):             # <<<<<<<<<<<<<<
 *         r = ComplexMPC.__new__(ComplexMPC)
 *     elif (symengine.is_a[symengine.Log](deref(o))):
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":144
 *     elif (symengine.is_a[symengine.ComplexMPC](deref(o))):
 *         r = ComplexMPC.__new__(ComplexMPC)
 *     elif (symengine.is_a[symengine.Log](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(Log)
 *     elif (symengine.is_a[symengine.Sin](deref(o))):
*/
  __pyx_t_1 = (SymEngine::is_a<SymEngine::Log>((*__pyx_v_o)) != 0);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":145
 *         r = ComplexMPC.__new__(ComplexMPC)
 *     elif (symengine.is_a[symengine.Log](deref(o))):
 *         r = Function.__new__(Log)             # <<<<<<<<<<<<<<
 *     elif (symengine.is_a[symengine.Sin](deref(o))):
 *         r = Function.__new__(Sin)
*/
    __pyx_t_2 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Function); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 145, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_new); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 145, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Log); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 145, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_9);
      assert(__pyx_t_2);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_9, __pyx__function);
      __pyx_t_5 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 145, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 145, __pyx_L1_error)
    __pyx_v_r = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":144
 *     elif (symengine.is_a[symengine.ComplexMPC](deref(o))):
 *         r = ComplexMPC.__new__(ComplexMPC)
 *     elif (symengine.is_a[symengine.Log](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(Log)
 *     elif (symengine.is_a[symengine.Sin](deref(o))):
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":146
 *     elif (symengine.is_a[symengine.Log](deref(o))):
 *         r = Function.__new__(Log)
 *     elif (symengine.is_a[symengine.Sin](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(Sin)
 *     elif (symengine.is_a[symengine.Cos](deref(o))):
*/
  __pyx_t_1 = (SymEngine::is_a<SymEngine::Sin>((*__pyx_v_o)) != 0);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":147
 *         r = Function.__new__(Log)
 *     elif (symengine.is_a[symengine.Sin](deref(o))):
 *         r = Function.__new__(Sin)             # <<<<<<<<<<<<<<
 *     elif (symengine.is_a[symengine.Cos](deref(o))):
 *         r = Function.__new__(Cos)
*/
    __pyx_t_9 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Function); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 147, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 147, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Sin); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 147, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
      assert(__pyx_t_9);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
      __pyx_t_5 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_3};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 147, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 147, __pyx_L1_error)
    __pyx_v_r = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":146
 *     elif (symengine.is_a[symengine.Log](deref(o))):
 *         r = Function.__new__(Log)
 *     elif (symengine.is_a[symengine.Sin](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(Sin)
 *     elif (symengine.is_a[symengine.Cos](deref(o))):
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":148
 *     elif (symengine.is_a[symengine.Sin](deref(o))):
 *         r = Function.__new__(Sin)
 *     elif (symengine.is_a[symengine.Cos](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(Cos)
 *     elif (symengine.is_a[symengine.Tan](deref(o))):
*/
  __pyx_t_1 = (SymEngine::is_a<SymEngine::Cos>((*__pyx_v_o)) != 0);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":149
 *         r = Function.__new__(Sin)
 *     elif (symengine.is_a[symengine.Cos](deref(o))):
 *         r = Function.__new__(Cos)             # <<<<<<<<<<<<<<
 *     elif (symengine.is_a[symengine.Tan](deref(o))):
 *         r = Function.__new__(Tan)
*/
    __pyx_t_2 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Function); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 149, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_new); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 149, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Cos); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 149, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_9);
      assert(__pyx_t_2);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_9, __pyx__function);
      __pyx_t_5 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 149, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 149, __pyx_L1_error)
    __pyx_v_r = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":148
 *     elif (symengine.is_a[symengine.Sin](deref(o))):
 *         r = Function.__new__(Sin)
 *     elif (symengine.is_a[symengine.Cos](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(Cos)
 *     elif (symengine.is_a[symengine.Tan](deref(o))):
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":150
 *     elif (symengine.is_a[symengine.Cos](deref(o))):
 *         r = Function.__new__(Cos)
 *     elif (symengine.is_a[symengine.Tan](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(Tan)
 *     elif (symengine.is_a[symengine.Cot](deref(o))):
*/
  __pyx_t_1 = (SymEngine::is_a<SymEngine::Tan>((*__pyx_v_o)) != 0);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":151
 *         r = Function.__new__(Cos)
 *     elif (symengine.is_a[symengine.Tan](deref(o))):
 *         r = Function.__new__(Tan)             # <<<<<<<<<<<<<<
 *     elif (symengine.is_a[symengine.Cot](deref(o))):
 *         r = Function.__new__(Cot)
*/
    __pyx_t_9 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Function); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 151, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 151, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Tan); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 151, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
      assert(__pyx_t_9);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
      __pyx_t_5 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_3};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 151, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 151, __pyx_L1_error)
    __pyx_v_r = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":150
 *     elif (symengine.is_a[symengine.Cos](deref(o))):
 *         r = Function.__new__(Cos)
 *     elif (symengine.is_a[symengine.Tan](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(Tan)
 *     elif (symengine.is_a[symengine.Cot](deref(o))):
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":152
 *     elif (symengine.is_a[symengine.Tan](deref(o))):
 *         r = Function.__new__(Tan)
 *     elif (symengine.is_a[symengine.Cot](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(Cot)
 *     elif (symengine.is_a[symengine.Csc](deref(o))):
*/
  __pyx_t_1 = (SymEngine::is_a<SymEngine::Cot>((*__pyx_v_o)) != 0);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":153
 *         r = Function.__new__(Tan)
 *     elif (symengine.is_a[symengine.Cot](deref(o))):
 *         r = Function.__new__(Cot)             # <<<<<<<<<<<<<<
 *     elif (symengine.is_a[symengine.Csc](deref(o))):
 *         r = Function.__new__(Csc)
*/
    __pyx_t_2 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Function); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 153, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_new); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 153, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Cot); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 153, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_9);
      assert(__pyx_t_2);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_9, __pyx__function);
      __pyx_t_5 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 153, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 153, __pyx_L1_error)
    __pyx_v_r = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":152
 *     elif (symengine.is_a[symengine.Tan](deref(o))):
 *         r = Function.__new__(Tan)
 *     elif (symengine.is_a[symengine.Cot](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(Cot)
 *     elif (symengine.is_a[symengine.Csc](deref(o))):
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":154
 *     elif (symengine.is_a[symengine.Cot](deref(o))):
 *         r = Function.__new__(Cot)
 *     elif (symengine.is_a[symengine.Csc](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(Csc)
 *     elif (symengine.is_a[symengine.Sec](deref(o))):
*/
  __pyx_t_1 = (SymEngine::is_a<SymEngine::Csc>((*__pyx_v_o)) != 0);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":155
 *         r = Function.__new__(Cot)
 *     elif (symengine.is_a[symengine.Csc](deref(o))):
 *         r = Function.__new__(Csc)             # <<<<<<<<<<<<<<
 *     elif (symengine.is_a[symengine.Sec](deref(o))):
 *         r = Function.__new__(Sec)
*/
    __pyx_t_9 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Function); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 155, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 155, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Csc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 155, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
      assert(__pyx_t_9);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
      __pyx_t_5 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_3};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 155, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 155, __pyx_L1_error)
    __pyx_v_r = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":154
 *     elif (symengine.is_a[symengine.Cot](deref(o))):
 *         r = Function.__new__(Cot)
 *     elif (symengine.is_a[symengine.Csc](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(Csc)
 *     elif (symengine.is_a[symengine.Sec](deref(o))):
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":156
 *     elif (symengine.is_a[symengine.Csc](deref(o))):
 *         r = Function.__new__(Csc)
 *     elif (symengine.is_a[symengine.Sec](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(Sec)
 *     elif (symengine.is_a[symengine.ASin](deref(o))):
*/
  __pyx_t_1 = (SymEngine::is_a<SymEngine::Sec>((*__pyx_v_o)) != 0);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":157
 *         r = Function.__new__(Csc)
 *     elif (symengine.is_a[symengine.Sec](deref(o))):
 *         r = Function.__new__(Sec)             # <<<<<<<<<<<<<<
 *     elif (symengine.is_a[symengine.ASin](deref(o))):
 *         r = Function.__new__(ASin)
*/
    __pyx_t_2 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Function); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 157, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_new); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 157, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Sec); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 157, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_9);
      assert(__pyx_t_2);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_9, __pyx__function);
      __pyx_t_5 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 157, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 157, __pyx_L1_error)
    __pyx_v_r = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":156
 *     elif (symengine.is_a[symengine.Csc](deref(o))):
 *         r = Function.__new__(Csc)
 *     elif (symengine.is_a[symengine.Sec](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(Sec)
 *     elif (symengine.is_a[symengine.ASin](deref(o))):
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":158
 *     elif (symengine.is_a[symengine.Sec](deref(o))):
 *         r = Function.__new__(Sec)
 *     elif (symengine.is_a[symengine.ASin](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(ASin)
 *     elif (symengine.is_a[symengine.ACos](deref(o))):
*/
  __pyx_t_1 = (SymEngine::is_a<SymEngine::ASin>((*__pyx_v_o)) != 0);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":159
 *         r = Function.__new__(Sec)
 *     elif (symengine.is_a[symengine.ASin](deref(o))):
 *         r = Function.__new__(ASin)             # <<<<<<<<<<<<<<
 *     elif (symengine.is_a[symengine.ACos](deref(o))):
 *         r = Function.__new__(ACos)
*/
    __pyx_t_9 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Function); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 159, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 159, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ASin); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 159, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
      assert(__pyx_t_9);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
      __pyx_t_5 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_3};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 159, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 159, __pyx_L1_error)
    __pyx_v_r = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":158
 *     elif (symengine.is_a[symengine.Sec](deref(o))):
 *         r = Function.__new__(Sec)
 *     elif (symengine.is_a[symengine.ASin](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(ASin)
 *     elif (symengine.is_a[symengine.ACos](deref(o))):
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":160
 *     elif (symengine.is_a[symengine.ASin](deref(o))):
 *         r = Function.__new__(ASin)
 *     elif (symengine.is_a[symengine.ACos](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(ACos)
 *     elif (symengine.is_a[symengine.ATan](deref(o))):
*/
  __pyx_t_1 = (SymEngine::is_a<SymEngine::ACos>((*__pyx_v_o)) != 0);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":161
 *         r = Function.__new__(ASin)
 *     elif (symengine.is_a[symengine.ACos](deref(o))):
 *         r = Function.__new__(ACos)             # <<<<<<<<<<<<<<
 *     elif (symengine.is_a[symengine.ATan](deref(o))):
 *         r = Function.__new__(ATan)
*/
    __pyx_t_2 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Function); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 161, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_new); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 161, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ACos); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 161, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_9);
      assert(__pyx_t_2);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_9, __pyx__function);
      __pyx_t_5 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 161, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 161, __pyx_L1_error)
    __pyx_v_r = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":160
 *     elif (symengine.is_a[symengine.ASin](deref(o))):
 *         r = Function.__new__(ASin)
 *     elif (symengine.is_a[symengine.ACos](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(ACos)
 *     elif (symengine.is_a[symengine.ATan](deref(o))):
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":162
 *     elif (symengine.is_a[symengine.ACos](deref(o))):
 *         r = Function.__new__(ACos)
 *     elif (symengine.is_a[symengine.ATan](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(ATan)
 *     elif (symengine.is_a[symengine.ACot](deref(o))):
*/
  __pyx_t_1 = (SymEngine::is_a<SymEngine::ATan>((*__pyx_v_o)) != 0);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":163
 *         r = Function.__new__(ACos)
 *     elif (symengine.is_a[symengine.ATan](deref(o))):
 *         r = Function.__new__(ATan)             # <<<<<<<<<<<<<<
 *     elif (symengine.is_a[symengine.ACot](deref(o))):
 *         r = Function.__new__(ACot)
*/
    __pyx_t_9 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Function); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 163, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 163, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ATan); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 163, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
      assert(__pyx_t_9);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
      __pyx_t_5 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_3};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 163, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 163, __pyx_L1_error)
    __pyx_v_r = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":162
 *     elif (symengine.is_a[symengine.ACos](deref(o))):
 *         r = Function.__new__(ACos)
 *     elif (symengine.is_a[symengine.ATan](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(ATan)
 *     elif (symengine.is_a[symengine.ACot](deref(o))):
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":164
 *     elif (symengine.is_a[symengine.ATan](deref(o))):
 *         r = Function.__new__(ATan)
 *     elif (symengine.is_a[symengine.ACot](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(ACot)
 *     elif (symengine.is_a[symengine.ACsc](deref(o))):
*/
  __pyx_t_1 = (SymEngine::is_a<SymEngine::ACot>((*__pyx_v_o)) != 0);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":165
 *         r = Function.__new__(ATan)
 *     elif (symengine.is_a[symengine.ACot](deref(o))):
 *         r = Function.__new__(ACot)             # <<<<<<<<<<<<<<
 *     elif (symengine.is_a[symengine.ACsc](deref(o))):
 *         r = Function.__new__(ACsc)
*/
    __pyx_t_2 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Function); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 165, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_new); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 165, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ACot); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 165, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_9);
      assert(__pyx_t_2);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_9, __pyx__function);
      __pyx_t_5 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 165, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 165, __pyx_L1_error)
    __pyx_v_r = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":164
 *     elif (symengine.is_a[symengine.ATan](deref(o))):
 *         r = Function.__new__(ATan)
 *     elif (symengine.is_a[symengine.ACot](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(ACot)
 *     elif (symengine.is_a[symengine.ACsc](deref(o))):
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":166
 *     elif (symengine.is_a[symengine.ACot](deref(o))):
 *         r = Function.__new__(ACot)
 *     elif (symengine.is_a[symengine.ACsc](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(ACsc)
 *     elif (symengine.is_a[symengine.ASec](deref(o))):
*/
  __pyx_t_1 = (SymEngine::is_a<SymEngine::ACsc>((*__pyx_v_o)) != 0);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":167
 *         r = Function.__new__(ACot)
 *     elif (symengine.is_a[symengine.ACsc](deref(o))):
 *         r = Function.__new__(ACsc)             # <<<<<<<<<<<<<<
 *     elif (symengine.is_a[symengine.ASec](deref(o))):
 *         r = Function.__new__(ASec)
*/
    __pyx_t_9 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Function); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 167, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 167, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ACsc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 167, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
      assert(__pyx_t_9);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
      __pyx_t_5 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_3};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 167, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 167, __pyx_L1_error)
    __pyx_v_r = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":166
 *     elif (symengine.is_a[symengine.ACot](deref(o))):
 *         r = Function.__new__(ACot)
 *     elif (symengine.is_a[symengine.ACsc](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(ACsc)
 *     elif (symengine.is_a[symengine.ASec](deref(o))):
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":168
 *     elif (symengine.is_a[symengine.ACsc](deref(o))):
 *         r = Function.__new__(ACsc)
 *     elif (symengine.is_a[symengine.ASec](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(ASec)
 *     elif (symengine.is_a[symengine.Sinh](deref(o))):
*/
  __pyx_t_1 = (SymEngine::is_a<SymEngine::ASec>((*__pyx_v_o)) != 0);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":169
 *         r = Function.__new__(ACsc)
 *     elif (symengine.is_a[symengine.ASec](deref(o))):
 *         r = Function.__new__(ASec)             # <<<<<<<<<<<<<<
 *     elif (symengine.is_a[symengine.Sinh](deref(o))):
 *         r = Function.__new__(Sinh)
*/
    __pyx_t_2 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Function); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 169, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_new); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 169, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ASec); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 169, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_9);
      assert(__pyx_t_2);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_9, __pyx__function);
      __pyx_t_5 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 169, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 169, __pyx_L1_error)
    __pyx_v_r = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":168
 *     elif (symengine.is_a[symengine.ACsc](deref(o))):
 *         r = Function.__new__(ACsc)
 *     elif (symengine.is_a[symengine.ASec](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(ASec)
 *     elif (symengine.is_a[symengine.Sinh](deref(o))):
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":170
 *     elif (symengine.is_a[symengine.ASec](deref(o))):
 *         r = Function.__new__(ASec)
 *     elif (symengine.is_a[symengine.Sinh](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(Sinh)
 *     elif (symengine.is_a[symengine.Cosh](deref(o))):
*/
  __pyx_t_1 = (SymEngine::is_a<SymEngine::Sinh>((*__pyx_v_o)) != 0);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":171
 *         r = Function.__new__(ASec)
 *     elif (symengine.is_a[symengine.Sinh](deref(o))):
 *         r = Function.__new__(Sinh)             # <<<<<<<<<<<<<<
 *     elif (symengine.is_a[symengine.Cosh](deref(o))):
 *         r = Function.__new__(Cosh)
*/
    __pyx_t_9 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Function); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 171, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 171, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Sinh); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 171, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
      assert(__pyx_t_9);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
      __pyx_t_5 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_3};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 171, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 171, __pyx_L1_error)
    __pyx_v_r = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":170
 *     elif (symengine.is_a[symengine.ASec](deref(o))):
 *         r = Function.__new__(ASec)
 *     elif (symengine.is_a[symengine.Sinh](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(Sinh)
 *     elif (symengine.is_a[symengine.Cosh](deref(o))):
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":172
 *     elif (symengine.is_a[symengine.Sinh](deref(o))):
 *         r = Function.__new__(Sinh)
 *     elif (symengine.is_a[symengine.Cosh](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(Cosh)
 *     elif (symengine.is_a[symengine.Tanh](deref(o))):
*/
  __pyx_t_1 = (SymEngine::is_a<SymEngine::Cosh>((*__pyx_v_o)) != 0);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":173
 *         r = Function.__new__(Sinh)
 *     elif (symengine.is_a[symengine.Cosh](deref(o))):
 *         r = Function.__new__(Cosh)             # <<<<<<<<<<<<<<
 *     elif (symengine.is_a[symengine.Tanh](deref(o))):
 *         r = Function.__new__(Tanh)
*/
    __pyx_t_2 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Function); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 173, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_new); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 173, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Cosh); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 173, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_9);
      assert(__pyx_t_2);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_9, __pyx__function);
      __pyx_t_5 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 173, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 173, __pyx_L1_error)
    __pyx_v_r = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":172
 *     elif (symengine.is_a[symengine.Sinh](deref(o))):
 *         r = Function.__new__(Sinh)
 *     elif (symengine.is_a[symengine.Cosh](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(Cosh)
 *     elif (symengine.is_a[symengine.Tanh](deref(o))):
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":174
 *     elif (symengine.is_a[symengine.Cosh](deref(o))):
 *         r = Function.__new__(Cosh)
 *     elif (symengine.is_a[symengine.Tanh](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(Tanh)
 *     elif (symengine.is_a[symengine.Coth](deref(o))):
*/
  __pyx_t_1 = (SymEngine::is_a<SymEngine::Tanh>((*__pyx_v_o)) != 0);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":175
 *         r = Function.__new__(Cosh)
 *     elif (symengine.is_a[symengine.Tanh](deref(o))):
 *         r = Function.__new__(Tanh)             # <<<<<<<<<<<<<<
 *     elif (symengine.is_a[symengine.Coth](deref(o))):
 *         r = Function.__new__(Coth)
*/
    __pyx_t_9 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Function); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 175, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 175, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Tanh); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 175, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
      assert(__pyx_t_9);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
      __pyx_t_5 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_3};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 175, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 175, __pyx_L1_error)
    __pyx_v_r = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":174
 *     elif (symengine.is_a[symengine.Cosh](deref(o))):
 *         r = Function.__new__(Cosh)
 *     elif (symengine.is_a[symengine.Tanh](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(Tanh)
 *     elif (symengine.is_a[symengine.Coth](deref(o))):
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":176
 *     elif (symengine.is_a[symengine.Tanh](deref(o))):
 *         r = Function.__new__(Tanh)
 *     elif (symengine.is_a[symengine.Coth](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(Coth)
 *     elif (symengine.is_a[symengine.Csch](deref(o))):
*/
  __pyx_t_1 = (SymEngine::is_a<SymEngine::Coth>((*__pyx_v_o)) != 0);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":177
 *         r = Function.__new__(Tanh)
 *     elif (symengine.is_a[symengine.Coth](deref(o))):
 *         r = Function.__new__(Coth)             # <<<<<<<<<<<<<<
 *     elif (symengine.is_a[symengine.Csch](deref(o))):
 *         r = Function.__new__(Csch)
*/
    __pyx_t_2 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Function); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 177, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_new); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 177, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Coth); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 177, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_9);
      assert(__pyx_t_2);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_9, __pyx__function);
      __pyx_t_5 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 177, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 177, __pyx_L1_error)
    __pyx_v_r = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":176
 *     elif (symengine.is_a[symengine.Tanh](deref(o))):
 *         r = Function.__new__(Tanh)
 *     elif (symengine.is_a[symengine.Coth](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(Coth)
 *     elif (symengine.is_a[symengine.Csch](deref(o))):
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":178
 *     elif (symengine.is_a[symengine.Coth](deref(o))):
 *         r = Function.__new__(Coth)
 *     elif (symengine.is_a[symengine.Csch](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(Csch)
 *     elif (symengine.is_a[symengine.Sech](deref(o))):
*/
  __pyx_t_1 = (SymEngine::is_a<SymEngine::Csch>((*__pyx_v_o)) != 0);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":179
 *         r = Function.__new__(Coth)
 *     elif (symengine.is_a[symengine.Csch](deref(o))):
 *         r = Function.__new__(Csch)             # <<<<<<<<<<<<<<
 *     elif (symengine.is_a[symengine.Sech](deref(o))):
 *         r = Function.__new__(Sech)
*/
    __pyx_t_9 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Function); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 179, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 179, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Csch); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 179, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
      assert(__pyx_t_9);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
      __pyx_t_5 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_3};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 179, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 179, __pyx_L1_error)
    __pyx_v_r = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":178
 *     elif (symengine.is_a[symengine.Coth](deref(o))):
 *         r = Function.__new__(Coth)
 *     elif (symengine.is_a[symengine.Csch](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(Csch)
 *     elif (symengine.is_a[symengine.Sech](deref(o))):
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":180
 *     elif (symengine.is_a[symengine.Csch](deref(o))):
 *         r = Function.__new__(Csch)
 *     elif (symengine.is_a[symengine.Sech](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(Sech)
 *     elif (symengine.is_a[symengine.ASinh](deref(o))):
*/
  __pyx_t_1 = (SymEngine::is_a<SymEngine::Sech>((*__pyx_v_o)) != 0);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":181
 *         r = Function.__new__(Csch)
 *     elif (symengine.is_a[symengine.Sech](deref(o))):
 *         r = Function.__new__(Sech)             # <<<<<<<<<<<<<<
 *     elif (symengine.is_a[symengine.ASinh](deref(o))):
 *         r = Function.__new__(ASinh)
*/
    __pyx_t_2 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Function); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 181, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_new); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 181, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Sech); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 181, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_9);
      assert(__pyx_t_2);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_9, __pyx__function);
      __pyx_t_5 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 181, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 181, __pyx_L1_error)
    __pyx_v_r = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":180
 *     elif (symengine.is_a[symengine.Csch](deref(o))):
 *         r = Function.__new__(Csch)
 *     elif (symengine.is_a[symengine.Sech](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(Sech)
 *     elif (symengine.is_a[symengine.ASinh](deref(o))):
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":182
 *     elif (symengine.is_a[symengine.Sech](deref(o))):
 *         r = Function.__new__(Sech)
 *     elif (symengine.is_a[symengine.ASinh](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(ASinh)
 *     elif (symengine.is_a[symengine.ACosh](deref(o))):
*/
  __pyx_t_1 = (SymEngine::is_a<SymEngine::ASinh>((*__pyx_v_o)) != 0);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":183
 *         r = Function.__new__(Sech)
 *     elif (symengine.is_a[symengine.ASinh](deref(o))):
 *         r = Function.__new__(ASinh)             # <<<<<<<<<<<<<<
 *     elif (symengine.is_a[symengine.ACosh](deref(o))):
 *         r = Function.__new__(ACosh)
*/
    __pyx_t_9 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Function); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 183, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 183, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ASinh); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 183, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
      assert(__pyx_t_9);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
      __pyx_t_5 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_3};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 183, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 183, __pyx_L1_error)
    __pyx_v_r = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":182
 *     elif (symengine.is_a[symengine.Sech](deref(o))):
 *         r = Function.__new__(Sech)
 *     elif (symengine.is_a[symengine.ASinh](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(ASinh)
 *     elif (symengine.is_a[symengine.ACosh](deref(o))):
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":184
 *     elif (symengine.is_a[symengine.ASinh](deref(o))):
 *         r = Function.__new__(ASinh)
 *     elif (symengine.is_a[symengine.ACosh](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(ACosh)
 *     elif (symengine.is_a[symengine.ATanh](deref(o))):
*/
  __pyx_t_1 = (SymEngine::is_a<SymEngine::ACosh>((*__pyx_v_o)) != 0);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":185
 *         r = Function.__new__(ASinh)
 *     elif (symengine.is_a[symengine.ACosh](deref(o))):
 *         r = Function.__new__(ACosh)             # <<<<<<<<<<<<<<
 *     elif (symengine.is_a[symengine.ATanh](deref(o))):
 *         r = Function.__new__(ATanh)
*/
    __pyx_t_2 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Function); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 185, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_new); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 185, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ACosh); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 185, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_9);
      assert(__pyx_t_2);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_9, __pyx__function);
      __pyx_t_5 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 185, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 185, __pyx_L1_error)
    __pyx_v_r = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":184
 *     elif (symengine.is_a[symengine.ASinh](deref(o))):
 *         r = Function.__new__(ASinh)
 *     elif (symengine.is_a[symengine.ACosh](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(ACosh)
 *     elif (symengine.is_a[symengine.ATanh](deref(o))):
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":186
 *     elif (symengine.is_a[symengine.ACosh](deref(o))):
 *         r = Function.__new__(ACosh)
 *     elif (symengine.is_a[symengine.ATanh](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(ATanh)
 *     elif (symengine.is_a[symengine.ACoth](deref(o))):
*/
  __pyx_t_1 = (SymEngine::is_a<SymEngine::ATanh>((*__pyx_v_o)) != 0);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":187
 *         r = Function.__new__(ACosh)
 *     elif (symengine.is_a[symengine.ATanh](deref(o))):
 *         r = Function.__new__(ATanh)             # <<<<<<<<<<<<<<
 *     elif (symengine.is_a[symengine.ACoth](deref(o))):
 *         r = Function.__new__(ACoth)
*/
    __pyx_t_9 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Function); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 187, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 187, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ATanh); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 187, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
      assert(__pyx_t_9);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
      __pyx_t_5 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_3};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 187, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 187, __pyx_L1_error)
    __pyx_v_r = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":186
 *     elif (symengine.is_a[symengine.ACosh](deref(o))):
 *         r = Function.__new__(ACosh)
 *     elif (symengine.is_a[symengine.ATanh](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(ATanh)
 *     elif (symengine.is_a[symengine.ACoth](deref(o))):
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":188
 *     elif (symengine.is_a[symengine.ATanh](deref(o))):
 *         r = Function.__new__(ATanh)
 *     elif (symengine.is_a[symengine.ACoth](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(ACoth)
 *     elif (symengine.is_a[symengine.ACsch](deref(o))):
*/
  __pyx_t_1 = (SymEngine::is_a<SymEngine::ACoth>((*__pyx_v_o)) != 0);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":189
 *         r = Function.__new__(ATanh)
 *     elif (symengine.is_a[symengine.ACoth](deref(o))):
 *         r = Function.__new__(ACoth)             # <<<<<<<<<<<<<<
 *     elif (symengine.is_a[symengine.ACsch](deref(o))):
 *         r = Function.__new__(ACsch)
*/
    __pyx_t_2 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Function); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 189, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_new); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 189, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ACoth); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 189, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_9);
      assert(__pyx_t_2);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_9, __pyx__function);
      __pyx_t_5 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 189, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 189, __pyx_L1_error)
    __pyx_v_r = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":188
 *     elif (symengine.is_a[symengine.ATanh](deref(o))):
 *         r = Function.__new__(ATanh)
 *     elif (symengine.is_a[symengine.ACoth](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(ACoth)
 *     elif (symengine.is_a[symengine.ACsch](deref(o))):
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":190
 *     elif (symengine.is_a[symengine.ACoth](deref(o))):
 *         r = Function.__new__(ACoth)
 *     elif (symengine.is_a[symengine.ACsch](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(ACsch)
 *     elif (symengine.is_a[symengine.ASech](deref(o))):
*/
  __pyx_t_1 = (SymEngine::is_a<SymEngine::ACsch>((*__pyx_v_o)) != 0);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":191
 *         r = Function.__new__(ACoth)
 *     elif (symengine.is_a[symengine.ACsch](deref(o))):
 *         r = Function.__new__(ACsch)             # <<<<<<<<<<<<<<
 *     elif (symengine.is_a[symengine.ASech](deref(o))):
 *         r = Function.__new__(ASech)
*/
    __pyx_t_9 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Function); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 191, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 191, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ACsch); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 191, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
      assert(__pyx_t_9);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
      __pyx_t_5 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_3};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 191, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 191, __pyx_L1_error)
    __pyx_v_r = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":190
 *     elif (symengine.is_a[symengine.ACoth](deref(o))):
 *         r = Function.__new__(ACoth)
 *     elif (symengine.is_a[symengine.ACsch](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(ACsch)
 *     elif (symengine.is_a[symengine.ASech](deref(o))):
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":192
 *     elif (symengine.is_a[symengine.ACsch](deref(o))):
 *         r = Function.__new__(ACsch)
 *     elif (symengine.is_a[symengine.ASech](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(ASech)
 *     elif (symengine.is_a[symengine.ATan2](deref(o))):
*/
  __pyx_t_1 = (SymEngine::is_a<SymEngine::ASech>((*__pyx_v_o)) != 0);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":193
 *         r = Function.__new__(ACsch)
 *     elif (symengine.is_a[symengine.ASech](deref(o))):
 *         r = Function.__new__(ASech)             # <<<<<<<<<<<<<<
 *     elif (symengine.is_a[symengine.ATan2](deref(o))):
 *         r = Function.__new__(ATan2)
*/
    __pyx_t_2 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Function); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 193, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_new); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 193, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ASech); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 193, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_9);
      assert(__pyx_t_2);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_9, __pyx__function);
      __pyx_t_5 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 193, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 193, __pyx_L1_error)
    __pyx_v_r = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":192
 *     elif (symengine.is_a[symengine.ACsch](deref(o))):
 *         r = Function.__new__(ACsch)
 *     elif (symengine.is_a[symengine.ASech](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(ASech)
 *     elif (symengine.is_a[symengine.ATan2](deref(o))):
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":194
 *     elif (symengine.is_a[symengine.ASech](deref(o))):
 *         r = Function.__new__(ASech)
 *     elif (symengine.is_a[symengine.ATan2](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(ATan2)
 *     elif (symengine.is_a[symengine.LambertW](deref(o))):
*/
  __pyx_t_1 = (SymEngine::is_a<SymEngine::ATan2>((*__pyx_v_o)) != 0);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":195
 *         r = Function.__new__(ASech)
 *     elif (symengine.is_a[symengine.ATan2](deref(o))):
 *         r = Function.__new__(ATan2)             # <<<<<<<<<<<<<<
 *     elif (symengine.is_a[symengine.LambertW](deref(o))):
 *         r = Function.__new__(LambertW)
*/
    __pyx_t_9 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Function); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 195, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 195, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ATan2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 195, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
      assert(__pyx_t_9);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
      __pyx_t_5 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_3};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 195, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 195, __pyx_L1_error)
    __pyx_v_r = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":194
 *     elif (symengine.is_a[symengine.ASech](deref(o))):
 *         r = Function.__new__(ASech)
 *     elif (symengine.is_a[symengine.ATan2](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(ATan2)
 *     elif (symengine.is_a[symengine.LambertW](deref(o))):
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":196
 *     elif (symengine.is_a[symengine.ATan2](deref(o))):
 *         r = Function.__new__(ATan2)
 *     elif (symengine.is_a[symengine.LambertW](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(LambertW)
 *     elif (symengine.is_a[symengine.Zeta](deref(o))):
*/
  __pyx_t_1 = (SymEngine::is_a<SymEngine::LambertW>((*__pyx_v_o)) != 0);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":197
 *         r = Function.__new__(ATan2)
 *     elif (symengine.is_a[symengine.LambertW](deref(o))):
 *         r = Function.__new__(LambertW)             # <<<<<<<<<<<<<<
 *     elif (symengine.is_a[symengine.Zeta](deref(o))):
 *         r = Function.__new__(zeta)
*/
    __pyx_t_2 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Function); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 197, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_new); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 197, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_LambertW); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 197, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_9);
      assert(__pyx_t_2);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_9, __pyx__function);
      __pyx_t_5 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 197, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 197, __pyx_L1_error)
    __pyx_v_r = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":196
 *     elif (symengine.is_a[symengine.ATan2](deref(o))):
 *         r = Function.__new__(ATan2)
 *     elif (symengine.is_a[symengine.LambertW](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(LambertW)
 *     elif (symengine.is_a[symengine.Zeta](deref(o))):
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":198
 *     elif (symengine.is_a[symengine.LambertW](deref(o))):
 *         r = Function.__new__(LambertW)
 *     elif (symengine.is_a[symengine.Zeta](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(zeta)
 *     elif (symengine.is_a[symengine.Dirichlet_eta](deref(o))):
*/
  __pyx_t_1 = (SymEngine::is_a<SymEngine::Zeta>((*__pyx_v_o)) != 0);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":199
 *         r = Function.__new__(LambertW)
 *     elif (symengine.is_a[symengine.Zeta](deref(o))):
 *         r = Function.__new__(zeta)             # <<<<<<<<<<<<<<
 *     elif (symengine.is_a[symengine.Dirichlet_eta](deref(o))):
 *         r = Function.__new__(dirichlet_eta)
*/
    __pyx_t_9 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Function); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 199, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 199, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_zeta); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 199, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
      assert(__pyx_t_9);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
      __pyx_t_5 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_3};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 199, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 199, __pyx_L1_error)
    __pyx_v_r = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":198
 *     elif (symengine.is_a[symengine.LambertW](deref(o))):
 *         r = Function.__new__(LambertW)
 *     elif (symengine.is_a[symengine.Zeta](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(zeta)
 *     elif (symengine.is_a[symengine.Dirichlet_eta](deref(o))):
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":200
 *     elif (symengine.is_a[symengine.Zeta](deref(o))):
 *         r = Function.__new__(zeta)
 *     elif (symengine.is_a[symengine.Dirichlet_eta](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(dirichlet_eta)
 *     elif (symengine.is_a[symengine.KroneckerDelta](deref(o))):
*/
  __pyx_t_1 = (SymEngine::is_a<SymEngine::Dirichlet_eta>((*__pyx_v_o)) != 0);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":201
 *         r = Function.__new__(zeta)
 *     elif (symengine.is_a[symengine.Dirichlet_eta](deref(o))):
 *         r = Function.__new__(dirichlet_eta)             # <<<<<<<<<<<<<<
 *     elif (symengine.is_a[symengine.KroneckerDelta](deref(o))):
 *         r = Function.__new__(KroneckerDelta)
*/
    __pyx_t_2 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Function); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 201, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_new); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 201, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_dirichlet_eta); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 201, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_9);
      assert(__pyx_t_2);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_9, __pyx__function);
      __pyx_t_5 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 201, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 201, __pyx_L1_error)
    __pyx_v_r = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":200
 *     elif (symengine.is_a[symengine.Zeta](deref(o))):
 *         r = Function.__new__(zeta)
 *     elif (symengine.is_a[symengine.Dirichlet_eta](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(dirichlet_eta)
 *     elif (symengine.is_a[symengine.KroneckerDelta](deref(o))):
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":202
 *     elif (symengine.is_a[symengine.Dirichlet_eta](deref(o))):
 *         r = Function.__new__(dirichlet_eta)
 *     elif (symengine.is_a[symengine.KroneckerDelta](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(KroneckerDelta)
 *     elif (symengine.is_a[symengine.LeviCivita](deref(o))):
*/
  __pyx_t_1 = (SymEngine::is_a<SymEngine::KroneckerDelta>((*__pyx_v_o)) != 0);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":203
 *         r = Function.__new__(dirichlet_eta)
 *     elif (symengine.is_a[symengine.KroneckerDelta](deref(o))):
 *         r = Function.__new__(KroneckerDelta)             # <<<<<<<<<<<<<<
 *     elif (symengine.is_a[symengine.LeviCivita](deref(o))):
 *         r = Function.__new__(LeviCivita)
*/
    __pyx_t_9 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Function); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 203, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 203, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_KroneckerDelta); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 203, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
      assert(__pyx_t_9);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
      __pyx_t_5 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_3};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 203, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 203, __pyx_L1_error)
    __pyx_v_r = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":202
 *     elif (symengine.is_a[symengine.Dirichlet_eta](deref(o))):
 *         r = Function.__new__(dirichlet_eta)
 *     elif (symengine.is_a[symengine.KroneckerDelta](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(KroneckerDelta)
 *     elif (symengine.is_a[symengine.LeviCivita](deref(o))):
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":204
 *     elif (symengine.is_a[symengine.KroneckerDelta](deref(o))):
 *         r = Function.__new__(KroneckerDelta)
 *     elif (symengine.is_a[symengine.LeviCivita](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(LeviCivita)
 *     elif (symengine.is_a[symengine.Erf](deref(o))):
*/
  __pyx_t_1 = (SymEngine::is_a<SymEngine::LeviCivita>((*__pyx_v_o)) != 0);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":205
 *         r = Function.__new__(KroneckerDelta)
 *     elif (symengine.is_a[symengine.LeviCivita](deref(o))):
 *         r = Function.__new__(LeviCivita)             # <<<<<<<<<<<<<<
 *     elif (symengine.is_a[symengine.Erf](deref(o))):
 *         r = Function.__new__(erf)
*/
    __pyx_t_2 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Function); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 205, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_new); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 205, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_LeviCivita); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 205, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_9);
      assert(__pyx_t_2);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_9, __pyx__function);
      __pyx_t_5 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 205, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 205, __pyx_L1_error)
    __pyx_v_r = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":204
 *     elif (symengine.is_a[symengine.KroneckerDelta](deref(o))):
 *         r = Function.__new__(KroneckerDelta)
 *     elif (symengine.is_a[symengine.LeviCivita](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(LeviCivita)
 *     elif (symengine.is_a[symengine.Erf](deref(o))):
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":206
 *     elif (symengine.is_a[symengine.LeviCivita](deref(o))):
 *         r = Function.__new__(LeviCivita)
 *     elif (symengine.is_a[symengine.Erf](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(erf)
 *     elif (symengine.is_a[symengine.Erfc](deref(o))):
*/
  __pyx_t_1 = (SymEngine::is_a<SymEngine::Erf>((*__pyx_v_o)) != 0);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":207
 *         r = Function.__new__(LeviCivita)
 *     elif (symengine.is_a[symengine.Erf](deref(o))):
 *         r = Function.__new__(erf)             # <<<<<<<<<<<<<<
 *     elif (symengine.is_a[symengine.Erfc](deref(o))):
 *         r = Function.__new__(erfc)
*/
    __pyx_t_9 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Function); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 207, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 207, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_erf); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 207, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
      assert(__pyx_t_9);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
      __pyx_t_5 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_3};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 207, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 207, __pyx_L1_error)
    __pyx_v_r = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":206
 *     elif (symengine.is_a[symengine.LeviCivita](deref(o))):
 *         r = Function.__new__(LeviCivita)
 *     elif (symengine.is_a[symengine.Erf](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(erf)
 *     elif (symengine.is_a[symengine.Erfc](deref(o))):
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":208
 *     elif (symengine.is_a[symengine.Erf](deref(o))):
 *         r = Function.__new__(erf)
 *     elif (symengine.is_a[symengine.Erfc](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(erfc)
 *     elif (symengine.is_a[symengine.LowerGamma](deref(o))):
*/
  __pyx_t_1 = (SymEngine::is_a<SymEngine::Erfc>((*__pyx_v_o)) != 0);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":209
 *         r = Function.__new__(erf)
 *     elif (symengine.is_a[symengine.Erfc](deref(o))):
 *         r = Function.__new__(erfc)             # <<<<<<<<<<<<<<
 *     elif (symengine.is_a[symengine.LowerGamma](deref(o))):
 *         r = Function.__new__(lowergamma)
*/
    __pyx_t_2 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Function); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 209, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_new); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 209, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_erfc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 209, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_9);
      assert(__pyx_t_2);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_9, __pyx__function);
      __pyx_t_5 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 209, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 209, __pyx_L1_error)
    __pyx_v_r = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":208
 *     elif (symengine.is_a[symengine.Erf](deref(o))):
 *         r = Function.__new__(erf)
 *     elif (symengine.is_a[symengine.Erfc](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(erfc)
 *     elif (symengine.is_a[symengine.LowerGamma](deref(o))):
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":210
 *     elif (symengine.is_a[symengine.Erfc](deref(o))):
 *         r = Function.__new__(erfc)
 *     elif (symengine.is_a[symengine.LowerGamma](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(lowergamma)
 *     elif (symengine.is_a[symengine.UpperGamma](deref(o))):
*/
  __pyx_t_1 = (SymEngine::is_a<SymEngine::LowerGamma>((*__pyx_v_o)) != 0);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":211
 *         r = Function.__new__(erfc)
 *     elif (symengine.is_a[symengine.LowerGamma](deref(o))):
 *         r = Function.__new__(lowergamma)             # <<<<<<<<<<<<<<
 *     elif (symengine.is_a[symengine.UpperGamma](deref(o))):
 *         r = Function.__new__(uppergamma)
*/
    __pyx_t_9 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Function); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 211, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 211, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_lowergamma); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 211, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
      assert(__pyx_t_9);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
      __pyx_t_5 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_3};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 211, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 211, __pyx_L1_error)
    __pyx_v_r = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":210
 *     elif (symengine.is_a[symengine.Erfc](deref(o))):
 *         r = Function.__new__(erfc)
 *     elif (symengine.is_a[symengine.LowerGamma](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(lowergamma)
 *     elif (symengine.is_a[symengine.UpperGamma](deref(o))):
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":212
 *     elif (symengine.is_a[symengine.LowerGamma](deref(o))):
 *         r = Function.__new__(lowergamma)
 *     elif (symengine.is_a[symengine.UpperGamma](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(uppergamma)
 *     elif (symengine.is_a[symengine.LogGamma](deref(o))):
*/
  __pyx_t_1 = (SymEngine::is_a<SymEngine::UpperGamma>((*__pyx_v_o)) != 0);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":213
 *         r = Function.__new__(lowergamma)
 *     elif (symengine.is_a[symengine.UpperGamma](deref(o))):
 *         r = Function.__new__(uppergamma)             # <<<<<<<<<<<<<<
 *     elif (symengine.is_a[symengine.LogGamma](deref(o))):
 *         r = Function.__new__(loggamma)
*/
    __pyx_t_2 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Function); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 213, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_new); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 213, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_uppergamma); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 213, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_9);
      assert(__pyx_t_2);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_9, __pyx__function);
      __pyx_t_5 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 213, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 213, __pyx_L1_error)
    __pyx_v_r = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":212
 *     elif (symengine.is_a[symengine.LowerGamma](deref(o))):
 *         r = Function.__new__(lowergamma)
 *     elif (symengine.is_a[symengine.UpperGamma](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(uppergamma)
 *     elif (symengine.is_a[symengine.LogGamma](deref(o))):
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":214
 *     elif (symengine.is_a[symengine.UpperGamma](deref(o))):
 *         r = Function.__new__(uppergamma)
 *     elif (symengine.is_a[symengine.LogGamma](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(loggamma)
 *     elif (symengine.is_a[symengine.Beta](deref(o))):
*/
  __pyx_t_1 = (SymEngine::is_a<SymEngine::LogGamma>((*__pyx_v_o)) != 0);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":215
 *         r = Function.__new__(uppergamma)
 *     elif (symengine.is_a[symengine.LogGamma](deref(o))):
 *         r = Function.__new__(loggamma)             # <<<<<<<<<<<<<<
 *     elif (symengine.is_a[symengine.Beta](deref(o))):
 *         r = Function.__new__(beta)
*/
    __pyx_t_9 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Function); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 215, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 215, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_loggamma); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 215, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
      assert(__pyx_t_9);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
      __pyx_t_5 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_3};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 215, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 215, __pyx_L1_error)
    __pyx_v_r = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":214
 *     elif (symengine.is_a[symengine.UpperGamma](deref(o))):
 *         r = Function.__new__(uppergamma)
 *     elif (symengine.is_a[symengine.LogGamma](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(loggamma)
 *     elif (symengine.is_a[symengine.Beta](deref(o))):
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":216
 *     elif (symengine.is_a[symengine.LogGamma](deref(o))):
 *         r = Function.__new__(loggamma)
 *     elif (symengine.is_a[symengine.Beta](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(beta)
 *     elif (symengine.is_a[symengine.PolyGamma](deref(o))):
*/
  __pyx_t_1 = (SymEngine::is_a<SymEngine::Beta>((*__pyx_v_o)) != 0);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":217
 *         r = Function.__new__(loggamma)
 *     elif (symengine.is_a[symengine.Beta](deref(o))):
 *         r = Function.__new__(beta)             # <<<<<<<<<<<<<<
 *     elif (symengine.is_a[symengine.PolyGamma](deref(o))):
 *         r = Function.__new__(polygamma)
*/
    __pyx_t_2 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Function); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 217, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_new); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 217, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_beta); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 217, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_9);
      assert(__pyx_t_2);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_9, __pyx__function);
      __pyx_t_5 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 217, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 217, __pyx_L1_error)
    __pyx_v_r = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":216
 *     elif (symengine.is_a[symengine.LogGamma](deref(o))):
 *         r = Function.__new__(loggamma)
 *     elif (symengine.is_a[symengine.Beta](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(beta)
 *     elif (symengine.is_a[symengine.PolyGamma](deref(o))):
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":218
 *     elif (symengine.is_a[symengine.Beta](deref(o))):
 *         r = Function.__new__(beta)
 *     elif (symengine.is_a[symengine.PolyGamma](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(polygamma)
 *     elif (symengine.is_a[symengine.Sign](deref(o))):
*/
  __pyx_t_1 = (SymEngine::is_a<SymEngine::PolyGamma>((*__pyx_v_o)) != 0);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":219
 *         r = Function.__new__(beta)
 *     elif (symengine.is_a[symengine.PolyGamma](deref(o))):
 *         r = Function.__new__(polygamma)             # <<<<<<<<<<<<<<
 *     elif (symengine.is_a[symengine.Sign](deref(o))):
 *         r = Function.__new__(sign)
*/
    __pyx_t_9 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Function); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 219, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 219, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_polygamma); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 219, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
      assert(__pyx_t_9);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
      __pyx_t_5 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_3};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 219, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 219, __pyx_L1_error)
    __pyx_v_r = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":218
 *     elif (symengine.is_a[symengine.Beta](deref(o))):
 *         r = Function.__new__(beta)
 *     elif (symengine.is_a[symengine.PolyGamma](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(polygamma)
 *     elif (symengine.is_a[symengine.Sign](deref(o))):
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":220
 *     elif (symengine.is_a[symengine.PolyGamma](deref(o))):
 *         r = Function.__new__(polygamma)
 *     elif (symengine.is_a[symengine.Sign](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(sign)
 *     elif (symengine.is_a[symengine.Floor](deref(o))):
*/
  __pyx_t_1 = (SymEngine::is_a<SymEngine::Sign>((*__pyx_v_o)) != 0);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":221
 *         r = Function.__new__(polygamma)
 *     elif (symengine.is_a[symengine.Sign](deref(o))):
 *         r = Function.__new__(sign)             # <<<<<<<<<<<<<<
 *     elif (symengine.is_a[symengine.Floor](deref(o))):
 *         r = Function.__new__(floor)
*/
    __pyx_t_2 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Function); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 221, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_new); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 221, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sign); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 221, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_9);
      assert(__pyx_t_2);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_9, __pyx__function);
      __pyx_t_5 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 221, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 221, __pyx_L1_error)
    __pyx_v_r = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":220
 *     elif (symengine.is_a[symengine.PolyGamma](deref(o))):
 *         r = Function.__new__(polygamma)
 *     elif (symengine.is_a[symengine.Sign](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(sign)
 *     elif (symengine.is_a[symengine.Floor](deref(o))):
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":222
 *     elif (symengine.is_a[symengine.Sign](deref(o))):
 *         r = Function.__new__(sign)
 *     elif (symengine.is_a[symengine.Floor](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(floor)
 *     elif (symengine.is_a[symengine.Ceiling](deref(o))):
*/
  __pyx_t_1 = (SymEngine::is_a<SymEngine::Floor>((*__pyx_v_o)) != 0);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":223
 *         r = Function.__new__(sign)
 *     elif (symengine.is_a[symengine.Floor](deref(o))):
 *         r = Function.__new__(floor)             # <<<<<<<<<<<<<<
 *     elif (symengine.is_a[symengine.Ceiling](deref(o))):
 *         r = Function.__new__(ceiling)
*/
    __pyx_t_9 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Function); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 223, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 223, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_floor); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 223, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
      assert(__pyx_t_9);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
      __pyx_t_5 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_3};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 223, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 223, __pyx_L1_error)
    __pyx_v_r = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":222
 *     elif (symengine.is_a[symengine.Sign](deref(o))):
 *         r = Function.__new__(sign)
 *     elif (symengine.is_a[symengine.Floor](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(floor)
 *     elif (symengine.is_a[symengine.Ceiling](deref(o))):
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":224
 *     elif (symengine.is_a[symengine.Floor](deref(o))):
 *         r = Function.__new__(floor)
 *     elif (symengine.is_a[symengine.Ceiling](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(ceiling)
 *     elif (symengine.is_a[symengine.Conjugate](deref(o))):
*/
  __pyx_t_1 = (SymEngine::is_a<SymEngine::Ceiling>((*__pyx_v_o)) != 0);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":225
 *         r = Function.__new__(floor)
 *     elif (symengine.is_a[symengine.Ceiling](deref(o))):
 *         r = Function.__new__(ceiling)             # <<<<<<<<<<<<<<
 *     elif (symengine.is_a[symengine.Conjugate](deref(o))):
 *         r = Function.__new__(conjugate)
*/
    __pyx_t_2 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Function); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 225, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_new); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 225, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ceiling); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 225, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_9);
      assert(__pyx_t_2);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_9, __pyx__function);
      __pyx_t_5 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 225, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 225, __pyx_L1_error)
    __pyx_v_r = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":224
 *     elif (symengine.is_a[symengine.Floor](deref(o))):
 *         r = Function.__new__(floor)
 *     elif (symengine.is_a[symengine.Ceiling](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(ceiling)
 *     elif (symengine.is_a[symengine.Conjugate](deref(o))):
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":226
 *     elif (symengine.is_a[symengine.Ceiling](deref(o))):
 *         r = Function.__new__(ceiling)
 *     elif (symengine.is_a[symengine.Conjugate](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(conjugate)
 *     elif (symengine.is_a[symengine.PyNumber](deref(o))):
*/
  __pyx_t_1 = (SymEngine::is_a<SymEngine::Conjugate>((*__pyx_v_o)) != 0);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":227
 *         r = Function.__new__(ceiling)
 *     elif (symengine.is_a[symengine.Conjugate](deref(o))):
 *         r = Function.__new__(conjugate)             # <<<<<<<<<<<<<<
 *     elif (symengine.is_a[symengine.PyNumber](deref(o))):
 *         r = PyNumber.__new__(PyNumber)
*/
    __pyx_t_9 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Function); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 227, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 227, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_conjugate); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 227, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
      assert(__pyx_t_9);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
      __pyx_t_5 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_3};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 227, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 227, __pyx_L1_error)
    __pyx_v_r = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":226
 *     elif (symengine.is_a[symengine.Ceiling](deref(o))):
 *         r = Function.__new__(ceiling)
 *     elif (symengine.is_a[symengine.Conjugate](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(conjugate)
 *     elif (symengine.is_a[symengine.PyNumber](deref(o))):
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":228
 *     elif (symengine.is_a[symengine.Conjugate](deref(o))):
 *         r = Function.__new__(conjugate)
 *     elif (symengine.is_a[symengine.PyNumber](deref(o))):             # <<<<<<<<<<<<<<
 *         r = PyNumber.__new__(PyNumber)
 *     elif (symengine.is_a[symengine.Piecewise](deref(o))):
*/
  __pyx_t_1 = (SymEngine::is_a<SymEngine::PyNumber>((*__pyx_v_o)) != 0);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":229
 *         r = Function.__new__(conjugate)
 *     elif (symengine.is_a[symengine.PyNumber](deref(o))):
 *         r = PyNumber.__new__(PyNumber)             # <<<<<<<<<<<<<<
 *     elif (symengine.is_a[symengine.Piecewise](deref(o))):
 *         r = Function.__new__(Piecewise)
*/
    __pyx_t_4 = ((PyObject *)__pyx_tp_new_9symengine_3lib_17symengine_wrapper_PyNumber(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_PyNumber), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 229, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_4);
    if (!(likely(__Pyx_TypeTest(((PyObject *)__pyx_t_4), __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic)))) __PYX_ERR(0, 229, __pyx_L1_error)
    __pyx_v_r = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":228
 *     elif (symengine.is_a[symengine.Conjugate](deref(o))):
 *         r = Function.__new__(conjugate)
 *     elif (symengine.is_a[symengine.PyNumber](deref(o))):             # <<<<<<<<<<<<<<
 *         r = PyNumber.__new__(PyNumber)
 *     elif (symengine.is_a[symengine.Piecewise](deref(o))):
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":230
 *     elif (symengine.is_a[symengine.PyNumber](deref(o))):
 *         r = PyNumber.__new__(PyNumber)
 *     elif (symengine.is_a[symengine.Piecewise](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(Piecewise)
 *     elif (symengine.is_a[symengine.Contains](deref(o))):
*/
  __pyx_t_1 = (SymEngine::is_a<SymEngine::Piecewise>((*__pyx_v_o)) != 0);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":231
 *         r = PyNumber.__new__(PyNumber)
 *     elif (symengine.is_a[symengine.Piecewise](deref(o))):
 *         r = Function.__new__(Piecewise)             # <<<<<<<<<<<<<<
 *     elif (symengine.is_a[symengine.Contains](deref(o))):
 *         r = Boolean.__new__(Contains)
*/
    __pyx_t_2 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Function); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 231, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_new); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 231, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Piecewise); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 231, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_9);
      assert(__pyx_t_2);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_9, __pyx__function);
      __pyx_t_5 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 231, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 231, __pyx_L1_error)
    __pyx_v_r = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":230
 *     elif (symengine.is_a[symengine.PyNumber](deref(o))):
 *         r = PyNumber.__new__(PyNumber)
 *     elif (symengine.is_a[symengine.Piecewise](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(Piecewise)
 *     elif (symengine.is_a[symengine.Contains](deref(o))):
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":232
 *     elif (symengine.is_a[symengine.Piecewise](deref(o))):
 *         r = Function.__new__(Piecewise)
 *     elif (symengine.is_a[symengine.Contains](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Boolean.__new__(Contains)
 *     elif (symengine.is_a[symengine.Interval](deref(o))):
*/
  __pyx_t_1 = (SymEngine::is_a<SymEngine::Contains>((*__pyx_v_o)) != 0);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":233
 *         r = Function.__new__(Piecewise)
 *     elif (symengine.is_a[symengine.Contains](deref(o))):
 *         r = Boolean.__new__(Contains)             # <<<<<<<<<<<<<<
 *     elif (symengine.is_a[symengine.Interval](deref(o))):
 *         r = Set.__new__(Interval)
*/
    __pyx_t_9 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Boolean);
    __Pyx_INCREF(__pyx_t_9);
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Contains); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 233, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_3};
      __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 233, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 233, __pyx_L1_error)
    __pyx_v_r = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":232
 *     elif (symengine.is_a[symengine.Piecewise](deref(o))):
 *         r = Function.__new__(Piecewise)
 *     elif (symengine.is_a[symengine.Contains](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Boolean.__new__(Contains)
 *     elif (symengine.is_a[symengine.Interval](deref(o))):
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":234
 *     elif (symengine.is_a[symengine.Contains](deref(o))):
 *         r = Boolean.__new__(Contains)
 *     elif (symengine.is_a[symengine.Interval](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Set.__new__(Interval)
 *     elif (symengine.is_a[symengine.EmptySet](deref(o))):
*/
  __pyx_t_1 = (SymEngine::is_a<SymEngine::Interval>((*__pyx_v_o)) != 0);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":235
 *         r = Boolean.__new__(Contains)
 *     elif (symengine.is_a[symengine.Interval](deref(o))):
 *         r = Set.__new__(Interval)             # <<<<<<<<<<<<<<
 *     elif (symengine.is_a[symengine.EmptySet](deref(o))):
 *         r = Set.__new__(EmptySet)
*/
    __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Set);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_Interval); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 235, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_5 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_9};
      __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 235, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 235, __pyx_L1_error)
    __pyx_v_r = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":234
 *     elif (symengine.is_a[symengine.Contains](deref(o))):
 *         r = Boolean.__new__(Contains)
 *     elif (symengine.is_a[symengine.Interval](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Set.__new__(Interval)
 *     elif (symengine.is_a[symengine.EmptySet](deref(o))):
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":236
 *     elif (symengine.is_a[symengine.Interval](deref(o))):
 *         r = Set.__new__(Interval)
 *     elif (symengine.is_a[symengine.EmptySet](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Set.__new__(EmptySet)
 *     elif (symengine.is_a[symengine.Reals](deref(o))):
*/
  __pyx_t_1 = (SymEngine::is_a<SymEngine::EmptySet>((*__pyx_v_o)) != 0);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":237
 *         r = Set.__new__(Interval)
 *     elif (symengine.is_a[symengine.EmptySet](deref(o))):
 *         r = Set.__new__(EmptySet)             # <<<<<<<<<<<<<<
 *     elif (symengine.is_a[symengine.Reals](deref(o))):
 *         r = Set.__new__(Reals)
*/
    __pyx_t_9 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Set);
    __Pyx_INCREF(__pyx_t_9);
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_EmptySet); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 237, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_3};
      __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 237, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 237, __pyx_L1_error)
    __pyx_v_r = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":236
 *     elif (symengine.is_a[symengine.Interval](deref(o))):
 *         r = Set.__new__(Interval)
 *     elif (symengine.is_a[symengine.EmptySet](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Set.__new__(EmptySet)
 *     elif (symengine.is_a[symengine.Reals](deref(o))):
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":238
 *     elif (symengine.is_a[symengine.EmptySet](deref(o))):
 *         r = Set.__new__(EmptySet)
 *     elif (symengine.is_a[symengine.Reals](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Set.__new__(Reals)
 *     elif (symengine.is_a[symengine.Integers](deref(o))):
*/
  __pyx_t_1 = (SymEngine::is_a<SymEngine::Reals>((*__pyx_v_o)) != 0);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":239
 *         r = Set.__new__(EmptySet)
 *     elif (symengine.is_a[symengine.Reals](deref(o))):
 *         r = Set.__new__(Reals)             # <<<<<<<<<<<<<<
 *     elif (symengine.is_a[symengine.Integers](deref(o))):
 *         r = Set.__new__(Integers)
*/
    __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Set);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_Reals); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 239, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_5 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_9};
      __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 239, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 239, __pyx_L1_error)
    __pyx_v_r = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":238
 *     elif (symengine.is_a[symengine.EmptySet](deref(o))):
 *         r = Set.__new__(EmptySet)
 *     elif (symengine.is_a[symengine.Reals](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Set.__new__(Reals)
 *     elif (symengine.is_a[symengine.Integers](deref(o))):
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":240
 *     elif (symengine.is_a[symengine.Reals](deref(o))):
 *         r = Set.__new__(Reals)
 *     elif (symengine.is_a[symengine.Integers](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Set.__new__(Integers)
 *     elif (symengine.is_a[symengine.Rationals](deref(o))):
*/
  __pyx_t_1 = (SymEngine::is_a<SymEngine::Integers>((*__pyx_v_o)) != 0);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":241
 *         r = Set.__new__(Reals)
 *     elif (symengine.is_a[symengine.Integers](deref(o))):
 *         r = Set.__new__(Integers)             # <<<<<<<<<<<<<<
 *     elif (symengine.is_a[symengine.Rationals](deref(o))):
 *         r = Set.__new__(Rationals)
*/
    __pyx_t_9 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Set);
    __Pyx_INCREF(__pyx_t_9);
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Integers); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 241, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_3};
      __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 241, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 241, __pyx_L1_error)
    __pyx_v_r = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":240
 *     elif (symengine.is_a[symengine.Reals](deref(o))):
 *         r = Set.__new__(Reals)
 *     elif (symengine.is_a[symengine.Integers](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Set.__new__(Integers)
 *     elif (symengine.is_a[symengine.Rationals](deref(o))):
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":242
 *     elif (symengine.is_a[symengine.Integers](deref(o))):
 *         r = Set.__new__(Integers)
 *     elif (symengine.is_a[symengine.Rationals](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Set.__new__(Rationals)
 *     elif (symengine.is_a[symengine.UniversalSet](deref(o))):
*/
  __pyx_t_1 = (SymEngine::is_a<SymEngine::Rationals>((*__pyx_v_o)) != 0);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":243
 *         r = Set.__new__(Integers)
 *     elif (symengine.is_a[symengine.Rationals](deref(o))):
 *         r = Set.__new__(Rationals)             # <<<<<<<<<<<<<<
 *     elif (symengine.is_a[symengine.UniversalSet](deref(o))):
 *         r = Set.__new__(UniversalSet)
*/
    __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Set);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_Rationals); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 243, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_5 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_9};
      __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 243, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 243, __pyx_L1_error)
    __pyx_v_r = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":242
 *     elif (symengine.is_a[symengine.Integers](deref(o))):
 *         r = Set.__new__(Integers)
 *     elif (symengine.is_a[symengine.Rationals](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Set.__new__(Rationals)
 *     elif (symengine.is_a[symengine.UniversalSet](deref(o))):
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":244
 *     elif (symengine.is_a[symengine.Rationals](deref(o))):
 *         r = Set.__new__(Rationals)
 *     elif (symengine.is_a[symengine.UniversalSet](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Set.__new__(UniversalSet)
 *     elif (symengine.is_a[symengine.FiniteSet](deref(o))):
*/
  __pyx_t_1 = (SymEngine::is_a<SymEngine::UniversalSet>((*__pyx_v_o)) != 0);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":245
 *         r = Set.__new__(Rationals)
 *     elif (symengine.is_a[symengine.UniversalSet](deref(o))):
 *         r = Set.__new__(UniversalSet)             # <<<<<<<<<<<<<<
 *     elif (symengine.is_a[symengine.FiniteSet](deref(o))):
 *         r = Set.__new__(FiniteSet)
*/
    __pyx_t_9 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Set);
    __Pyx_INCREF(__pyx_t_9);
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_UniversalSet); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 245, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_3};
      __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 245, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 245, __pyx_L1_error)
    __pyx_v_r = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":244
 *     elif (symengine.is_a[symengine.Rationals](deref(o))):
 *         r = Set.__new__(Rationals)
 *     elif (symengine.is_a[symengine.UniversalSet](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Set.__new__(UniversalSet)
 *     elif (symengine.is_a[symengine.FiniteSet](deref(o))):
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":246
 *     elif (symengine.is_a[symengine.UniversalSet](deref(o))):
 *         r = Set.__new__(UniversalSet)
 *     elif (symengine.is_a[symengine.FiniteSet](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Set.__new__(FiniteSet)
 *     elif (symengine.is_a[symengine.Union](deref(o))):
*/
  __pyx_t_1 = (SymEngine::is_a<SymEngine::FiniteSet>((*__pyx_v_o)) != 0);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":247
 *         r = Set.__new__(UniversalSet)
 *     elif (symengine.is_a[symengine.FiniteSet](deref(o))):
 *         r = Set.__new__(FiniteSet)             # <<<<<<<<<<<<<<
 *     elif (symengine.is_a[symengine.Union](deref(o))):
 *         r = Set.__new__(Union)
*/
    __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Set);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_FiniteSet); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 247, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_5 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_9};
      __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 247, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 247, __pyx_L1_error)
    __pyx_v_r = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":246
 *     elif (symengine.is_a[symengine.UniversalSet](deref(o))):
 *         r = Set.__new__(UniversalSet)
 *     elif (symengine.is_a[symengine.FiniteSet](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Set.__new__(FiniteSet)
 *     elif (symengine.is_a[symengine.Union](deref(o))):
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":248
 *     elif (symengine.is_a[symengine.FiniteSet](deref(o))):
 *         r = Set.__new__(FiniteSet)
 *     elif (symengine.is_a[symengine.Union](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Set.__new__(Union)
 *     elif (symengine.is_a[symengine.Complement](deref(o))):
*/
  __pyx_t_1 = (SymEngine::is_a<SymEngine::Union>((*__pyx_v_o)) != 0);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":249
 *         r = Set.__new__(FiniteSet)
 *     elif (symengine.is_a[symengine.Union](deref(o))):
 *         r = Set.__new__(Union)             # <<<<<<<<<<<<<<
 *     elif (symengine.is_a[symengine.Complement](deref(o))):
 *         r = Set.__new__(Complement)
*/
    __pyx_t_9 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Set);
    __Pyx_INCREF(__pyx_t_9);
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Union); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 249, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_3};
      __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 249, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 249, __pyx_L1_error)
    __pyx_v_r = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":248
 *     elif (symengine.is_a[symengine.FiniteSet](deref(o))):
 *         r = Set.__new__(FiniteSet)
 *     elif (symengine.is_a[symengine.Union](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Set.__new__(Union)
 *     elif (symengine.is_a[symengine.Complement](deref(o))):
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":250
 *     elif (symengine.is_a[symengine.Union](deref(o))):
 *         r = Set.__new__(Union)
 *     elif (symengine.is_a[symengine.Complement](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Set.__new__(Complement)
 *     elif (symengine.is_a[symengine.ConditionSet](deref(o))):
*/
  __pyx_t_1 = (SymEngine::is_a<SymEngine::Complement>((*__pyx_v_o)) != 0);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":251
 *         r = Set.__new__(Union)
 *     elif (symengine.is_a[symengine.Complement](deref(o))):
 *         r = Set.__new__(Complement)             # <<<<<<<<<<<<<<
 *     elif (symengine.is_a[symengine.ConditionSet](deref(o))):
 *         r = Set.__new__(ConditionSet)
*/
    __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Set);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_Complement); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 251, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_5 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_9};
      __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 251, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 251, __pyx_L1_error)
    __pyx_v_r = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":250
 *     elif (symengine.is_a[symengine.Union](deref(o))):
 *         r = Set.__new__(Union)
 *     elif (symengine.is_a[symengine.Complement](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Set.__new__(Complement)
 *     elif (symengine.is_a[symengine.ConditionSet](deref(o))):
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":252
 *     elif (symengine.is_a[symengine.Complement](deref(o))):
 *         r = Set.__new__(Complement)
 *     elif (symengine.is_a[symengine.ConditionSet](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Set.__new__(ConditionSet)
 *     elif (symengine.is_a[symengine.ImageSet](deref(o))):
*/
  __pyx_t_1 = (SymEngine::is_a<SymEngine::ConditionSet>((*__pyx_v_o)) != 0);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":253
 *         r = Set.__new__(Complement)
 *     elif (symengine.is_a[symengine.ConditionSet](deref(o))):
 *         r = Set.__new__(ConditionSet)             # <<<<<<<<<<<<<<
 *     elif (symengine.is_a[symengine.ImageSet](deref(o))):
 *         r = Set.__new__(ImageSet)
*/
    __pyx_t_9 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Set);
    __Pyx_INCREF(__pyx_t_9);
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ConditionSet); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 253, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_3};
      __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 253, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 253, __pyx_L1_error)
    __pyx_v_r = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":252
 *     elif (symengine.is_a[symengine.Complement](deref(o))):
 *         r = Set.__new__(Complement)
 *     elif (symengine.is_a[symengine.ConditionSet](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Set.__new__(ConditionSet)
 *     elif (symengine.is_a[symengine.ImageSet](deref(o))):
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":254
 *     elif (symengine.is_a[symengine.ConditionSet](deref(o))):
 *         r = Set.__new__(ConditionSet)
 *     elif (symengine.is_a[symengine.ImageSet](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Set.__new__(ImageSet)
 *     elif (symengine.is_a[symengine.And](deref(o))):
*/
  __pyx_t_1 = (SymEngine::is_a<SymEngine::ImageSet>((*__pyx_v_o)) != 0);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":255
 *         r = Set.__new__(ConditionSet)
 *     elif (symengine.is_a[symengine.ImageSet](deref(o))):
 *         r = Set.__new__(ImageSet)             # <<<<<<<<<<<<<<
 *     elif (symengine.is_a[symengine.And](deref(o))):
 *         r = Boolean.__new__(And)
*/
    __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Set);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_ImageSet); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 255, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_5 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_9};
      __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 255, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 255, __pyx_L1_error)
    __pyx_v_r = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":254
 *     elif (symengine.is_a[symengine.ConditionSet](deref(o))):
 *         r = Set.__new__(ConditionSet)
 *     elif (symengine.is_a[symengine.ImageSet](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Set.__new__(ImageSet)
 *     elif (symengine.is_a[symengine.And](deref(o))):
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":256
 *     elif (symengine.is_a[symengine.ImageSet](deref(o))):
 *         r = Set.__new__(ImageSet)
 *     elif (symengine.is_a[symengine.And](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Boolean.__new__(And)
 *     elif (symengine.is_a[symengine.Not](deref(o))):
*/
  __pyx_t_1 = (SymEngine::is_a<SymEngine::And>((*__pyx_v_o)) != 0);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":257
 *         r = Set.__new__(ImageSet)
 *     elif (symengine.is_a[symengine.And](deref(o))):
 *         r = Boolean.__new__(And)             # <<<<<<<<<<<<<<
 *     elif (symengine.is_a[symengine.Not](deref(o))):
 *         r = Boolean.__new__(Not)
*/
    __pyx_t_9 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Boolean);
    __Pyx_INCREF(__pyx_t_9);
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_And); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 257, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_3};
      __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 257, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 257, __pyx_L1_error)
    __pyx_v_r = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":256
 *     elif (symengine.is_a[symengine.ImageSet](deref(o))):
 *         r = Set.__new__(ImageSet)
 *     elif (symengine.is_a[symengine.And](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Boolean.__new__(And)
 *     elif (symengine.is_a[symengine.Not](deref(o))):
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":258
 *     elif (symengine.is_a[symengine.And](deref(o))):
 *         r = Boolean.__new__(And)
 *     elif (symengine.is_a[symengine.Not](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Boolean.__new__(Not)
 *     elif (symengine.is_a[symengine.Or](deref(o))):
*/
  __pyx_t_1 = (SymEngine::is_a<SymEngine::Not>((*__pyx_v_o)) != 0);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":259
 *         r = Boolean.__new__(And)
 *     elif (symengine.is_a[symengine.Not](deref(o))):
 *         r = Boolean.__new__(Not)             # <<<<<<<<<<<<<<
 *     elif (symengine.is_a[symengine.Or](deref(o))):
 *         r = Boolean.__new__(Or)
*/
    __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Boolean);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_Not); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 259, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_5 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_9};
      __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 259, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 259, __pyx_L1_error)
    __pyx_v_r = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":258
 *     elif (symengine.is_a[symengine.And](deref(o))):
 *         r = Boolean.__new__(And)
 *     elif (symengine.is_a[symengine.Not](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Boolean.__new__(Not)
 *     elif (symengine.is_a[symengine.Or](deref(o))):
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":260
 *     elif (symengine.is_a[symengine.Not](deref(o))):
 *         r = Boolean.__new__(Not)
 *     elif (symengine.is_a[symengine.Or](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Boolean.__new__(Or)
 *     elif (symengine.is_a[symengine.Xor](deref(o))):
*/
  __pyx_t_1 = (SymEngine::is_a<SymEngine::Or>((*__pyx_v_o)) != 0);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":261
 *         r = Boolean.__new__(Not)
 *     elif (symengine.is_a[symengine.Or](deref(o))):
 *         r = Boolean.__new__(Or)             # <<<<<<<<<<<<<<
 *     elif (symengine.is_a[symengine.Xor](deref(o))):
 *         r = Boolean.__new__(Xor)
*/
    __pyx_t_9 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Boolean);
    __Pyx_INCREF(__pyx_t_9);
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Or); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 261, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_3};
      __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 261, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 261, __pyx_L1_error)
    __pyx_v_r = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":260
 *     elif (symengine.is_a[symengine.Not](deref(o))):
 *         r = Boolean.__new__(Not)
 *     elif (symengine.is_a[symengine.Or](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Boolean.__new__(Or)
 *     elif (symengine.is_a[symengine.Xor](deref(o))):
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":262
 *     elif (symengine.is_a[symengine.Or](deref(o))):
 *         r = Boolean.__new__(Or)
 *     elif (symengine.is_a[symengine.Xor](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Boolean.__new__(Xor)
 *     elif (symengine.is_a[symengine.UnevaluatedExpr](deref(o))):
*/
  __pyx_t_1 = (SymEngine::is_a<SymEngine::Xor>((*__pyx_v_o)) != 0);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":263
 *         r = Boolean.__new__(Or)
 *     elif (symengine.is_a[symengine.Xor](deref(o))):
 *         r = Boolean.__new__(Xor)             # <<<<<<<<<<<<<<
 *     elif (symengine.is_a[symengine.UnevaluatedExpr](deref(o))):
 *         r = Function.__new__(UnevaluatedExpr)
*/
    __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Boolean);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_Xor); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 263, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_5 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_9};
      __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 263, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 263, __pyx_L1_error)
    __pyx_v_r = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":262
 *     elif (symengine.is_a[symengine.Or](deref(o))):
 *         r = Boolean.__new__(Or)
 *     elif (symengine.is_a[symengine.Xor](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Boolean.__new__(Xor)
 *     elif (symengine.is_a[symengine.UnevaluatedExpr](deref(o))):
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":264
 *     elif (symengine.is_a[symengine.Xor](deref(o))):
 *         r = Boolean.__new__(Xor)
 *     elif (symengine.is_a[symengine.UnevaluatedExpr](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(UnevaluatedExpr)
 *     else:
*/
  __pyx_t_1 = (SymEngine::is_a<SymEngine::UnevaluatedExpr>((*__pyx_v_o)) != 0);
  if (likely(__pyx_t_1)) {

    /* "symengine/lib/symengine_wrapper.pyx":265
 *         r = Boolean.__new__(Xor)
 *     elif (symengine.is_a[symengine.UnevaluatedExpr](deref(o))):
 *         r = Function.__new__(UnevaluatedExpr)             # <<<<<<<<<<<<<<
 *     else:
 *         raise Exception("Unsupported SymEngine class.")
*/
    __pyx_t_9 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Function); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 265, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 265, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_UnevaluatedExpr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 265, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
      assert(__pyx_t_9);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
      __pyx_t_5 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_3};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 265, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 265, __pyx_L1_error)
    __pyx_v_r = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":264
 *     elif (symengine.is_a[symengine.Xor](deref(o))):
 *         r = Boolean.__new__(Xor)
 *     elif (symengine.is_a[symengine.UnevaluatedExpr](deref(o))):             # <<<<<<<<<<<<<<
 *         r = Function.__new__(UnevaluatedExpr)
 *     else:
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":267
 *         r = Function.__new__(UnevaluatedExpr)
 *     else:
 *         raise Exception("Unsupported SymEngine class.")             # <<<<<<<<<<<<<<
 *     r.thisptr = o
 *     return r
*/
  /*else*/ {
    __pyx_t_2 = NULL;
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Unsupported_SymEngine_class};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_Exception)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 267, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(0, 267, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "symengine/lib/symengine_wrapper.pyx":268
 *     else:
 *         raise Exception("Unsupported SymEngine class.")
 *     r.thisptr = o             # <<<<<<<<<<<<<<
 *     return r
 * 
*/
  __pyx_v_r->thisptr = __pyx_v_o;

  /* "symengine/lib/symengine_wrapper.pyx":269
 *         raise Exception("Unsupported SymEngine class.")
 *     r.thisptr = o
 *     return r             # <<<<<<<<<<<<<<
 * 
 * def sympy2symengine(a, raise_error=False):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_r);
  __pyx_r = ((PyObject *)__pyx_v_r);
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":47
 *     p_cap.m = v.thisptr
 * 
 * cdef object c2py(rcp_const_basic o):             # <<<<<<<<<<<<<<
 *     cdef Basic r
 *     cdef PyObject *obj
*/

  /* 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_9);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.c2py", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_r);
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":271
 *     return r
 * 
 * def sympy2symengine(a, raise_error=False):             # <<<<<<<<<<<<<<
 *     """
 *     Converts 'a' from SymPy to SymEngine.
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5sympy2symengine(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9symengine_3lib_17symengine_wrapper_4sympy2symengine, "\n    Converts 'a' from SymPy to SymEngine.\n\n    If the expression cannot be converted, it either returns None (if\n    raise_error==False) or raises a SympifyError exception (if\n    raise_error==True).\n    ");
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_5sympy2symengine = {"sympy2symengine", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_5sympy2symengine, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9symengine_3lib_17symengine_wrapper_4sympy2symengine};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5sympy2symengine(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_a = 0;
  PyObject *__pyx_v_raise_error = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("sympy2symengine (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_a,&__pyx_mstate_global->__pyx_n_u_raise_error,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 271, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 271, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 271, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "sympy2symengine", 0) < (0)) __PYX_ERR(0, 271, __pyx_L3_error)
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False)));
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("sympy2symengine", 0, 1, 2, i); __PYX_ERR(0, 271, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 271, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 271, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False)));
    }
    __pyx_v_a = values[0];
    __pyx_v_raise_error = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("sympy2symengine", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 271, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.sympy2symengine", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_4sympy2symengine(__pyx_self, __pyx_v_a, __pyx_v_raise_error);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_4sympy2symengine(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_a, PyObject *__pyx_v_raise_error) {
  PyObject *__pyx_v_sympy = NULL;
  PyObject *__pyx_v_sympy_AppliedUndef = NULL;
  PyObject *__pyx_v_x = NULL;
  PyObject *__pyx_v_y = NULL;
  PyObject *__pyx_v_name = NULL;
  PyObject *__pyx_v_row = NULL;
  PyObject *__pyx_v_col = NULL;
  PyObject *__pyx_v_v = NULL;
  PyObject *__pyx_v_r = NULL;
  PyObject *__pyx_v_e = NULL;
  PyObject *__pyx_7genexpr__pyx_v_x = NULL;
  PyObject *__pyx_8genexpr1__pyx_v_x = 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 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  size_t __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *(*__pyx_t_9)(PyObject *);
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  PyObject *(*__pyx_t_13)(PyObject *);
  Py_ssize_t __pyx_t_14;
  PyObject *(*__pyx_t_15)(PyObject *);
  int __pyx_t_16;
  PyObject *__pyx_t_17[5];
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("sympy2symengine", 0);

  /* "symengine/lib/symengine_wrapper.pyx":279
 *     raise_error==True).
 *     """
 *     import sympy             # <<<<<<<<<<<<<<
 *     from sympy.core.function import AppliedUndef as sympy_AppliedUndef
 *     if isinstance(a, sympy.Symbol):
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sympy, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 279, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sympy = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":280
 *     """
 *     import sympy
 *     from sympy.core.function import AppliedUndef as sympy_AppliedUndef             # <<<<<<<<<<<<<<
 *     if isinstance(a, sympy.Symbol):
 *         return Symbol(a.name)
*/
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_AppliedUndef};
    __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sympy_core_function, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 280, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_AppliedUndef};
    __pyx_t_3 = 0; {
      __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_1, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 280, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      switch (__pyx_t_3) {
        case 0:
        __Pyx_INCREF(__pyx_t_4);
        __pyx_v_sympy_AppliedUndef = __pyx_t_4;
        break;
        default:;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":281
 *     import sympy
 *     from sympy.core.function import AppliedUndef as sympy_AppliedUndef
 *     if isinstance(a, sympy.Symbol):             # <<<<<<<<<<<<<<
 *         return Symbol(a.name)
 *     elif isinstance(a, sympy.Dummy):
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_Symbol); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 281, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = PyObject_IsInstance(__pyx_v_a, __pyx_t_1); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 281, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":282
 *     from sympy.core.function import AppliedUndef as sympy_AppliedUndef
 *     if isinstance(a, sympy.Symbol):
 *         return Symbol(a.name)             # <<<<<<<<<<<<<<
 *     elif isinstance(a, sympy.Dummy):
 *         return Dummy(a.name)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = NULL;
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 282, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_6};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Symbol, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 282, __pyx_L1_error)
      __Pyx_GOTREF((PyObject *)__pyx_t_1);
    }
    __pyx_r = ((PyObject *)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":281
 *     import sympy
 *     from sympy.core.function import AppliedUndef as sympy_AppliedUndef
 *     if isinstance(a, sympy.Symbol):             # <<<<<<<<<<<<<<
 *         return Symbol(a.name)
 *     elif isinstance(a, sympy.Dummy):
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":283
 *     if isinstance(a, sympy.Symbol):
 *         return Symbol(a.name)
 *     elif isinstance(a, sympy.Dummy):             # <<<<<<<<<<<<<<
 *         return Dummy(a.name)
 *     elif isinstance(a, sympy.Mul):
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_Dummy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 283, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = PyObject_IsInstance(__pyx_v_a, __pyx_t_1); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 283, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":284
 *         return Symbol(a.name)
 *     elif isinstance(a, sympy.Dummy):
 *         return Dummy(a.name)             # <<<<<<<<<<<<<<
 *     elif isinstance(a, sympy.Mul):
 *         return mul(*[sympy2symengine(x, raise_error) for x in a.args])
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_6 = NULL;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 284, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_4};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Dummy, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 284, __pyx_L1_error)
      __Pyx_GOTREF((PyObject *)__pyx_t_1);
    }
    __pyx_r = ((PyObject *)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":283
 *     if isinstance(a, sympy.Symbol):
 *         return Symbol(a.name)
 *     elif isinstance(a, sympy.Dummy):             # <<<<<<<<<<<<<<
 *         return Dummy(a.name)
 *     elif isinstance(a, sympy.Mul):
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":285
 *     elif isinstance(a, sympy.Dummy):
 *         return Dummy(a.name)
 *     elif isinstance(a, sympy.Mul):             # <<<<<<<<<<<<<<
 *         return mul(*[sympy2symengine(x, raise_error) for x in a.args])
 *     elif isinstance(a, sympy.Add):
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_Mul); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 285, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = PyObject_IsInstance(__pyx_v_a, __pyx_t_1); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 285, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":286
 *         return Dummy(a.name)
 *     elif isinstance(a, sympy.Mul):
 *         return mul(*[sympy2symengine(x, raise_error) for x in a.args])             # <<<<<<<<<<<<<<
 *     elif isinstance(a, sympy.Add):
 *         return add(*[sympy2symengine(x, raise_error) for x in a.args])
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_mul); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 286, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    { /* enter inner scope */
      __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 286, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 286, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
        __pyx_t_8 = __pyx_t_6; __Pyx_INCREF(__pyx_t_8);
        __pyx_t_3 = 0;
        __pyx_t_9 = NULL;
      } else {
        __pyx_t_3 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 286, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_9 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 286, __pyx_L6_error)
      }
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      for (;;) {
        if (likely(!__pyx_t_9)) {
          if (likely(PyList_CheckExact(__pyx_t_8))) {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_8);
              #if !CYTHON_ASSUME_SAFE_SIZE
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 286, __pyx_L6_error)
              #endif
              if (__pyx_t_3 >= __pyx_temp) break;
            }
            __pyx_t_6 = __Pyx_PyList_GetItemRefFast(__pyx_t_8, __pyx_t_3, __Pyx_ReferenceSharing_OwnStrongReference);
            ++__pyx_t_3;
          } else {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_8);
              #if !CYTHON_ASSUME_SAFE_SIZE
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 286, __pyx_L6_error)
              #endif
              if (__pyx_t_3 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_6 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_3));
            #else
            __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_8, __pyx_t_3);
            #endif
            ++__pyx_t_3;
          }
          if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 286, __pyx_L6_error)
        } else {
          __pyx_t_6 = __pyx_t_9(__pyx_t_8);
          if (unlikely(!__pyx_t_6)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 286, __pyx_L6_error)
              PyErr_Clear();
            }
            break;
          }
        }
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_x, __pyx_t_6);
        __pyx_t_6 = 0;
        __pyx_t_10 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_sympy2symengine); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 286, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_7 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_11))) {
          __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_11);
          assert(__pyx_t_10);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_11);
          __Pyx_INCREF(__pyx_t_10);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_11, __pyx__function);
          __pyx_t_7 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[3] = {__pyx_t_10, __pyx_7genexpr__pyx_v_x, __pyx_v_raise_error};
          __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_11, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 286, __pyx_L6_error)
          __Pyx_GOTREF(__pyx_t_6);
        }
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 286, __pyx_L6_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_XDECREF(__pyx_7genexpr__pyx_v_x); __pyx_7genexpr__pyx_v_x = 0;
      goto __pyx_L10_exit_scope;
      __pyx_L6_error:;
      __Pyx_XDECREF(__pyx_7genexpr__pyx_v_x); __pyx_7genexpr__pyx_v_x = 0;
      goto __pyx_L1_error;
      __pyx_L10_exit_scope:;
    } /* exit inner scope */
    __pyx_t_8 = PySequence_Tuple(__pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 286, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 286, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":285
 *     elif isinstance(a, sympy.Dummy):
 *         return Dummy(a.name)
 *     elif isinstance(a, sympy.Mul):             # <<<<<<<<<<<<<<
 *         return mul(*[sympy2symengine(x, raise_error) for x in a.args])
 *     elif isinstance(a, sympy.Add):
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":287
 *     elif isinstance(a, sympy.Mul):
 *         return mul(*[sympy2symengine(x, raise_error) for x in a.args])
 *     elif isinstance(a, sympy.Add):             # <<<<<<<<<<<<<<
 *         return add(*[sympy2symengine(x, raise_error) for x in a.args])
 *     elif isinstance(a, (sympy.Pow, sympy.exp)):
*/
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_Add); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 287, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyObject_IsInstance(__pyx_v_a, __pyx_t_4); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 287, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":288
 *         return mul(*[sympy2symengine(x, raise_error) for x in a.args])
 *     elif isinstance(a, sympy.Add):
 *         return add(*[sympy2symengine(x, raise_error) for x in a.args])             # <<<<<<<<<<<<<<
 *     elif isinstance(a, (sympy.Pow, sympy.exp)):
 *         x, y = a.as_base_exp()
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_add); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 288, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    { /* enter inner scope */
      __pyx_t_8 = PyList_New(0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 288, __pyx_L13_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 288, __pyx_L13_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
        __pyx_t_6 = __pyx_t_1; __Pyx_INCREF(__pyx_t_6);
        __pyx_t_3 = 0;
        __pyx_t_9 = NULL;
      } else {
        __pyx_t_3 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 288, __pyx_L13_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_9 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 288, __pyx_L13_error)
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      for (;;) {
        if (likely(!__pyx_t_9)) {
          if (likely(PyList_CheckExact(__pyx_t_6))) {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_6);
              #if !CYTHON_ASSUME_SAFE_SIZE
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 288, __pyx_L13_error)
              #endif
              if (__pyx_t_3 >= __pyx_temp) break;
            }
            __pyx_t_1 = __Pyx_PyList_GetItemRefFast(__pyx_t_6, __pyx_t_3, __Pyx_ReferenceSharing_OwnStrongReference);
            ++__pyx_t_3;
          } else {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_6);
              #if !CYTHON_ASSUME_SAFE_SIZE
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 288, __pyx_L13_error)
              #endif
              if (__pyx_t_3 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_1 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_3));
            #else
            __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_6, __pyx_t_3);
            #endif
            ++__pyx_t_3;
          }
          if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 288, __pyx_L13_error)
        } else {
          __pyx_t_1 = __pyx_t_9(__pyx_t_6);
          if (unlikely(!__pyx_t_1)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 288, __pyx_L13_error)
              PyErr_Clear();
            }
            break;
          }
        }
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_XDECREF_SET(__pyx_8genexpr1__pyx_v_x, __pyx_t_1);
        __pyx_t_1 = 0;
        __pyx_t_11 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_sympy2symengine); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 288, __pyx_L13_error)
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_7 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_10))) {
          __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_10);
          assert(__pyx_t_11);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_10);
          __Pyx_INCREF(__pyx_t_11);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_10, __pyx__function);
          __pyx_t_7 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[3] = {__pyx_t_11, __pyx_8genexpr1__pyx_v_x, __pyx_v_raise_error};
          __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_10, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 288, __pyx_L13_error)
          __Pyx_GOTREF(__pyx_t_1);
        }
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_8, (PyObject*)__pyx_t_1))) __PYX_ERR(0, 288, __pyx_L13_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      }
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_x); __pyx_8genexpr1__pyx_v_x = 0;
      goto __pyx_L17_exit_scope;
      __pyx_L13_error:;
      __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_x); __pyx_8genexpr1__pyx_v_x = 0;
      goto __pyx_L1_error;
      __pyx_L17_exit_scope:;
    } /* exit inner scope */
    __pyx_t_6 = PySequence_Tuple(__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 288, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 288, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_r = __pyx_t_8;
    __pyx_t_8 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":287
 *     elif isinstance(a, sympy.Mul):
 *         return mul(*[sympy2symengine(x, raise_error) for x in a.args])
 *     elif isinstance(a, sympy.Add):             # <<<<<<<<<<<<<<
 *         return add(*[sympy2symengine(x, raise_error) for x in a.args])
 *     elif isinstance(a, (sympy.Pow, sympy.exp)):
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":289
 *     elif isinstance(a, sympy.Add):
 *         return add(*[sympy2symengine(x, raise_error) for x in a.args])
 *     elif isinstance(a, (sympy.Pow, sympy.exp)):             # <<<<<<<<<<<<<<
 *         x, y = a.as_base_exp()
 *         return sympy2symengine(x, raise_error) ** sympy2symengine(y, raise_error)
*/
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_Pow); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 289, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_exp); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 289, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_12 = PyObject_IsInstance(__pyx_v_a, __pyx_t_8); 
  if (!__pyx_t_12) {
  } else {
    __pyx_t_5 = __pyx_t_12;
    goto __pyx_L18_bool_binop_done;
  }
  __pyx_t_12 = PyObject_IsInstance(__pyx_v_a, __pyx_t_6); 
  __pyx_t_5 = __pyx_t_12;
  __pyx_L18_bool_binop_done:;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":290
 *         return add(*[sympy2symengine(x, raise_error) for x in a.args])
 *     elif isinstance(a, (sympy.Pow, sympy.exp)):
 *         x, y = a.as_base_exp()             # <<<<<<<<<<<<<<
 *         return sympy2symengine(x, raise_error) ** sympy2symengine(y, raise_error)
 *     elif isinstance(a, sympy.Integer):
*/
    __pyx_t_6 = __pyx_v_a;
    __Pyx_INCREF(__pyx_t_6);
    __pyx_t_7 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
      __pyx_t_8 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_as_base_exp, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 290, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_8))) || (PyList_CheckExact(__pyx_t_8))) {
      PyObject* sequence = __pyx_t_8;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 290, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0);
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1);
        __Pyx_INCREF(__pyx_t_4);
      } else {
        __pyx_t_6 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference);
        if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 290, __pyx_L1_error)
        __Pyx_XGOTREF(__pyx_t_6);
        __pyx_t_4 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference);
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 290, __pyx_L1_error)
        __Pyx_XGOTREF(__pyx_t_4);
      }
      #else
      __pyx_t_6 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 290, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 290, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      #endif
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_1 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 290, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_13 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1);
      index = 0; __pyx_t_6 = __pyx_t_13(__pyx_t_1); if (unlikely(!__pyx_t_6)) goto __pyx_L20_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_6);
      index = 1; __pyx_t_4 = __pyx_t_13(__pyx_t_1); if (unlikely(!__pyx_t_4)) goto __pyx_L20_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_4);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_1), 2) < (0)) __PYX_ERR(0, 290, __pyx_L1_error)
      __pyx_t_13 = NULL;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L21_unpacking_done;
      __pyx_L20_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_13 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 290, __pyx_L1_error)
      __pyx_L21_unpacking_done:;
    }
    __pyx_v_x = __pyx_t_6;
    __pyx_t_6 = 0;
    __pyx_v_y = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":291
 *     elif isinstance(a, (sympy.Pow, sympy.exp)):
 *         x, y = a.as_base_exp()
 *         return sympy2symengine(x, raise_error) ** sympy2symengine(y, raise_error)             # <<<<<<<<<<<<<<
 *     elif isinstance(a, sympy.Integer):
 *         return Integer(a.p)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_sympy2symengine); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 291, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
      assert(__pyx_t_4);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
      __pyx_t_7 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_v_x, __pyx_v_raise_error};
      __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 291, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
    }
    __pyx_t_4 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_sympy2symengine); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 291, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_7 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
      assert(__pyx_t_4);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_1, __pyx__function);
      __pyx_t_7 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_v_y, __pyx_v_raise_error};
      __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_1, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 291, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
    }
    __pyx_t_1 = PyNumber_Power(__pyx_t_8, __pyx_t_6, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 291, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":289
 *     elif isinstance(a, sympy.Add):
 *         return add(*[sympy2symengine(x, raise_error) for x in a.args])
 *     elif isinstance(a, (sympy.Pow, sympy.exp)):             # <<<<<<<<<<<<<<
 *         x, y = a.as_base_exp()
 *         return sympy2symengine(x, raise_error) ** sympy2symengine(y, raise_error)
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":292
 *         x, y = a.as_base_exp()
 *         return sympy2symengine(x, raise_error) ** sympy2symengine(y, raise_error)
 *     elif isinstance(a, sympy.Integer):             # <<<<<<<<<<<<<<
 *         return Integer(a.p)
 *     elif isinstance(a, sympy.Rational):
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_Integer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 292, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = PyObject_IsInstance(__pyx_v_a, __pyx_t_1); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 292, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":293
 *         return sympy2symengine(x, raise_error) ** sympy2symengine(y, raise_error)
 *     elif isinstance(a, sympy.Integer):
 *         return Integer(a.p)             # <<<<<<<<<<<<<<
 *     elif isinstance(a, sympy.Rational):
 *         return Integer(a.p) / Integer(a.q)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_6 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_Integer); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 293, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_mstate_global->__pyx_n_u_p); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 293, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_7 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8);
      assert(__pyx_t_6);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_8, __pyx__function);
      __pyx_t_7 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_4};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 293, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":292
 *         x, y = a.as_base_exp()
 *         return sympy2symengine(x, raise_error) ** sympy2symengine(y, raise_error)
 *     elif isinstance(a, sympy.Integer):             # <<<<<<<<<<<<<<
 *         return Integer(a.p)
 *     elif isinstance(a, sympy.Rational):
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":294
 *     elif isinstance(a, sympy.Integer):
 *         return Integer(a.p)
 *     elif isinstance(a, sympy.Rational):             # <<<<<<<<<<<<<<
 *         return Integer(a.p) / Integer(a.q)
 *     elif isinstance(a, sympy.Float):
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_Rational); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 294, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = PyObject_IsInstance(__pyx_v_a, __pyx_t_1); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 294, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":295
 *         return Integer(a.p)
 *     elif isinstance(a, sympy.Rational):
 *         return Integer(a.p) / Integer(a.q)             # <<<<<<<<<<<<<<
 *     elif isinstance(a, sympy.Float):
 *         if a._prec > 53:
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_8 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Integer); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 295, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_mstate_global->__pyx_n_u_p); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 295, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
      assert(__pyx_t_8);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
      __pyx_t_7 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_6};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 295, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __pyx_t_6 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_Integer); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 295, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_mstate_global->__pyx_n_u_q); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 295, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_7 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8);
      assert(__pyx_t_6);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_8, __pyx__function);
      __pyx_t_7 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_10};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 295, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    __pyx_t_8 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 295, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_r = __pyx_t_8;
    __pyx_t_8 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":294
 *     elif isinstance(a, sympy.Integer):
 *         return Integer(a.p)
 *     elif isinstance(a, sympy.Rational):             # <<<<<<<<<<<<<<
 *         return Integer(a.p) / Integer(a.q)
 *     elif isinstance(a, sympy.Float):
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":296
 *     elif isinstance(a, sympy.Rational):
 *         return Integer(a.p) / Integer(a.q)
 *     elif isinstance(a, sympy.Float):             # <<<<<<<<<<<<<<
 *         if a._prec > 53:
 *             return RealMPFR(str(a), a._prec)
*/
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_Float); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 296, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_5 = PyObject_IsInstance(__pyx_v_a, __pyx_t_8); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 296, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":297
 *         return Integer(a.p) / Integer(a.q)
 *     elif isinstance(a, sympy.Float):
 *         if a._prec > 53:             # <<<<<<<<<<<<<<
 *             return RealMPFR(str(a), a._prec)
 *         else:
*/
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_mstate_global->__pyx_n_u_prec); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 297, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_4 = PyObject_RichCompare(__pyx_t_8, __pyx_mstate_global->__pyx_int_53, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 297, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 297, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_5) {

      /* "symengine/lib/symengine_wrapper.pyx":298
 *     elif isinstance(a, sympy.Float):
 *         if a._prec > 53:
 *             return RealMPFR(str(a), a._prec)             # <<<<<<<<<<<<<<
 *         else:
 *             return RealDouble(float(a))
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_8 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_RealMPFR); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 298, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_10 = __Pyx_PyObject_Unicode(__pyx_v_a); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 298, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_mstate_global->__pyx_n_u_prec); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 298, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_1);
        assert(__pyx_t_8);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_1, __pyx__function);
        __pyx_t_7 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_8, __pyx_t_10, __pyx_t_6};
        __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_1, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 298, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
      }
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L0;

      /* "symengine/lib/symengine_wrapper.pyx":297
 *         return Integer(a.p) / Integer(a.q)
 *     elif isinstance(a, sympy.Float):
 *         if a._prec > 53:             # <<<<<<<<<<<<<<
 *             return RealMPFR(str(a), a._prec)
 *         else:
*/
    }

    /* "symengine/lib/symengine_wrapper.pyx":300
 *             return RealMPFR(str(a), a._prec)
 *         else:
 *             return RealDouble(float(a))             # <<<<<<<<<<<<<<
 *     elif a is sympy.I:
 *         return I
*/
    /*else*/ {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_RealDouble); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 300, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_10 = __Pyx_PyNumber_Float(__pyx_v_a); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 300, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_7 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
        assert(__pyx_t_1);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
        __pyx_t_7 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_10};
        __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 300, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
      }
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L0;
    }

    /* "symengine/lib/symengine_wrapper.pyx":296
 *     elif isinstance(a, sympy.Rational):
 *         return Integer(a.p) / Integer(a.q)
 *     elif isinstance(a, sympy.Float):             # <<<<<<<<<<<<<<
 *         if a._prec > 53:
 *             return RealMPFR(str(a), a._prec)
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":301
 *         else:
 *             return RealDouble(float(a))
 *     elif a is sympy.I:             # <<<<<<<<<<<<<<
 *         return I
 *     elif a is sympy.E:
*/
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_I); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 301, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = (__pyx_v_a == __pyx_t_4);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":302
 *             return RealDouble(float(a))
 *     elif a is sympy.I:
 *         return I             # <<<<<<<<<<<<<<
 *     elif a is sympy.E:
 *         return E
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_I); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 302, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":301
 *         else:
 *             return RealDouble(float(a))
 *     elif a is sympy.I:             # <<<<<<<<<<<<<<
 *         return I
 *     elif a is sympy.E:
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":303
 *     elif a is sympy.I:
 *         return I
 *     elif a is sympy.E:             # <<<<<<<<<<<<<<
 *         return E
 *     elif a is sympy.pi:
*/
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_E); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 303, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = (__pyx_v_a == __pyx_t_4);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":304
 *         return I
 *     elif a is sympy.E:
 *         return E             # <<<<<<<<<<<<<<
 *     elif a is sympy.pi:
 *         return pi
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_E); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 304, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":303
 *     elif a is sympy.I:
 *         return I
 *     elif a is sympy.E:             # <<<<<<<<<<<<<<
 *         return E
 *     elif a is sympy.pi:
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":305
 *     elif a is sympy.E:
 *         return E
 *     elif a is sympy.pi:             # <<<<<<<<<<<<<<
 *         return pi
 *     elif a is sympy.GoldenRatio:
*/
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_pi); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 305, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = (__pyx_v_a == __pyx_t_4);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":306
 *         return E
 *     elif a is sympy.pi:
 *         return pi             # <<<<<<<<<<<<<<
 *     elif a is sympy.GoldenRatio:
 *         return golden_ratio
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_pi); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 306, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":305
 *     elif a is sympy.E:
 *         return E
 *     elif a is sympy.pi:             # <<<<<<<<<<<<<<
 *         return pi
 *     elif a is sympy.GoldenRatio:
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":307
 *     elif a is sympy.pi:
 *         return pi
 *     elif a is sympy.GoldenRatio:             # <<<<<<<<<<<<<<
 *         return golden_ratio
 *     elif a is sympy.Catalan:
*/
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_GoldenRatio); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 307, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = (__pyx_v_a == __pyx_t_4);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":308
 *         return pi
 *     elif a is sympy.GoldenRatio:
 *         return golden_ratio             # <<<<<<<<<<<<<<
 *     elif a is sympy.Catalan:
 *         return catalan
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_golden_ratio); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 308, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":307
 *     elif a is sympy.pi:
 *         return pi
 *     elif a is sympy.GoldenRatio:             # <<<<<<<<<<<<<<
 *         return golden_ratio
 *     elif a is sympy.Catalan:
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":309
 *     elif a is sympy.GoldenRatio:
 *         return golden_ratio
 *     elif a is sympy.Catalan:             # <<<<<<<<<<<<<<
 *         return catalan
 *     elif a is sympy.EulerGamma:
*/
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_Catalan); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 309, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = (__pyx_v_a == __pyx_t_4);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":310
 *         return golden_ratio
 *     elif a is sympy.Catalan:
 *         return catalan             # <<<<<<<<<<<<<<
 *     elif a is sympy.EulerGamma:
 *         return eulergamma
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_catalan); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 310, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":309
 *     elif a is sympy.GoldenRatio:
 *         return golden_ratio
 *     elif a is sympy.Catalan:             # <<<<<<<<<<<<<<
 *         return catalan
 *     elif a is sympy.EulerGamma:
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":311
 *     elif a is sympy.Catalan:
 *         return catalan
 *     elif a is sympy.EulerGamma:             # <<<<<<<<<<<<<<
 *         return eulergamma
 *     elif a is sympy.S.NegativeInfinity:
*/
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_EulerGamma); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 311, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = (__pyx_v_a == __pyx_t_4);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":312
 *         return catalan
 *     elif a is sympy.EulerGamma:
 *         return eulergamma             # <<<<<<<<<<<<<<
 *     elif a is sympy.S.NegativeInfinity:
 *         return minus_oo
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_eulergamma); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 312, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":311
 *     elif a is sympy.Catalan:
 *         return catalan
 *     elif a is sympy.EulerGamma:             # <<<<<<<<<<<<<<
 *         return eulergamma
 *     elif a is sympy.S.NegativeInfinity:
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":313
 *     elif a is sympy.EulerGamma:
 *         return eulergamma
 *     elif a is sympy.S.NegativeInfinity:             # <<<<<<<<<<<<<<
 *         return minus_oo
 *     elif a is sympy.S.Infinity:
*/
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_S); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 313, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_NegativeInfinity); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 313, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_5 = (__pyx_v_a == __pyx_t_6);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":314
 *         return eulergamma
 *     elif a is sympy.S.NegativeInfinity:
 *         return minus_oo             # <<<<<<<<<<<<<<
 *     elif a is sympy.S.Infinity:
 *         return oo
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_minus_oo); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 314, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":313
 *     elif a is sympy.EulerGamma:
 *         return eulergamma
 *     elif a is sympy.S.NegativeInfinity:             # <<<<<<<<<<<<<<
 *         return minus_oo
 *     elif a is sympy.S.Infinity:
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":315
 *     elif a is sympy.S.NegativeInfinity:
 *         return minus_oo
 *     elif a is sympy.S.Infinity:             # <<<<<<<<<<<<<<
 *         return oo
 *     elif a is sympy.S.ComplexInfinity:
*/
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_S); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 315, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_Infinity); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 315, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_5 = (__pyx_v_a == __pyx_t_4);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":316
 *         return minus_oo
 *     elif a is sympy.S.Infinity:
 *         return oo             # <<<<<<<<<<<<<<
 *     elif a is sympy.S.ComplexInfinity:
 *         return zoo
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_oo); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 316, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":315
 *     elif a is sympy.S.NegativeInfinity:
 *         return minus_oo
 *     elif a is sympy.S.Infinity:             # <<<<<<<<<<<<<<
 *         return oo
 *     elif a is sympy.S.ComplexInfinity:
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":317
 *     elif a is sympy.S.Infinity:
 *         return oo
 *     elif a is sympy.S.ComplexInfinity:             # <<<<<<<<<<<<<<
 *         return zoo
 *     elif a is sympy.nan:
*/
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_S); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 317, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ComplexInfinity); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 317, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_5 = (__pyx_v_a == __pyx_t_6);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":318
 *         return oo
 *     elif a is sympy.S.ComplexInfinity:
 *         return zoo             # <<<<<<<<<<<<<<
 *     elif a is sympy.nan:
 *         return nan
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_zoo); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 318, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":317
 *     elif a is sympy.S.Infinity:
 *         return oo
 *     elif a is sympy.S.ComplexInfinity:             # <<<<<<<<<<<<<<
 *         return zoo
 *     elif a is sympy.nan:
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":319
 *     elif a is sympy.S.ComplexInfinity:
 *         return zoo
 *     elif a is sympy.nan:             # <<<<<<<<<<<<<<
 *         return nan
 *     elif a is sympy.S.true:
*/
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_nan); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 319, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = (__pyx_v_a == __pyx_t_6);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":320
 *         return zoo
 *     elif a is sympy.nan:
 *         return nan             # <<<<<<<<<<<<<<
 *     elif a is sympy.S.true:
 *         return true
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_nan); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 320, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":319
 *     elif a is sympy.S.ComplexInfinity:
 *         return zoo
 *     elif a is sympy.nan:             # <<<<<<<<<<<<<<
 *         return nan
 *     elif a is sympy.S.true:
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":321
 *     elif a is sympy.nan:
 *         return nan
 *     elif a is sympy.S.true:             # <<<<<<<<<<<<<<
 *         return true
 *     elif a is sympy.S.false:
*/
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_S); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 321, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_true); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 321, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_5 = (__pyx_v_a == __pyx_t_4);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":322
 *         return nan
 *     elif a is sympy.S.true:
 *         return true             # <<<<<<<<<<<<<<
 *     elif a is sympy.S.false:
 *         return false
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_true); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 322, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":321
 *     elif a is sympy.nan:
 *         return nan
 *     elif a is sympy.S.true:             # <<<<<<<<<<<<<<
 *         return true
 *     elif a is sympy.S.false:
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":323
 *     elif a is sympy.S.true:
 *         return true
 *     elif a is sympy.S.false:             # <<<<<<<<<<<<<<
 *         return false
 *     elif isinstance(a, sympy.functions.elementary.trigonometric.TrigonometricFunction):
*/
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_S); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 323, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_false); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 323, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_5 = (__pyx_v_a == __pyx_t_6);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":324
 *         return true
 *     elif a is sympy.S.false:
 *         return false             # <<<<<<<<<<<<<<
 *     elif isinstance(a, sympy.functions.elementary.trigonometric.TrigonometricFunction):
 *         if isinstance(a, sympy.sin):
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_false); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 324, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":323
 *     elif a is sympy.S.true:
 *         return true
 *     elif a is sympy.S.false:             # <<<<<<<<<<<<<<
 *         return false
 *     elif isinstance(a, sympy.functions.elementary.trigonometric.TrigonometricFunction):
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":325
 *     elif a is sympy.S.false:
 *         return false
 *     elif isinstance(a, sympy.functions.elementary.trigonometric.TrigonometricFunction):             # <<<<<<<<<<<<<<
 *         if isinstance(a, sympy.sin):
 *             return sin(a.args[0])
*/
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_functions); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 325, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_elementary); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 325, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_trigonometric); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 325, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_TrigonometricFunction); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 325, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_5 = PyObject_IsInstance(__pyx_v_a, __pyx_t_4); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 325, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":326
 *         return false
 *     elif isinstance(a, sympy.functions.elementary.trigonometric.TrigonometricFunction):
 *         if isinstance(a, sympy.sin):             # <<<<<<<<<<<<<<
 *             return sin(a.args[0])
 *         elif isinstance(a, sympy.cos):
*/
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_sin); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 326, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyObject_IsInstance(__pyx_v_a, __pyx_t_4); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 326, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_5) {

      /* "symengine/lib/symengine_wrapper.pyx":327
 *     elif isinstance(a, sympy.functions.elementary.trigonometric.TrigonometricFunction):
 *         if isinstance(a, sympy.sin):
 *             return sin(a.args[0])             # <<<<<<<<<<<<<<
 *         elif isinstance(a, sympy.cos):
 *             return cos(a.args[0])
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_6 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_sin); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 327, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 327, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 327, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_7 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_10))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_10);
        assert(__pyx_t_6);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_10);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_10, __pyx__function);
        __pyx_t_7 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_8};
        __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_10, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 327, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
      }
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L0;

      /* "symengine/lib/symengine_wrapper.pyx":326
 *         return false
 *     elif isinstance(a, sympy.functions.elementary.trigonometric.TrigonometricFunction):
 *         if isinstance(a, sympy.sin):             # <<<<<<<<<<<<<<
 *             return sin(a.args[0])
 *         elif isinstance(a, sympy.cos):
*/
    }

    /* "symengine/lib/symengine_wrapper.pyx":328
 *         if isinstance(a, sympy.sin):
 *             return sin(a.args[0])
 *         elif isinstance(a, sympy.cos):             # <<<<<<<<<<<<<<
 *             return cos(a.args[0])
 *         elif isinstance(a, sympy.tan):
*/
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_cos); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 328, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyObject_IsInstance(__pyx_v_a, __pyx_t_4); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 328, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_5) {

      /* "symengine/lib/symengine_wrapper.pyx":329
 *             return sin(a.args[0])
 *         elif isinstance(a, sympy.cos):
 *             return cos(a.args[0])             # <<<<<<<<<<<<<<
 *         elif isinstance(a, sympy.tan):
 *             return tan(a.args[0])
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_10 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_cos); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 329, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 329, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_6, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 329, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_7 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_8))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_8);
        assert(__pyx_t_10);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_10);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_8, __pyx__function);
        __pyx_t_7 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_1};
        __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 329, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
      }
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L0;

      /* "symengine/lib/symengine_wrapper.pyx":328
 *         if isinstance(a, sympy.sin):
 *             return sin(a.args[0])
 *         elif isinstance(a, sympy.cos):             # <<<<<<<<<<<<<<
 *             return cos(a.args[0])
 *         elif isinstance(a, sympy.tan):
*/
    }

    /* "symengine/lib/symengine_wrapper.pyx":330
 *         elif isinstance(a, sympy.cos):
 *             return cos(a.args[0])
 *         elif isinstance(a, sympy.tan):             # <<<<<<<<<<<<<<
 *             return tan(a.args[0])
 *         elif isinstance(a, sympy.cot):
*/
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_tan); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 330, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyObject_IsInstance(__pyx_v_a, __pyx_t_4); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 330, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_5) {

      /* "symengine/lib/symengine_wrapper.pyx":331
 *             return cos(a.args[0])
 *         elif isinstance(a, sympy.tan):
 *             return tan(a.args[0])             # <<<<<<<<<<<<<<
 *         elif isinstance(a, sympy.cot):
 *             return cot(a.args[0])
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_8 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_tan); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 331, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 331, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_10, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 331, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_7 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_1);
        assert(__pyx_t_8);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_1, __pyx__function);
        __pyx_t_7 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_6};
        __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_1, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 331, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
      }
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L0;

      /* "symengine/lib/symengine_wrapper.pyx":330
 *         elif isinstance(a, sympy.cos):
 *             return cos(a.args[0])
 *         elif isinstance(a, sympy.tan):             # <<<<<<<<<<<<<<
 *             return tan(a.args[0])
 *         elif isinstance(a, sympy.cot):
*/
    }

    /* "symengine/lib/symengine_wrapper.pyx":332
 *         elif isinstance(a, sympy.tan):
 *             return tan(a.args[0])
 *         elif isinstance(a, sympy.cot):             # <<<<<<<<<<<<<<
 *             return cot(a.args[0])
 *         elif isinstance(a, sympy.csc):
*/
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_cot); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 332, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyObject_IsInstance(__pyx_v_a, __pyx_t_4); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 332, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_5) {

      /* "symengine/lib/symengine_wrapper.pyx":333
 *             return tan(a.args[0])
 *         elif isinstance(a, sympy.cot):
 *             return cot(a.args[0])             # <<<<<<<<<<<<<<
 *         elif isinstance(a, sympy.csc):
 *             return csc(a.args[0])
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_cot); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 333, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 333, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_10 = __Pyx_GetItemInt(__pyx_t_8, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 333, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_7 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
        assert(__pyx_t_1);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
        __pyx_t_7 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_10};
        __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 333, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
      }
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L0;

      /* "symengine/lib/symengine_wrapper.pyx":332
 *         elif isinstance(a, sympy.tan):
 *             return tan(a.args[0])
 *         elif isinstance(a, sympy.cot):             # <<<<<<<<<<<<<<
 *             return cot(a.args[0])
 *         elif isinstance(a, sympy.csc):
*/
    }

    /* "symengine/lib/symengine_wrapper.pyx":334
 *         elif isinstance(a, sympy.cot):
 *             return cot(a.args[0])
 *         elif isinstance(a, sympy.csc):             # <<<<<<<<<<<<<<
 *             return csc(a.args[0])
 *         elif isinstance(a, sympy.sec):
*/
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_csc); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 334, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyObject_IsInstance(__pyx_v_a, __pyx_t_4); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 334, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_5) {

      /* "symengine/lib/symengine_wrapper.pyx":335
 *             return cot(a.args[0])
 *         elif isinstance(a, sympy.csc):
 *             return csc(a.args[0])             # <<<<<<<<<<<<<<
 *         elif isinstance(a, sympy.sec):
 *             return sec(a.args[0])
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_6 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_csc); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 335, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 335, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 335, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_7 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_10))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_10);
        assert(__pyx_t_6);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_10);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_10, __pyx__function);
        __pyx_t_7 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_8};
        __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_10, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 335, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
      }
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L0;

      /* "symengine/lib/symengine_wrapper.pyx":334
 *         elif isinstance(a, sympy.cot):
 *             return cot(a.args[0])
 *         elif isinstance(a, sympy.csc):             # <<<<<<<<<<<<<<
 *             return csc(a.args[0])
 *         elif isinstance(a, sympy.sec):
*/
    }

    /* "symengine/lib/symengine_wrapper.pyx":336
 *         elif isinstance(a, sympy.csc):
 *             return csc(a.args[0])
 *         elif isinstance(a, sympy.sec):             # <<<<<<<<<<<<<<
 *             return sec(a.args[0])
 *     elif isinstance(a, sympy.functions.elementary.trigonometric.InverseTrigonometricFunction):
*/
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_sec); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 336, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyObject_IsInstance(__pyx_v_a, __pyx_t_4); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 336, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_5) {

      /* "symengine/lib/symengine_wrapper.pyx":337
 *             return csc(a.args[0])
 *         elif isinstance(a, sympy.sec):
 *             return sec(a.args[0])             # <<<<<<<<<<<<<<
 *     elif isinstance(a, sympy.functions.elementary.trigonometric.InverseTrigonometricFunction):
 *         if isinstance(a, sympy.asin):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_10 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_sec); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 337, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 337, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_6, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 337, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_7 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_8))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_8);
        assert(__pyx_t_10);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_10);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_8, __pyx__function);
        __pyx_t_7 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_1};
        __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 337, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
      }
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L0;

      /* "symengine/lib/symengine_wrapper.pyx":336
 *         elif isinstance(a, sympy.csc):
 *             return csc(a.args[0])
 *         elif isinstance(a, sympy.sec):             # <<<<<<<<<<<<<<
 *             return sec(a.args[0])
 *     elif isinstance(a, sympy.functions.elementary.trigonometric.InverseTrigonometricFunction):
*/
    }

    /* "symengine/lib/symengine_wrapper.pyx":325
 *     elif a is sympy.S.false:
 *         return false
 *     elif isinstance(a, sympy.functions.elementary.trigonometric.TrigonometricFunction):             # <<<<<<<<<<<<<<
 *         if isinstance(a, sympy.sin):
 *             return sin(a.args[0])
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":338
 *         elif isinstance(a, sympy.sec):
 *             return sec(a.args[0])
 *     elif isinstance(a, sympy.functions.elementary.trigonometric.InverseTrigonometricFunction):             # <<<<<<<<<<<<<<
 *         if isinstance(a, sympy.asin):
 *             return asin(a.args[0])
*/
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_functions); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 338, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_elementary); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 338, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_trigonometric); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 338, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_InverseTrigonometricFunction); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 338, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_5 = PyObject_IsInstance(__pyx_v_a, __pyx_t_8); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 338, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":339
 *             return sec(a.args[0])
 *     elif isinstance(a, sympy.functions.elementary.trigonometric.InverseTrigonometricFunction):
 *         if isinstance(a, sympy.asin):             # <<<<<<<<<<<<<<
 *             return asin(a.args[0])
 *         elif isinstance(a, sympy.acos):
*/
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_asin); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 339, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_5 = PyObject_IsInstance(__pyx_v_a, __pyx_t_8); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 339, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (__pyx_t_5) {

      /* "symengine/lib/symengine_wrapper.pyx":340
 *     elif isinstance(a, sympy.functions.elementary.trigonometric.InverseTrigonometricFunction):
 *         if isinstance(a, sympy.asin):
 *             return asin(a.args[0])             # <<<<<<<<<<<<<<
 *         elif isinstance(a, sympy.acos):
 *             return acos(a.args[0])
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_4 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_asin); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 340, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 340, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_10, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 340, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_7 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
        assert(__pyx_t_4);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_1, __pyx__function);
        __pyx_t_7 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_6};
        __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_1, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 340, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
      }
      __pyx_r = __pyx_t_8;
      __pyx_t_8 = 0;
      goto __pyx_L0;

      /* "symengine/lib/symengine_wrapper.pyx":339
 *             return sec(a.args[0])
 *     elif isinstance(a, sympy.functions.elementary.trigonometric.InverseTrigonometricFunction):
 *         if isinstance(a, sympy.asin):             # <<<<<<<<<<<<<<
 *             return asin(a.args[0])
 *         elif isinstance(a, sympy.acos):
*/
    }

    /* "symengine/lib/symengine_wrapper.pyx":341
 *         if isinstance(a, sympy.asin):
 *             return asin(a.args[0])
 *         elif isinstance(a, sympy.acos):             # <<<<<<<<<<<<<<
 *             return acos(a.args[0])
 *         elif isinstance(a, sympy.atan):
*/
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_acos); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 341, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_5 = PyObject_IsInstance(__pyx_v_a, __pyx_t_8); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 341, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (__pyx_t_5) {

      /* "symengine/lib/symengine_wrapper.pyx":342
 *             return asin(a.args[0])
 *         elif isinstance(a, sympy.acos):
 *             return acos(a.args[0])             # <<<<<<<<<<<<<<
 *         elif isinstance(a, sympy.atan):
 *             return atan(a.args[0])
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_acos); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 342, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 342, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_10 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 342, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_7 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
        assert(__pyx_t_1);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
        __pyx_t_7 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_10};
        __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 342, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
      }
      __pyx_r = __pyx_t_8;
      __pyx_t_8 = 0;
      goto __pyx_L0;

      /* "symengine/lib/symengine_wrapper.pyx":341
 *         if isinstance(a, sympy.asin):
 *             return asin(a.args[0])
 *         elif isinstance(a, sympy.acos):             # <<<<<<<<<<<<<<
 *             return acos(a.args[0])
 *         elif isinstance(a, sympy.atan):
*/
    }

    /* "symengine/lib/symengine_wrapper.pyx":343
 *         elif isinstance(a, sympy.acos):
 *             return acos(a.args[0])
 *         elif isinstance(a, sympy.atan):             # <<<<<<<<<<<<<<
 *             return atan(a.args[0])
 *         elif isinstance(a, sympy.acot):
*/
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_atan); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 343, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_5 = PyObject_IsInstance(__pyx_v_a, __pyx_t_8); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 343, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (__pyx_t_5) {

      /* "symengine/lib/symengine_wrapper.pyx":344
 *             return acos(a.args[0])
 *         elif isinstance(a, sympy.atan):
 *             return atan(a.args[0])             # <<<<<<<<<<<<<<
 *         elif isinstance(a, sympy.acot):
 *             return acot(a.args[0])
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_6 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_atan); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 344, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 344, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 344, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_7 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_10))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_10);
        assert(__pyx_t_6);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_10);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_10, __pyx__function);
        __pyx_t_7 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_4};
        __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_10, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 344, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
      }
      __pyx_r = __pyx_t_8;
      __pyx_t_8 = 0;
      goto __pyx_L0;

      /* "symengine/lib/symengine_wrapper.pyx":343
 *         elif isinstance(a, sympy.acos):
 *             return acos(a.args[0])
 *         elif isinstance(a, sympy.atan):             # <<<<<<<<<<<<<<
 *             return atan(a.args[0])
 *         elif isinstance(a, sympy.acot):
*/
    }

    /* "symengine/lib/symengine_wrapper.pyx":345
 *         elif isinstance(a, sympy.atan):
 *             return atan(a.args[0])
 *         elif isinstance(a, sympy.acot):             # <<<<<<<<<<<<<<
 *             return acot(a.args[0])
 *         elif isinstance(a, sympy.acsc):
*/
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_acot); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 345, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_5 = PyObject_IsInstance(__pyx_v_a, __pyx_t_8); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 345, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (__pyx_t_5) {

      /* "symengine/lib/symengine_wrapper.pyx":346
 *             return atan(a.args[0])
 *         elif isinstance(a, sympy.acot):
 *             return acot(a.args[0])             # <<<<<<<<<<<<<<
 *         elif isinstance(a, sympy.acsc):
 *             return acsc(a.args[0])
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_10 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_acot); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 346, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 346, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_6, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 346, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_7 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_4);
        assert(__pyx_t_10);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_10);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
        __pyx_t_7 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_1};
        __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 346, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
      }
      __pyx_r = __pyx_t_8;
      __pyx_t_8 = 0;
      goto __pyx_L0;

      /* "symengine/lib/symengine_wrapper.pyx":345
 *         elif isinstance(a, sympy.atan):
 *             return atan(a.args[0])
 *         elif isinstance(a, sympy.acot):             # <<<<<<<<<<<<<<
 *             return acot(a.args[0])
 *         elif isinstance(a, sympy.acsc):
*/
    }

    /* "symengine/lib/symengine_wrapper.pyx":347
 *         elif isinstance(a, sympy.acot):
 *             return acot(a.args[0])
 *         elif isinstance(a, sympy.acsc):             # <<<<<<<<<<<<<<
 *             return acsc(a.args[0])
 *         elif isinstance(a, sympy.asec):
*/
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_acsc); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 347, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_5 = PyObject_IsInstance(__pyx_v_a, __pyx_t_8); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 347, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (__pyx_t_5) {

      /* "symengine/lib/symengine_wrapper.pyx":348
 *             return acot(a.args[0])
 *         elif isinstance(a, sympy.acsc):
 *             return acsc(a.args[0])             # <<<<<<<<<<<<<<
 *         elif isinstance(a, sympy.asec):
 *             return asec(a.args[0])
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_4 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_acsc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 348, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 348, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_10, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 348, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_7 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
        assert(__pyx_t_4);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_1, __pyx__function);
        __pyx_t_7 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_6};
        __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_1, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 348, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
      }
      __pyx_r = __pyx_t_8;
      __pyx_t_8 = 0;
      goto __pyx_L0;

      /* "symengine/lib/symengine_wrapper.pyx":347
 *         elif isinstance(a, sympy.acot):
 *             return acot(a.args[0])
 *         elif isinstance(a, sympy.acsc):             # <<<<<<<<<<<<<<
 *             return acsc(a.args[0])
 *         elif isinstance(a, sympy.asec):
*/
    }

    /* "symengine/lib/symengine_wrapper.pyx":349
 *         elif isinstance(a, sympy.acsc):
 *             return acsc(a.args[0])
 *         elif isinstance(a, sympy.asec):             # <<<<<<<<<<<<<<
 *             return asec(a.args[0])
 *         elif isinstance(a, sympy.atan2):
*/
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_asec); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 349, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_5 = PyObject_IsInstance(__pyx_v_a, __pyx_t_8); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 349, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (__pyx_t_5) {

      /* "symengine/lib/symengine_wrapper.pyx":350
 *             return acsc(a.args[0])
 *         elif isinstance(a, sympy.asec):
 *             return asec(a.args[0])             # <<<<<<<<<<<<<<
 *         elif isinstance(a, sympy.atan2):
 *             return atan2(*a.args)
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_asec); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 350, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 350, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_10 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 350, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_7 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
        assert(__pyx_t_1);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
        __pyx_t_7 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_10};
        __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 350, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
      }
      __pyx_r = __pyx_t_8;
      __pyx_t_8 = 0;
      goto __pyx_L0;

      /* "symengine/lib/symengine_wrapper.pyx":349
 *         elif isinstance(a, sympy.acsc):
 *             return acsc(a.args[0])
 *         elif isinstance(a, sympy.asec):             # <<<<<<<<<<<<<<
 *             return asec(a.args[0])
 *         elif isinstance(a, sympy.atan2):
*/
    }

    /* "symengine/lib/symengine_wrapper.pyx":351
 *         elif isinstance(a, sympy.asec):
 *             return asec(a.args[0])
 *         elif isinstance(a, sympy.atan2):             # <<<<<<<<<<<<<<
 *             return atan2(*a.args)
 *     elif isinstance(a, sympy.functions.elementary.hyperbolic.HyperbolicFunction):
*/
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_atan2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 351, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_5 = PyObject_IsInstance(__pyx_v_a, __pyx_t_8); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 351, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (__pyx_t_5) {

      /* "symengine/lib/symengine_wrapper.pyx":352
 *             return asec(a.args[0])
 *         elif isinstance(a, sympy.atan2):
 *             return atan2(*a.args)             # <<<<<<<<<<<<<<
 *     elif isinstance(a, sympy.functions.elementary.hyperbolic.HyperbolicFunction):
 *         if isinstance(a, sympy.sinh):
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_atan2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 352, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 352, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_10 = __Pyx_PySequence_Tuple(__pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 352, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_10, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 352, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_r = __pyx_t_6;
      __pyx_t_6 = 0;
      goto __pyx_L0;

      /* "symengine/lib/symengine_wrapper.pyx":351
 *         elif isinstance(a, sympy.asec):
 *             return asec(a.args[0])
 *         elif isinstance(a, sympy.atan2):             # <<<<<<<<<<<<<<
 *             return atan2(*a.args)
 *     elif isinstance(a, sympy.functions.elementary.hyperbolic.HyperbolicFunction):
*/
    }

    /* "symengine/lib/symengine_wrapper.pyx":338
 *         elif isinstance(a, sympy.sec):
 *             return sec(a.args[0])
 *     elif isinstance(a, sympy.functions.elementary.trigonometric.InverseTrigonometricFunction):             # <<<<<<<<<<<<<<
 *         if isinstance(a, sympy.asin):
 *             return asin(a.args[0])
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":353
 *         elif isinstance(a, sympy.atan2):
 *             return atan2(*a.args)
 *     elif isinstance(a, sympy.functions.elementary.hyperbolic.HyperbolicFunction):             # <<<<<<<<<<<<<<
 *         if isinstance(a, sympy.sinh):
 *             return sinh(a.args[0])
*/
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_functions); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 353, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_elementary); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 353, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_hyperbolic); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 353, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_HyperbolicFunction); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 353, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_5 = PyObject_IsInstance(__pyx_v_a, __pyx_t_10); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 353, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":354
 *             return atan2(*a.args)
 *     elif isinstance(a, sympy.functions.elementary.hyperbolic.HyperbolicFunction):
 *         if isinstance(a, sympy.sinh):             # <<<<<<<<<<<<<<
 *             return sinh(a.args[0])
 *         elif isinstance(a, sympy.cosh):
*/
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_sinh); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 354, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_5 = PyObject_IsInstance(__pyx_v_a, __pyx_t_10); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 354, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (__pyx_t_5) {

      /* "symengine/lib/symengine_wrapper.pyx":355
 *     elif isinstance(a, sympy.functions.elementary.hyperbolic.HyperbolicFunction):
 *         if isinstance(a, sympy.sinh):
 *             return sinh(a.args[0])             # <<<<<<<<<<<<<<
 *         elif isinstance(a, sympy.cosh):
 *             return cosh(a.args[0])
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_6 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_sinh); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 355, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 355, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 355, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_7 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_8))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8);
        assert(__pyx_t_6);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_8, __pyx__function);
        __pyx_t_7 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_4};
        __pyx_t_10 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 355, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
      }
      __pyx_r = __pyx_t_10;
      __pyx_t_10 = 0;
      goto __pyx_L0;

      /* "symengine/lib/symengine_wrapper.pyx":354
 *             return atan2(*a.args)
 *     elif isinstance(a, sympy.functions.elementary.hyperbolic.HyperbolicFunction):
 *         if isinstance(a, sympy.sinh):             # <<<<<<<<<<<<<<
 *             return sinh(a.args[0])
 *         elif isinstance(a, sympy.cosh):
*/
    }

    /* "symengine/lib/symengine_wrapper.pyx":356
 *         if isinstance(a, sympy.sinh):
 *             return sinh(a.args[0])
 *         elif isinstance(a, sympy.cosh):             # <<<<<<<<<<<<<<
 *             return cosh(a.args[0])
 *         elif isinstance(a, sympy.tanh):
*/
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_cosh); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 356, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_5 = PyObject_IsInstance(__pyx_v_a, __pyx_t_10); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 356, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (__pyx_t_5) {

      /* "symengine/lib/symengine_wrapper.pyx":357
 *             return sinh(a.args[0])
 *         elif isinstance(a, sympy.cosh):
 *             return cosh(a.args[0])             # <<<<<<<<<<<<<<
 *         elif isinstance(a, sympy.tanh):
 *             return tanh(a.args[0])
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_8 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_cosh); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 357, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 357, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_6, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 357, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_7 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
        assert(__pyx_t_8);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
        __pyx_t_7 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_1};
        __pyx_t_10 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 357, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
      }
      __pyx_r = __pyx_t_10;
      __pyx_t_10 = 0;
      goto __pyx_L0;

      /* "symengine/lib/symengine_wrapper.pyx":356
 *         if isinstance(a, sympy.sinh):
 *             return sinh(a.args[0])
 *         elif isinstance(a, sympy.cosh):             # <<<<<<<<<<<<<<
 *             return cosh(a.args[0])
 *         elif isinstance(a, sympy.tanh):
*/
    }

    /* "symengine/lib/symengine_wrapper.pyx":358
 *         elif isinstance(a, sympy.cosh):
 *             return cosh(a.args[0])
 *         elif isinstance(a, sympy.tanh):             # <<<<<<<<<<<<<<
 *             return tanh(a.args[0])
 *         elif isinstance(a, sympy.coth):
*/
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_tanh); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 358, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_5 = PyObject_IsInstance(__pyx_v_a, __pyx_t_10); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 358, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (__pyx_t_5) {

      /* "symengine/lib/symengine_wrapper.pyx":359
 *             return cosh(a.args[0])
 *         elif isinstance(a, sympy.tanh):
 *             return tanh(a.args[0])             # <<<<<<<<<<<<<<
 *         elif isinstance(a, sympy.coth):
 *             return coth(a.args[0])
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_4 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_tanh); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 359, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 359, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_8, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 359, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_7 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
        assert(__pyx_t_4);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_1, __pyx__function);
        __pyx_t_7 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_6};
        __pyx_t_10 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_1, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 359, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
      }
      __pyx_r = __pyx_t_10;
      __pyx_t_10 = 0;
      goto __pyx_L0;

      /* "symengine/lib/symengine_wrapper.pyx":358
 *         elif isinstance(a, sympy.cosh):
 *             return cosh(a.args[0])
 *         elif isinstance(a, sympy.tanh):             # <<<<<<<<<<<<<<
 *             return tanh(a.args[0])
 *         elif isinstance(a, sympy.coth):
*/
    }

    /* "symengine/lib/symengine_wrapper.pyx":360
 *         elif isinstance(a, sympy.tanh):
 *             return tanh(a.args[0])
 *         elif isinstance(a, sympy.coth):             # <<<<<<<<<<<<<<
 *             return coth(a.args[0])
 *         elif isinstance(a, sympy.csch):
*/
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_coth); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 360, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_5 = PyObject_IsInstance(__pyx_v_a, __pyx_t_10); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 360, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (__pyx_t_5) {

      /* "symengine/lib/symengine_wrapper.pyx":361
 *             return tanh(a.args[0])
 *         elif isinstance(a, sympy.coth):
 *             return coth(a.args[0])             # <<<<<<<<<<<<<<
 *         elif isinstance(a, sympy.csch):
 *             return csch(a.args[0])
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_coth); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 361, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 361, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 361, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_7 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
        assert(__pyx_t_1);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
        __pyx_t_7 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_8};
        __pyx_t_10 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 361, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
      }
      __pyx_r = __pyx_t_10;
      __pyx_t_10 = 0;
      goto __pyx_L0;

      /* "symengine/lib/symengine_wrapper.pyx":360
 *         elif isinstance(a, sympy.tanh):
 *             return tanh(a.args[0])
 *         elif isinstance(a, sympy.coth):             # <<<<<<<<<<<<<<
 *             return coth(a.args[0])
 *         elif isinstance(a, sympy.csch):
*/
    }

    /* "symengine/lib/symengine_wrapper.pyx":362
 *         elif isinstance(a, sympy.coth):
 *             return coth(a.args[0])
 *         elif isinstance(a, sympy.csch):             # <<<<<<<<<<<<<<
 *             return csch(a.args[0])
 *         elif isinstance(a, sympy.sech):
*/
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_csch); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 362, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_5 = PyObject_IsInstance(__pyx_v_a, __pyx_t_10); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 362, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (__pyx_t_5) {

      /* "symengine/lib/symengine_wrapper.pyx":363
 *             return coth(a.args[0])
 *         elif isinstance(a, sympy.csch):
 *             return csch(a.args[0])             # <<<<<<<<<<<<<<
 *         elif isinstance(a, sympy.sech):
 *             return sech(a.args[0])
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_6 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_csch); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 363, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 363, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 363, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_7 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_8))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8);
        assert(__pyx_t_6);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_8, __pyx__function);
        __pyx_t_7 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_4};
        __pyx_t_10 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 363, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
      }
      __pyx_r = __pyx_t_10;
      __pyx_t_10 = 0;
      goto __pyx_L0;

      /* "symengine/lib/symengine_wrapper.pyx":362
 *         elif isinstance(a, sympy.coth):
 *             return coth(a.args[0])
 *         elif isinstance(a, sympy.csch):             # <<<<<<<<<<<<<<
 *             return csch(a.args[0])
 *         elif isinstance(a, sympy.sech):
*/
    }

    /* "symengine/lib/symengine_wrapper.pyx":364
 *         elif isinstance(a, sympy.csch):
 *             return csch(a.args[0])
 *         elif isinstance(a, sympy.sech):             # <<<<<<<<<<<<<<
 *             return sech(a.args[0])
 *     elif isinstance(a, sympy.asinh):
*/
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_sech); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 364, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_5 = PyObject_IsInstance(__pyx_v_a, __pyx_t_10); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 364, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (__pyx_t_5) {

      /* "symengine/lib/symengine_wrapper.pyx":365
 *             return csch(a.args[0])
 *         elif isinstance(a, sympy.sech):
 *             return sech(a.args[0])             # <<<<<<<<<<<<<<
 *     elif isinstance(a, sympy.asinh):
 *         return asinh(a.args[0])
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_8 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_sech); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 365, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 365, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_6, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 365, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_7 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
        assert(__pyx_t_8);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
        __pyx_t_7 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_1};
        __pyx_t_10 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 365, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
      }
      __pyx_r = __pyx_t_10;
      __pyx_t_10 = 0;
      goto __pyx_L0;

      /* "symengine/lib/symengine_wrapper.pyx":364
 *         elif isinstance(a, sympy.csch):
 *             return csch(a.args[0])
 *         elif isinstance(a, sympy.sech):             # <<<<<<<<<<<<<<
 *             return sech(a.args[0])
 *     elif isinstance(a, sympy.asinh):
*/
    }

    /* "symengine/lib/symengine_wrapper.pyx":353
 *         elif isinstance(a, sympy.atan2):
 *             return atan2(*a.args)
 *     elif isinstance(a, sympy.functions.elementary.hyperbolic.HyperbolicFunction):             # <<<<<<<<<<<<<<
 *         if isinstance(a, sympy.sinh):
 *             return sinh(a.args[0])
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":366
 *         elif isinstance(a, sympy.sech):
 *             return sech(a.args[0])
 *     elif isinstance(a, sympy.asinh):             # <<<<<<<<<<<<<<
 *         return asinh(a.args[0])
 *     elif isinstance(a, sympy.acosh):
*/
  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_asinh); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 366, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_5 = PyObject_IsInstance(__pyx_v_a, __pyx_t_10); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 366, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":367
 *             return sech(a.args[0])
 *     elif isinstance(a, sympy.asinh):
 *         return asinh(a.args[0])             # <<<<<<<<<<<<<<
 *     elif isinstance(a, sympy.acosh):
 *         return acosh(a.args[0])
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_asinh); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 367, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 367, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_8, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 367, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_7 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
      assert(__pyx_t_4);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_1, __pyx__function);
      __pyx_t_7 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_6};
      __pyx_t_10 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_1, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 367, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
    }
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":366
 *         elif isinstance(a, sympy.sech):
 *             return sech(a.args[0])
 *     elif isinstance(a, sympy.asinh):             # <<<<<<<<<<<<<<
 *         return asinh(a.args[0])
 *     elif isinstance(a, sympy.acosh):
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":368
 *     elif isinstance(a, sympy.asinh):
 *         return asinh(a.args[0])
 *     elif isinstance(a, sympy.acosh):             # <<<<<<<<<<<<<<
 *         return acosh(a.args[0])
 *     elif isinstance(a, sympy.atanh):
*/
  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_acosh); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 368, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_5 = PyObject_IsInstance(__pyx_v_a, __pyx_t_10); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 368, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":369
 *         return asinh(a.args[0])
 *     elif isinstance(a, sympy.acosh):
 *         return acosh(a.args[0])             # <<<<<<<<<<<<<<
 *     elif isinstance(a, sympy.atanh):
 *         return atanh(a.args[0])
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_acosh); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 369, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 369, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 369, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_7 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
      assert(__pyx_t_1);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
      __pyx_t_7 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_8};
      __pyx_t_10 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 369, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
    }
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":368
 *     elif isinstance(a, sympy.asinh):
 *         return asinh(a.args[0])
 *     elif isinstance(a, sympy.acosh):             # <<<<<<<<<<<<<<
 *         return acosh(a.args[0])
 *     elif isinstance(a, sympy.atanh):
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":370
 *     elif isinstance(a, sympy.acosh):
 *         return acosh(a.args[0])
 *     elif isinstance(a, sympy.atanh):             # <<<<<<<<<<<<<<
 *         return atanh(a.args[0])
 *     elif isinstance(a, sympy.acoth):
*/
  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_atanh); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 370, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_5 = PyObject_IsInstance(__pyx_v_a, __pyx_t_10); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 370, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":371
 *         return acosh(a.args[0])
 *     elif isinstance(a, sympy.atanh):
 *         return atanh(a.args[0])             # <<<<<<<<<<<<<<
 *     elif isinstance(a, sympy.acoth):
 *         return acoth(a.args[0])
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_6 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_atanh); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 371, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 371, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 371, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_7 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8);
      assert(__pyx_t_6);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_8, __pyx__function);
      __pyx_t_7 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_4};
      __pyx_t_10 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 371, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
    }
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":370
 *     elif isinstance(a, sympy.acosh):
 *         return acosh(a.args[0])
 *     elif isinstance(a, sympy.atanh):             # <<<<<<<<<<<<<<
 *         return atanh(a.args[0])
 *     elif isinstance(a, sympy.acoth):
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":372
 *     elif isinstance(a, sympy.atanh):
 *         return atanh(a.args[0])
 *     elif isinstance(a, sympy.acoth):             # <<<<<<<<<<<<<<
 *         return acoth(a.args[0])
 *     elif isinstance(a, sympy.log):
*/
  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_acoth); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 372, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_5 = PyObject_IsInstance(__pyx_v_a, __pyx_t_10); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 372, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":373
 *         return atanh(a.args[0])
 *     elif isinstance(a, sympy.acoth):
 *         return acoth(a.args[0])             # <<<<<<<<<<<<<<
 *     elif isinstance(a, sympy.log):
 *         return log(a.args[0])
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_8 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_acoth); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 373, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 373, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_6, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 373, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
      assert(__pyx_t_8);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
      __pyx_t_7 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_1};
      __pyx_t_10 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 373, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
    }
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":372
 *     elif isinstance(a, sympy.atanh):
 *         return atanh(a.args[0])
 *     elif isinstance(a, sympy.acoth):             # <<<<<<<<<<<<<<
 *         return acoth(a.args[0])
 *     elif isinstance(a, sympy.log):
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":374
 *     elif isinstance(a, sympy.acoth):
 *         return acoth(a.args[0])
 *     elif isinstance(a, sympy.log):             # <<<<<<<<<<<<<<
 *         return log(a.args[0])
 *     elif isinstance(a, sympy.Abs):
*/
  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 374, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_5 = PyObject_IsInstance(__pyx_v_a, __pyx_t_10); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 374, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":375
 *         return acoth(a.args[0])
 *     elif isinstance(a, sympy.log):
 *         return log(a.args[0])             # <<<<<<<<<<<<<<
 *     elif isinstance(a, sympy.Abs):
 *         return abs(sympy2symengine(a.args[0], raise_error))
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 375, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 375, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_8, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 375, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_7 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
      assert(__pyx_t_4);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_1, __pyx__function);
      __pyx_t_7 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_6};
      __pyx_t_10 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_1, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 375, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
    }
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":374
 *     elif isinstance(a, sympy.acoth):
 *         return acoth(a.args[0])
 *     elif isinstance(a, sympy.log):             # <<<<<<<<<<<<<<
 *         return log(a.args[0])
 *     elif isinstance(a, sympy.Abs):
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":376
 *     elif isinstance(a, sympy.log):
 *         return log(a.args[0])
 *     elif isinstance(a, sympy.Abs):             # <<<<<<<<<<<<<<
 *         return abs(sympy2symengine(a.args[0], raise_error))
 *     elif isinstance(a, sympy.Max):
*/
  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_Abs); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 376, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_5 = PyObject_IsInstance(__pyx_v_a, __pyx_t_10); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 376, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":377
 *         return log(a.args[0])
 *     elif isinstance(a, sympy.Abs):
 *         return abs(sympy2symengine(a.args[0], raise_error))             # <<<<<<<<<<<<<<
 *     elif isinstance(a, sympy.Max):
 *         return _max(*a.args)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_sympy2symengine); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 377, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 377, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 377, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_7 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
      assert(__pyx_t_1);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
      __pyx_t_7 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_1, __pyx_t_8, __pyx_v_raise_error};
      __pyx_t_10 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 377, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
    }
    __pyx_t_6 = __Pyx_PyNumber_Absolute(__pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 377, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":376
 *     elif isinstance(a, sympy.log):
 *         return log(a.args[0])
 *     elif isinstance(a, sympy.Abs):             # <<<<<<<<<<<<<<
 *         return abs(sympy2symengine(a.args[0], raise_error))
 *     elif isinstance(a, sympy.Max):
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":378
 *     elif isinstance(a, sympy.Abs):
 *         return abs(sympy2symengine(a.args[0], raise_error))
 *     elif isinstance(a, sympy.Max):             # <<<<<<<<<<<<<<
 *         return _max(*a.args)
 *     elif isinstance(a, sympy.Min):
*/
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_Max); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 378, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = PyObject_IsInstance(__pyx_v_a, __pyx_t_6); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 378, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":379
 *         return abs(sympy2symengine(a.args[0], raise_error))
 *     elif isinstance(a, sympy.Max):
 *         return _max(*a.args)             # <<<<<<<<<<<<<<
 *     elif isinstance(a, sympy.Min):
 *         return _min(*a.args)
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_max); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 379, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 379, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_8 = __Pyx_PySequence_Tuple(__pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 379, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 379, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":378
 *     elif isinstance(a, sympy.Abs):
 *         return abs(sympy2symengine(a.args[0], raise_error))
 *     elif isinstance(a, sympy.Max):             # <<<<<<<<<<<<<<
 *         return _max(*a.args)
 *     elif isinstance(a, sympy.Min):
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":380
 *     elif isinstance(a, sympy.Max):
 *         return _max(*a.args)
 *     elif isinstance(a, sympy.Min):             # <<<<<<<<<<<<<<
 *         return _min(*a.args)
 *     elif isinstance(a, sympy.Equality):
*/
  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_Min); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 380, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_5 = PyObject_IsInstance(__pyx_v_a, __pyx_t_10); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 380, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":381
 *         return _max(*a.args)
 *     elif isinstance(a, sympy.Min):
 *         return _min(*a.args)             # <<<<<<<<<<<<<<
 *     elif isinstance(a, sympy.Equality):
 *         return eq(*a.args)
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_min); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 381, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 381, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_6 = __Pyx_PySequence_Tuple(__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 381, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_6, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 381, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_r = __pyx_t_8;
    __pyx_t_8 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":380
 *     elif isinstance(a, sympy.Max):
 *         return _max(*a.args)
 *     elif isinstance(a, sympy.Min):             # <<<<<<<<<<<<<<
 *         return _min(*a.args)
 *     elif isinstance(a, sympy.Equality):
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":382
 *     elif isinstance(a, sympy.Min):
 *         return _min(*a.args)
 *     elif isinstance(a, sympy.Equality):             # <<<<<<<<<<<<<<
 *         return eq(*a.args)
 *     elif isinstance(a, sympy.Unequality):
*/
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_Equality); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 382, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_5 = PyObject_IsInstance(__pyx_v_a, __pyx_t_8); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 382, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":383
 *         return _min(*a.args)
 *     elif isinstance(a, sympy.Equality):
 *         return eq(*a.args)             # <<<<<<<<<<<<<<
 *     elif isinstance(a, sympy.Unequality):
 *         return ne(*a.args)
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_eq); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 383, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 383, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_10 = __Pyx_PySequence_Tuple(__pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 383, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_10, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 383, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":382
 *     elif isinstance(a, sympy.Min):
 *         return _min(*a.args)
 *     elif isinstance(a, sympy.Equality):             # <<<<<<<<<<<<<<
 *         return eq(*a.args)
 *     elif isinstance(a, sympy.Unequality):
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":384
 *     elif isinstance(a, sympy.Equality):
 *         return eq(*a.args)
 *     elif isinstance(a, sympy.Unequality):             # <<<<<<<<<<<<<<
 *         return ne(*a.args)
 *     elif isinstance(a, sympy.GreaterThan):
*/
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_Unequality); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 384, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = PyObject_IsInstance(__pyx_v_a, __pyx_t_6); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 384, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":385
 *         return eq(*a.args)
 *     elif isinstance(a, sympy.Unequality):
 *         return ne(*a.args)             # <<<<<<<<<<<<<<
 *     elif isinstance(a, sympy.GreaterThan):
 *         return ge(*a.args)
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_ne); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 385, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 385, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_8 = __Pyx_PySequence_Tuple(__pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 385, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 385, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":384
 *     elif isinstance(a, sympy.Equality):
 *         return eq(*a.args)
 *     elif isinstance(a, sympy.Unequality):             # <<<<<<<<<<<<<<
 *         return ne(*a.args)
 *     elif isinstance(a, sympy.GreaterThan):
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":386
 *     elif isinstance(a, sympy.Unequality):
 *         return ne(*a.args)
 *     elif isinstance(a, sympy.GreaterThan):             # <<<<<<<<<<<<<<
 *         return ge(*a.args)
 *     elif isinstance(a, sympy.StrictGreaterThan):
*/
  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_GreaterThan); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 386, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_5 = PyObject_IsInstance(__pyx_v_a, __pyx_t_10); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 386, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":387
 *         return ne(*a.args)
 *     elif isinstance(a, sympy.GreaterThan):
 *         return ge(*a.args)             # <<<<<<<<<<<<<<
 *     elif isinstance(a, sympy.StrictGreaterThan):
 *         return gt(*a.args)
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_ge); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 387, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 387, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_6 = __Pyx_PySequence_Tuple(__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 387, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_6, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 387, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_r = __pyx_t_8;
    __pyx_t_8 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":386
 *     elif isinstance(a, sympy.Unequality):
 *         return ne(*a.args)
 *     elif isinstance(a, sympy.GreaterThan):             # <<<<<<<<<<<<<<
 *         return ge(*a.args)
 *     elif isinstance(a, sympy.StrictGreaterThan):
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":388
 *     elif isinstance(a, sympy.GreaterThan):
 *         return ge(*a.args)
 *     elif isinstance(a, sympy.StrictGreaterThan):             # <<<<<<<<<<<<<<
 *         return gt(*a.args)
 *     elif isinstance(a, sympy.LessThan):
*/
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_StrictGreaterThan); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 388, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_5 = PyObject_IsInstance(__pyx_v_a, __pyx_t_8); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 388, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":389
 *         return ge(*a.args)
 *     elif isinstance(a, sympy.StrictGreaterThan):
 *         return gt(*a.args)             # <<<<<<<<<<<<<<
 *     elif isinstance(a, sympy.LessThan):
 *         return le(*a.args)
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_gt); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 389, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 389, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_10 = __Pyx_PySequence_Tuple(__pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 389, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_10, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 389, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":388
 *     elif isinstance(a, sympy.GreaterThan):
 *         return ge(*a.args)
 *     elif isinstance(a, sympy.StrictGreaterThan):             # <<<<<<<<<<<<<<
 *         return gt(*a.args)
 *     elif isinstance(a, sympy.LessThan):
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":390
 *     elif isinstance(a, sympy.StrictGreaterThan):
 *         return gt(*a.args)
 *     elif isinstance(a, sympy.LessThan):             # <<<<<<<<<<<<<<
 *         return le(*a.args)
 *     elif isinstance(a, sympy.StrictLessThan):
*/
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_LessThan); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 390, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = PyObject_IsInstance(__pyx_v_a, __pyx_t_6); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 390, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":391
 *         return gt(*a.args)
 *     elif isinstance(a, sympy.LessThan):
 *         return le(*a.args)             # <<<<<<<<<<<<<<
 *     elif isinstance(a, sympy.StrictLessThan):
 *         return lt(*a.args)
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_le); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 391, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 391, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_8 = __Pyx_PySequence_Tuple(__pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 391, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 391, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":390
 *     elif isinstance(a, sympy.StrictGreaterThan):
 *         return gt(*a.args)
 *     elif isinstance(a, sympy.LessThan):             # <<<<<<<<<<<<<<
 *         return le(*a.args)
 *     elif isinstance(a, sympy.StrictLessThan):
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":392
 *     elif isinstance(a, sympy.LessThan):
 *         return le(*a.args)
 *     elif isinstance(a, sympy.StrictLessThan):             # <<<<<<<<<<<<<<
 *         return lt(*a.args)
 *     elif isinstance(a, sympy.LambertW):
*/
  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_StrictLessThan); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 392, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_5 = PyObject_IsInstance(__pyx_v_a, __pyx_t_10); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 392, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":393
 *         return le(*a.args)
 *     elif isinstance(a, sympy.StrictLessThan):
 *         return lt(*a.args)             # <<<<<<<<<<<<<<
 *     elif isinstance(a, sympy.LambertW):
 *         return LambertW(a.args[0])
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_lt); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 393, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 393, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_6 = __Pyx_PySequence_Tuple(__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 393, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_6, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 393, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_r = __pyx_t_8;
    __pyx_t_8 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":392
 *     elif isinstance(a, sympy.LessThan):
 *         return le(*a.args)
 *     elif isinstance(a, sympy.StrictLessThan):             # <<<<<<<<<<<<<<
 *         return lt(*a.args)
 *     elif isinstance(a, sympy.LambertW):
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":394
 *     elif isinstance(a, sympy.StrictLessThan):
 *         return lt(*a.args)
 *     elif isinstance(a, sympy.LambertW):             # <<<<<<<<<<<<<<
 *         return LambertW(a.args[0])
 *     elif isinstance(a, sympy.zeta):
*/
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_LambertW); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 394, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_5 = PyObject_IsInstance(__pyx_v_a, __pyx_t_8); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 394, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":395
 *         return lt(*a.args)
 *     elif isinstance(a, sympy.LambertW):
 *         return LambertW(a.args[0])             # <<<<<<<<<<<<<<
 *     elif isinstance(a, sympy.zeta):
 *         return zeta(*a.args)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_6 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_LambertW); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 395, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 395, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 395, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_7 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_10))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_10);
      assert(__pyx_t_6);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_10);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_10, __pyx__function);
      __pyx_t_7 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_4};
      __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_10, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 395, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
    }
    __pyx_r = __pyx_t_8;
    __pyx_t_8 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":394
 *     elif isinstance(a, sympy.StrictLessThan):
 *         return lt(*a.args)
 *     elif isinstance(a, sympy.LambertW):             # <<<<<<<<<<<<<<
 *         return LambertW(a.args[0])
 *     elif isinstance(a, sympy.zeta):
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":396
 *     elif isinstance(a, sympy.LambertW):
 *         return LambertW(a.args[0])
 *     elif isinstance(a, sympy.zeta):             # <<<<<<<<<<<<<<
 *         return zeta(*a.args)
 *     elif isinstance(a, sympy.dirichlet_eta):
*/
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_zeta); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 396, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_5 = PyObject_IsInstance(__pyx_v_a, __pyx_t_8); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 396, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":397
 *         return LambertW(a.args[0])
 *     elif isinstance(a, sympy.zeta):
 *         return zeta(*a.args)             # <<<<<<<<<<<<<<
 *     elif isinstance(a, sympy.dirichlet_eta):
 *         return dirichlet_eta(a.args[0])
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_zeta); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 397, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 397, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 397, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_4, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 397, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":396
 *     elif isinstance(a, sympy.LambertW):
 *         return LambertW(a.args[0])
 *     elif isinstance(a, sympy.zeta):             # <<<<<<<<<<<<<<
 *         return zeta(*a.args)
 *     elif isinstance(a, sympy.dirichlet_eta):
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":398
 *     elif isinstance(a, sympy.zeta):
 *         return zeta(*a.args)
 *     elif isinstance(a, sympy.dirichlet_eta):             # <<<<<<<<<<<<<<
 *         return dirichlet_eta(a.args[0])
 *     elif isinstance(a, sympy.KroneckerDelta):
*/
  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_dirichlet_eta); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 398, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_5 = PyObject_IsInstance(__pyx_v_a, __pyx_t_10); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 398, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":399
 *         return zeta(*a.args)
 *     elif isinstance(a, sympy.dirichlet_eta):
 *         return dirichlet_eta(a.args[0])             # <<<<<<<<<<<<<<
 *     elif isinstance(a, sympy.KroneckerDelta):
 *         return KroneckerDelta(*a.args)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_dirichlet_eta); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 399, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 399, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_6, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 399, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_8);
      assert(__pyx_t_4);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_8, __pyx__function);
      __pyx_t_7 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_1};
      __pyx_t_10 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 399, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
    }
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":398
 *     elif isinstance(a, sympy.zeta):
 *         return zeta(*a.args)
 *     elif isinstance(a, sympy.dirichlet_eta):             # <<<<<<<<<<<<<<
 *         return dirichlet_eta(a.args[0])
 *     elif isinstance(a, sympy.KroneckerDelta):
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":400
 *     elif isinstance(a, sympy.dirichlet_eta):
 *         return dirichlet_eta(a.args[0])
 *     elif isinstance(a, sympy.KroneckerDelta):             # <<<<<<<<<<<<<<
 *         return KroneckerDelta(*a.args)
 *     elif isinstance(a, sympy.LeviCivita):
*/
  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_KroneckerDelta); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 400, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_5 = PyObject_IsInstance(__pyx_v_a, __pyx_t_10); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 400, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":401
 *         return dirichlet_eta(a.args[0])
 *     elif isinstance(a, sympy.KroneckerDelta):
 *         return KroneckerDelta(*a.args)             # <<<<<<<<<<<<<<
 *     elif isinstance(a, sympy.LeviCivita):
 *         return LeviCivita(*a.args)
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_KroneckerDelta); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 401, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 401, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_1 = __Pyx_PySequence_Tuple(__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 401, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_1, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 401, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_r = __pyx_t_8;
    __pyx_t_8 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":400
 *     elif isinstance(a, sympy.dirichlet_eta):
 *         return dirichlet_eta(a.args[0])
 *     elif isinstance(a, sympy.KroneckerDelta):             # <<<<<<<<<<<<<<
 *         return KroneckerDelta(*a.args)
 *     elif isinstance(a, sympy.LeviCivita):
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":402
 *     elif isinstance(a, sympy.KroneckerDelta):
 *         return KroneckerDelta(*a.args)
 *     elif isinstance(a, sympy.LeviCivita):             # <<<<<<<<<<<<<<
 *         return LeviCivita(*a.args)
 *     elif isinstance(a, sympy.erf):
*/
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_LeviCivita); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 402, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_5 = PyObject_IsInstance(__pyx_v_a, __pyx_t_8); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 402, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":403
 *         return KroneckerDelta(*a.args)
 *     elif isinstance(a, sympy.LeviCivita):
 *         return LeviCivita(*a.args)             # <<<<<<<<<<<<<<
 *     elif isinstance(a, sympy.erf):
 *         return erf(a.args[0])
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_LeviCivita); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 403, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 403, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_10 = __Pyx_PySequence_Tuple(__pyx_t_1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 403, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 403, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":402
 *     elif isinstance(a, sympy.KroneckerDelta):
 *         return KroneckerDelta(*a.args)
 *     elif isinstance(a, sympy.LeviCivita):             # <<<<<<<<<<<<<<
 *         return LeviCivita(*a.args)
 *     elif isinstance(a, sympy.erf):
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":404
 *     elif isinstance(a, sympy.LeviCivita):
 *         return LeviCivita(*a.args)
 *     elif isinstance(a, sympy.erf):             # <<<<<<<<<<<<<<
 *         return erf(a.args[0])
 *     elif isinstance(a, sympy.erfc):
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_erf); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 404, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = PyObject_IsInstance(__pyx_v_a, __pyx_t_1); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 404, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":405
 *         return LeviCivita(*a.args)
 *     elif isinstance(a, sympy.erf):
 *         return erf(a.args[0])             # <<<<<<<<<<<<<<
 *     elif isinstance(a, sympy.erfc):
 *         return erfc(a.args[0])
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_erf); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 405, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 405, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 405, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_7 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_8);
      assert(__pyx_t_10);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_10);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_8, __pyx__function);
      __pyx_t_7 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_6};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 405, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":404
 *     elif isinstance(a, sympy.LeviCivita):
 *         return LeviCivita(*a.args)
 *     elif isinstance(a, sympy.erf):             # <<<<<<<<<<<<<<
 *         return erf(a.args[0])
 *     elif isinstance(a, sympy.erfc):
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":406
 *     elif isinstance(a, sympy.erf):
 *         return erf(a.args[0])
 *     elif isinstance(a, sympy.erfc):             # <<<<<<<<<<<<<<
 *         return erfc(a.args[0])
 *     elif isinstance(a, sympy.lowergamma):
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_erfc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 406, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = PyObject_IsInstance(__pyx_v_a, __pyx_t_1); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 406, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":407
 *         return erf(a.args[0])
 *     elif isinstance(a, sympy.erfc):
 *         return erfc(a.args[0])             # <<<<<<<<<<<<<<
 *     elif isinstance(a, sympy.lowergamma):
 *         return lowergamma(*a.args)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_8 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_erfc); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 407, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 407, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_10, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 407, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_7 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
      assert(__pyx_t_8);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
      __pyx_t_7 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_4};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 407, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":406
 *     elif isinstance(a, sympy.erf):
 *         return erf(a.args[0])
 *     elif isinstance(a, sympy.erfc):             # <<<<<<<<<<<<<<
 *         return erfc(a.args[0])
 *     elif isinstance(a, sympy.lowergamma):
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":408
 *     elif isinstance(a, sympy.erfc):
 *         return erfc(a.args[0])
 *     elif isinstance(a, sympy.lowergamma):             # <<<<<<<<<<<<<<
 *         return lowergamma(*a.args)
 *     elif isinstance(a, sympy.uppergamma):
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_lowergamma); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 408, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = PyObject_IsInstance(__pyx_v_a, __pyx_t_1); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 408, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":409
 *         return erfc(a.args[0])
 *     elif isinstance(a, sympy.lowergamma):
 *         return lowergamma(*a.args)             # <<<<<<<<<<<<<<
 *     elif isinstance(a, sympy.uppergamma):
 *         return uppergamma(*a.args)
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_lowergamma); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 409, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 409, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 409, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 409, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":408
 *     elif isinstance(a, sympy.erfc):
 *         return erfc(a.args[0])
 *     elif isinstance(a, sympy.lowergamma):             # <<<<<<<<<<<<<<
 *         return lowergamma(*a.args)
 *     elif isinstance(a, sympy.uppergamma):
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":410
 *     elif isinstance(a, sympy.lowergamma):
 *         return lowergamma(*a.args)
 *     elif isinstance(a, sympy.uppergamma):             # <<<<<<<<<<<<<<
 *         return uppergamma(*a.args)
 *     elif isinstance(a, sympy.loggamma):
*/
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_uppergamma); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 410, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = PyObject_IsInstance(__pyx_v_a, __pyx_t_6); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 410, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":411
 *         return lowergamma(*a.args)
 *     elif isinstance(a, sympy.uppergamma):
 *         return uppergamma(*a.args)             # <<<<<<<<<<<<<<
 *     elif isinstance(a, sympy.loggamma):
 *         return loggamma(a.args[0])
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_uppergamma); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 411, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 411, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = __Pyx_PySequence_Tuple(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 411, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 411, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":410
 *     elif isinstance(a, sympy.lowergamma):
 *         return lowergamma(*a.args)
 *     elif isinstance(a, sympy.uppergamma):             # <<<<<<<<<<<<<<
 *         return uppergamma(*a.args)
 *     elif isinstance(a, sympy.loggamma):
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":412
 *     elif isinstance(a, sympy.uppergamma):
 *         return uppergamma(*a.args)
 *     elif isinstance(a, sympy.loggamma):             # <<<<<<<<<<<<<<
 *         return loggamma(a.args[0])
 *     elif isinstance(a, sympy.beta):
*/
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_loggamma); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 412, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyObject_IsInstance(__pyx_v_a, __pyx_t_4); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 412, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":413
 *         return uppergamma(*a.args)
 *     elif isinstance(a, sympy.loggamma):
 *         return loggamma(a.args[0])             # <<<<<<<<<<<<<<
 *     elif isinstance(a, sympy.beta):
 *         return beta(*a.args)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_loggamma); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 413, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 413, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_10 = __Pyx_GetItemInt(__pyx_t_8, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 413, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_7 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
      assert(__pyx_t_1);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
      __pyx_t_7 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_10};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 413, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":412
 *     elif isinstance(a, sympy.uppergamma):
 *         return uppergamma(*a.args)
 *     elif isinstance(a, sympy.loggamma):             # <<<<<<<<<<<<<<
 *         return loggamma(a.args[0])
 *     elif isinstance(a, sympy.beta):
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":414
 *     elif isinstance(a, sympy.loggamma):
 *         return loggamma(a.args[0])
 *     elif isinstance(a, sympy.beta):             # <<<<<<<<<<<<<<
 *         return beta(*a.args)
 *     elif isinstance(a, sympy.polygamma):
*/
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_beta); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 414, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyObject_IsInstance(__pyx_v_a, __pyx_t_4); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 414, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":415
 *         return loggamma(a.args[0])
 *     elif isinstance(a, sympy.beta):
 *         return beta(*a.args)             # <<<<<<<<<<<<<<
 *     elif isinstance(a, sympy.polygamma):
 *         return polygamma(*a.args)
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_beta); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 415, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 415, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_10 = __Pyx_PySequence_Tuple(__pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 415, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_10, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 415, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":414
 *     elif isinstance(a, sympy.loggamma):
 *         return loggamma(a.args[0])
 *     elif isinstance(a, sympy.beta):             # <<<<<<<<<<<<<<
 *         return beta(*a.args)
 *     elif isinstance(a, sympy.polygamma):
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":416
 *     elif isinstance(a, sympy.beta):
 *         return beta(*a.args)
 *     elif isinstance(a, sympy.polygamma):             # <<<<<<<<<<<<<<
 *         return polygamma(*a.args)
 *     elif isinstance(a, sympy.sign):
*/
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_polygamma); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 416, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = PyObject_IsInstance(__pyx_v_a, __pyx_t_6); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 416, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":417
 *         return beta(*a.args)
 *     elif isinstance(a, sympy.polygamma):
 *         return polygamma(*a.args)             # <<<<<<<<<<<<<<
 *     elif isinstance(a, sympy.sign):
 *         return sign(a.args[0])
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_polygamma); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 417, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 417, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 417, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_4, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 417, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":416
 *     elif isinstance(a, sympy.beta):
 *         return beta(*a.args)
 *     elif isinstance(a, sympy.polygamma):             # <<<<<<<<<<<<<<
 *         return polygamma(*a.args)
 *     elif isinstance(a, sympy.sign):
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":418
 *     elif isinstance(a, sympy.polygamma):
 *         return polygamma(*a.args)
 *     elif isinstance(a, sympy.sign):             # <<<<<<<<<<<<<<
 *         return sign(a.args[0])
 *     elif isinstance(a, sympy.floor):
*/
  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_sign); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 418, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_5 = PyObject_IsInstance(__pyx_v_a, __pyx_t_10); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 418, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":419
 *         return polygamma(*a.args)
 *     elif isinstance(a, sympy.sign):
 *         return sign(a.args[0])             # <<<<<<<<<<<<<<
 *     elif isinstance(a, sympy.floor):
 *         return floor(a.args[0])
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_sign); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 419, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 419, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 419, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_7 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
      assert(__pyx_t_4);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
      __pyx_t_7 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_8};
      __pyx_t_10 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 419, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
    }
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":418
 *     elif isinstance(a, sympy.polygamma):
 *         return polygamma(*a.args)
 *     elif isinstance(a, sympy.sign):             # <<<<<<<<<<<<<<
 *         return sign(a.args[0])
 *     elif isinstance(a, sympy.floor):
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":420
 *     elif isinstance(a, sympy.sign):
 *         return sign(a.args[0])
 *     elif isinstance(a, sympy.floor):             # <<<<<<<<<<<<<<
 *         return floor(a.args[0])
 *     elif isinstance(a, sympy.ceiling):
*/
  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_floor); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 420, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_5 = PyObject_IsInstance(__pyx_v_a, __pyx_t_10); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 420, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":421
 *         return sign(a.args[0])
 *     elif isinstance(a, sympy.floor):
 *         return floor(a.args[0])             # <<<<<<<<<<<<<<
 *     elif isinstance(a, sympy.ceiling):
 *         return ceiling(a.args[0])
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_6 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_floor); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 421, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 421, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 421, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_7 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8);
      assert(__pyx_t_6);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_8, __pyx__function);
      __pyx_t_7 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_1};
      __pyx_t_10 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 421, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
    }
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":420
 *     elif isinstance(a, sympy.sign):
 *         return sign(a.args[0])
 *     elif isinstance(a, sympy.floor):             # <<<<<<<<<<<<<<
 *         return floor(a.args[0])
 *     elif isinstance(a, sympy.ceiling):
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":422
 *     elif isinstance(a, sympy.floor):
 *         return floor(a.args[0])
 *     elif isinstance(a, sympy.ceiling):             # <<<<<<<<<<<<<<
 *         return ceiling(a.args[0])
 *     elif isinstance(a, sympy.conjugate):
*/
  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_ceiling); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 422, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_5 = PyObject_IsInstance(__pyx_v_a, __pyx_t_10); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 422, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":423
 *         return floor(a.args[0])
 *     elif isinstance(a, sympy.ceiling):
 *         return ceiling(a.args[0])             # <<<<<<<<<<<<<<
 *     elif isinstance(a, sympy.conjugate):
 *         return conjugate(a.args[0])
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_8 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_ceiling); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 423, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 423, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_6, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 423, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_1);
      assert(__pyx_t_8);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_1, __pyx__function);
      __pyx_t_7 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_4};
      __pyx_t_10 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_1, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 423, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
    }
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":422
 *     elif isinstance(a, sympy.floor):
 *         return floor(a.args[0])
 *     elif isinstance(a, sympy.ceiling):             # <<<<<<<<<<<<<<
 *         return ceiling(a.args[0])
 *     elif isinstance(a, sympy.conjugate):
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":424
 *     elif isinstance(a, sympy.ceiling):
 *         return ceiling(a.args[0])
 *     elif isinstance(a, sympy.conjugate):             # <<<<<<<<<<<<<<
 *         return conjugate(a.args[0])
 *     elif isinstance(a, sympy.And):
*/
  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_conjugate); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 424, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_5 = PyObject_IsInstance(__pyx_v_a, __pyx_t_10); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 424, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":425
 *         return ceiling(a.args[0])
 *     elif isinstance(a, sympy.conjugate):
 *         return conjugate(a.args[0])             # <<<<<<<<<<<<<<
 *     elif isinstance(a, sympy.And):
 *         return logical_and(*a.args)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_conjugate); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 425, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 425, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_8, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 425, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_7 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4);
      assert(__pyx_t_1);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
      __pyx_t_7 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_6};
      __pyx_t_10 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 425, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
    }
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":424
 *     elif isinstance(a, sympy.ceiling):
 *         return ceiling(a.args[0])
 *     elif isinstance(a, sympy.conjugate):             # <<<<<<<<<<<<<<
 *         return conjugate(a.args[0])
 *     elif isinstance(a, sympy.And):
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":426
 *     elif isinstance(a, sympy.conjugate):
 *         return conjugate(a.args[0])
 *     elif isinstance(a, sympy.And):             # <<<<<<<<<<<<<<
 *         return logical_and(*a.args)
 *     elif isinstance(a, sympy.Or):
*/
  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_And); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 426, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_5 = PyObject_IsInstance(__pyx_v_a, __pyx_t_10); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 426, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":427
 *         return conjugate(a.args[0])
 *     elif isinstance(a, sympy.And):
 *         return logical_and(*a.args)             # <<<<<<<<<<<<<<
 *     elif isinstance(a, sympy.Or):
 *         return logical_or(*a.args)
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_logical_and); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 427, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 427, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PySequence_Tuple(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 427, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 427, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":426
 *     elif isinstance(a, sympy.conjugate):
 *         return conjugate(a.args[0])
 *     elif isinstance(a, sympy.And):             # <<<<<<<<<<<<<<
 *         return logical_and(*a.args)
 *     elif isinstance(a, sympy.Or):
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":428
 *     elif isinstance(a, sympy.And):
 *         return logical_and(*a.args)
 *     elif isinstance(a, sympy.Or):             # <<<<<<<<<<<<<<
 *         return logical_or(*a.args)
 *     elif isinstance(a, sympy.Not):
*/
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_Or); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 428, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyObject_IsInstance(__pyx_v_a, __pyx_t_4); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 428, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":429
 *         return logical_and(*a.args)
 *     elif isinstance(a, sympy.Or):
 *         return logical_or(*a.args)             # <<<<<<<<<<<<<<
 *     elif isinstance(a, sympy.Not):
 *         return logical_not(a.args[0])
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_logical_or); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 429, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 429, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_10 = __Pyx_PySequence_Tuple(__pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 429, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_10, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 429, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":428
 *     elif isinstance(a, sympy.And):
 *         return logical_and(*a.args)
 *     elif isinstance(a, sympy.Or):             # <<<<<<<<<<<<<<
 *         return logical_or(*a.args)
 *     elif isinstance(a, sympy.Not):
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":430
 *     elif isinstance(a, sympy.Or):
 *         return logical_or(*a.args)
 *     elif isinstance(a, sympy.Not):             # <<<<<<<<<<<<<<
 *         return logical_not(a.args[0])
 *     elif isinstance(a, sympy.Nor):
*/
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_Not); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 430, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = PyObject_IsInstance(__pyx_v_a, __pyx_t_6); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 430, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":431
 *         return logical_or(*a.args)
 *     elif isinstance(a, sympy.Not):
 *         return logical_not(a.args[0])             # <<<<<<<<<<<<<<
 *     elif isinstance(a, sympy.Nor):
 *         return Nor(*a.args)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_logical_not); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 431, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 431, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 431, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_7 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_4);
      assert(__pyx_t_10);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_10);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
      __pyx_t_7 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_8};
      __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 431, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
    }
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":430
 *     elif isinstance(a, sympy.Or):
 *         return logical_or(*a.args)
 *     elif isinstance(a, sympy.Not):             # <<<<<<<<<<<<<<
 *         return logical_not(a.args[0])
 *     elif isinstance(a, sympy.Nor):
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":432
 *     elif isinstance(a, sympy.Not):
 *         return logical_not(a.args[0])
 *     elif isinstance(a, sympy.Nor):             # <<<<<<<<<<<<<<
 *         return Nor(*a.args)
 *     elif isinstance(a, sympy.Nand):
*/
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_Nor); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 432, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = PyObject_IsInstance(__pyx_v_a, __pyx_t_6); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 432, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":433
 *         return logical_not(a.args[0])
 *     elif isinstance(a, sympy.Nor):
 *         return Nor(*a.args)             # <<<<<<<<<<<<<<
 *     elif isinstance(a, sympy.Nand):
 *         return Nand(*a.args)
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_Nor); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 433, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 433, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_8 = __Pyx_PySequence_Tuple(__pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 433, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 433, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":432
 *     elif isinstance(a, sympy.Not):
 *         return logical_not(a.args[0])
 *     elif isinstance(a, sympy.Nor):             # <<<<<<<<<<<<<<
 *         return Nor(*a.args)
 *     elif isinstance(a, sympy.Nand):
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":434
 *     elif isinstance(a, sympy.Nor):
 *         return Nor(*a.args)
 *     elif isinstance(a, sympy.Nand):             # <<<<<<<<<<<<<<
 *         return Nand(*a.args)
 *     elif isinstance(a, sympy.Xor):
*/
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_Nand); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 434, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyObject_IsInstance(__pyx_v_a, __pyx_t_4); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 434, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":435
 *         return Nor(*a.args)
 *     elif isinstance(a, sympy.Nand):
 *         return Nand(*a.args)             # <<<<<<<<<<<<<<
 *     elif isinstance(a, sympy.Xor):
 *         return logical_xor(*a.args)
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Nand); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 435, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 435, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_6 = __Pyx_PySequence_Tuple(__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 435, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 435, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_r = __pyx_t_8;
    __pyx_t_8 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":434
 *     elif isinstance(a, sympy.Nor):
 *         return Nor(*a.args)
 *     elif isinstance(a, sympy.Nand):             # <<<<<<<<<<<<<<
 *         return Nand(*a.args)
 *     elif isinstance(a, sympy.Xor):
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":436
 *     elif isinstance(a, sympy.Nand):
 *         return Nand(*a.args)
 *     elif isinstance(a, sympy.Xor):             # <<<<<<<<<<<<<<
 *         return logical_xor(*a.args)
 *     elif isinstance(a, sympy.gamma):
*/
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_Xor); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 436, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_5 = PyObject_IsInstance(__pyx_v_a, __pyx_t_8); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 436, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":437
 *         return Nand(*a.args)
 *     elif isinstance(a, sympy.Xor):
 *         return logical_xor(*a.args)             # <<<<<<<<<<<<<<
 *     elif isinstance(a, sympy.gamma):
 *         return gamma(a.args[0])
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_logical_xor); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 437, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 437, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 437, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 437, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":436
 *     elif isinstance(a, sympy.Nand):
 *         return Nand(*a.args)
 *     elif isinstance(a, sympy.Xor):             # <<<<<<<<<<<<<<
 *         return logical_xor(*a.args)
 *     elif isinstance(a, sympy.gamma):
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":438
 *     elif isinstance(a, sympy.Xor):
 *         return logical_xor(*a.args)
 *     elif isinstance(a, sympy.gamma):             # <<<<<<<<<<<<<<
 *         return gamma(a.args[0])
 *     elif isinstance(a, sympy.Derivative):
*/
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_gamma); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 438, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = PyObject_IsInstance(__pyx_v_a, __pyx_t_6); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 438, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":439
 *         return logical_xor(*a.args)
 *     elif isinstance(a, sympy.gamma):
 *         return gamma(a.args[0])             # <<<<<<<<<<<<<<
 *     elif isinstance(a, sympy.Derivative):
 *         return Derivative(a.expr, *a.variables)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_gamma); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 439, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 439, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_10, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 439, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_7 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_8);
      assert(__pyx_t_4);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_8, __pyx__function);
      __pyx_t_7 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_1};
      __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 439, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
    }
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":438
 *     elif isinstance(a, sympy.Xor):
 *         return logical_xor(*a.args)
 *     elif isinstance(a, sympy.gamma):             # <<<<<<<<<<<<<<
 *         return gamma(a.args[0])
 *     elif isinstance(a, sympy.Derivative):
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":440
 *     elif isinstance(a, sympy.gamma):
 *         return gamma(a.args[0])
 *     elif isinstance(a, sympy.Derivative):             # <<<<<<<<<<<<<<
 *         return Derivative(a.expr, *a.variables)
 *     elif isinstance(a, sympy.Subs):
*/
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_Derivative); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 440, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = PyObject_IsInstance(__pyx_v_a, __pyx_t_6); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 440, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":441
 *         return gamma(a.args[0])
 *     elif isinstance(a, sympy.Derivative):
 *         return Derivative(a.expr, *a.variables)             # <<<<<<<<<<<<<<
 *     elif isinstance(a, sympy.Subs):
 *         return Subs(a.expr, a.variables, a.point)
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_Derivative); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 441, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_mstate_global->__pyx_n_u_expr); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 441, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 441, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_8);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_8) != (0)) __PYX_ERR(0, 441, __pyx_L1_error);
    __pyx_t_8 = 0;
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_mstate_global->__pyx_n_u_variables); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 441, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 441, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = PyNumber_Add(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 441, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 441, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":440
 *     elif isinstance(a, sympy.gamma):
 *         return gamma(a.args[0])
 *     elif isinstance(a, sympy.Derivative):             # <<<<<<<<<<<<<<
 *         return Derivative(a.expr, *a.variables)
 *     elif isinstance(a, sympy.Subs):
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":442
 *     elif isinstance(a, sympy.Derivative):
 *         return Derivative(a.expr, *a.variables)
 *     elif isinstance(a, sympy.Subs):             # <<<<<<<<<<<<<<
 *         return Subs(a.expr, a.variables, a.point)
 *     elif isinstance(a, sympy_AppliedUndef):
*/
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_Subs); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 442, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyObject_IsInstance(__pyx_v_a, __pyx_t_4); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 442, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":443
 *         return Derivative(a.expr, *a.variables)
 *     elif isinstance(a, sympy.Subs):
 *         return Subs(a.expr, a.variables, a.point)             # <<<<<<<<<<<<<<
 *     elif isinstance(a, sympy_AppliedUndef):
 *         name = str(a.func)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_8 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_Subs); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 443, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_mstate_global->__pyx_n_u_expr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 443, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_mstate_global->__pyx_n_u_variables); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 443, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_mstate_global->__pyx_n_u_point); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 443, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_7 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
      assert(__pyx_t_8);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
      __pyx_t_7 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[4] = {__pyx_t_8, __pyx_t_1, __pyx_t_10, __pyx_t_11};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_7, (4-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 443, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":442
 *     elif isinstance(a, sympy.Derivative):
 *         return Derivative(a.expr, *a.variables)
 *     elif isinstance(a, sympy.Subs):             # <<<<<<<<<<<<<<
 *         return Subs(a.expr, a.variables, a.point)
 *     elif isinstance(a, sympy_AppliedUndef):
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":444
 *     elif isinstance(a, sympy.Subs):
 *         return Subs(a.expr, a.variables, a.point)
 *     elif isinstance(a, sympy_AppliedUndef):             # <<<<<<<<<<<<<<
 *         name = str(a.func)
 *         return function_symbol(name, *(a.args))
*/
  __pyx_t_5 = PyObject_IsInstance(__pyx_v_a, __pyx_v_sympy_AppliedUndef); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 444, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":445
 *         return Subs(a.expr, a.variables, a.point)
 *     elif isinstance(a, sympy_AppliedUndef):
 *         name = str(a.func)             # <<<<<<<<<<<<<<
 *         return function_symbol(name, *(a.args))
 *     elif isinstance(a, (sympy.Piecewise)):
*/
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_mstate_global->__pyx_n_u_func); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 445, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyObject_Unicode(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 445, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_name = ((PyObject*)__pyx_t_6);
    __pyx_t_6 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":446
 *     elif isinstance(a, sympy_AppliedUndef):
 *         name = str(a.func)
 *         return function_symbol(name, *(a.args))             # <<<<<<<<<<<<<<
 *     elif isinstance(a, (sympy.Piecewise)):
 *         return piecewise(*(a.args))
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_function_symbol); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 446, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 446, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_v_name);
    __Pyx_GIVEREF(__pyx_v_name);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_name) != (0)) __PYX_ERR(0, 446, __pyx_L1_error);
    __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 446, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_10 = __Pyx_PySequence_Tuple(__pyx_t_11); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 446, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_t_11 = PyNumber_Add(__pyx_t_4, __pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 446, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_11, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 446, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":444
 *     elif isinstance(a, sympy.Subs):
 *         return Subs(a.expr, a.variables, a.point)
 *     elif isinstance(a, sympy_AppliedUndef):             # <<<<<<<<<<<<<<
 *         name = str(a.func)
 *         return function_symbol(name, *(a.args))
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":447
 *         name = str(a.func)
 *         return function_symbol(name, *(a.args))
 *     elif isinstance(a, (sympy.Piecewise)):             # <<<<<<<<<<<<<<
 *         return piecewise(*(a.args))
 *     elif a is sympy.S.Reals:
*/
  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_Piecewise); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 447, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_5 = PyObject_IsInstance(__pyx_v_a, __pyx_t_10); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 447, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":448
 *         return function_symbol(name, *(a.args))
 *     elif isinstance(a, (sympy.Piecewise)):
 *         return piecewise(*(a.args))             # <<<<<<<<<<<<<<
 *     elif a is sympy.S.Reals:
 *         return S.Reals
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_piecewise); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 448, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 448, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_6 = __Pyx_PySequence_Tuple(__pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 448, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_6, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 448, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_r = __pyx_t_11;
    __pyx_t_11 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":447
 *         name = str(a.func)
 *         return function_symbol(name, *(a.args))
 *     elif isinstance(a, (sympy.Piecewise)):             # <<<<<<<<<<<<<<
 *         return piecewise(*(a.args))
 *     elif a is sympy.S.Reals:
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":449
 *     elif isinstance(a, (sympy.Piecewise)):
 *         return piecewise(*(a.args))
 *     elif a is sympy.S.Reals:             # <<<<<<<<<<<<<<
 *         return S.Reals
 *     elif a is sympy.S.Integers:
*/
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_S); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 449, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_Reals); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 449, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_5 = (__pyx_v_a == __pyx_t_6);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":450
 *         return piecewise(*(a.args))
 *     elif a is sympy.S.Reals:
 *         return S.Reals             # <<<<<<<<<<<<<<
 *     elif a is sympy.S.Integers:
 *         return S.Integers
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_S); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 450, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_Reals); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 450, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_r = __pyx_t_11;
    __pyx_t_11 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":449
 *     elif isinstance(a, (sympy.Piecewise)):
 *         return piecewise(*(a.args))
 *     elif a is sympy.S.Reals:             # <<<<<<<<<<<<<<
 *         return S.Reals
 *     elif a is sympy.S.Integers:
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":451
 *     elif a is sympy.S.Reals:
 *         return S.Reals
 *     elif a is sympy.S.Integers:             # <<<<<<<<<<<<<<
 *         return S.Integers
 *     elif a is sympy.S.Rationals:
*/
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_S); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 451, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_Integers); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 451, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_5 = (__pyx_v_a == __pyx_t_6);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":452
 *         return S.Reals
 *     elif a is sympy.S.Integers:
 *         return S.Integers             # <<<<<<<<<<<<<<
 *     elif a is sympy.S.Rationals:
 *         return S.Rationals
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_S); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 452, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_Integers); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 452, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_r = __pyx_t_11;
    __pyx_t_11 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":451
 *     elif a is sympy.S.Reals:
 *         return S.Reals
 *     elif a is sympy.S.Integers:             # <<<<<<<<<<<<<<
 *         return S.Integers
 *     elif a is sympy.S.Rationals:
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":453
 *     elif a is sympy.S.Integers:
 *         return S.Integers
 *     elif a is sympy.S.Rationals:             # <<<<<<<<<<<<<<
 *         return S.Rationals
 *     elif isinstance(a, sympy.Interval):
*/
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_S); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 453, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_Rationals); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 453, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_5 = (__pyx_v_a == __pyx_t_6);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":454
 *         return S.Integers
 *     elif a is sympy.S.Rationals:
 *         return S.Rationals             # <<<<<<<<<<<<<<
 *     elif isinstance(a, sympy.Interval):
 *         return interval(*(a.args))
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_S); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 454, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_Rationals); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 454, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_r = __pyx_t_11;
    __pyx_t_11 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":453
 *     elif a is sympy.S.Integers:
 *         return S.Integers
 *     elif a is sympy.S.Rationals:             # <<<<<<<<<<<<<<
 *         return S.Rationals
 *     elif isinstance(a, sympy.Interval):
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":455
 *     elif a is sympy.S.Rationals:
 *         return S.Rationals
 *     elif isinstance(a, sympy.Interval):             # <<<<<<<<<<<<<<
 *         return interval(*(a.args))
 *     elif a is sympy.S.EmptySet:
*/
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_Interval); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 455, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_5 = PyObject_IsInstance(__pyx_v_a, __pyx_t_11); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 455, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":456
 *         return S.Rationals
 *     elif isinstance(a, sympy.Interval):
 *         return interval(*(a.args))             # <<<<<<<<<<<<<<
 *     elif a is sympy.S.EmptySet:
 *         return S.EmptySet
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_interval); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 456, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 456, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_10 = __Pyx_PySequence_Tuple(__pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 456, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_10, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 456, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":455
 *     elif a is sympy.S.Rationals:
 *         return S.Rationals
 *     elif isinstance(a, sympy.Interval):             # <<<<<<<<<<<<<<
 *         return interval(*(a.args))
 *     elif a is sympy.S.EmptySet:
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":457
 *     elif isinstance(a, sympy.Interval):
 *         return interval(*(a.args))
 *     elif a is sympy.S.EmptySet:             # <<<<<<<<<<<<<<
 *         return S.EmptySet
 *     elif a is sympy.S.UniversalSet:
*/
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_S); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 457, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_EmptySet); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 457, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_5 = (__pyx_v_a == __pyx_t_10);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":458
 *         return interval(*(a.args))
 *     elif a is sympy.S.EmptySet:
 *         return S.EmptySet             # <<<<<<<<<<<<<<
 *     elif a is sympy.S.UniversalSet:
 *         return S.UniversalSet
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_S); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 458, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_EmptySet); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 458, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":457
 *     elif isinstance(a, sympy.Interval):
 *         return interval(*(a.args))
 *     elif a is sympy.S.EmptySet:             # <<<<<<<<<<<<<<
 *         return S.EmptySet
 *     elif a is sympy.S.UniversalSet:
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":459
 *     elif a is sympy.S.EmptySet:
 *         return S.EmptySet
 *     elif a is sympy.S.UniversalSet:             # <<<<<<<<<<<<<<
 *         return S.UniversalSet
 *     elif isinstance(a, sympy.FiniteSet):
*/
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_S); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 459, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_UniversalSet); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 459, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_5 = (__pyx_v_a == __pyx_t_10);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":460
 *         return S.EmptySet
 *     elif a is sympy.S.UniversalSet:
 *         return S.UniversalSet             # <<<<<<<<<<<<<<
 *     elif isinstance(a, sympy.FiniteSet):
 *         return finiteset(*(a.args))
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_S); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 460, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_UniversalSet); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 460, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":459
 *     elif a is sympy.S.EmptySet:
 *         return S.EmptySet
 *     elif a is sympy.S.UniversalSet:             # <<<<<<<<<<<<<<
 *         return S.UniversalSet
 *     elif isinstance(a, sympy.FiniteSet):
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":461
 *     elif a is sympy.S.UniversalSet:
 *         return S.UniversalSet
 *     elif isinstance(a, sympy.FiniteSet):             # <<<<<<<<<<<<<<
 *         return finiteset(*(a.args))
 *     elif isinstance(a, sympy.Contains):
*/
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_FiniteSet); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 461, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = PyObject_IsInstance(__pyx_v_a, __pyx_t_6); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 461, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":462
 *         return S.UniversalSet
 *     elif isinstance(a, sympy.FiniteSet):
 *         return finiteset(*(a.args))             # <<<<<<<<<<<<<<
 *     elif isinstance(a, sympy.Contains):
 *         return contains(*(a.args))
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_finiteset); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 462, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 462, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_11 = __Pyx_PySequence_Tuple(__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 462, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_11, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 462, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":461
 *     elif a is sympy.S.UniversalSet:
 *         return S.UniversalSet
 *     elif isinstance(a, sympy.FiniteSet):             # <<<<<<<<<<<<<<
 *         return finiteset(*(a.args))
 *     elif isinstance(a, sympy.Contains):
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":463
 *     elif isinstance(a, sympy.FiniteSet):
 *         return finiteset(*(a.args))
 *     elif isinstance(a, sympy.Contains):             # <<<<<<<<<<<<<<
 *         return contains(*(a.args))
 *     elif isinstance(a, sympy.Union):
*/
  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_Contains); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 463, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_5 = PyObject_IsInstance(__pyx_v_a, __pyx_t_10); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 463, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":464
 *         return finiteset(*(a.args))
 *     elif isinstance(a, sympy.Contains):
 *         return contains(*(a.args))             # <<<<<<<<<<<<<<
 *     elif isinstance(a, sympy.Union):
 *         return set_union(*(a.args))
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_contains); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 464, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 464, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_6 = __Pyx_PySequence_Tuple(__pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 464, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_6, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 464, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_r = __pyx_t_11;
    __pyx_t_11 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":463
 *     elif isinstance(a, sympy.FiniteSet):
 *         return finiteset(*(a.args))
 *     elif isinstance(a, sympy.Contains):             # <<<<<<<<<<<<<<
 *         return contains(*(a.args))
 *     elif isinstance(a, sympy.Union):
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":465
 *     elif isinstance(a, sympy.Contains):
 *         return contains(*(a.args))
 *     elif isinstance(a, sympy.Union):             # <<<<<<<<<<<<<<
 *         return set_union(*(a.args))
 *     elif isinstance(a, sympy.Intersection):
*/
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_Union); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 465, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_5 = PyObject_IsInstance(__pyx_v_a, __pyx_t_11); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 465, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":466
 *         return contains(*(a.args))
 *     elif isinstance(a, sympy.Union):
 *         return set_union(*(a.args))             # <<<<<<<<<<<<<<
 *     elif isinstance(a, sympy.Intersection):
 *         return set_intersection(*(a.args))
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_set_union); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 466, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 466, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_10 = __Pyx_PySequence_Tuple(__pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 466, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_10, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 466, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":465
 *     elif isinstance(a, sympy.Contains):
 *         return contains(*(a.args))
 *     elif isinstance(a, sympy.Union):             # <<<<<<<<<<<<<<
 *         return set_union(*(a.args))
 *     elif isinstance(a, sympy.Intersection):
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":467
 *     elif isinstance(a, sympy.Union):
 *         return set_union(*(a.args))
 *     elif isinstance(a, sympy.Intersection):             # <<<<<<<<<<<<<<
 *         return set_intersection(*(a.args))
 *     elif isinstance(a, sympy.Complement):
*/
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_Intersection); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 467, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = PyObject_IsInstance(__pyx_v_a, __pyx_t_6); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 467, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":468
 *         return set_union(*(a.args))
 *     elif isinstance(a, sympy.Intersection):
 *         return set_intersection(*(a.args))             # <<<<<<<<<<<<<<
 *     elif isinstance(a, sympy.Complement):
 *         return set_complement(*(a.args))
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_set_intersection); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 468, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 468, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_11 = __Pyx_PySequence_Tuple(__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 468, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_11, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 468, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":467
 *     elif isinstance(a, sympy.Union):
 *         return set_union(*(a.args))
 *     elif isinstance(a, sympy.Intersection):             # <<<<<<<<<<<<<<
 *         return set_intersection(*(a.args))
 *     elif isinstance(a, sympy.Complement):
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":469
 *     elif isinstance(a, sympy.Intersection):
 *         return set_intersection(*(a.args))
 *     elif isinstance(a, sympy.Complement):             # <<<<<<<<<<<<<<
 *         return set_complement(*(a.args))
 *     elif isinstance(a, sympy.ImageSet):
*/
  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_Complement); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 469, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_5 = PyObject_IsInstance(__pyx_v_a, __pyx_t_10); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 469, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":470
 *         return set_intersection(*(a.args))
 *     elif isinstance(a, sympy.Complement):
 *         return set_complement(*(a.args))             # <<<<<<<<<<<<<<
 *     elif isinstance(a, sympy.ImageSet):
 *         return imageset(*(a.args))
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_set_complement); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 470, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 470, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_6 = __Pyx_PySequence_Tuple(__pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 470, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_6, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 470, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_r = __pyx_t_11;
    __pyx_t_11 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":469
 *     elif isinstance(a, sympy.Intersection):
 *         return set_intersection(*(a.args))
 *     elif isinstance(a, sympy.Complement):             # <<<<<<<<<<<<<<
 *         return set_complement(*(a.args))
 *     elif isinstance(a, sympy.ImageSet):
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":471
 *     elif isinstance(a, sympy.Complement):
 *         return set_complement(*(a.args))
 *     elif isinstance(a, sympy.ImageSet):             # <<<<<<<<<<<<<<
 *         return imageset(*(a.args))
 *     elif isinstance(a, sympy.Function):
*/
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_ImageSet); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 471, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_5 = PyObject_IsInstance(__pyx_v_a, __pyx_t_11); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 471, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":472
 *         return set_complement(*(a.args))
 *     elif isinstance(a, sympy.ImageSet):
 *         return imageset(*(a.args))             # <<<<<<<<<<<<<<
 *     elif isinstance(a, sympy.Function):
 *         return PyFunction(a, a.args, a.func, sympy_module)
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_imageset); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 472, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 472, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_10 = __Pyx_PySequence_Tuple(__pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 472, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_10, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 472, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":471
 *     elif isinstance(a, sympy.Complement):
 *         return set_complement(*(a.args))
 *     elif isinstance(a, sympy.ImageSet):             # <<<<<<<<<<<<<<
 *         return imageset(*(a.args))
 *     elif isinstance(a, sympy.Function):
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":473
 *     elif isinstance(a, sympy.ImageSet):
 *         return imageset(*(a.args))
 *     elif isinstance(a, sympy.Function):             # <<<<<<<<<<<<<<
 *         return PyFunction(a, a.args, a.func, sympy_module)
 *     elif isinstance(a, sympy.UnevaluatedExpr):
*/
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_Function); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 473, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = PyObject_IsInstance(__pyx_v_a, __pyx_t_6); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 473, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":474
 *         return imageset(*(a.args))
 *     elif isinstance(a, sympy.Function):
 *         return PyFunction(a, a.args, a.func, sympy_module)             # <<<<<<<<<<<<<<
 *     elif isinstance(a, sympy.UnevaluatedExpr):
 *         return UnevaluatedExpr(a.args[0])
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_PyFunction); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 474, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 474, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_mstate_global->__pyx_n_u_func); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 474, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_sympy_module); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 474, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_7 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_11))) {
      __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_11);
      assert(__pyx_t_10);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_11);
      __Pyx_INCREF(__pyx_t_10);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_11, __pyx__function);
      __pyx_t_7 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[5] = {__pyx_t_10, __pyx_v_a, __pyx_t_4, __pyx_t_1, __pyx_t_8};
      __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_11, __pyx_callargs+__pyx_t_7, (5-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 474, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
    }
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":473
 *     elif isinstance(a, sympy.ImageSet):
 *         return imageset(*(a.args))
 *     elif isinstance(a, sympy.Function):             # <<<<<<<<<<<<<<
 *         return PyFunction(a, a.args, a.func, sympy_module)
 *     elif isinstance(a, sympy.UnevaluatedExpr):
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":475
 *     elif isinstance(a, sympy.Function):
 *         return PyFunction(a, a.args, a.func, sympy_module)
 *     elif isinstance(a, sympy.UnevaluatedExpr):             # <<<<<<<<<<<<<<
 *         return UnevaluatedExpr(a.args[0])
 *     elif isinstance(a, sympy.MatrixBase):
*/
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_UnevaluatedExpr); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 475, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = PyObject_IsInstance(__pyx_v_a, __pyx_t_6); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 475, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":476
 *         return PyFunction(a, a.args, a.func, sympy_module)
 *     elif isinstance(a, sympy.UnevaluatedExpr):
 *         return UnevaluatedExpr(a.args[0])             # <<<<<<<<<<<<<<
 *     elif isinstance(a, sympy.MatrixBase):
 *         row, col = a.shape
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_11 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_UnevaluatedExpr); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 476, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 476, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 476, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_7 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_8);
      assert(__pyx_t_11);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_11);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_8, __pyx__function);
      __pyx_t_7 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_t_4};
      __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 476, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
    }
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":475
 *     elif isinstance(a, sympy.Function):
 *         return PyFunction(a, a.args, a.func, sympy_module)
 *     elif isinstance(a, sympy.UnevaluatedExpr):             # <<<<<<<<<<<<<<
 *         return UnevaluatedExpr(a.args[0])
 *     elif isinstance(a, sympy.MatrixBase):
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":477
 *     elif isinstance(a, sympy.UnevaluatedExpr):
 *         return UnevaluatedExpr(a.args[0])
 *     elif isinstance(a, sympy.MatrixBase):             # <<<<<<<<<<<<<<
 *         row, col = a.shape
 *         v = []
*/
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_MatrixBase); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 477, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = PyObject_IsInstance(__pyx_v_a, __pyx_t_6); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 477, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":478
 *         return UnevaluatedExpr(a.args[0])
 *     elif isinstance(a, sympy.MatrixBase):
 *         row, col = a.shape             # <<<<<<<<<<<<<<
 *         v = []
 *         for r in a.tolist():
*/
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_mstate_global->__pyx_n_u_shape); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 478, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) {
      PyObject* sequence = __pyx_t_6;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 478, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_8 = PyTuple_GET_ITEM(sequence, 0);
        __Pyx_INCREF(__pyx_t_8);
        __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1);
        __Pyx_INCREF(__pyx_t_4);
      } else {
        __pyx_t_8 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference);
        if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 478, __pyx_L1_error)
        __Pyx_XGOTREF(__pyx_t_8);
        __pyx_t_4 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference);
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 478, __pyx_L1_error)
        __Pyx_XGOTREF(__pyx_t_4);
      }
      #else
      __pyx_t_8 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 478, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 478, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      #endif
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_11 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 478, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_13 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_11);
      index = 0; __pyx_t_8 = __pyx_t_13(__pyx_t_11); if (unlikely(!__pyx_t_8)) goto __pyx_L26_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_8);
      index = 1; __pyx_t_4 = __pyx_t_13(__pyx_t_11); if (unlikely(!__pyx_t_4)) goto __pyx_L26_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_4);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_11), 2) < (0)) __PYX_ERR(0, 478, __pyx_L1_error)
      __pyx_t_13 = NULL;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      goto __pyx_L27_unpacking_done;
      __pyx_L26_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_13 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 478, __pyx_L1_error)
      __pyx_L27_unpacking_done:;
    }
    __pyx_v_row = __pyx_t_8;
    __pyx_t_8 = 0;
    __pyx_v_col = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":479
 *     elif isinstance(a, sympy.MatrixBase):
 *         row, col = a.shape
 *         v = []             # <<<<<<<<<<<<<<
 *         for r in a.tolist():
 *             for e in r:
*/
    __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 479, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_v_v = ((PyObject*)__pyx_t_6);
    __pyx_t_6 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":480
 *         row, col = a.shape
 *         v = []
 *         for r in a.tolist():             # <<<<<<<<<<<<<<
 *             for e in r:
 *                 v.append(e)
*/
    __pyx_t_4 = __pyx_v_a;
    __Pyx_INCREF(__pyx_t_4);
    __pyx_t_7 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
      __pyx_t_6 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_tolist, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 480, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
    }
    if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
      __pyx_t_4 = __pyx_t_6; __Pyx_INCREF(__pyx_t_4);
      __pyx_t_3 = 0;
      __pyx_t_9 = NULL;
    } else {
      __pyx_t_3 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 480, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_9 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 480, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    for (;;) {
      if (likely(!__pyx_t_9)) {
        if (likely(PyList_CheckExact(__pyx_t_4))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_4);
            #if !CYTHON_ASSUME_SAFE_SIZE
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 480, __pyx_L1_error)
            #endif
            if (__pyx_t_3 >= __pyx_temp) break;
          }
          __pyx_t_6 = __Pyx_PyList_GetItemRefFast(__pyx_t_4, __pyx_t_3, __Pyx_ReferenceSharing_OwnStrongReference);
          ++__pyx_t_3;
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_4);
            #if !CYTHON_ASSUME_SAFE_SIZE
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 480, __pyx_L1_error)
            #endif
            if (__pyx_t_3 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_3));
          #else
          __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_3);
          #endif
          ++__pyx_t_3;
        }
        if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 480, __pyx_L1_error)
      } else {
        __pyx_t_6 = __pyx_t_9(__pyx_t_4);
        if (unlikely(!__pyx_t_6)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 480, __pyx_L1_error)
            PyErr_Clear();
          }
          break;
        }
      }
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_XDECREF_SET(__pyx_v_r, __pyx_t_6);
      __pyx_t_6 = 0;

      /* "symengine/lib/symengine_wrapper.pyx":481
 *         v = []
 *         for r in a.tolist():
 *             for e in r:             # <<<<<<<<<<<<<<
 *                 v.append(e)
 *         if isinstance(a, sympy.MutableDenseMatrix):
*/
      if (likely(PyList_CheckExact(__pyx_v_r)) || PyTuple_CheckExact(__pyx_v_r)) {
        __pyx_t_6 = __pyx_v_r; __Pyx_INCREF(__pyx_t_6);
        __pyx_t_14 = 0;
        __pyx_t_15 = NULL;
      } else {
        __pyx_t_14 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_v_r); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 481, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_15 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 481, __pyx_L1_error)
      }
      for (;;) {
        if (likely(!__pyx_t_15)) {
          if (likely(PyList_CheckExact(__pyx_t_6))) {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_6);
              #if !CYTHON_ASSUME_SAFE_SIZE
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 481, __pyx_L1_error)
              #endif
              if (__pyx_t_14 >= __pyx_temp) break;
            }
            __pyx_t_8 = __Pyx_PyList_GetItemRefFast(__pyx_t_6, __pyx_t_14, __Pyx_ReferenceSharing_OwnStrongReference);
            ++__pyx_t_14;
          } else {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_6);
              #if !CYTHON_ASSUME_SAFE_SIZE
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 481, __pyx_L1_error)
              #endif
              if (__pyx_t_14 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_8 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_14));
            #else
            __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_6, __pyx_t_14);
            #endif
            ++__pyx_t_14;
          }
          if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 481, __pyx_L1_error)
        } else {
          __pyx_t_8 = __pyx_t_15(__pyx_t_6);
          if (unlikely(!__pyx_t_8)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 481, __pyx_L1_error)
              PyErr_Clear();
            }
            break;
          }
        }
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_XDECREF_SET(__pyx_v_e, __pyx_t_8);
        __pyx_t_8 = 0;

        /* "symengine/lib/symengine_wrapper.pyx":482
 *         for r in a.tolist():
 *             for e in r:
 *                 v.append(e)             # <<<<<<<<<<<<<<
 *         if isinstance(a, sympy.MutableDenseMatrix):
 *             return MutableDenseMatrix(row, col, v)
*/
        __pyx_t_16 = __Pyx_PyList_Append(__pyx_v_v, __pyx_v_e); if (unlikely(__pyx_t_16 == ((int)-1))) __PYX_ERR(0, 482, __pyx_L1_error)

        /* "symengine/lib/symengine_wrapper.pyx":481
 *         v = []
 *         for r in a.tolist():
 *             for e in r:             # <<<<<<<<<<<<<<
 *                 v.append(e)
 *         if isinstance(a, sympy.MutableDenseMatrix):
*/
      }
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "symengine/lib/symengine_wrapper.pyx":480
 *         row, col = a.shape
 *         v = []
 *         for r in a.tolist():             # <<<<<<<<<<<<<<
 *             for e in r:
 *                 v.append(e)
*/
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":483
 *             for e in r:
 *                 v.append(e)
 *         if isinstance(a, sympy.MutableDenseMatrix):             # <<<<<<<<<<<<<<
 *             return MutableDenseMatrix(row, col, v)
 *         elif isinstance(a, sympy.ImmutableDenseMatrix):
*/
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_MutableDenseMatrix); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 483, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyObject_IsInstance(__pyx_v_a, __pyx_t_4); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 483, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_5) {

      /* "symengine/lib/symengine_wrapper.pyx":484
 *                 v.append(e)
 *         if isinstance(a, sympy.MutableDenseMatrix):
 *             return MutableDenseMatrix(row, col, v)             # <<<<<<<<<<<<<<
 *         elif isinstance(a, sympy.ImmutableDenseMatrix):
 *             return ImmutableDenseMatrix(row, col, v)
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_6 = NULL;
      __pyx_t_7 = 1;
      {
        PyObject *__pyx_callargs[4] = {__pyx_t_6, __pyx_v_row, __pyx_v_col, __pyx_v_v};
        __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_MutableDenseMatrix, __pyx_callargs+__pyx_t_7, (4-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 484, __pyx_L1_error)
        __Pyx_GOTREF((PyObject *)__pyx_t_4);
      }
      __pyx_r = ((PyObject *)__pyx_t_4);
      __pyx_t_4 = 0;
      goto __pyx_L0;

      /* "symengine/lib/symengine_wrapper.pyx":483
 *             for e in r:
 *                 v.append(e)
 *         if isinstance(a, sympy.MutableDenseMatrix):             # <<<<<<<<<<<<<<
 *             return MutableDenseMatrix(row, col, v)
 *         elif isinstance(a, sympy.ImmutableDenseMatrix):
*/
    }

    /* "symengine/lib/symengine_wrapper.pyx":485
 *         if isinstance(a, sympy.MutableDenseMatrix):
 *             return MutableDenseMatrix(row, col, v)
 *         elif isinstance(a, sympy.ImmutableDenseMatrix):             # <<<<<<<<<<<<<<
 *             return ImmutableDenseMatrix(row, col, v)
 *         else:
*/
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_ImmutableDenseMatrix); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 485, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyObject_IsInstance(__pyx_v_a, __pyx_t_4); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 485, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (likely(__pyx_t_5)) {

      /* "symengine/lib/symengine_wrapper.pyx":486
 *             return MutableDenseMatrix(row, col, v)
 *         elif isinstance(a, sympy.ImmutableDenseMatrix):
 *             return ImmutableDenseMatrix(row, col, v)             # <<<<<<<<<<<<<<
 *         else:
 *             raise NotImplementedError
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_6 = NULL;
      __pyx_t_7 = 1;
      {
        PyObject *__pyx_callargs[4] = {__pyx_t_6, __pyx_v_row, __pyx_v_col, __pyx_v_v};
        __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ImmutableDenseMatrix, __pyx_callargs+__pyx_t_7, (4-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 486, __pyx_L1_error)
        __Pyx_GOTREF((PyObject *)__pyx_t_4);
      }
      __pyx_r = ((PyObject *)__pyx_t_4);
      __pyx_t_4 = 0;
      goto __pyx_L0;

      /* "symengine/lib/symengine_wrapper.pyx":485
 *         if isinstance(a, sympy.MutableDenseMatrix):
 *             return MutableDenseMatrix(row, col, v)
 *         elif isinstance(a, sympy.ImmutableDenseMatrix):             # <<<<<<<<<<<<<<
 *             return ImmutableDenseMatrix(row, col, v)
 *         else:
*/
    }

    /* "symengine/lib/symengine_wrapper.pyx":488
 *             return ImmutableDenseMatrix(row, col, v)
 *         else:
 *             raise NotImplementedError             # <<<<<<<<<<<<<<
 *     elif isinstance(a, sympy.polys.domains.modularinteger.ModularInteger):
 *         return PyNumber(a, sympy_module)
*/
    /*else*/ {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_NotImplementedError))), 0, 0, 0);
      __PYX_ERR(0, 488, __pyx_L1_error)
    }

    /* "symengine/lib/symengine_wrapper.pyx":477
 *     elif isinstance(a, sympy.UnevaluatedExpr):
 *         return UnevaluatedExpr(a.args[0])
 *     elif isinstance(a, sympy.MatrixBase):             # <<<<<<<<<<<<<<
 *         row, col = a.shape
 *         v = []
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":489
 *         else:
 *             raise NotImplementedError
 *     elif isinstance(a, sympy.polys.domains.modularinteger.ModularInteger):             # <<<<<<<<<<<<<<
 *         return PyNumber(a, sympy_module)
 *     elif sympy.__version__ > '1.0':
*/
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_polys); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 489, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_domains); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 489, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_modularinteger); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 489, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ModularInteger); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 489, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_5 = PyObject_IsInstance(__pyx_v_a, __pyx_t_6); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 489, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":490
 *             raise NotImplementedError
 *     elif isinstance(a, sympy.polys.domains.modularinteger.ModularInteger):
 *         return PyNumber(a, sympy_module)             # <<<<<<<<<<<<<<
 *     elif sympy.__version__ > '1.0':
 *         if isinstance(a, sympy.acsch):
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_sympy_module); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 490, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_v_a, __pyx_t_8};
      __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_PyNumber, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 490, __pyx_L1_error)
      __Pyx_GOTREF((PyObject *)__pyx_t_6);
    }
    __pyx_r = ((PyObject *)__pyx_t_6);
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":489
 *         else:
 *             raise NotImplementedError
 *     elif isinstance(a, sympy.polys.domains.modularinteger.ModularInteger):             # <<<<<<<<<<<<<<
 *         return PyNumber(a, sympy_module)
 *     elif sympy.__version__ > '1.0':
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":491
 *     elif isinstance(a, sympy.polys.domains.modularinteger.ModularInteger):
 *         return PyNumber(a, sympy_module)
 *     elif sympy.__version__ > '1.0':             # <<<<<<<<<<<<<<
 *         if isinstance(a, sympy.acsch):
 *             return acsch(a.args[0])
*/
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_version); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 491, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = PyObject_RichCompare(__pyx_t_6, __pyx_mstate_global->__pyx_kp_u_1_0, Py_GT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 491, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 491, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":492
 *         return PyNumber(a, sympy_module)
 *     elif sympy.__version__ > '1.0':
 *         if isinstance(a, sympy.acsch):             # <<<<<<<<<<<<<<
 *             return acsch(a.args[0])
 *         elif isinstance(a, sympy.asech):
*/
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_acsch); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 492, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_5 = PyObject_IsInstance(__pyx_v_a, __pyx_t_8); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 492, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (__pyx_t_5) {

      /* "symengine/lib/symengine_wrapper.pyx":493
 *     elif sympy.__version__ > '1.0':
 *         if isinstance(a, sympy.acsch):
 *             return acsch(a.args[0])             # <<<<<<<<<<<<<<
 *         elif isinstance(a, sympy.asech):
 *             return asech(a.args[0])
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_6 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_acsch); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 493, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 493, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_11, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 493, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_7 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
        assert(__pyx_t_6);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
        __pyx_t_7 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_1};
        __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 493, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
      }
      __pyx_r = __pyx_t_8;
      __pyx_t_8 = 0;
      goto __pyx_L0;

      /* "symengine/lib/symengine_wrapper.pyx":492
 *         return PyNumber(a, sympy_module)
 *     elif sympy.__version__ > '1.0':
 *         if isinstance(a, sympy.acsch):             # <<<<<<<<<<<<<<
 *             return acsch(a.args[0])
 *         elif isinstance(a, sympy.asech):
*/
    }

    /* "symengine/lib/symengine_wrapper.pyx":494
 *         if isinstance(a, sympy.acsch):
 *             return acsch(a.args[0])
 *         elif isinstance(a, sympy.asech):             # <<<<<<<<<<<<<<
 *             return asech(a.args[0])
 *         elif isinstance(a, sympy.ConditionSet):
*/
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_asech); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 494, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_5 = PyObject_IsInstance(__pyx_v_a, __pyx_t_8); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 494, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (__pyx_t_5) {

      /* "symengine/lib/symengine_wrapper.pyx":495
 *             return acsch(a.args[0])
 *         elif isinstance(a, sympy.asech):
 *             return asech(a.args[0])             # <<<<<<<<<<<<<<
 *         elif isinstance(a, sympy.ConditionSet):
 *             return conditionset(*(a.args))
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_4 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_asech); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 495, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 495, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_11 = __Pyx_GetItemInt(__pyx_t_6, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 495, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_7 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
        assert(__pyx_t_4);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_1, __pyx__function);
        __pyx_t_7 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_11};
        __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_1, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 495, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
      }
      __pyx_r = __pyx_t_8;
      __pyx_t_8 = 0;
      goto __pyx_L0;

      /* "symengine/lib/symengine_wrapper.pyx":494
 *         if isinstance(a, sympy.acsch):
 *             return acsch(a.args[0])
 *         elif isinstance(a, sympy.asech):             # <<<<<<<<<<<<<<
 *             return asech(a.args[0])
 *         elif isinstance(a, sympy.ConditionSet):
*/
    }

    /* "symengine/lib/symengine_wrapper.pyx":496
 *         elif isinstance(a, sympy.asech):
 *             return asech(a.args[0])
 *         elif isinstance(a, sympy.ConditionSet):             # <<<<<<<<<<<<<<
 *             return conditionset(*(a.args))
 * 
*/
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_ConditionSet); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 496, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_5 = PyObject_IsInstance(__pyx_v_a, __pyx_t_8); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 496, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (__pyx_t_5) {

      /* "symengine/lib/symengine_wrapper.pyx":497
 *             return asech(a.args[0])
 *         elif isinstance(a, sympy.ConditionSet):
 *             return conditionset(*(a.args))             # <<<<<<<<<<<<<<
 * 
 *     if raise_error:
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_conditionset); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 497, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 497, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_11 = __Pyx_PySequence_Tuple(__pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 497, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 497, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "symengine/lib/symengine_wrapper.pyx":496
 *         elif isinstance(a, sympy.asech):
 *             return asech(a.args[0])
 *         elif isinstance(a, sympy.ConditionSet):             # <<<<<<<<<<<<<<
 *             return conditionset(*(a.args))
 * 
*/
    }

    /* "symengine/lib/symengine_wrapper.pyx":491
 *     elif isinstance(a, sympy.polys.domains.modularinteger.ModularInteger):
 *         return PyNumber(a, sympy_module)
 *     elif sympy.__version__ > '1.0':             # <<<<<<<<<<<<<<
 *         if isinstance(a, sympy.acsch):
 *             return acsch(a.args[0])
*/
  }
  __pyx_L3:;

  /* "symengine/lib/symengine_wrapper.pyx":499
 *             return conditionset(*(a.args))
 * 
 *     if raise_error:             # <<<<<<<<<<<<<<
 *         raise SympifyError(("sympy2symengine: Cannot convert '%r' (of type %s)"
 *                             " to a symengine type.") % (a, type(a)))
*/
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_raise_error); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 499, __pyx_L1_error)
  if (unlikely(__pyx_t_5)) {

    /* "symengine/lib/symengine_wrapper.pyx":500
 * 
 *     if raise_error:
 *         raise SympifyError(("sympy2symengine: Cannot convert '%r' (of type %s)"             # <<<<<<<<<<<<<<
 *                             " to a symengine type.") % (a, type(a)))
 * 
*/
    __pyx_t_11 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_SympifyError); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 500, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);

    /* "symengine/lib/symengine_wrapper.pyx":501
 *     if raise_error:
 *         raise SympifyError(("sympy2symengine: Cannot convert '%r' (of type %s)"
 *                             " to a symengine type.") % (a, type(a)))             # <<<<<<<<<<<<<<
 * 
 * 
*/
    __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_a), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 501, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(((PyObject *)Py_TYPE(__pyx_v_a))), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 501, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_17[0] = __pyx_mstate_global->__pyx_kp_u_sympy2symengine_Cannot_convert;
    __pyx_t_17[1] = __pyx_t_4;
    __pyx_t_17[2] = __pyx_mstate_global->__pyx_kp_u_of_type;
    __pyx_t_17[3] = __pyx_t_6;
    __pyx_t_17[4] = __pyx_mstate_global->__pyx_kp_u_to_a_symengine_type;

    /* "symengine/lib/symengine_wrapper.pyx":500
 * 
 *     if raise_error:
 *         raise SympifyError(("sympy2symengine: Cannot convert '%r' (of type %s)"             # <<<<<<<<<<<<<<
 *                             " to a symengine type.") % (a, type(a)))
 * 
*/
    __pyx_t_10 = __Pyx_PyUnicode_Join(__pyx_t_17, 5, 33 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 11 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + 22, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6));
    if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 500, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_8);
      assert(__pyx_t_11);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_11);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_8, __pyx__function);
      __pyx_t_7 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_t_10};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 500, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 500, __pyx_L1_error)

    /* "symengine/lib/symengine_wrapper.pyx":499
 *             return conditionset(*(a.args))
 * 
 *     if raise_error:             # <<<<<<<<<<<<<<
 *         raise SympifyError(("sympy2symengine: Cannot convert '%r' (of type %s)"
 *                             " to a symengine type.") % (a, type(a)))
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":271
 *     return r
 * 
 * def sympy2symengine(a, raise_error=False):             # <<<<<<<<<<<<<<
 *     """
 *     Converts 'a' from SymPy to SymEngine.
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.sympy2symengine", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sympy);
  __Pyx_XDECREF(__pyx_v_sympy_AppliedUndef);
  __Pyx_XDECREF(__pyx_v_x);
  __Pyx_XDECREF(__pyx_v_y);
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XDECREF(__pyx_v_row);
  __Pyx_XDECREF(__pyx_v_col);
  __Pyx_XDECREF(__pyx_v_v);
  __Pyx_XDECREF(__pyx_v_r);
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XDECREF(__pyx_7genexpr__pyx_v_x);
  __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_x);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":504
 * 
 * 
 * def sympify(a):             # <<<<<<<<<<<<<<
 *     """
 *     Converts an expression 'a' into a SymEngine type.
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_7sympify(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9symengine_3lib_17symengine_wrapper_6sympify, "\n    Converts an expression 'a' into a SymEngine type.\n\n    Arguments\n    =========\n\n    a ............. An expression to convert.\n\n    Examples\n    ========\n\n    >>> from symengine import sympify\n    >>> sympify(1)\n    1\n    >>> sympify(\"a+b\")\n    a + b\n    ");
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_7sympify = {"sympify", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_7sympify, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9symengine_3lib_17symengine_wrapper_6sympify};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_7sympify(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_a = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("sympify (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_a,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 504, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 504, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "sympify", 0) < (0)) __PYX_ERR(0, 504, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("sympify", 1, 1, 1, i); __PYX_ERR(0, 504, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 504, __pyx_L3_error)
    }
    __pyx_v_a = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("sympify", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 504, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.sympify", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_6sympify(__pyx_self, __pyx_v_a);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_6sympify(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_a) {
  PyObject *__pyx_v_v = NULL;
  PyObject *__pyx_v_e = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  std::string __pyx_t_5;
  SymEngine::RCP<const SymEngine::Basic> __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  PyObject *(*__pyx_t_8)(PyObject *);
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("sympify", 0);

  /* "symengine/lib/symengine_wrapper.pyx":522
 *     a + b
 *     """
 *     if isinstance(a, str):             # <<<<<<<<<<<<<<
 *         return c2py(symengine.parse(a.encode("utf-8")))
 *     elif isinstance(a, tuple):
*/
  __pyx_t_1 = PyUnicode_Check(__pyx_v_a); 
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":523
 *     """
 *     if isinstance(a, str):
 *         return c2py(symengine.parse(a.encode("utf-8")))             # <<<<<<<<<<<<<<
 *     elif isinstance(a, tuple):
 *         v = []
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __pyx_v_a;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_4 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_utf_8};
      __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_encode, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 523, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __pyx_t_5 = __pyx_convert_string_from_py_6libcpp_6string_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 523, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    try {
      __pyx_t_6 = SymEngine::parse(__pyx_t_5);
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(0, 523, __pyx_L1_error)
    }
    __pyx_t_2 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_6)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 523, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":522
 *     a + b
 *     """
 *     if isinstance(a, str):             # <<<<<<<<<<<<<<
 *         return c2py(symengine.parse(a.encode("utf-8")))
 *     elif isinstance(a, tuple):
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":524
 *     if isinstance(a, str):
 *         return c2py(symengine.parse(a.encode("utf-8")))
 *     elif isinstance(a, tuple):             # <<<<<<<<<<<<<<
 *         v = []
 *         for e in a:
*/
  __pyx_t_1 = PyTuple_Check(__pyx_v_a); 
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":525
 *         return c2py(symengine.parse(a.encode("utf-8")))
 *     elif isinstance(a, tuple):
 *         v = []             # <<<<<<<<<<<<<<
 *         for e in a:
 *             v.append(sympify(e))
*/
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 525, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_v = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":526
 *     elif isinstance(a, tuple):
 *         v = []
 *         for e in a:             # <<<<<<<<<<<<<<
 *             v.append(sympify(e))
 *         return tuple(v)
*/
    if (likely(PyList_CheckExact(__pyx_v_a)) || PyTuple_CheckExact(__pyx_v_a)) {
      __pyx_t_2 = __pyx_v_a; __Pyx_INCREF(__pyx_t_2);
      __pyx_t_7 = 0;
      __pyx_t_8 = NULL;
    } else {
      __pyx_t_7 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_a); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 526, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_8 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 526, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_8)) {
        if (likely(PyList_CheckExact(__pyx_t_2))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
            #if !CYTHON_ASSUME_SAFE_SIZE
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 526, __pyx_L1_error)
            #endif
            if (__pyx_t_7 >= __pyx_temp) break;
          }
          __pyx_t_3 = __Pyx_PyList_GetItemRefFast(__pyx_t_2, __pyx_t_7, __Pyx_ReferenceSharing_OwnStrongReference);
          ++__pyx_t_7;
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
            #if !CYTHON_ASSUME_SAFE_SIZE
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 526, __pyx_L1_error)
            #endif
            if (__pyx_t_7 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_3 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_7));
          #else
          __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_7);
          #endif
          ++__pyx_t_7;
        }
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 526, __pyx_L1_error)
      } else {
        __pyx_t_3 = __pyx_t_8(__pyx_t_2);
        if (unlikely(!__pyx_t_3)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 526, __pyx_L1_error)
            PyErr_Clear();
          }
          break;
        }
      }
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_XDECREF_SET(__pyx_v_e, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "symengine/lib/symengine_wrapper.pyx":527
 *         v = []
 *         for e in a:
 *             v.append(sympify(e))             # <<<<<<<<<<<<<<
 *         return tuple(v)
 *     elif isinstance(a, list):
*/
      __pyx_t_9 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 527, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_4 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_10))) {
        __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_10);
        assert(__pyx_t_9);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_10);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_10, __pyx__function);
        __pyx_t_4 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_v_e};
        __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_10, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 527, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_v, __pyx_t_3); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 527, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "symengine/lib/symengine_wrapper.pyx":526
 *     elif isinstance(a, tuple):
 *         v = []
 *         for e in a:             # <<<<<<<<<<<<<<
 *             v.append(sympify(e))
 *         return tuple(v)
*/
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":528
 *         for e in a:
 *             v.append(sympify(e))
 *         return tuple(v)             # <<<<<<<<<<<<<<
 *     elif isinstance(a, list):
 *         v = []
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyList_AsTuple(__pyx_v_v); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 528, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":524
 *     if isinstance(a, str):
 *         return c2py(symengine.parse(a.encode("utf-8")))
 *     elif isinstance(a, tuple):             # <<<<<<<<<<<<<<
 *         v = []
 *         for e in a:
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":529
 *             v.append(sympify(e))
 *         return tuple(v)
 *     elif isinstance(a, list):             # <<<<<<<<<<<<<<
 *         v = []
 *         for e in a:
*/
  __pyx_t_1 = PyList_Check(__pyx_v_a); 
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":530
 *         return tuple(v)
 *     elif isinstance(a, list):
 *         v = []             # <<<<<<<<<<<<<<
 *         for e in a:
 *             v.append(sympify(e))
*/
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 530, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_v = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":531
 *     elif isinstance(a, list):
 *         v = []
 *         for e in a:             # <<<<<<<<<<<<<<
 *             v.append(sympify(e))
 *         return v
*/
    if (likely(PyList_CheckExact(__pyx_v_a)) || PyTuple_CheckExact(__pyx_v_a)) {
      __pyx_t_2 = __pyx_v_a; __Pyx_INCREF(__pyx_t_2);
      __pyx_t_7 = 0;
      __pyx_t_8 = NULL;
    } else {
      __pyx_t_7 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_a); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 531, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_8 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 531, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_8)) {
        if (likely(PyList_CheckExact(__pyx_t_2))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
            #if !CYTHON_ASSUME_SAFE_SIZE
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 531, __pyx_L1_error)
            #endif
            if (__pyx_t_7 >= __pyx_temp) break;
          }
          __pyx_t_3 = __Pyx_PyList_GetItemRefFast(__pyx_t_2, __pyx_t_7, __Pyx_ReferenceSharing_OwnStrongReference);
          ++__pyx_t_7;
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
            #if !CYTHON_ASSUME_SAFE_SIZE
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 531, __pyx_L1_error)
            #endif
            if (__pyx_t_7 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_3 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_7));
          #else
          __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_7);
          #endif
          ++__pyx_t_7;
        }
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 531, __pyx_L1_error)
      } else {
        __pyx_t_3 = __pyx_t_8(__pyx_t_2);
        if (unlikely(!__pyx_t_3)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 531, __pyx_L1_error)
            PyErr_Clear();
          }
          break;
        }
      }
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_XDECREF_SET(__pyx_v_e, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "symengine/lib/symengine_wrapper.pyx":532
 *         v = []
 *         for e in a:
 *             v.append(sympify(e))             # <<<<<<<<<<<<<<
 *         return v
 *     return _sympify(a, True)
*/
      __pyx_t_10 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 532, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_4 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_9))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
        assert(__pyx_t_10);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9);
        __Pyx_INCREF(__pyx_t_10);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_9, __pyx__function);
        __pyx_t_4 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_v_e};
        __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 532, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_v, __pyx_t_3); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 532, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "symengine/lib/symengine_wrapper.pyx":531
 *     elif isinstance(a, list):
 *         v = []
 *         for e in a:             # <<<<<<<<<<<<<<
 *             v.append(sympify(e))
 *         return v
*/
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":533
 *         for e in a:
 *             v.append(sympify(e))
 *         return v             # <<<<<<<<<<<<<<
 *     return _sympify(a, True)
 * 
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_v);
    __pyx_r = __pyx_v_v;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":529
 *             v.append(sympify(e))
 *         return tuple(v)
 *     elif isinstance(a, list):             # <<<<<<<<<<<<<<
 *         v = []
 *         for e in a:
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":534
 *             v.append(sympify(e))
 *         return v
 *     return _sympify(a, True)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_sympify_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 534, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_9))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_9, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_a, Py_True};
    __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 534, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":504
 * 
 * 
 * def sympify(a):             # <<<<<<<<<<<<<<
 *     """
 *     Converts an expression 'a' into a SymEngine type.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.sympify", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v);
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":537
 * 
 * 
 * def _sympify(a, raise_error=True):             # <<<<<<<<<<<<<<
 *     """
 *     Converts an expression 'a' into a SymEngine type.
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9_sympify(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9symengine_3lib_17symengine_wrapper_8_sympify, "\n    Converts an expression 'a' into a SymEngine type.\n\n    Arguments\n    =========\n\n    a ............. An expression to convert.\n    raise_error ... Will raise an error on a failure (default True), otherwise\n                    it returns None if 'a' cannot be converted.\n\n    Examples\n    ========\n\n    >>> from symengine.li.symengine_wrapper import _sympify\n    >>> _sympify(1)\n    1\n    >>> _sympify(\"abc\", False)\n    >>>\n\n    ");
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_9_sympify = {"_sympify", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_9_sympify, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9symengine_3lib_17symengine_wrapper_8_sympify};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9_sympify(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_a = 0;
  PyObject *__pyx_v_raise_error = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sympify (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_a,&__pyx_mstate_global->__pyx_n_u_raise_error,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 537, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 537, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 537, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_sympify", 0) < (0)) __PYX_ERR(0, 537, __pyx_L3_error)
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_True)));
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_sympify", 0, 1, 2, i); __PYX_ERR(0, 537, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 537, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 537, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_True)));
    }
    __pyx_v_a = values[0];
    __pyx_v_raise_error = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_sympify", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 537, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper._sympify", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_8_sympify(__pyx_self, __pyx_v_a, __pyx_v_raise_error);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8_sympify(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_a, PyObject *__pyx_v_raise_error) {
  CYTHON_UNUSED PyObject *__pyx_v_sympy = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  int __pyx_t_14;
  PyObject *__pyx_t_15[5];
  PyObject *__pyx_t_16 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sympify", 0);

  /* "symengine/lib/symengine_wrapper.pyx":558
 * 
 *     """
 *     if isinstance(a, (Basic, MatrixBase)):             # <<<<<<<<<<<<<<
 *         return a
 *     elif isinstance(a, bool):
*/
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_a, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic); 
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_a, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_MatrixBase); 
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":559
 *     """
 *     if isinstance(a, (Basic, MatrixBase)):
 *         return a             # <<<<<<<<<<<<<<
 *     elif isinstance(a, bool):
 *         return (true if a else false)
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_a);
    __pyx_r = __pyx_v_a;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":558
 * 
 *     """
 *     if isinstance(a, (Basic, MatrixBase)):             # <<<<<<<<<<<<<<
 *         return a
 *     elif isinstance(a, bool):
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":560
 *     if isinstance(a, (Basic, MatrixBase)):
 *         return a
 *     elif isinstance(a, bool):             # <<<<<<<<<<<<<<
 *         return (true if a else false)
 *     elif isinstance(a, numbers.Integral):
*/
  __pyx_t_1 = PyBool_Check(__pyx_v_a); 
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":561
 *         return a
 *     elif isinstance(a, bool):
 *         return (true if a else false)             # <<<<<<<<<<<<<<
 *     elif isinstance(a, numbers.Integral):
 *         return Integer(a)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_a); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 561, __pyx_L1_error)
    if (__pyx_t_1) {
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_true); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 561, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = __pyx_t_4;
      __pyx_t_4 = 0;
    } else {
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_false); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 561, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = __pyx_t_4;
      __pyx_t_4 = 0;
    }
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":560
 *     if isinstance(a, (Basic, MatrixBase)):
 *         return a
 *     elif isinstance(a, bool):             # <<<<<<<<<<<<<<
 *         return (true if a else false)
 *     elif isinstance(a, numbers.Integral):
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":562
 *     elif isinstance(a, bool):
 *         return (true if a else false)
 *     elif isinstance(a, numbers.Integral):             # <<<<<<<<<<<<<<
 *         return Integer(a)
 *     elif isinstance(a, float):
*/
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_numbers); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 562, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Integral); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 562, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_1 = PyObject_IsInstance(__pyx_v_a, __pyx_t_4); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 562, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":563
 *         return (true if a else false)
 *     elif isinstance(a, numbers.Integral):
 *         return Integer(a)             # <<<<<<<<<<<<<<
 *     elif isinstance(a, float):
 *         return RealDouble(a)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_Integer); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 563, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
      assert(__pyx_t_3);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
      __pyx_t_6 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_a};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 563, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":562
 *     elif isinstance(a, bool):
 *         return (true if a else false)
 *     elif isinstance(a, numbers.Integral):             # <<<<<<<<<<<<<<
 *         return Integer(a)
 *     elif isinstance(a, float):
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":564
 *     elif isinstance(a, numbers.Integral):
 *         return Integer(a)
 *     elif isinstance(a, float):             # <<<<<<<<<<<<<<
 *         return RealDouble(a)
 *     elif have_numpy and isinstance(a, (np.float16, np.float32)):
*/
  __pyx_t_1 = PyFloat_Check(__pyx_v_a); 
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":565
 *         return Integer(a)
 *     elif isinstance(a, float):
 *         return RealDouble(a)             # <<<<<<<<<<<<<<
 *     elif have_numpy and isinstance(a, (np.float16, np.float32)):
 *         return RealDouble(a)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_5 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_RealDouble); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 565, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
      assert(__pyx_t_5);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
      __pyx_t_6 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_a};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 565, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":564
 *     elif isinstance(a, numbers.Integral):
 *         return Integer(a)
 *     elif isinstance(a, float):             # <<<<<<<<<<<<<<
 *         return RealDouble(a)
 *     elif have_numpy and isinstance(a, (np.float16, np.float32)):
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":566
 *     elif isinstance(a, float):
 *         return RealDouble(a)
 *     elif have_numpy and isinstance(a, (np.float16, np.float32)):             # <<<<<<<<<<<<<<
 *         return RealDouble(a)
 *     elif isinstance(a, complex):
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_have_numpy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 566, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 566, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L6_bool_binop_done;
  }
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 566, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_float16); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 566, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 566, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_float32); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 566, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_7 = PyObject_IsInstance(__pyx_v_a, __pyx_t_3); 
  if (!__pyx_t_7) {
  } else {
    __pyx_t_2 = __pyx_t_7;
    goto __pyx_L8_bool_binop_done;
  }
  __pyx_t_7 = PyObject_IsInstance(__pyx_v_a, __pyx_t_5); 
  __pyx_t_2 = __pyx_t_7;
  __pyx_L8_bool_binop_done:;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_1 = __pyx_t_2;
  __pyx_L6_bool_binop_done:;
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":567
 *         return RealDouble(a)
 *     elif have_numpy and isinstance(a, (np.float16, np.float32)):
 *         return RealDouble(a)             # <<<<<<<<<<<<<<
 *     elif isinstance(a, complex):
 *         return ComplexDouble(a)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_5 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_RealDouble); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 567, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      assert(__pyx_t_5);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
      __pyx_t_6 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_a};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 567, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":566
 *     elif isinstance(a, float):
 *         return RealDouble(a)
 *     elif have_numpy and isinstance(a, (np.float16, np.float32)):             # <<<<<<<<<<<<<<
 *         return RealDouble(a)
 *     elif isinstance(a, complex):
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":568
 *     elif have_numpy and isinstance(a, (np.float16, np.float32)):
 *         return RealDouble(a)
 *     elif isinstance(a, complex):             # <<<<<<<<<<<<<<
 *         return ComplexDouble(a)
 *     elif hasattr(a, '_symengine_'):
*/
  __pyx_t_1 = PyComplex_Check(__pyx_v_a); 
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":569
 *         return RealDouble(a)
 *     elif isinstance(a, complex):
 *         return ComplexDouble(a)             # <<<<<<<<<<<<<<
 *     elif hasattr(a, '_symengine_'):
 *         return _sympify(a._symengine_(), raise_error)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = NULL;
    __pyx_t_6 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_a};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ComplexDouble, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 569, __pyx_L1_error)
      __Pyx_GOTREF((PyObject *)__pyx_t_3);
    }
    __pyx_r = ((PyObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":568
 *     elif have_numpy and isinstance(a, (np.float16, np.float32)):
 *         return RealDouble(a)
 *     elif isinstance(a, complex):             # <<<<<<<<<<<<<<
 *         return ComplexDouble(a)
 *     elif hasattr(a, '_symengine_'):
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":570
 *     elif isinstance(a, complex):
 *         return ComplexDouble(a)
 *     elif hasattr(a, '_symengine_'):             # <<<<<<<<<<<<<<
 *         return _sympify(a._symengine_(), raise_error)
 *     elif hasattr(a, '_sympy_'):
*/
  __pyx_t_1 = __Pyx_HasAttr(__pyx_v_a, __pyx_mstate_global->__pyx_n_u_symengine); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 570, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":571
 *         return ComplexDouble(a)
 *     elif hasattr(a, '_symengine_'):
 *         return _sympify(a._symengine_(), raise_error)             # <<<<<<<<<<<<<<
 *     elif hasattr(a, '_sympy_'):
 *         return _sympify(a._sympy_(), raise_error)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_sympify_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 571, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_9 = __pyx_v_a;
    __Pyx_INCREF(__pyx_t_9);
    __pyx_t_6 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL};
      __pyx_t_8 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_symengine, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 571, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
    }
    __pyx_t_6 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
      assert(__pyx_t_4);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
      __pyx_t_6 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_t_8, __pyx_v_raise_error};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 571, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":570
 *     elif isinstance(a, complex):
 *         return ComplexDouble(a)
 *     elif hasattr(a, '_symengine_'):             # <<<<<<<<<<<<<<
 *         return _sympify(a._symengine_(), raise_error)
 *     elif hasattr(a, '_sympy_'):
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":572
 *     elif hasattr(a, '_symengine_'):
 *         return _sympify(a._symengine_(), raise_error)
 *     elif hasattr(a, '_sympy_'):             # <<<<<<<<<<<<<<
 *         return _sympify(a._sympy_(), raise_error)
 *     elif hasattr(a, 'pyobject'):
*/
  __pyx_t_1 = __Pyx_HasAttr(__pyx_v_a, __pyx_mstate_global->__pyx_n_u_sympy_2); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 572, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":573
 *         return _sympify(a._symengine_(), raise_error)
 *     elif hasattr(a, '_sympy_'):
 *         return _sympify(a._sympy_(), raise_error)             # <<<<<<<<<<<<<<
 *     elif hasattr(a, 'pyobject'):
 *         return _sympify(a.pyobject(), raise_error)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_5 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_sympify_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 573, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = __pyx_v_a;
    __Pyx_INCREF(__pyx_t_9);
    __pyx_t_6 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL};
      __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_sympy_2, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 573, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    __pyx_t_6 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_8);
      assert(__pyx_t_5);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_8, __pyx__function);
      __pyx_t_6 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_t_4, __pyx_v_raise_error};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 573, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":572
 *     elif hasattr(a, '_symengine_'):
 *         return _sympify(a._symengine_(), raise_error)
 *     elif hasattr(a, '_sympy_'):             # <<<<<<<<<<<<<<
 *         return _sympify(a._sympy_(), raise_error)
 *     elif hasattr(a, 'pyobject'):
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":574
 *     elif hasattr(a, '_sympy_'):
 *         return _sympify(a._sympy_(), raise_error)
 *     elif hasattr(a, 'pyobject'):             # <<<<<<<<<<<<<<
 *         return _sympify(a.pyobject(), raise_error)
 * 
*/
  __pyx_t_1 = __Pyx_HasAttr(__pyx_v_a, __pyx_mstate_global->__pyx_n_u_pyobject); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 574, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":575
 *         return _sympify(a._sympy_(), raise_error)
 *     elif hasattr(a, 'pyobject'):
 *         return _sympify(a.pyobject(), raise_error)             # <<<<<<<<<<<<<<
 * 
 *     try:
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_8 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_sympify_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 575, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_9 = __pyx_v_a;
    __Pyx_INCREF(__pyx_t_9);
    __pyx_t_6 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL};
      __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_pyobject, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 575, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
    }
    __pyx_t_6 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
      assert(__pyx_t_8);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
      __pyx_t_6 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_8, __pyx_t_5, __pyx_v_raise_error};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 575, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":574
 *     elif hasattr(a, '_sympy_'):
 *         return _sympify(a._sympy_(), raise_error)
 *     elif hasattr(a, 'pyobject'):             # <<<<<<<<<<<<<<
 *         return _sympify(a.pyobject(), raise_error)
 * 
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":577
 *         return _sympify(a.pyobject(), raise_error)
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy2symengine(a, raise_error)
*/
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
    __Pyx_XGOTREF(__pyx_t_10);
    __Pyx_XGOTREF(__pyx_t_11);
    __Pyx_XGOTREF(__pyx_t_12);
    /*try:*/ {

      /* "symengine/lib/symengine_wrapper.pyx":578
 * 
 *     try:
 *         import sympy             # <<<<<<<<<<<<<<
 *         return sympy2symengine(a, raise_error)
 *     except ImportError:
*/
      __pyx_t_13 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sympy, 0, 0, NULL, 0); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 578, __pyx_L10_error)
      __pyx_t_3 = __pyx_t_13;
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_v_sympy = __pyx_t_3;
      __pyx_t_3 = 0;

      /* "symengine/lib/symengine_wrapper.pyx":579
 *     try:
 *         import sympy
 *         return sympy2symengine(a, raise_error)             # <<<<<<<<<<<<<<
 *     except ImportError:
 *         pass
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_4 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_sympy2symengine); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 579, __pyx_L10_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
        assert(__pyx_t_4);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
        __pyx_t_6 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_v_a, __pyx_v_raise_error};
        __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 579, __pyx_L10_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L14_try_return;

      /* "symengine/lib/symengine_wrapper.pyx":577
 *         return _sympify(a.pyobject(), raise_error)
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy2symengine(a, raise_error)
*/
    }
    __pyx_L10_error:;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":580
 *         import sympy
 *         return sympy2symengine(a, raise_error)
 *     except ImportError:             # <<<<<<<<<<<<<<
 *         pass
 * 
*/
    __pyx_t_14 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_ImportError))));
    if (__pyx_t_14) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L11_exception_handled;
    }
    goto __pyx_L12_except_error;

    /* "symengine/lib/symengine_wrapper.pyx":577
 *         return _sympify(a.pyobject(), raise_error)
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy2symengine(a, raise_error)
*/
    __pyx_L12_except_error:;
    __Pyx_XGIVEREF(__pyx_t_10);
    __Pyx_XGIVEREF(__pyx_t_11);
    __Pyx_XGIVEREF(__pyx_t_12);
    __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
    goto __pyx_L1_error;
    __pyx_L14_try_return:;
    __Pyx_XGIVEREF(__pyx_t_10);
    __Pyx_XGIVEREF(__pyx_t_11);
    __Pyx_XGIVEREF(__pyx_t_12);
    __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
    goto __pyx_L0;
    __pyx_L11_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_10);
    __Pyx_XGIVEREF(__pyx_t_11);
    __Pyx_XGIVEREF(__pyx_t_12);
    __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
  }

  /* "symengine/lib/symengine_wrapper.pyx":583
 *         pass
 * 
 *     if raise_error:             # <<<<<<<<<<<<<<
 *         raise SympifyError(
 *             "sympify: Cannot convert '%r' (of type %s) to a symengine type." % (
*/
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_raise_error); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 583, __pyx_L1_error)
  if (unlikely(__pyx_t_1)) {

    /* "symengine/lib/symengine_wrapper.pyx":584
 * 
 *     if raise_error:
 *         raise SympifyError(             # <<<<<<<<<<<<<<
 *             "sympify: Cannot convert '%r' (of type %s) to a symengine type." % (
 *                 a, type(a)))
*/
    __pyx_t_5 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_SympifyError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 584, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);

    /* "symengine/lib/symengine_wrapper.pyx":586
 *         raise SympifyError(
 *             "sympify: Cannot convert '%r' (of type %s) to a symengine type." % (
 *                 a, type(a)))             # <<<<<<<<<<<<<<
 * 
 * funcs = {}
*/
    __pyx_t_8 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_a), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 586, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(((PyObject *)Py_TYPE(__pyx_v_a))), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 586, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_15[0] = __pyx_mstate_global->__pyx_kp_u_sympify_Cannot_convert;
    __pyx_t_15[1] = __pyx_t_8;
    __pyx_t_15[2] = __pyx_mstate_global->__pyx_kp_u_of_type;
    __pyx_t_15[3] = __pyx_t_9;
    __pyx_t_15[4] = __pyx_mstate_global->__pyx_kp_u_to_a_symengine_type;

    /* "symengine/lib/symengine_wrapper.pyx":585
 *     if raise_error:
 *         raise SympifyError(
 *             "sympify: Cannot convert '%r' (of type %s) to a symengine type." % (             # <<<<<<<<<<<<<<
 *                 a, type(a)))
 * 
*/
    __pyx_t_16 = __Pyx_PyUnicode_Join(__pyx_t_15, 5, 25 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8) + 11 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9) + 22, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9));
    if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 585, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_6 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      assert(__pyx_t_5);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
      __pyx_t_6 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_16};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 584, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 584, __pyx_L1_error)

    /* "symengine/lib/symengine_wrapper.pyx":583
 *         pass
 * 
 *     if raise_error:             # <<<<<<<<<<<<<<
 *         raise SympifyError(
 *             "sympify: Cannot convert '%r' (of type %s) to a symengine type." % (
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":537
 * 
 * 
 * def _sympify(a, raise_error=True):             # <<<<<<<<<<<<<<
 *     """
 *     Converts an expression 'a' into a SymEngine type.
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper._sympify", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sympy);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":590
 * funcs = {}
 * 
 * def get_function_class(function, module):             # <<<<<<<<<<<<<<
 *     if not function in funcs:
 *         funcs[function] = PyFunctionClass(function, module)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_11get_function_class(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_11get_function_class = {"get_function_class", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_11get_function_class, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_11get_function_class(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_function = 0;
  PyObject *__pyx_v_module = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_function_class (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_function,&__pyx_mstate_global->__pyx_n_u_module,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 590, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 590, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 590, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "get_function_class", 0) < (0)) __PYX_ERR(0, 590, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("get_function_class", 1, 2, 2, i); __PYX_ERR(0, 590, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 590, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 590, __pyx_L3_error)
    }
    __pyx_v_function = values[0];
    __pyx_v_module = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("get_function_class", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 590, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.get_function_class", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_10get_function_class(__pyx_self, __pyx_v_function, __pyx_v_module);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10get_function_class(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_function, PyObject *__pyx_v_module) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_function_class", 0);

  /* "symengine/lib/symengine_wrapper.pyx":591
 * 
 * def get_function_class(function, module):
 *     if not function in funcs:             # <<<<<<<<<<<<<<
 *         funcs[function] = PyFunctionClass(function, module)
 *     return funcs[function]
*/
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_funcs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 591, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_v_function, __pyx_t_1, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 591, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "symengine/lib/symengine_wrapper.pyx":592
 * def get_function_class(function, module):
 *     if not function in funcs:
 *         funcs[function] = PyFunctionClass(function, module)             # <<<<<<<<<<<<<<
 *     return funcs[function]
 * 
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_function, __pyx_v_module};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_PyFunctionClass, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 592, __pyx_L1_error)
      __Pyx_GOTREF((PyObject *)__pyx_t_1);
    }
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_funcs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 592, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (unlikely((PyObject_SetItem(__pyx_t_3, __pyx_v_function, ((PyObject *)__pyx_t_1)) < 0))) __PYX_ERR(0, 592, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF((PyObject *)__pyx_t_1); __pyx_t_1 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":591
 * 
 * def get_function_class(function, module):
 *     if not function in funcs:             # <<<<<<<<<<<<<<
 *         funcs[function] = PyFunctionClass(function, module)
 *     return funcs[function]
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":593
 *     if not function in funcs:
 *         funcs[function] = PyFunctionClass(function, module)
 *     return funcs[function]             # <<<<<<<<<<<<<<
 * 
 * class Singleton(object):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_funcs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 593, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_function); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 593, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":590
 * funcs = {}
 * 
 * def get_function_class(function, module):             # <<<<<<<<<<<<<<
 *     if not function in funcs:
 *         funcs[function] = PyFunctionClass(function, module)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.get_function_class", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":599
 *     __call__ = staticmethod(sympify)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def Zero(self):
 *         return zero
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9Singleton_1Zero(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_9Singleton_1Zero = {"Zero", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_9Singleton_1Zero, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9Singleton_1Zero(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Zero (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 599, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 599, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "Zero", 0) < (0)) __PYX_ERR(0, 599, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("Zero", 1, 1, 1, i); __PYX_ERR(0, 599, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 599, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("Zero", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 599, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Singleton.Zero", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_9Singleton_Zero(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_9Singleton_Zero(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("Zero", 0);

  /* "symengine/lib/symengine_wrapper.pyx":601
 *     @property
 *     def Zero(self):
 *         return zero             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_zero); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 601, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":599
 *     __call__ = staticmethod(sympify)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def Zero(self):
 *         return zero
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Singleton.Zero", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":603
 *         return zero
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def One(self):
 *         return one
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9Singleton_3One(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_9Singleton_3One = {"One", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_9Singleton_3One, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9Singleton_3One(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("One (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 603, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 603, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "One", 0) < (0)) __PYX_ERR(0, 603, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("One", 1, 1, 1, i); __PYX_ERR(0, 603, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 603, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("One", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 603, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Singleton.One", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_9Singleton_2One(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_9Singleton_2One(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("One", 0);

  /* "symengine/lib/symengine_wrapper.pyx":605
 *     @property
 *     def One(self):
 *         return one             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_one); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 605, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":603
 *         return zero
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def One(self):
 *         return one
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Singleton.One", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":607
 *         return one
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def NegativeOne(self):
 *         return minus_one
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9Singleton_5NegativeOne(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_9Singleton_5NegativeOne = {"NegativeOne", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_9Singleton_5NegativeOne, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9Singleton_5NegativeOne(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("NegativeOne (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 607, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 607, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "NegativeOne", 0) < (0)) __PYX_ERR(0, 607, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("NegativeOne", 1, 1, 1, i); __PYX_ERR(0, 607, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 607, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("NegativeOne", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 607, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Singleton.NegativeOne", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_9Singleton_4NegativeOne(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_9Singleton_4NegativeOne(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("NegativeOne", 0);

  /* "symengine/lib/symengine_wrapper.pyx":609
 *     @property
 *     def NegativeOne(self):
 *         return minus_one             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_minus_one); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 609, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":607
 *         return one
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def NegativeOne(self):
 *         return minus_one
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Singleton.NegativeOne", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":611
 *         return minus_one
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def Half(self):
 *         return half
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9Singleton_7Half(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_9Singleton_7Half = {"Half", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_9Singleton_7Half, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9Singleton_7Half(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Half (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 611, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 611, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "Half", 0) < (0)) __PYX_ERR(0, 611, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("Half", 1, 1, 1, i); __PYX_ERR(0, 611, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 611, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("Half", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 611, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Singleton.Half", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_9Singleton_6Half(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_9Singleton_6Half(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("Half", 0);

  /* "symengine/lib/symengine_wrapper.pyx":613
 *     @property
 *     def Half(self):
 *         return half             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_half); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 613, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":611
 *         return minus_one
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def Half(self):
 *         return half
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Singleton.Half", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":615
 *         return half
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def Pi(self):
 *         return pi
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9Singleton_9Pi(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_9Singleton_9Pi = {"Pi", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_9Singleton_9Pi, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9Singleton_9Pi(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Pi (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 615, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 615, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "Pi", 0) < (0)) __PYX_ERR(0, 615, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("Pi", 1, 1, 1, i); __PYX_ERR(0, 615, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 615, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("Pi", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 615, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Singleton.Pi", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_9Singleton_8Pi(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_9Singleton_8Pi(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("Pi", 0);

  /* "symengine/lib/symengine_wrapper.pyx":617
 *     @property
 *     def Pi(self):
 *         return pi             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_pi); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 617, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":615
 *         return half
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def Pi(self):
 *         return pi
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Singleton.Pi", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":619
 *         return pi
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def NaN(self):
 *         return nan
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9Singleton_11NaN(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_9Singleton_11NaN = {"NaN", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_9Singleton_11NaN, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9Singleton_11NaN(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("NaN (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 619, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 619, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "NaN", 0) < (0)) __PYX_ERR(0, 619, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("NaN", 1, 1, 1, i); __PYX_ERR(0, 619, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 619, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("NaN", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 619, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Singleton.NaN", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_9Singleton_10NaN(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_9Singleton_10NaN(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("NaN", 0);

  /* "symengine/lib/symengine_wrapper.pyx":621
 *     @property
 *     def NaN(self):
 *         return nan             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_nan); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 621, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":619
 *         return pi
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def NaN(self):
 *         return nan
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Singleton.NaN", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":623
 *         return nan
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def Infinity(self):
 *         return oo
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9Singleton_13Infinity(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_9Singleton_13Infinity = {"Infinity", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_9Singleton_13Infinity, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9Singleton_13Infinity(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Infinity (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 623, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 623, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "Infinity", 0) < (0)) __PYX_ERR(0, 623, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("Infinity", 1, 1, 1, i); __PYX_ERR(0, 623, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 623, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("Infinity", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 623, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Singleton.Infinity", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_9Singleton_12Infinity(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_9Singleton_12Infinity(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("Infinity", 0);

  /* "symengine/lib/symengine_wrapper.pyx":625
 *     @property
 *     def Infinity(self):
 *         return oo             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_oo); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 625, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":623
 *         return nan
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def Infinity(self):
 *         return oo
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Singleton.Infinity", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":627
 *         return oo
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def NegativeInfinity(self):
 *         return minus_oo
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9Singleton_15NegativeInfinity(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_9Singleton_15NegativeInfinity = {"NegativeInfinity", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_9Singleton_15NegativeInfinity, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9Singleton_15NegativeInfinity(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("NegativeInfinity (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 627, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 627, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "NegativeInfinity", 0) < (0)) __PYX_ERR(0, 627, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("NegativeInfinity", 1, 1, 1, i); __PYX_ERR(0, 627, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 627, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("NegativeInfinity", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 627, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Singleton.NegativeInfinity", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_9Singleton_14NegativeInfinity(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_9Singleton_14NegativeInfinity(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("NegativeInfinity", 0);

  /* "symengine/lib/symengine_wrapper.pyx":629
 *     @property
 *     def NegativeInfinity(self):
 *         return minus_oo             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_minus_oo); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 629, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":627
 *         return oo
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def NegativeInfinity(self):
 *         return minus_oo
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Singleton.NegativeInfinity", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":631
 *         return minus_oo
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def ComplexInfinity(self):
 *         return zoo
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9Singleton_17ComplexInfinity(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_9Singleton_17ComplexInfinity = {"ComplexInfinity", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_9Singleton_17ComplexInfinity, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9Singleton_17ComplexInfinity(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ComplexInfinity (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 631, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 631, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "ComplexInfinity", 0) < (0)) __PYX_ERR(0, 631, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("ComplexInfinity", 1, 1, 1, i); __PYX_ERR(0, 631, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 631, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("ComplexInfinity", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 631, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Singleton.ComplexInfinity", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_9Singleton_16ComplexInfinity(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_9Singleton_16ComplexInfinity(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("ComplexInfinity", 0);

  /* "symengine/lib/symengine_wrapper.pyx":633
 *     @property
 *     def ComplexInfinity(self):
 *         return zoo             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_zoo); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 633, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":631
 *         return minus_oo
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def ComplexInfinity(self):
 *         return zoo
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Singleton.ComplexInfinity", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":635
 *         return zoo
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def Exp1(self):
 *         return E
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9Singleton_19Exp1(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_9Singleton_19Exp1 = {"Exp1", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_9Singleton_19Exp1, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9Singleton_19Exp1(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Exp1 (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 635, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 635, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "Exp1", 0) < (0)) __PYX_ERR(0, 635, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("Exp1", 1, 1, 1, i); __PYX_ERR(0, 635, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 635, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("Exp1", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 635, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Singleton.Exp1", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_9Singleton_18Exp1(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_9Singleton_18Exp1(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("Exp1", 0);

  /* "symengine/lib/symengine_wrapper.pyx":637
 *     @property
 *     def Exp1(self):
 *         return E             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_E); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 637, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":635
 *         return zoo
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def Exp1(self):
 *         return E
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Singleton.Exp1", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":639
 *         return E
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def GoldenRatio(self):
 *         return golden_ratio
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9Singleton_21GoldenRatio(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_9Singleton_21GoldenRatio = {"GoldenRatio", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_9Singleton_21GoldenRatio, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9Singleton_21GoldenRatio(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("GoldenRatio (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 639, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 639, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "GoldenRatio", 0) < (0)) __PYX_ERR(0, 639, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("GoldenRatio", 1, 1, 1, i); __PYX_ERR(0, 639, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 639, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("GoldenRatio", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 639, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Singleton.GoldenRatio", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_9Singleton_20GoldenRatio(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_9Singleton_20GoldenRatio(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("GoldenRatio", 0);

  /* "symengine/lib/symengine_wrapper.pyx":641
 *     @property
 *     def GoldenRatio(self):
 *         return golden_ratio             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_golden_ratio); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 641, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":639
 *         return E
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def GoldenRatio(self):
 *         return golden_ratio
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Singleton.GoldenRatio", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":643
 *         return golden_ratio
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def Catalan(self):
 *         return catalan
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9Singleton_23Catalan(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_9Singleton_23Catalan = {"Catalan", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_9Singleton_23Catalan, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9Singleton_23Catalan(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Catalan (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 643, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 643, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "Catalan", 0) < (0)) __PYX_ERR(0, 643, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("Catalan", 1, 1, 1, i); __PYX_ERR(0, 643, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 643, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("Catalan", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 643, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Singleton.Catalan", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_9Singleton_22Catalan(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_9Singleton_22Catalan(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("Catalan", 0);

  /* "symengine/lib/symengine_wrapper.pyx":645
 *     @property
 *     def Catalan(self):
 *         return catalan             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_catalan); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 645, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":643
 *         return golden_ratio
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def Catalan(self):
 *         return catalan
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Singleton.Catalan", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":647
 *         return catalan
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def EulerGamma(self):
 *         return eulergamma
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9Singleton_25EulerGamma(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_9Singleton_25EulerGamma = {"EulerGamma", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_9Singleton_25EulerGamma, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9Singleton_25EulerGamma(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("EulerGamma (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 647, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 647, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "EulerGamma", 0) < (0)) __PYX_ERR(0, 647, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("EulerGamma", 1, 1, 1, i); __PYX_ERR(0, 647, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 647, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("EulerGamma", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 647, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Singleton.EulerGamma", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_9Singleton_24EulerGamma(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_9Singleton_24EulerGamma(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("EulerGamma", 0);

  /* "symengine/lib/symengine_wrapper.pyx":649
 *     @property
 *     def EulerGamma(self):
 *         return eulergamma             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_eulergamma); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 649, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":647
 *         return catalan
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def EulerGamma(self):
 *         return eulergamma
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Singleton.EulerGamma", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":651
 *         return eulergamma
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def ImaginaryUnit(self):
 *         return I
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9Singleton_27ImaginaryUnit(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_9Singleton_27ImaginaryUnit = {"ImaginaryUnit", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_9Singleton_27ImaginaryUnit, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9Singleton_27ImaginaryUnit(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ImaginaryUnit (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 651, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 651, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "ImaginaryUnit", 0) < (0)) __PYX_ERR(0, 651, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("ImaginaryUnit", 1, 1, 1, i); __PYX_ERR(0, 651, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 651, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("ImaginaryUnit", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 651, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Singleton.ImaginaryUnit", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_9Singleton_26ImaginaryUnit(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_9Singleton_26ImaginaryUnit(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("ImaginaryUnit", 0);

  /* "symengine/lib/symengine_wrapper.pyx":653
 *     @property
 *     def ImaginaryUnit(self):
 *         return I             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_I); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 653, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":651
 *         return eulergamma
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def ImaginaryUnit(self):
 *         return I
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Singleton.ImaginaryUnit", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":655
 *         return I
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def true(self):
 *         return true
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9Singleton_29true(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_9Singleton_29true = {"true", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_9Singleton_29true, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9Singleton_29true(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("true (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 655, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 655, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "true", 0) < (0)) __PYX_ERR(0, 655, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("true", 1, 1, 1, i); __PYX_ERR(0, 655, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 655, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("true", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 655, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Singleton.true", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_9Singleton_28true(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_9Singleton_28true(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("true", 0);

  /* "symengine/lib/symengine_wrapper.pyx":657
 *     @property
 *     def true(self):
 *         return true             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_true); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 657, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":655
 *         return I
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def true(self):
 *         return true
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Singleton.true", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":659
 *         return true
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def false(self):
 *         return false
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9Singleton_31false(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_9Singleton_31false = {"false", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_9Singleton_31false, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9Singleton_31false(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("false (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 659, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 659, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "false", 0) < (0)) __PYX_ERR(0, 659, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("false", 1, 1, 1, i); __PYX_ERR(0, 659, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 659, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("false", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 659, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Singleton.false", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_9Singleton_30false(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_9Singleton_30false(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("false", 0);

  /* "symengine/lib/symengine_wrapper.pyx":661
 *     @property
 *     def false(self):
 *         return false             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_false); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 661, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":659
 *         return true
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def false(self):
 *         return false
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Singleton.false", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":663
 *         return false
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def EmptySet(self):
 *         return empty_set_singleton
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9Singleton_33EmptySet(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_9Singleton_33EmptySet = {"EmptySet", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_9Singleton_33EmptySet, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9Singleton_33EmptySet(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("EmptySet (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 663, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 663, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "EmptySet", 0) < (0)) __PYX_ERR(0, 663, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("EmptySet", 1, 1, 1, i); __PYX_ERR(0, 663, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 663, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("EmptySet", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 663, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Singleton.EmptySet", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_9Singleton_32EmptySet(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_9Singleton_32EmptySet(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("EmptySet", 0);

  /* "symengine/lib/symengine_wrapper.pyx":665
 *     @property
 *     def EmptySet(self):
 *         return empty_set_singleton             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_empty_set_singleton); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 665, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":663
 *         return false
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def EmptySet(self):
 *         return empty_set_singleton
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Singleton.EmptySet", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":667
 *         return empty_set_singleton
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def UniversalSet(self):
 *         return universal_set_singleton
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9Singleton_35UniversalSet(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_9Singleton_35UniversalSet = {"UniversalSet", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_9Singleton_35UniversalSet, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9Singleton_35UniversalSet(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("UniversalSet (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 667, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 667, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "UniversalSet", 0) < (0)) __PYX_ERR(0, 667, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("UniversalSet", 1, 1, 1, i); __PYX_ERR(0, 667, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 667, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("UniversalSet", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 667, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Singleton.UniversalSet", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_9Singleton_34UniversalSet(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_9Singleton_34UniversalSet(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("UniversalSet", 0);

  /* "symengine/lib/symengine_wrapper.pyx":669
 *     @property
 *     def UniversalSet(self):
 *         return universal_set_singleton             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_universal_set_singleton); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 669, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":667
 *         return empty_set_singleton
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def UniversalSet(self):
 *         return universal_set_singleton
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Singleton.UniversalSet", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":671
 *         return universal_set_singleton
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def Integers(self):
 *         return integers_singleton
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9Singleton_37Integers(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_9Singleton_37Integers = {"Integers", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_9Singleton_37Integers, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9Singleton_37Integers(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Integers (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 671, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 671, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "Integers", 0) < (0)) __PYX_ERR(0, 671, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("Integers", 1, 1, 1, i); __PYX_ERR(0, 671, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 671, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("Integers", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 671, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Singleton.Integers", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_9Singleton_36Integers(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_9Singleton_36Integers(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("Integers", 0);

  /* "symengine/lib/symengine_wrapper.pyx":673
 *     @property
 *     def Integers(self):
 *         return integers_singleton             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_integers_singleton); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 673, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":671
 *         return universal_set_singleton
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def Integers(self):
 *         return integers_singleton
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Singleton.Integers", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":675
 *         return integers_singleton
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def Rationals(self):
 *         return rationals_singleton
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9Singleton_39Rationals(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_9Singleton_39Rationals = {"Rationals", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_9Singleton_39Rationals, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9Singleton_39Rationals(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Rationals (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 675, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 675, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "Rationals", 0) < (0)) __PYX_ERR(0, 675, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("Rationals", 1, 1, 1, i); __PYX_ERR(0, 675, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 675, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("Rationals", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 675, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Singleton.Rationals", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_9Singleton_38Rationals(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_9Singleton_38Rationals(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("Rationals", 0);

  /* "symengine/lib/symengine_wrapper.pyx":677
 *     @property
 *     def Rationals(self):
 *         return rationals_singleton             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_rationals_singleton); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 677, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":675
 *         return integers_singleton
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def Rationals(self):
 *         return rationals_singleton
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Singleton.Rationals", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":679
 *         return rationals_singleton
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def Reals(self):
 *         return reals_singleton
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9Singleton_41Reals(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_9Singleton_41Reals = {"Reals", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_9Singleton_41Reals, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9Singleton_41Reals(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Reals (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 679, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 679, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "Reals", 0) < (0)) __PYX_ERR(0, 679, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("Reals", 1, 1, 1, i); __PYX_ERR(0, 679, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 679, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("Reals", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 679, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Singleton.Reals", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_9Singleton_40Reals(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_9Singleton_40Reals(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("Reals", 0);

  /* "symengine/lib/symengine_wrapper.pyx":681
 *     @property
 *     def Reals(self):
 *         return reals_singleton             # <<<<<<<<<<<<<<
 * 
 * S = Singleton()
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_reals_singleton); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 681, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":679
 *         return rationals_singleton
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def Reals(self):
 *         return reals_singleton
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Singleton.Reals", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":688
 * cdef class DictBasicIter(object):
 * 
 *     cdef init(self, map_basic_basic.iterator begin, map_basic_basic.iterator end):             # <<<<<<<<<<<<<<
 *         self.begin = begin
 *         self.end = end
*/

static PyObject *__pyx_f_9symengine_3lib_17symengine_wrapper_13DictBasicIter_init(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DictBasicIter *__pyx_v_self, SymEngine::map_basic_basic::iterator __pyx_v_begin, SymEngine::map_basic_basic::iterator __pyx_v_end) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("init", 0);

  /* "symengine/lib/symengine_wrapper.pyx":689
 * 
 *     cdef init(self, map_basic_basic.iterator begin, map_basic_basic.iterator end):
 *         self.begin = begin             # <<<<<<<<<<<<<<
 *         self.end = end
 * 
*/
  __pyx_v_self->begin = __pyx_v_begin;

  /* "symengine/lib/symengine_wrapper.pyx":690
 *     cdef init(self, map_basic_basic.iterator begin, map_basic_basic.iterator end):
 *         self.begin = begin
 *         self.end = end             # <<<<<<<<<<<<<<
 * 
 *     def __iter__(self):
*/
  __pyx_v_self->end = __pyx_v_end;

  /* "symengine/lib/symengine_wrapper.pyx":688
 * cdef class DictBasicIter(object):
 * 
 *     cdef init(self, map_basic_basic.iterator begin, map_basic_basic.iterator end):             # <<<<<<<<<<<<<<
 *         self.begin = begin
 *         self.end = end
*/

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

/* "symengine/lib/symengine_wrapper.pyx":692
 *         self.end = end
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_13DictBasicIter_1__iter__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_13DictBasicIter_1__iter__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_13DictBasicIter___iter__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DictBasicIter *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_13DictBasicIter___iter__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DictBasicIter *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":693
 * 
 *     def __iter__(self):
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def __next__(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_self);
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":692
 *         self.end = end
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
*/

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

/* "symengine/lib/symengine_wrapper.pyx":695
 *         return self
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         if self.begin != self.end:
 *             obj = c2py(deref(self.begin).first)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_13DictBasicIter_3__next__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_13DictBasicIter_3__next__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_13DictBasicIter_2__next__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DictBasicIter *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_13DictBasicIter_2__next__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DictBasicIter *__pyx_v_self) {
  PyObject *__pyx_v_obj = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_error_without_exception = 0; /* StopIteration */
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__next__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":696
 * 
 *     def __next__(self):
 *         if self.begin != self.end:             # <<<<<<<<<<<<<<
 *             obj = c2py(deref(self.begin).first)
 *         else:
*/
  __pyx_t_1 = (__pyx_v_self->begin != __pyx_v_self->end);
  if (likely(__pyx_t_1)) {

    /* "symengine/lib/symengine_wrapper.pyx":697
 *     def __next__(self):
 *         if self.begin != self.end:
 *             obj = c2py(deref(self.begin).first)             # <<<<<<<<<<<<<<
 *         else:
 *             raise StopIteration
*/
    __pyx_t_2 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py((*__pyx_v_self->begin).first); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 697, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_obj = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":696
 * 
 *     def __next__(self):
 *         if self.begin != self.end:             # <<<<<<<<<<<<<<
 *             obj = c2py(deref(self.begin).first)
 *         else:
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":699
 *             obj = c2py(deref(self.begin).first)
 *         else:
 *             raise StopIteration             # <<<<<<<<<<<<<<
 *         inc(self.begin)
 *         return obj
*/
  /*else*/ {
    __pyx_error_without_exception = 1;
    goto __pyx_L1_error;;
  }
  __pyx_L3:;

  /* "symengine/lib/symengine_wrapper.pyx":700
 *         else:
 *             raise StopIteration
 *         inc(self.begin)             # <<<<<<<<<<<<<<
 *         return obj
 * 
*/
  (void)((++__pyx_v_self->begin));

  /* "symengine/lib/symengine_wrapper.pyx":701
 *             raise StopIteration
 *         inc(self.begin)
 *         return obj             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_obj);
  __pyx_r = __pyx_v_obj;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":695
 *         return self
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         if self.begin != self.end:
 *             obj = c2py(deref(self.begin).first)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  if (!__pyx_error_without_exception) {
    __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DictBasicIter.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  }
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_obj);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.begin,self.end cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_13DictBasicIter_5__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_13DictBasicIter_5__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_13DictBasicIter_5__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_13DictBasicIter_5__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_13DictBasicIter_4__reduce_cython__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DictBasicIter *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_13DictBasicIter_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DictBasicIter *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "self.begin,self.end cannot be converted to a Python object for pickling"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "self.begin,self.end cannot be converted to a Python object for pickling"
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_self_begin_self_end_cannot_be_co, 0, 0);
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.begin,self.end cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DictBasicIter.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.begin,self.end cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.begin,self.end cannot be converted to a Python object for pickling"
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_13DictBasicIter_7__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_13DictBasicIter_7__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_13DictBasicIter_7__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_13DictBasicIter_7__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(1, 3, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 3, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 3, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3, __pyx_L3_error)
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DictBasicIter.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_13DictBasicIter_6__setstate_cython__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DictBasicIter *)__pyx_v_self), __pyx_v___pyx_state);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_13DictBasicIter_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DictBasicIter *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError, "self.begin,self.end cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "self.begin,self.end cannot be converted to a Python object for pickling"             # <<<<<<<<<<<<<<
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_self_begin_self_end_cannot_be_co, 0, 0);
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.begin,self.end cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.begin,self.end cannot be converted to a Python object for pickling"
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DictBasicIter.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":706
 * cdef class _DictBasic(object):
 * 
 *     def __init__(self, tocopy = None):             # <<<<<<<<<<<<<<
 *         if tocopy != None:
 *             self.add_dict(tocopy)
*/

/* Python wrapper */
static int __pyx_pw_9symengine_3lib_17symengine_wrapper_10_DictBasic_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_9symengine_3lib_17symengine_wrapper_10_DictBasic_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_tocopy = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_tocopy,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 706, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 706, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 706, __pyx_L3_error)
      if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
    } else {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 706, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_tocopy = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 706, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper._DictBasic.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_10_DictBasic___init__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper__DictBasic *)__pyx_v_self), __pyx_v_tocopy);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_9symengine_3lib_17symengine_wrapper_10_DictBasic___init__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper__DictBasic *__pyx_v_self, PyObject *__pyx_v_tocopy) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":707
 * 
 *     def __init__(self, tocopy = None):
 *         if tocopy != None:             # <<<<<<<<<<<<<<
 *             self.add_dict(tocopy)
 * 
*/
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_tocopy, Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 707, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 707, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "symengine/lib/symengine_wrapper.pyx":708
 *     def __init__(self, tocopy = None):
 *         if tocopy != None:
 *             self.add_dict(tocopy)             # <<<<<<<<<<<<<<
 * 
 *     def as_dict(self):
*/
    __pyx_t_3 = ((PyObject *)__pyx_v_self);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_4 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_tocopy};
      __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_add_dict, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 708, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":707
 * 
 *     def __init__(self, tocopy = None):
 *         if tocopy != None:             # <<<<<<<<<<<<<<
 *             self.add_dict(tocopy)
 * 
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":706
 * cdef class _DictBasic(object):
 * 
 *     def __init__(self, tocopy = None):             # <<<<<<<<<<<<<<
 *         if tocopy != None:
 *             self.add_dict(tocopy)
*/

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper._DictBasic.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":710
 *             self.add_dict(tocopy)
 * 
 *     def as_dict(self):             # <<<<<<<<<<<<<<
 *         ret = {}
 *         it = self.c.begin()
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10_DictBasic_3as_dict(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_10_DictBasic_3as_dict = {"as_dict", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_10_DictBasic_3as_dict, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10_DictBasic_3as_dict(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("as_dict (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("as_dict", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("as_dict", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_10_DictBasic_2as_dict(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper__DictBasic *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10_DictBasic_2as_dict(struct __pyx_obj_9symengine_3lib_17symengine_wrapper__DictBasic *__pyx_v_self) {
  PyObject *__pyx_v_ret = NULL;
  SymEngine::map_basic_basic::iterator __pyx_v_it;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("as_dict", 0);

  /* "symengine/lib/symengine_wrapper.pyx":711
 * 
 *     def as_dict(self):
 *         ret = {}             # <<<<<<<<<<<<<<
 *         it = self.c.begin()
 *         while it != self.c.end():
*/
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 711, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_ret = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":712
 *     def as_dict(self):
 *         ret = {}
 *         it = self.c.begin()             # <<<<<<<<<<<<<<
 *         while it != self.c.end():
 *             ret[c2py(deref(it).first)] = c2py(deref(it).second)
*/
  __pyx_v_it = __pyx_v_self->c.begin();

  /* "symengine/lib/symengine_wrapper.pyx":713
 *         ret = {}
 *         it = self.c.begin()
 *         while it != self.c.end():             # <<<<<<<<<<<<<<
 *             ret[c2py(deref(it).first)] = c2py(deref(it).second)
 *             inc(it)
*/
  while (1) {
    __pyx_t_2 = (__pyx_v_it != __pyx_v_self->c.end());
    if (!__pyx_t_2) break;

    /* "symengine/lib/symengine_wrapper.pyx":714
 *         it = self.c.begin()
 *         while it != self.c.end():
 *             ret[c2py(deref(it).first)] = c2py(deref(it).second)             # <<<<<<<<<<<<<<
 *             inc(it)
 *         return ret
*/
    __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py((*__pyx_v_it).second); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 714, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py((*__pyx_v_it).first); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 714, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (unlikely((PyDict_SetItem(__pyx_v_ret, __pyx_t_3, __pyx_t_1) < 0))) __PYX_ERR(0, 714, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":715
 *         while it != self.c.end():
 *             ret[c2py(deref(it).first)] = c2py(deref(it).second)
 *             inc(it)             # <<<<<<<<<<<<<<
 *         return ret
 * 
*/
    (void)((++__pyx_v_it));
  }

  /* "symengine/lib/symengine_wrapper.pyx":716
 *             ret[c2py(deref(it).first)] = c2py(deref(it).second)
 *             inc(it)
 *         return ret             # <<<<<<<<<<<<<<
 * 
 *     def add_dict(self, d):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_ret);
  __pyx_r = __pyx_v_ret;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":710
 *             self.add_dict(tocopy)
 * 
 *     def as_dict(self):             # <<<<<<<<<<<<<<
 *         ret = {}
 *         it = self.c.begin()
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper._DictBasic.as_dict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_ret);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":718
 *         return ret
 * 
 *     def add_dict(self, d):             # <<<<<<<<<<<<<<
 *         cdef _DictBasic D
 *         if isinstance(d, DictBasic):
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10_DictBasic_5add_dict(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_10_DictBasic_5add_dict = {"add_dict", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_10_DictBasic_5add_dict, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10_DictBasic_5add_dict(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_d = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("add_dict (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_d,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 718, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 718, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "add_dict", 0) < (0)) __PYX_ERR(0, 718, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("add_dict", 1, 1, 1, i); __PYX_ERR(0, 718, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 718, __pyx_L3_error)
    }
    __pyx_v_d = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("add_dict", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 718, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper._DictBasic.add_dict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_10_DictBasic_4add_dict(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper__DictBasic *)__pyx_v_self), __pyx_v_d);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10_DictBasic_4add_dict(struct __pyx_obj_9symengine_3lib_17symengine_wrapper__DictBasic *__pyx_v_self, PyObject *__pyx_v_d) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper__DictBasic *__pyx_v_D = 0;
  PyObject *__pyx_v_key = NULL;
  PyObject *__pyx_v_value = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  size_t __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("add_dict", 0);

  /* "symengine/lib/symengine_wrapper.pyx":720
 *     def add_dict(self, d):
 *         cdef _DictBasic D
 *         if isinstance(d, DictBasic):             # <<<<<<<<<<<<<<
 *             D = d
 *             self.c.insert(D.c.begin(), D.c.end())
*/
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_DictBasic); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 720, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_IsInstance(__pyx_v_d, __pyx_t_1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 720, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "symengine/lib/symengine_wrapper.pyx":721
 *         cdef _DictBasic D
 *         if isinstance(d, DictBasic):
 *             D = d             # <<<<<<<<<<<<<<
 *             self.c.insert(D.c.begin(), D.c.end())
 *         else:
*/
    __pyx_t_1 = __pyx_v_d;
    __Pyx_INCREF(__pyx_t_1);
    if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper__DictBasic))))) __PYX_ERR(0, 721, __pyx_L1_error)
    __pyx_v_D = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper__DictBasic *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":722
 *         if isinstance(d, DictBasic):
 *             D = d
 *             self.c.insert(D.c.begin(), D.c.end())             # <<<<<<<<<<<<<<
 *         else:
 *             for key, value in d.iteritems():
*/
    try {
      __pyx_v_self->c.insert(__pyx_v_D->c.begin(), __pyx_v_D->c.end());
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(0, 722, __pyx_L1_error)
    }

    /* "symengine/lib/symengine_wrapper.pyx":720
 *     def add_dict(self, d):
 *         cdef _DictBasic D
 *         if isinstance(d, DictBasic):             # <<<<<<<<<<<<<<
 *             D = d
 *             self.c.insert(D.c.begin(), D.c.end())
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":724
 *             self.c.insert(D.c.begin(), D.c.end())
 *         else:
 *             for key, value in d.iteritems():             # <<<<<<<<<<<<<<
 *                 self.add(key, value)
 * 
*/
  /*else*/ {
    __pyx_t_3 = 0;
    if (unlikely(__pyx_v_d == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "iteritems");
      __PYX_ERR(0, 724, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_dict_iterator(__pyx_v_d, 0, __pyx_mstate_global->__pyx_n_u_iteritems, (&__pyx_t_4), (&__pyx_t_5)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 724, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_1);
    __pyx_t_1 = __pyx_t_6;
    __pyx_t_6 = 0;
    while (1) {
      __pyx_t_8 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_4, &__pyx_t_3, &__pyx_t_6, &__pyx_t_7, NULL, __pyx_t_5);
      if (unlikely(__pyx_t_8 == 0)) break;
      if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 724, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_6);
      __pyx_t_6 = 0;
      __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_7);
      __pyx_t_7 = 0;

      /* "symengine/lib/symengine_wrapper.pyx":725
 *         else:
 *             for key, value in d.iteritems():
 *                 self.add(key, value)             # <<<<<<<<<<<<<<
 * 
 *     def add(self, key, value):
*/
      __pyx_t_6 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_9 = 0;
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_v_key, __pyx_v_value};
        __pyx_t_7 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_add, __pyx_callargs+__pyx_t_9, (3-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 725, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
      }
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __pyx_L3:;

  /* "symengine/lib/symengine_wrapper.pyx":718
 *         return ret
 * 
 *     def add_dict(self, d):             # <<<<<<<<<<<<<<
 *         cdef _DictBasic D
 *         if isinstance(d, DictBasic):
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper._DictBasic.add_dict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_D);
  __Pyx_XDECREF(__pyx_v_key);
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":727
 *                 self.add(key, value)
 * 
 *     def add(self, key, value):             # <<<<<<<<<<<<<<
 *         cdef Basic K = sympify(key)
 *         cdef Basic V = sympify(value)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10_DictBasic_7add(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_10_DictBasic_7add = {"add", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_10_DictBasic_7add, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10_DictBasic_7add(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_key = 0;
  PyObject *__pyx_v_value = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("add (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_key,&__pyx_mstate_global->__pyx_n_u_value,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 727, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 727, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 727, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "add", 0) < (0)) __PYX_ERR(0, 727, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("add", 1, 2, 2, i); __PYX_ERR(0, 727, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 727, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 727, __pyx_L3_error)
    }
    __pyx_v_key = values[0];
    __pyx_v_value = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("add", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 727, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper._DictBasic.add", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_10_DictBasic_6add(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper__DictBasic *)__pyx_v_self), __pyx_v_key, __pyx_v_value);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10_DictBasic_6add(struct __pyx_obj_9symengine_3lib_17symengine_wrapper__DictBasic *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_K = 0;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_V = 0;
  std::pair<SymEngine::RCP<const SymEngine::Basic>, SymEngine::RCP<const SymEngine::Basic>> __pyx_v_pair;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  SymEngine::RCP<const SymEngine::Basic> __pyx_t_5;
  std::pair<SymEngine::map_basic_basic::iterator,int>  __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("add", 0);

  /* "symengine/lib/symengine_wrapper.pyx":728
 * 
 *     def add(self, key, value):
 *         cdef Basic K = sympify(key)             # <<<<<<<<<<<<<<
 *         cdef Basic V = sympify(value)
 *         cdef symengine.std_pair_rcp_const_basic_rcp_const_basic pair
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 728, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_key};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 728, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 728, __pyx_L1_error)
  __pyx_v_K = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":729
 *     def add(self, key, value):
 *         cdef Basic K = sympify(key)
 *         cdef Basic V = sympify(value)             # <<<<<<<<<<<<<<
 *         cdef symengine.std_pair_rcp_const_basic_rcp_const_basic pair
 *         pair.first = K.thisptr
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 729, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_value};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 729, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 729, __pyx_L1_error)
  __pyx_v_V = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":731
 *         cdef Basic V = sympify(value)
 *         cdef symengine.std_pair_rcp_const_basic_rcp_const_basic pair
 *         pair.first = K.thisptr             # <<<<<<<<<<<<<<
 *         pair.second = V.thisptr
 *         return self.c.insert(pair).second
*/
  __pyx_t_5 = __pyx_v_K->thisptr;
  __pyx_v_pair.first = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5);

  /* "symengine/lib/symengine_wrapper.pyx":732
 *         cdef symengine.std_pair_rcp_const_basic_rcp_const_basic pair
 *         pair.first = K.thisptr
 *         pair.second = V.thisptr             # <<<<<<<<<<<<<<
 *         return self.c.insert(pair).second
 * 
*/
  __pyx_t_5 = __pyx_v_V->thisptr;
  __pyx_v_pair.second = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5);

  /* "symengine/lib/symengine_wrapper.pyx":733
 *         pair.first = K.thisptr
 *         pair.second = V.thisptr
 *         return self.c.insert(pair).second             # <<<<<<<<<<<<<<
 * 
 *     def copy(self):
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_6 = __pyx_v_self->c.insert(__pyx_v_pair);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 733, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_t_6.second); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 733, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":727
 *                 self.add(key, value)
 * 
 *     def add(self, key, value):             # <<<<<<<<<<<<<<
 *         cdef Basic K = sympify(key)
 *         cdef Basic V = sympify(value)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper._DictBasic.add", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_K);
  __Pyx_XDECREF((PyObject *)__pyx_v_V);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":735
 *         return self.c.insert(pair).second
 * 
 *     def copy(self):             # <<<<<<<<<<<<<<
 *         return DictBasic(self)
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10_DictBasic_9copy(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_10_DictBasic_9copy = {"copy", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_10_DictBasic_9copy, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10_DictBasic_9copy(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("copy (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("copy", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("copy", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_10_DictBasic_8copy(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper__DictBasic *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10_DictBasic_8copy(struct __pyx_obj_9symengine_3lib_17symengine_wrapper__DictBasic *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("copy", 0);

  /* "symengine/lib/symengine_wrapper.pyx":736
 * 
 *     def copy(self):
 *         return DictBasic(self)             # <<<<<<<<<<<<<<
 * 
 *     __copy__ = copy
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_DictBasic); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 736, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, ((PyObject *)__pyx_v_self)};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 736, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":735
 *         return self.c.insert(pair).second
 * 
 *     def copy(self):             # <<<<<<<<<<<<<<
 *         return DictBasic(self)
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper._DictBasic.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":740
 *     __copy__ = copy
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self.c.size()
 * 
*/

/* Python wrapper */
static Py_ssize_t __pyx_pw_9symengine_3lib_17symengine_wrapper_10_DictBasic_11__len__(PyObject *__pyx_v_self); /*proto*/
static Py_ssize_t __pyx_pw_9symengine_3lib_17symengine_wrapper_10_DictBasic_11__len__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_10_DictBasic_10__len__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper__DictBasic *)__pyx_v_self));

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

static Py_ssize_t __pyx_pf_9symengine_3lib_17symengine_wrapper_10_DictBasic_10__len__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper__DictBasic *__pyx_v_self) {
  Py_ssize_t __pyx_r;

  /* "symengine/lib/symengine_wrapper.pyx":741
 * 
 *     def __len__(self):
 *         return self.c.size()             # <<<<<<<<<<<<<<
 * 
 *     def __getitem__(self, key):
*/
  __pyx_r = __pyx_v_self->c.size();
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":740
 *     __copy__ = copy
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self.c.size()
 * 
*/

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

/* "symengine/lib/symengine_wrapper.pyx":743
 *         return self.c.size()
 * 
 *     def __getitem__(self, key):             # <<<<<<<<<<<<<<
 *         cdef Basic K = sympify(key)
 *         it = self.c.find(K.thisptr)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10_DictBasic_13__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10_DictBasic_13__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_10_DictBasic_12__getitem__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper__DictBasic *)__pyx_v_self), ((PyObject *)__pyx_v_key));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10_DictBasic_12__getitem__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper__DictBasic *__pyx_v_self, PyObject *__pyx_v_key) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_K = 0;
  SymEngine::map_basic_basic::iterator __pyx_v_it;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__getitem__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":744
 * 
 *     def __getitem__(self, key):
 *         cdef Basic K = sympify(key)             # <<<<<<<<<<<<<<
 *         it = self.c.find(K.thisptr)
 *         if it == self.c.end():
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 744, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_key};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 744, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 744, __pyx_L1_error)
  __pyx_v_K = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":745
 *     def __getitem__(self, key):
 *         cdef Basic K = sympify(key)
 *         it = self.c.find(K.thisptr)             # <<<<<<<<<<<<<<
 *         if it == self.c.end():
 *             raise KeyError(key)
*/
  __pyx_v_it = __pyx_v_self->c.find(__pyx_v_K->thisptr);

  /* "symengine/lib/symengine_wrapper.pyx":746
 *         cdef Basic K = sympify(key)
 *         it = self.c.find(K.thisptr)
 *         if it == self.c.end():             # <<<<<<<<<<<<<<
 *             raise KeyError(key)
 *         else:
*/
  __pyx_t_5 = (__pyx_v_it == __pyx_v_self->c.end());
  if (unlikely(__pyx_t_5)) {

    /* "symengine/lib/symengine_wrapper.pyx":747
 *         it = self.c.find(K.thisptr)
 *         if it == self.c.end():
 *             raise KeyError(key)             # <<<<<<<<<<<<<<
 *         else:
 *             return c2py(deref(it).second)
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_key};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_KeyError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 747, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 747, __pyx_L1_error)

    /* "symengine/lib/symengine_wrapper.pyx":746
 *         cdef Basic K = sympify(key)
 *         it = self.c.find(K.thisptr)
 *         if it == self.c.end():             # <<<<<<<<<<<<<<
 *             raise KeyError(key)
 *         else:
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":749
 *             raise KeyError(key)
 *         else:
 *             return c2py(deref(it).second)             # <<<<<<<<<<<<<<
 * 
 *     def __setitem__(self, key, value):
*/
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py((*__pyx_v_it).second); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 749, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "symengine/lib/symengine_wrapper.pyx":743
 *         return self.c.size()
 * 
 *     def __getitem__(self, key):             # <<<<<<<<<<<<<<
 *         cdef Basic K = sympify(key)
 *         it = self.c.find(K.thisptr)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper._DictBasic.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_K);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":751
 *             return c2py(deref(it).second)
 * 
 *     def __setitem__(self, key, value):             # <<<<<<<<<<<<<<
 *         cdef Basic K = sympify(key)
 *         cdef Basic V = sympify(value)
*/

/* Python wrapper */
static int __pyx_pw_9symengine_3lib_17symengine_wrapper_10_DictBasic_15__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_9symengine_3lib_17symengine_wrapper_10_DictBasic_15__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_10_DictBasic_14__setitem__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper__DictBasic *)__pyx_v_self), ((PyObject *)__pyx_v_key), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_9symengine_3lib_17symengine_wrapper_10_DictBasic_14__setitem__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper__DictBasic *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_K = 0;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_V = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  SymEngine::RCP<const SymEngine::Basic> __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setitem__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":752
 * 
 *     def __setitem__(self, key, value):
 *         cdef Basic K = sympify(key)             # <<<<<<<<<<<<<<
 *         cdef Basic V = sympify(value)
 *         self.c[K.thisptr] = V.thisptr
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 752, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_key};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 752, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 752, __pyx_L1_error)
  __pyx_v_K = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":753
 *     def __setitem__(self, key, value):
 *         cdef Basic K = sympify(key)
 *         cdef Basic V = sympify(value)             # <<<<<<<<<<<<<<
 *         self.c[K.thisptr] = V.thisptr
 * 
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 753, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_value};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 753, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 753, __pyx_L1_error)
  __pyx_v_V = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":754
 *         cdef Basic K = sympify(key)
 *         cdef Basic V = sympify(value)
 *         self.c[K.thisptr] = V.thisptr             # <<<<<<<<<<<<<<
 * 
 *     def clear(self):
*/
  __pyx_t_5 = __pyx_v_V->thisptr;
  (__pyx_v_self->c[__pyx_v_K->thisptr]) = __pyx_t_5;

  /* "symengine/lib/symengine_wrapper.pyx":751
 *             return c2py(deref(it).second)
 * 
 *     def __setitem__(self, key, value):             # <<<<<<<<<<<<<<
 *         cdef Basic K = sympify(key)
 *         cdef Basic V = sympify(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("symengine.lib.symengine_wrapper._DictBasic.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_K);
  __Pyx_XDECREF((PyObject *)__pyx_v_V);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":756
 *         self.c[K.thisptr] = V.thisptr
 * 
 *     def clear(self):             # <<<<<<<<<<<<<<
 *         self.clear()
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10_DictBasic_17clear(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_10_DictBasic_17clear = {"clear", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_10_DictBasic_17clear, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10_DictBasic_17clear(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("clear (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("clear", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("clear", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_10_DictBasic_16clear(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper__DictBasic *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10_DictBasic_16clear(struct __pyx_obj_9symengine_3lib_17symengine_wrapper__DictBasic *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("clear", 0);

  /* "symengine/lib/symengine_wrapper.pyx":757
 * 
 *     def clear(self):
 *         self.clear()             # <<<<<<<<<<<<<<
 * 
 *     def __delitem__(self, key):
*/
  __pyx_t_2 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_clear, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 757, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":756
 *         self.c[K.thisptr] = V.thisptr
 * 
 *     def clear(self):             # <<<<<<<<<<<<<<
 *         self.clear()
 * 
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper._DictBasic.clear", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":759
 *         self.clear()
 * 
 *     def __delitem__(self, key):             # <<<<<<<<<<<<<<
 *         cdef Basic K = sympify(key)
 *         self.c.erase(K.thisptr)
*/

/* Python wrapper */
static int __pyx_pw_9symengine_3lib_17symengine_wrapper_10_DictBasic_19__delitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
static int __pyx_pw_9symengine_3lib_17symengine_wrapper_10_DictBasic_19__delitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__delitem__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_10_DictBasic_18__delitem__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper__DictBasic *)__pyx_v_self), ((PyObject *)__pyx_v_key));

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

static int __pyx_pf_9symengine_3lib_17symengine_wrapper_10_DictBasic_18__delitem__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper__DictBasic *__pyx_v_self, PyObject *__pyx_v_key) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_K = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__delitem__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":760
 * 
 *     def __delitem__(self, key):
 *         cdef Basic K = sympify(key)             # <<<<<<<<<<<<<<
 *         self.c.erase(K.thisptr)
 * 
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 760, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_key};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 760, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 760, __pyx_L1_error)
  __pyx_v_K = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":761
 *     def __delitem__(self, key):
 *         cdef Basic K = sympify(key)
 *         self.c.erase(K.thisptr)             # <<<<<<<<<<<<<<
 * 
 *     def __contains__(self, key):
*/
  (void)(__pyx_v_self->c.erase(__pyx_v_K->thisptr));

  /* "symengine/lib/symengine_wrapper.pyx":759
 *         self.clear()
 * 
 *     def __delitem__(self, key):             # <<<<<<<<<<<<<<
 *         cdef Basic K = sympify(key)
 *         self.c.erase(K.thisptr)
*/

  /* 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("symengine.lib.symengine_wrapper._DictBasic.__delitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_K);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":763
 *         self.c.erase(K.thisptr)
 * 
 *     def __contains__(self, key):             # <<<<<<<<<<<<<<
 *         cdef Basic K = sympify(key)
 *         it = self.c.find(K.thisptr)
*/

/* Python wrapper */
static int __pyx_pw_9symengine_3lib_17symengine_wrapper_10_DictBasic_21__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
static int __pyx_pw_9symengine_3lib_17symengine_wrapper_10_DictBasic_21__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__contains__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_10_DictBasic_20__contains__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper__DictBasic *)__pyx_v_self), ((PyObject *)__pyx_v_key));

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

static int __pyx_pf_9symengine_3lib_17symengine_wrapper_10_DictBasic_20__contains__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper__DictBasic *__pyx_v_self, PyObject *__pyx_v_key) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_K = 0;
  SymEngine::map_basic_basic::iterator __pyx_v_it;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__contains__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":764
 * 
 *     def __contains__(self, key):
 *         cdef Basic K = sympify(key)             # <<<<<<<<<<<<<<
 *         it = self.c.find(K.thisptr)
 *         return it != self.c.end()
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 764, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_key};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 764, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 764, __pyx_L1_error)
  __pyx_v_K = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":765
 *     def __contains__(self, key):
 *         cdef Basic K = sympify(key)
 *         it = self.c.find(K.thisptr)             # <<<<<<<<<<<<<<
 *         return it != self.c.end()
 * 
*/
  __pyx_v_it = __pyx_v_self->c.find(__pyx_v_K->thisptr);

  /* "symengine/lib/symengine_wrapper.pyx":766
 *         cdef Basic K = sympify(key)
 *         it = self.c.find(K.thisptr)
 *         return it != self.c.end()             # <<<<<<<<<<<<<<
 * 
 *     def __iter__(self):
*/
  __pyx_r = (__pyx_v_it != __pyx_v_self->c.end());
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":763
 *         self.c.erase(K.thisptr)
 * 
 *     def __contains__(self, key):             # <<<<<<<<<<<<<<
 *         cdef Basic K = sympify(key)
 *         it = self.c.find(K.thisptr)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper._DictBasic.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_K);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":768
 *         return it != self.c.end()
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         cdef DictBasicIter d = DictBasicIter()
 *         d.init(self.c.begin(), self.c.end())
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10_DictBasic_23__iter__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10_DictBasic_23__iter__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_10_DictBasic_22__iter__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper__DictBasic *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10_DictBasic_22__iter__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper__DictBasic *__pyx_v_self) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DictBasicIter *__pyx_v_d = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__iter__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":769
 * 
 *     def __iter__(self):
 *         cdef DictBasicIter d = DictBasicIter()             # <<<<<<<<<<<<<<
 *         d.init(self.c.begin(), self.c.end())
 *         return d
*/
  __pyx_t_2 = NULL;
  __pyx_t_3 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DictBasicIter, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 769, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_1);
  }
  __pyx_v_d = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DictBasicIter *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":770
 *     def __iter__(self):
 *         cdef DictBasicIter d = DictBasicIter()
 *         d.init(self.c.begin(), self.c.end())             # <<<<<<<<<<<<<<
 *         return d
 * 
*/
  __pyx_t_1 = ((struct __pyx_vtabstruct_9symengine_3lib_17symengine_wrapper_DictBasicIter *)__pyx_v_d->__pyx_vtab)->init(__pyx_v_d, __pyx_v_self->c.begin(), __pyx_v_self->c.end()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 770, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":771
 *         cdef DictBasicIter d = DictBasicIter()
 *         d.init(self.c.begin(), self.c.end())
 *         return d             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_d);
  __pyx_r = ((PyObject *)__pyx_v_d);
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":768
 *         return it != self.c.end()
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         cdef DictBasicIter d = DictBasicIter()
 *         d.init(self.c.begin(), self.c.end())
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper._DictBasic.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_d);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.c cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10_DictBasic_25__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_10_DictBasic_25__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_10_DictBasic_25__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10_DictBasic_25__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_10_DictBasic_24__reduce_cython__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper__DictBasic *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10_DictBasic_24__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper__DictBasic *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "self.c cannot be converted to a Python object for pickling"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "self.c cannot be converted to a Python object for pickling"
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_self_c_cannot_be_converted_to_a, 0, 0);
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.c cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper._DictBasic.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.c cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.c cannot be converted to a Python object for pickling"
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10_DictBasic_27__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_10_DictBasic_27__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_10_DictBasic_27__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10_DictBasic_27__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(1, 3, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 3, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 3, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3, __pyx_L3_error)
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper._DictBasic.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_10_DictBasic_26__setstate_cython__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper__DictBasic *)__pyx_v_self), __pyx_v___pyx_state);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10_DictBasic_26__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper__DictBasic *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError, "self.c cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "self.c cannot be converted to a Python object for pickling"             # <<<<<<<<<<<<<<
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_self_c_cannot_be_converted_to_a, 0, 0);
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.c cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.c cannot be converted to a Python object for pickling"
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper._DictBasic.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":776
 * class DictBasic(_DictBasic, MutableMapping):
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "{" + ", ".join(["%s: %s" % (str(key), str(value)) for key, value in self.items()]) + "}"
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9DictBasic_1__str__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_9DictBasic_1__str__ = {"__str__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_9DictBasic_1__str__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9DictBasic_1__str__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 776, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 776, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__str__", 0) < (0)) __PYX_ERR(0, 776, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__str__", 1, 1, 1, i); __PYX_ERR(0, 776, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 776, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__str__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 776, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DictBasic.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_9DictBasic___str__(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_9DictBasic___str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_8genexpr2__pyx_v_key = NULL;
  PyObject *__pyx_8genexpr2__pyx_v_value = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9[3];
  PyObject *__pyx_t_10 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":777
 * 
 *     def __str__(self):
 *         return "{" + ", ".join(["%s: %s" % (str(key), str(value)) for key, value in self.items()]) + "}"             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
*/
  __Pyx_XDECREF(__pyx_r);
  { /* enter inner scope */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 777, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = 0;
    if (unlikely(__pyx_v_self == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items");
      __PYX_ERR(0, 777, __pyx_L5_error)
    }
    __pyx_t_6 = __Pyx_dict_iterator(__pyx_v_self, 0, __pyx_mstate_global->__pyx_n_u_items, (&__pyx_t_4), (&__pyx_t_5)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 777, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_2);
    __pyx_t_2 = __pyx_t_6;
    __pyx_t_6 = 0;
    while (1) {
      __pyx_t_8 = __Pyx_dict_iter_next(__pyx_t_2, __pyx_t_4, &__pyx_t_3, &__pyx_t_6, &__pyx_t_7, NULL, __pyx_t_5);
      if (unlikely(__pyx_t_8 == 0)) break;
      if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 777, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_XDECREF_SET(__pyx_8genexpr2__pyx_v_key, __pyx_t_6);
      __pyx_t_6 = 0;
      __Pyx_XDECREF_SET(__pyx_8genexpr2__pyx_v_value, __pyx_t_7);
      __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyObject_Unicode(__pyx_8genexpr2__pyx_v_key); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 777, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_6 = __Pyx_PyObject_Unicode(__pyx_8genexpr2__pyx_v_value); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 777, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_9[0] = __pyx_t_7;
      __pyx_t_9[1] = __pyx_mstate_global->__pyx_kp_u_;
      __pyx_t_9[2] = __pyx_t_6;
      __pyx_t_10 = __Pyx_PyUnicode_Join(__pyx_t_9, 3, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6));
      if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 777, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_10))) __PYX_ERR(0, 777, __pyx_L5_error)
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_key); __pyx_8genexpr2__pyx_v_key = 0;
    __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_value); __pyx_8genexpr2__pyx_v_value = 0;
    goto __pyx_L8_exit_scope;
    __pyx_L5_error:;
    __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_key); __pyx_8genexpr2__pyx_v_key = 0;
    __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_value); __pyx_8genexpr2__pyx_v_value = 0;
    goto __pyx_L1_error;
    __pyx_L8_exit_scope:;
  } /* exit inner scope */
  __pyx_t_2 = PyUnicode_Join(__pyx_mstate_global->__pyx_kp_u__7, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 777, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u__6, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 777, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_t_1, __pyx_mstate_global->__pyx_kp_u__8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 777, __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;

  /* "symengine/lib/symengine_wrapper.pyx":776
 * class DictBasic(_DictBasic, MutableMapping):
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "{" + ", ".join(["%s: %s" % (str(key), str(value)) for key, value in self.items()]) + "}"
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DictBasic.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_key);
  __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_value);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":779
 *         return "{" + ", ".join(["%s: %s" % (str(key), str(value)) for key, value in self.items()]) + "}"
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9DictBasic_3__repr__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_9DictBasic_3__repr__ = {"__repr__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_9DictBasic_3__repr__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9DictBasic_3__repr__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 779, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 779, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__repr__", 0) < (0)) __PYX_ERR(0, 779, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__repr__", 1, 1, 1, i); __PYX_ERR(0, 779, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 779, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__repr__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 779, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DictBasic.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_9DictBasic_2__repr__(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_9DictBasic_2__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":780
 * 
 *     def __repr__(self):
 *         return self.__str__()             # <<<<<<<<<<<<<<
 * 
 * def get_dict(*args):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_str, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 780, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":779
 *         return "{" + ", ".join(["%s: %s" % (str(key), str(value)) for key, value in self.items()]) + "}"
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DictBasic.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":782
 *         return self.__str__()
 * 
 * def get_dict(*args):             # <<<<<<<<<<<<<<
 *     """
 *     Returns a DictBasic instance from args. Inputs can be,
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_13get_dict(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
PyDoc_STRVAR(__pyx_doc_9symengine_3lib_17symengine_wrapper_12get_dict, "\n    Returns a DictBasic instance from args. Inputs can be,\n        1. a DictBasic\n        2. a Python dictionary\n        3. two args old, new\n    ");
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_13get_dict = {"get_dict", (PyCFunction)(void(*)(void))(PyCFunctionWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_13get_dict, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9symengine_3lib_17symengine_wrapper_12get_dict};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_13get_dict(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_args = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_dict (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("get_dict", __pyx_kwds); return NULL;}
  __Pyx_INCREF(__pyx_args);
  __pyx_v_args = __pyx_args;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_12get_dict(__pyx_self, __pyx_v_args);

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_12get_dict(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_args) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper__DictBasic *__pyx_v_D = 0;
  PyObject *__pyx_v_k = NULL;
  PyObject *__pyx_v_v = NULL;
  PyObject *__pyx_v_arg = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *(*__pyx_t_8)(PyObject *);
  PyObject *__pyx_t_9 = NULL;
  PyObject *(*__pyx_t_10)(PyObject *);
  Py_ssize_t __pyx_t_11;
  int __pyx_t_12;
  int __pyx_t_13;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_dict", 0);

  /* "symengine/lib/symengine_wrapper.pyx":789
 *         3. two args old, new
 *     """
 *     cdef _DictBasic D = DictBasic()             # <<<<<<<<<<<<<<
 *     if len(args) == 2:
 *         if is_sequence(args[0]):
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_DictBasic); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 789, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 789, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper__DictBasic))))) __PYX_ERR(0, 789, __pyx_L1_error)
  __pyx_v_D = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper__DictBasic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":790
 *     """
 *     cdef _DictBasic D = DictBasic()
 *     if len(args) == 2:             # <<<<<<<<<<<<<<
 *         if is_sequence(args[0]):
 *             for k, v in zip(args[0], args[1]):
*/
  __pyx_t_5 = __Pyx_PyTuple_GET_SIZE(__pyx_v_args); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 790, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 == 2);
  if (__pyx_t_6) {

    /* "symengine/lib/symengine_wrapper.pyx":791
 *     cdef _DictBasic D = DictBasic()
 *     if len(args) == 2:
 *         if is_sequence(args[0]):             # <<<<<<<<<<<<<<
 *             for k, v in zip(args[0], args[1]):
 *                 D.add(k, v)
*/
    __pyx_t_3 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_is_sequence); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 791, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v_args, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 791, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_4 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      assert(__pyx_t_3);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
      __pyx_t_4 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_7};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 791, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 791, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_6) {

      /* "symengine/lib/symengine_wrapper.pyx":792
 *     if len(args) == 2:
 *         if is_sequence(args[0]):
 *             for k, v in zip(args[0], args[1]):             # <<<<<<<<<<<<<<
 *                 D.add(k, v)
 *         else:
*/
      __pyx_t_2 = NULL;
      __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v_args, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 792, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_3 = __Pyx_GetItemInt_Tuple(__pyx_v_args, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 792, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = 1;
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_t_7, __pyx_t_3};
        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_zip, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 792, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
        __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3);
        __pyx_t_5 = 0;
        __pyx_t_8 = NULL;
      } else {
        __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 792, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_8 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 792, __pyx_L1_error)
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      for (;;) {
        if (likely(!__pyx_t_8)) {
          if (likely(PyList_CheckExact(__pyx_t_3))) {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3);
              #if !CYTHON_ASSUME_SAFE_SIZE
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 792, __pyx_L1_error)
              #endif
              if (__pyx_t_5 >= __pyx_temp) break;
            }
            __pyx_t_1 = __Pyx_PyList_GetItemRefFast(__pyx_t_3, __pyx_t_5, __Pyx_ReferenceSharing_OwnStrongReference);
            ++__pyx_t_5;
          } else {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3);
              #if !CYTHON_ASSUME_SAFE_SIZE
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 792, __pyx_L1_error)
              #endif
              if (__pyx_t_5 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_1 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5));
            #else
            __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_5);
            #endif
            ++__pyx_t_5;
          }
          if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 792, __pyx_L1_error)
        } else {
          __pyx_t_1 = __pyx_t_8(__pyx_t_3);
          if (unlikely(!__pyx_t_1)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 792, __pyx_L1_error)
              PyErr_Clear();
            }
            break;
          }
        }
        __Pyx_GOTREF(__pyx_t_1);
        if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
          PyObject* sequence = __pyx_t_1;
          Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
          if (unlikely(size != 2)) {
            if (size > 2) __Pyx_RaiseTooManyValuesError(2);
            else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
            __PYX_ERR(0, 792, __pyx_L1_error)
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          if (likely(PyTuple_CheckExact(sequence))) {
            __pyx_t_7 = PyTuple_GET_ITEM(sequence, 0);
            __Pyx_INCREF(__pyx_t_7);
            __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1);
            __Pyx_INCREF(__pyx_t_2);
          } else {
            __pyx_t_7 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference);
            if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 792, __pyx_L1_error)
            __Pyx_XGOTREF(__pyx_t_7);
            __pyx_t_2 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference);
            if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 792, __pyx_L1_error)
            __Pyx_XGOTREF(__pyx_t_2);
          }
          #else
          __pyx_t_7 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 792, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 792, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        } else {
          Py_ssize_t index = -1;
          __pyx_t_9 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 792, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __pyx_t_10 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_9);
          index = 0; __pyx_t_7 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_7)) goto __pyx_L7_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_7);
          index = 1; __pyx_t_2 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_2)) goto __pyx_L7_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_2);
          if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < (0)) __PYX_ERR(0, 792, __pyx_L1_error)
          __pyx_t_10 = NULL;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          goto __pyx_L8_unpacking_done;
          __pyx_L7_unpacking_failed:;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          __pyx_t_10 = NULL;
          if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
          __PYX_ERR(0, 792, __pyx_L1_error)
          __pyx_L8_unpacking_done:;
        }
        __Pyx_XDECREF_SET(__pyx_v_k, __pyx_t_7);
        __pyx_t_7 = 0;
        __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_2);
        __pyx_t_2 = 0;

        /* "symengine/lib/symengine_wrapper.pyx":793
 *         if is_sequence(args[0]):
 *             for k, v in zip(args[0], args[1]):
 *                 D.add(k, v)             # <<<<<<<<<<<<<<
 *         else:
 *             D.add(args[0], args[1])
*/
        __pyx_t_2 = ((PyObject *)__pyx_v_D);
        __Pyx_INCREF(__pyx_t_2);
        __pyx_t_4 = 0;
        {
          PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_k, __pyx_v_v};
          __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_add, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 793, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
        }
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "symengine/lib/symengine_wrapper.pyx":792
 *     if len(args) == 2:
 *         if is_sequence(args[0]):
 *             for k, v in zip(args[0], args[1]):             # <<<<<<<<<<<<<<
 *                 D.add(k, v)
 *         else:
*/
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "symengine/lib/symengine_wrapper.pyx":791
 *     cdef _DictBasic D = DictBasic()
 *     if len(args) == 2:
 *         if is_sequence(args[0]):             # <<<<<<<<<<<<<<
 *             for k, v in zip(args[0], args[1]):
 *                 D.add(k, v)
*/
      goto __pyx_L4;
    }

    /* "symengine/lib/symengine_wrapper.pyx":795
 *                 D.add(k, v)
 *         else:
 *             D.add(args[0], args[1])             # <<<<<<<<<<<<<<
 *         return D
 *     elif len(args) == 1:
*/
    /*else*/ {
      __pyx_t_1 = ((PyObject *)__pyx_v_D);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_GetItemInt_Tuple(__pyx_v_args, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 795, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v_args, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 795, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_4 = 0;
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_1, __pyx_t_2, __pyx_t_7};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_add, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 795, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __pyx_L4:;

    /* "symengine/lib/symengine_wrapper.pyx":796
 *         else:
 *             D.add(args[0], args[1])
 *         return D             # <<<<<<<<<<<<<<
 *     elif len(args) == 1:
 *         arg = args[0]
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF((PyObject *)__pyx_v_D);
    __pyx_r = ((PyObject *)__pyx_v_D);
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":790
 *     """
 *     cdef _DictBasic D = DictBasic()
 *     if len(args) == 2:             # <<<<<<<<<<<<<<
 *         if is_sequence(args[0]):
 *             for k, v in zip(args[0], args[1]):
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":797
 *             D.add(args[0], args[1])
 *         return D
 *     elif len(args) == 1:             # <<<<<<<<<<<<<<
 *         arg = args[0]
 *     else:
*/
  __pyx_t_5 = __Pyx_PyTuple_GET_SIZE(__pyx_v_args); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 797, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 == 1);
  if (likely(__pyx_t_6)) {

    /* "symengine/lib/symengine_wrapper.pyx":798
 *         return D
 *     elif len(args) == 1:
 *         arg = args[0]             # <<<<<<<<<<<<<<
 *     else:
 *         raise TypeError("subs/msubs takes one or two arguments (%d given)" % \
*/
    __pyx_t_3 = __Pyx_GetItemInt_Tuple(__pyx_v_args, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 798, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_arg = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":797
 *             D.add(args[0], args[1])
 *         return D
 *     elif len(args) == 1:             # <<<<<<<<<<<<<<
 *         arg = args[0]
 *     else:
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":800
 *         arg = args[0]
 *     else:
 *         raise TypeError("subs/msubs takes one or two arguments (%d given)" % \             # <<<<<<<<<<<<<<
 *                 len(args))
 *     if isinstance(arg, DictBasic):
*/
  /*else*/ {
    __pyx_t_7 = NULL;

    /* "symengine/lib/symengine_wrapper.pyx":801
 *     else:
 *         raise TypeError("subs/msubs takes one or two arguments (%d given)" % \
 *                 len(args))             # <<<<<<<<<<<<<<
 *     if isinstance(arg, DictBasic):
 *         return arg
*/
    __pyx_t_5 = __Pyx_PyTuple_GET_SIZE(__pyx_v_args); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 801, __pyx_L1_error)
    __pyx_t_2 = PyLong_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 801, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);

    /* "symengine/lib/symengine_wrapper.pyx":800
 *         arg = args[0]
 *     else:
 *         raise TypeError("subs/msubs takes one or two arguments (%d given)" % \             # <<<<<<<<<<<<<<
 *                 len(args))
 *     if isinstance(arg, DictBasic):
*/
    __pyx_t_1 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_subs_msubs_takes_one_or_two_argu, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 800, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_1};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 800, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 800, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "symengine/lib/symengine_wrapper.pyx":802
 *         raise TypeError("subs/msubs takes one or two arguments (%d given)" % \
 *                 len(args))
 *     if isinstance(arg, DictBasic):             # <<<<<<<<<<<<<<
 *         return arg
 *     for k, v in arg.items():
*/
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_DictBasic); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 802, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = PyObject_IsInstance(__pyx_v_arg, __pyx_t_3); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 802, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_6) {

    /* "symengine/lib/symengine_wrapper.pyx":803
 *                 len(args))
 *     if isinstance(arg, DictBasic):
 *         return arg             # <<<<<<<<<<<<<<
 *     for k, v in arg.items():
 *         D.add(k, v)
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_arg);
    __pyx_r = __pyx_v_arg;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":802
 *         raise TypeError("subs/msubs takes one or two arguments (%d given)" % \
 *                 len(args))
 *     if isinstance(arg, DictBasic):             # <<<<<<<<<<<<<<
 *         return arg
 *     for k, v in arg.items():
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":804
 *     if isinstance(arg, DictBasic):
 *         return arg
 *     for k, v in arg.items():             # <<<<<<<<<<<<<<
 *         D.add(k, v)
 *     return D
*/
  __pyx_t_5 = 0;
  if (unlikely(__pyx_v_arg == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items");
    __PYX_ERR(0, 804, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_dict_iterator(__pyx_v_arg, 0, __pyx_mstate_global->__pyx_n_u_items, (&__pyx_t_11), (&__pyx_t_12)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 804, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __pyx_t_3 = __pyx_t_1;
  __pyx_t_1 = 0;
  while (1) {
    __pyx_t_13 = __Pyx_dict_iter_next(__pyx_t_3, __pyx_t_11, &__pyx_t_5, &__pyx_t_1, &__pyx_t_7, NULL, __pyx_t_12);
    if (unlikely(__pyx_t_13 == 0)) break;
    if (unlikely(__pyx_t_13 == -1)) __PYX_ERR(0, 804, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_XDECREF_SET(__pyx_v_k, __pyx_t_1);
    __pyx_t_1 = 0;
    __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_7);
    __pyx_t_7 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":805
 *         return arg
 *     for k, v in arg.items():
 *         D.add(k, v)             # <<<<<<<<<<<<<<
 *     return D
 * 
*/
    __pyx_t_1 = ((PyObject *)__pyx_v_D);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_4 = 0;
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_1, __pyx_v_k, __pyx_v_v};
      __pyx_t_7 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_add, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 805, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":806
 *     for k, v in arg.items():
 *         D.add(k, v)
 *     return D             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_D);
  __pyx_r = ((PyObject *)__pyx_v_D);
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":782
 *         return self.__str__()
 * 
 * def get_dict(*args):             # <<<<<<<<<<<<<<
 *     """
 *     Returns a DictBasic instance from args. Inputs can be,
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.get_dict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_D);
  __Pyx_XDECREF(__pyx_v_k);
  __Pyx_XDECREF(__pyx_v_v);
  __Pyx_XDECREF(__pyx_v_arg);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":809
 * 
 * 
 * cdef tuple vec_basic_to_tuple(symengine.vec_basic& vec):             # <<<<<<<<<<<<<<
 *     return tuple(vec_basic_to_list(vec))
 * 
*/

static PyObject *__pyx_f_9symengine_3lib_17symengine_wrapper_vec_basic_to_tuple(SymEngine::vec_basic &__pyx_v_vec) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("vec_basic_to_tuple", 0);

  /* "symengine/lib/symengine_wrapper.pyx":810
 * 
 * cdef tuple vec_basic_to_tuple(symengine.vec_basic& vec):
 *     return tuple(vec_basic_to_list(vec))             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_vec_basic_to_list(__pyx_v_vec); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 810, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(__pyx_t_1 == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(0, 810, __pyx_L1_error)
  }
  __pyx_t_2 = PyList_AsTuple(((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 810, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":809
 * 
 * 
 * cdef tuple vec_basic_to_tuple(symengine.vec_basic& vec):             # <<<<<<<<<<<<<<
 *     return tuple(vec_basic_to_list(vec))
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.vec_basic_to_tuple", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":813
 * 
 * 
 * cdef list vec_basic_to_list(symengine.vec_basic& vec):             # <<<<<<<<<<<<<<
 *     result = []
 *     for i in range(vec.size()):
*/

static PyObject *__pyx_f_9symengine_3lib_17symengine_wrapper_vec_basic_to_list(SymEngine::vec_basic &__pyx_v_vec) {
  PyObject *__pyx_v_result = NULL;
  std::vector<SymEngine::RCP<const SymEngine::Basic>> ::size_type __pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  std::vector<SymEngine::RCP<const SymEngine::Basic>> ::size_type __pyx_t_2;
  std::vector<SymEngine::RCP<const SymEngine::Basic>> ::size_type __pyx_t_3;
  std::vector<SymEngine::RCP<const SymEngine::Basic>> ::size_type __pyx_t_4;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("vec_basic_to_list", 0);

  /* "symengine/lib/symengine_wrapper.pyx":814
 * 
 * cdef list vec_basic_to_list(symengine.vec_basic& vec):
 *     result = []             # <<<<<<<<<<<<<<
 *     for i in range(vec.size()):
 *         result.append(c2py(<rcp_const_basic>(vec[i])))
*/
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 814, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_result = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":815
 * cdef list vec_basic_to_list(symengine.vec_basic& vec):
 *     result = []
 *     for i in range(vec.size()):             # <<<<<<<<<<<<<<
 *         result.append(c2py(<rcp_const_basic>(vec[i])))
 *     return result
*/
  __pyx_t_2 = __pyx_v_vec.size();
  __pyx_t_3 = __pyx_t_2;
  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
    __pyx_v_i = __pyx_t_4;

    /* "symengine/lib/symengine_wrapper.pyx":816
 *     result = []
 *     for i in range(vec.size()):
 *         result.append(c2py(<rcp_const_basic>(vec[i])))             # <<<<<<<<<<<<<<
 *     return result
 * 
*/
    __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)(__pyx_v_vec[__pyx_v_i]))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 816, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_result, __pyx_t_1); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 816, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "symengine/lib/symengine_wrapper.pyx":817
 *     for i in range(vec.size()):
 *         result.append(c2py(<rcp_const_basic>(vec[i])))
 *     return result             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":813
 * 
 * 
 * cdef list vec_basic_to_list(symengine.vec_basic& vec):             # <<<<<<<<<<<<<<
 *     result = []
 *     for i in range(vec.size()):
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.vec_basic_to_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":820
 * 
 * 
 * cdef list vec_pair_to_list(symengine.vec_pair& vec):             # <<<<<<<<<<<<<<
 *     result = []
 *     cdef rcp_const_basic a, b
*/

static PyObject *__pyx_f_9symengine_3lib_17symengine_wrapper_vec_pair_to_list(SymEngine::vec_pair &__pyx_v_vec) {
  PyObject *__pyx_v_result = NULL;
  SymEngine::RCP<const SymEngine::Basic> __pyx_v_a;
  SymEngine::RCP<const SymEngine::Basic> __pyx_v_b;
  std::vector<std::pair<SymEngine::RCP<const SymEngine::Basic>,SymEngine::RCP<const SymEngine::Basic>> > ::size_type __pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  std::vector<std::pair<SymEngine::RCP<const SymEngine::Basic>,SymEngine::RCP<const SymEngine::Basic>> > ::size_type __pyx_t_2;
  std::vector<std::pair<SymEngine::RCP<const SymEngine::Basic>,SymEngine::RCP<const SymEngine::Basic>> > ::size_type __pyx_t_3;
  std::vector<std::pair<SymEngine::RCP<const SymEngine::Basic>,SymEngine::RCP<const SymEngine::Basic>> > ::size_type __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("vec_pair_to_list", 0);

  /* "symengine/lib/symengine_wrapper.pyx":821
 * 
 * cdef list vec_pair_to_list(symengine.vec_pair& vec):
 *     result = []             # <<<<<<<<<<<<<<
 *     cdef rcp_const_basic a, b
 *     for i in range(vec.size()):
*/
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 821, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_result = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":823
 *     result = []
 *     cdef rcp_const_basic a, b
 *     for i in range(vec.size()):             # <<<<<<<<<<<<<<
 *         a = <rcp_const_basic>vec[i].first
 *         b = <rcp_const_basic>vec[i].second
*/
  __pyx_t_2 = __pyx_v_vec.size();
  __pyx_t_3 = __pyx_t_2;
  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
    __pyx_v_i = __pyx_t_4;

    /* "symengine/lib/symengine_wrapper.pyx":824
 *     cdef rcp_const_basic a, b
 *     for i in range(vec.size()):
 *         a = <rcp_const_basic>vec[i].first             # <<<<<<<<<<<<<<
 *         b = <rcp_const_basic>vec[i].second
 *         result.append((c2py(a), c2py(b)))
*/
    __pyx_v_a = ((SymEngine::RCP<const SymEngine::Basic>)(__pyx_v_vec[__pyx_v_i]).first);

    /* "symengine/lib/symengine_wrapper.pyx":825
 *     for i in range(vec.size()):
 *         a = <rcp_const_basic>vec[i].first
 *         b = <rcp_const_basic>vec[i].second             # <<<<<<<<<<<<<<
 *         result.append((c2py(a), c2py(b)))
 *     return result
*/
    __pyx_v_b = ((SymEngine::RCP<const SymEngine::Basic>)(__pyx_v_vec[__pyx_v_i]).second);

    /* "symengine/lib/symengine_wrapper.pyx":826
 *         a = <rcp_const_basic>vec[i].first
 *         b = <rcp_const_basic>vec[i].second
 *         result.append((c2py(a), c2py(b)))             # <<<<<<<<<<<<<<
 *     return result
 * 
*/
    __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(__pyx_v_a); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 826, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(__pyx_v_b); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 826, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 826, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_1);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 826, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_5);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5) != (0)) __PYX_ERR(0, 826, __pyx_L1_error);
    __pyx_t_1 = 0;
    __pyx_t_5 = 0;
    __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_result, __pyx_t_6); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 826, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }

  /* "symengine/lib/symengine_wrapper.pyx":827
 *         b = <rcp_const_basic>vec[i].second
 *         result.append((c2py(a), c2py(b)))
 *     return result             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":820
 * 
 * 
 * cdef list vec_pair_to_list(symengine.vec_pair& vec):             # <<<<<<<<<<<<<<
 *     result = []
 *     cdef rcp_const_basic a, b
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.vec_pair_to_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":830
 * 
 * 
 * def load_basic(bytes s):             # <<<<<<<<<<<<<<
 *     return c2py(symengine.wrapper_loads(s))
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15load_basic(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_15load_basic = {"load_basic", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15load_basic, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15load_basic(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_s = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("load_basic (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_s,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 830, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 830, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "load_basic", 0) < (0)) __PYX_ERR(0, 830, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("load_basic", 1, 1, 1, i); __PYX_ERR(0, 830, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 830, __pyx_L3_error)
    }
    __pyx_v_s = ((PyObject*)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("load_basic", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 830, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.load_basic", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_s), (&PyBytes_Type), 1, "s", 1))) __PYX_ERR(0, 830, __pyx_L1_error)
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_14load_basic(__pyx_self, __pyx_v_s);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_14load_basic(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_s) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  std::string __pyx_t_1;
  SymEngine::RCP<const SymEngine::Basic> __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("load_basic", 0);

  /* "symengine/lib/symengine_wrapper.pyx":831
 * 
 * def load_basic(bytes s):
 *     return c2py(symengine.wrapper_loads(s))             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_convert_string_from_py_6libcpp_6string_std__in_string(__pyx_v_s); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 831, __pyx_L1_error)
  try {
    __pyx_t_2 = SymEngine::wrapper_loads(__pyx_t_1);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 831, __pyx_L1_error)
  }
  __pyx_t_3 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 831, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":830
 * 
 * 
 * def load_basic(bytes s):             # <<<<<<<<<<<<<<
 *     return c2py(symengine.wrapper_loads(s))
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.load_basic", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":838
 * cdef class Basic(object):
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return deref(self.thisptr).__str__().decode("utf-8")
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_1__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_1__str__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic___str__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic___str__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  std::string __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":839
 * 
 *     def __str__(self):
 *         return deref(self.thisptr).__str__().decode("utf-8")             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_1 = (*__pyx_v_self->thisptr).__str__();
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 839, __pyx_L1_error)
  }
  __pyx_t_2 = __Pyx_decode_cpp_string(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_1), 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 839, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":838
 * cdef class Basic(object):
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return deref(self.thisptr).__str__().decode("utf-8")
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Basic.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":841
 *         return deref(self.thisptr).__str__().decode("utf-8")
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_3__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_3__repr__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_2__repr__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_2__repr__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":842
 * 
 *     def __repr__(self):
 *         return self.__str__()             # <<<<<<<<<<<<<<
 * 
 *     def __reduce__(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_str, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 842, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":841
 *         return deref(self.thisptr).__str__().decode("utf-8")
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Basic.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":844
 *         return self.__str__()
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         cdef bytes s = symengine.wrapper_dumps(deref(self.thisptr))
 *         return (load_basic, (s,))
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_5__reduce__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_5Basic_5__reduce__ = {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_5__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_5__reduce__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_4__reduce__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_4__reduce__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self) {
  PyObject *__pyx_v_s = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  std::string __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":845
 * 
 *     def __reduce__(self):
 *         cdef bytes s = symengine.wrapper_dumps(deref(self.thisptr))             # <<<<<<<<<<<<<<
 *         return (load_basic, (s,))
 * 
*/
  try {
    __pyx_t_1 = SymEngine::wrapper_dumps((*__pyx_v_self->thisptr));
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 845, __pyx_L1_error)
  }
  __pyx_t_2 = __pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 845, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_s = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":846
 *     def __reduce__(self):
 *         cdef bytes s = symengine.wrapper_dumps(deref(self.thisptr))
 *         return (load_basic, (s,))             # <<<<<<<<<<<<<<
 * 
 *     def _repr_latex_(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_load_basic); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 846, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 846, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_s);
  __Pyx_GIVEREF(__pyx_v_s);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_s) != (0)) __PYX_ERR(0, 846, __pyx_L1_error);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 846, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2) != (0)) __PYX_ERR(0, 846, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3) != (0)) __PYX_ERR(0, 846, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":844
 *         return self.__str__()
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         cdef bytes s = symengine.wrapper_dumps(deref(self.thisptr))
 *         return (load_basic, (s,))
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Basic.__reduce__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_s);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":848
 *         return (load_basic, (s,))
 * 
 *     def _repr_latex_(self):             # <<<<<<<<<<<<<<
 *         if repr_latex[0]:
 *             return "${}$".format(latex(self))
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_7_repr_latex_(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_5Basic_7_repr_latex_ = {"_repr_latex_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_7_repr_latex_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_7_repr_latex_(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_repr_latex_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("_repr_latex_", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("_repr_latex_", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_6_repr_latex_(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_6_repr_latex_(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  size_t __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_repr_latex_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":849
 * 
 *     def _repr_latex_(self):
 *         if repr_latex[0]:             # <<<<<<<<<<<<<<
 *             return "${}$".format(latex(self))
 *         else:
*/
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_repr_latex); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 849, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 849, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 849, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_3) {

    /* "symengine/lib/symengine_wrapper.pyx":850
 *     def _repr_latex_(self):
 *         if repr_latex[0]:
 *             return "${}$".format(latex(self))             # <<<<<<<<<<<<<<
 *         else:
 *             return None
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __pyx_mstate_global->__pyx_kp_u__9;
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_5 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_latex); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 850, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
      assert(__pyx_t_5);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
      __pyx_t_7 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, ((PyObject *)__pyx_v_self)};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 850, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    __pyx_t_7 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 850, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":849
 * 
 *     def _repr_latex_(self):
 *         if repr_latex[0]:             # <<<<<<<<<<<<<<
 *             return "${}$".format(latex(self))
 *         else:
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":852
 *             return "${}$".format(latex(self))
 *         else:
 *             return None             # <<<<<<<<<<<<<<
 * 
 *     def __hash__(self):
*/
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;
  }

  /* "symengine/lib/symengine_wrapper.pyx":848
 *         return (load_basic, (s,))
 * 
 *     def _repr_latex_(self):             # <<<<<<<<<<<<<<
 *         if repr_latex[0]:
 *             return "${}$".format(latex(self))
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Basic._repr_latex_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":854
 *             return None
 * 
 *     def __hash__(self):             # <<<<<<<<<<<<<<
 *         return deref(self.thisptr).hash()
 * 
*/

/* Python wrapper */
static Py_hash_t __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_9__hash__(PyObject *__pyx_v_self); /*proto*/
static Py_hash_t __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_9__hash__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  Py_hash_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__hash__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_8__hash__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_v_self));

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

static Py_hash_t __pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_8__hash__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self) {
  Py_hash_t __pyx_r;
  unsigned int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "symengine/lib/symengine_wrapper.pyx":855
 * 
 *     def __hash__(self):
 *         return deref(self.thisptr).hash()             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
*/
  try {
    __pyx_t_1 = (*__pyx_v_self->thisptr).hash();
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 855, __pyx_L1_error)
  }
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":854
 *             return None
 * 
 *     def __hash__(self):             # <<<<<<<<<<<<<<
 *         return deref(self.thisptr).hash()
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Basic.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  if (unlikely(__pyx_r == -1) && !PyErr_Occurred()) __pyx_r = -2;
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":857
 *         return deref(self.thisptr).hash()
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         self.thisptr.reset()
 * 
*/

/* Python wrapper */
static void __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_11__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_11__dealloc__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_10__dealloc__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_v_self));

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

static void __pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_10__dealloc__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "symengine/lib/symengine_wrapper.pyx":858
 * 
 *     def __dealloc__(self):
 *         self.thisptr.reset()             # <<<<<<<<<<<<<<
 * 
 *     def _unsafe_reset(self):
*/
  try {
    __pyx_v_self->thisptr.reset();
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 858, __pyx_L1_error)
  }

  /* "symengine/lib/symengine_wrapper.pyx":857
 *         return deref(self.thisptr).hash()
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         self.thisptr.reset()
 * 
*/

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("symengine.lib.symengine_wrapper.Basic.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
}

/* "symengine/lib/symengine_wrapper.pyx":860
 *         self.thisptr.reset()
 * 
 *     def _unsafe_reset(self):             # <<<<<<<<<<<<<<
 *         self.thisptr.reset()
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_13_unsafe_reset(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_5Basic_13_unsafe_reset = {"_unsafe_reset", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_13_unsafe_reset, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_13_unsafe_reset(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_unsafe_reset (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("_unsafe_reset", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("_unsafe_reset", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_12_unsafe_reset(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_12_unsafe_reset(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_unsafe_reset", 0);

  /* "symengine/lib/symengine_wrapper.pyx":861
 * 
 *     def _unsafe_reset(self):
 *         self.thisptr.reset()             # <<<<<<<<<<<<<<
 * 
 *     def __add__(a, b):
*/
  try {
    __pyx_v_self->thisptr.reset();
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 861, __pyx_L1_error)
  }

  /* "symengine/lib/symengine_wrapper.pyx":860
 *         self.thisptr.reset()
 * 
 *     def _unsafe_reset(self):             # <<<<<<<<<<<<<<
 *         self.thisptr.reset()
 * 
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Basic._unsafe_reset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":863
 *         self.thisptr.reset()
 * 
 *     def __add__(a, b):             # <<<<<<<<<<<<<<
 *         cdef Basic A = _sympify(a, False)
 *         B_ = _sympify(b, False)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_15__add__(PyObject *__pyx_v_a, PyObject *__pyx_v_b); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_15__add__(PyObject *__pyx_v_a, PyObject *__pyx_v_b) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__add__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_14__add__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_v_a), ((PyObject *)__pyx_v_b));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_14__add__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_a, PyObject *__pyx_v_b) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_A = 0;
  PyObject *__pyx_v_B_ = NULL;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_B = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  SymEngine::RCP<const SymEngine::Basic> __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__add__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":864
 * 
 *     def __add__(a, b):
 *         cdef Basic A = _sympify(a, False)             # <<<<<<<<<<<<<<
 *         B_ = _sympify(b, False)
 *         if A is None or B_ is None or isinstance(B_, MatrixBase): return NotImplemented
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 864, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, ((PyObject *)__pyx_v_a), Py_False};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 864, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 864, __pyx_L1_error)
  __pyx_v_A = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":865
 *     def __add__(a, b):
 *         cdef Basic A = _sympify(a, False)
 *         B_ = _sympify(b, False)             # <<<<<<<<<<<<<<
 *         if A is None or B_ is None or isinstance(B_, MatrixBase): return NotImplemented
 *         cdef Basic B = B_
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_sympify_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 865, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_b, Py_False};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 865, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_B_ = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":866
 *         cdef Basic A = _sympify(a, False)
 *         B_ = _sympify(b, False)
 *         if A is None or B_ is None or isinstance(B_, MatrixBase): return NotImplemented             # <<<<<<<<<<<<<<
 *         cdef Basic B = B_
 *         return c2py(symengine.add(A.thisptr, B.thisptr))
*/
  __pyx_t_6 = (((PyObject *)__pyx_v_A) == Py_None);
  if (!__pyx_t_6) {
  } else {
    __pyx_t_5 = __pyx_t_6;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_6 = (__pyx_v_B_ == Py_None);
  if (!__pyx_t_6) {
  } else {
    __pyx_t_5 = __pyx_t_6;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_6 = __Pyx_TypeCheck(__pyx_v_B_, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_MatrixBase); 
  __pyx_t_5 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_5) {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_builtin_NotImplemented);
    __pyx_r = __pyx_builtin_NotImplemented;
    goto __pyx_L0;
  }

  /* "symengine/lib/symengine_wrapper.pyx":867
 *         B_ = _sympify(b, False)
 *         if A is None or B_ is None or isinstance(B_, MatrixBase): return NotImplemented
 *         cdef Basic B = B_             # <<<<<<<<<<<<<<
 *         return c2py(symengine.add(A.thisptr, B.thisptr))
 * 
*/
  __pyx_t_1 = __pyx_v_B_;
  __Pyx_INCREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 867, __pyx_L1_error)
  __pyx_v_B = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":868
 *         if A is None or B_ is None or isinstance(B_, MatrixBase): return NotImplemented
 *         cdef Basic B = B_
 *         return c2py(symengine.add(A.thisptr, B.thisptr))             # <<<<<<<<<<<<<<
 * 
 *     def __radd__(Basic self, b):
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_7 = SymEngine::add(__pyx_v_A->thisptr, __pyx_v_B->thisptr);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 868, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_7)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 868, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":863
 *         self.thisptr.reset()
 * 
 *     def __add__(a, b):             # <<<<<<<<<<<<<<
 *         cdef Basic A = _sympify(a, False)
 *         B_ = _sympify(b, False)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Basic.__add__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_A);
  __Pyx_XDECREF(__pyx_v_B_);
  __Pyx_XDECREF((PyObject *)__pyx_v_B);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":870
 *         return c2py(symengine.add(A.thisptr, B.thisptr))
 * 
 *     def __radd__(Basic self, b):             # <<<<<<<<<<<<<<
 *         B_ = _sympify(b, False)
 *         if B_ is None or isinstance(B_, MatrixBase): return NotImplemented
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_17__radd__(PyObject *__pyx_v_self, PyObject *__pyx_v_b); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_17__radd__(PyObject *__pyx_v_self, PyObject *__pyx_v_b) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__radd__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_16__radd__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_v_self), ((PyObject *)__pyx_v_b));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_16__radd__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self, PyObject *__pyx_v_b) {
  PyObject *__pyx_v_B_ = NULL;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_B = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  SymEngine::RCP<const SymEngine::Basic> __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__radd__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":871
 * 
 *     def __radd__(Basic self, b):
 *         B_ = _sympify(b, False)             # <<<<<<<<<<<<<<
 *         if B_ is None or isinstance(B_, MatrixBase): return NotImplemented
 *         cdef Basic B = B_
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 871, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_b, Py_False};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 871, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_B_ = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":872
 *     def __radd__(Basic self, b):
 *         B_ = _sympify(b, False)
 *         if B_ is None or isinstance(B_, MatrixBase): return NotImplemented             # <<<<<<<<<<<<<<
 *         cdef Basic B = B_
 *         return c2py(symengine.add(B.thisptr, self.thisptr))
*/
  __pyx_t_6 = (__pyx_v_B_ == Py_None);
  if (!__pyx_t_6) {
  } else {
    __pyx_t_5 = __pyx_t_6;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_6 = __Pyx_TypeCheck(__pyx_v_B_, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_MatrixBase); 
  __pyx_t_5 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_5) {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_builtin_NotImplemented);
    __pyx_r = __pyx_builtin_NotImplemented;
    goto __pyx_L0;
  }

  /* "symengine/lib/symengine_wrapper.pyx":873
 *         B_ = _sympify(b, False)
 *         if B_ is None or isinstance(B_, MatrixBase): return NotImplemented
 *         cdef Basic B = B_             # <<<<<<<<<<<<<<
 *         return c2py(symengine.add(B.thisptr, self.thisptr))
 * 
*/
  __pyx_t_1 = __pyx_v_B_;
  __Pyx_INCREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 873, __pyx_L1_error)
  __pyx_v_B = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":874
 *         if B_ is None or isinstance(B_, MatrixBase): return NotImplemented
 *         cdef Basic B = B_
 *         return c2py(symengine.add(B.thisptr, self.thisptr))             # <<<<<<<<<<<<<<
 * 
 *     def __sub__(a, b):
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_7 = SymEngine::add(__pyx_v_B->thisptr, __pyx_v_self->thisptr);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 874, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_7)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 874, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":870
 *         return c2py(symengine.add(A.thisptr, B.thisptr))
 * 
 *     def __radd__(Basic self, b):             # <<<<<<<<<<<<<<
 *         B_ = _sympify(b, False)
 *         if B_ is None or isinstance(B_, MatrixBase): return NotImplemented
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Basic.__radd__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_B_);
  __Pyx_XDECREF((PyObject *)__pyx_v_B);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":876
 *         return c2py(symengine.add(B.thisptr, self.thisptr))
 * 
 *     def __sub__(a, b):             # <<<<<<<<<<<<<<
 *         cdef Basic A = _sympify(a, False)
 *         B_ = _sympify(b, False)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_19__sub__(PyObject *__pyx_v_a, PyObject *__pyx_v_b); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_19__sub__(PyObject *__pyx_v_a, PyObject *__pyx_v_b) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__sub__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_18__sub__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_v_a), ((PyObject *)__pyx_v_b));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_18__sub__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_a, PyObject *__pyx_v_b) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_A = 0;
  PyObject *__pyx_v_B_ = NULL;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_B = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  SymEngine::RCP<const SymEngine::Basic> __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__sub__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":877
 * 
 *     def __sub__(a, b):
 *         cdef Basic A = _sympify(a, False)             # <<<<<<<<<<<<<<
 *         B_ = _sympify(b, False)
 *         if A is None or B_ is None or isinstance(B_, MatrixBase): return NotImplemented
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 877, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, ((PyObject *)__pyx_v_a), Py_False};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 877, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 877, __pyx_L1_error)
  __pyx_v_A = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":878
 *     def __sub__(a, b):
 *         cdef Basic A = _sympify(a, False)
 *         B_ = _sympify(b, False)             # <<<<<<<<<<<<<<
 *         if A is None or B_ is None or isinstance(B_, MatrixBase): return NotImplemented
 *         cdef Basic B = B_
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_sympify_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 878, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_b, Py_False};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 878, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_B_ = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":879
 *         cdef Basic A = _sympify(a, False)
 *         B_ = _sympify(b, False)
 *         if A is None or B_ is None or isinstance(B_, MatrixBase): return NotImplemented             # <<<<<<<<<<<<<<
 *         cdef Basic B = B_
 *         return c2py(symengine.sub(A.thisptr, B.thisptr))
*/
  __pyx_t_6 = (((PyObject *)__pyx_v_A) == Py_None);
  if (!__pyx_t_6) {
  } else {
    __pyx_t_5 = __pyx_t_6;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_6 = (__pyx_v_B_ == Py_None);
  if (!__pyx_t_6) {
  } else {
    __pyx_t_5 = __pyx_t_6;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_6 = __Pyx_TypeCheck(__pyx_v_B_, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_MatrixBase); 
  __pyx_t_5 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_5) {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_builtin_NotImplemented);
    __pyx_r = __pyx_builtin_NotImplemented;
    goto __pyx_L0;
  }

  /* "symengine/lib/symengine_wrapper.pyx":880
 *         B_ = _sympify(b, False)
 *         if A is None or B_ is None or isinstance(B_, MatrixBase): return NotImplemented
 *         cdef Basic B = B_             # <<<<<<<<<<<<<<
 *         return c2py(symengine.sub(A.thisptr, B.thisptr))
 * 
*/
  __pyx_t_1 = __pyx_v_B_;
  __Pyx_INCREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 880, __pyx_L1_error)
  __pyx_v_B = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":881
 *         if A is None or B_ is None or isinstance(B_, MatrixBase): return NotImplemented
 *         cdef Basic B = B_
 *         return c2py(symengine.sub(A.thisptr, B.thisptr))             # <<<<<<<<<<<<<<
 * 
 *     def __rsub__(Basic self, b):
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_7 = SymEngine::sub(__pyx_v_A->thisptr, __pyx_v_B->thisptr);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 881, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_7)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 881, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":876
 *         return c2py(symengine.add(B.thisptr, self.thisptr))
 * 
 *     def __sub__(a, b):             # <<<<<<<<<<<<<<
 *         cdef Basic A = _sympify(a, False)
 *         B_ = _sympify(b, False)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Basic.__sub__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_A);
  __Pyx_XDECREF(__pyx_v_B_);
  __Pyx_XDECREF((PyObject *)__pyx_v_B);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":883
 *         return c2py(symengine.sub(A.thisptr, B.thisptr))
 * 
 *     def __rsub__(Basic self, b):             # <<<<<<<<<<<<<<
 *         B_ = _sympify(b, False)
 *         if B_ is None or isinstance(B_, MatrixBase): return NotImplemented
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_21__rsub__(PyObject *__pyx_v_self, PyObject *__pyx_v_b); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_21__rsub__(PyObject *__pyx_v_self, PyObject *__pyx_v_b) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__rsub__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_20__rsub__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_v_self), ((PyObject *)__pyx_v_b));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_20__rsub__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self, PyObject *__pyx_v_b) {
  PyObject *__pyx_v_B_ = NULL;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_B = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  SymEngine::RCP<const SymEngine::Basic> __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__rsub__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":884
 * 
 *     def __rsub__(Basic self, b):
 *         B_ = _sympify(b, False)             # <<<<<<<<<<<<<<
 *         if B_ is None or isinstance(B_, MatrixBase): return NotImplemented
 *         cdef Basic B = B_
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 884, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_b, Py_False};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 884, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_B_ = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":885
 *     def __rsub__(Basic self, b):
 *         B_ = _sympify(b, False)
 *         if B_ is None or isinstance(B_, MatrixBase): return NotImplemented             # <<<<<<<<<<<<<<
 *         cdef Basic B = B_
 *         return c2py(symengine.sub(B.thisptr, self.thisptr))
*/
  __pyx_t_6 = (__pyx_v_B_ == Py_None);
  if (!__pyx_t_6) {
  } else {
    __pyx_t_5 = __pyx_t_6;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_6 = __Pyx_TypeCheck(__pyx_v_B_, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_MatrixBase); 
  __pyx_t_5 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_5) {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_builtin_NotImplemented);
    __pyx_r = __pyx_builtin_NotImplemented;
    goto __pyx_L0;
  }

  /* "symengine/lib/symengine_wrapper.pyx":886
 *         B_ = _sympify(b, False)
 *         if B_ is None or isinstance(B_, MatrixBase): return NotImplemented
 *         cdef Basic B = B_             # <<<<<<<<<<<<<<
 *         return c2py(symengine.sub(B.thisptr, self.thisptr))
 * 
*/
  __pyx_t_1 = __pyx_v_B_;
  __Pyx_INCREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 886, __pyx_L1_error)
  __pyx_v_B = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":887
 *         if B_ is None or isinstance(B_, MatrixBase): return NotImplemented
 *         cdef Basic B = B_
 *         return c2py(symengine.sub(B.thisptr, self.thisptr))             # <<<<<<<<<<<<<<
 * 
 *     def __mul__(a, b):
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_7 = SymEngine::sub(__pyx_v_B->thisptr, __pyx_v_self->thisptr);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 887, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_7)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 887, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":883
 *         return c2py(symengine.sub(A.thisptr, B.thisptr))
 * 
 *     def __rsub__(Basic self, b):             # <<<<<<<<<<<<<<
 *         B_ = _sympify(b, False)
 *         if B_ is None or isinstance(B_, MatrixBase): return NotImplemented
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Basic.__rsub__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_B_);
  __Pyx_XDECREF((PyObject *)__pyx_v_B);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":889
 *         return c2py(symengine.sub(B.thisptr, self.thisptr))
 * 
 *     def __mul__(a, b):             # <<<<<<<<<<<<<<
 *         cdef Basic A = _sympify(a, False)
 *         B_ = _sympify(b, False)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_23__mul__(PyObject *__pyx_v_a, PyObject *__pyx_v_b); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_23__mul__(PyObject *__pyx_v_a, PyObject *__pyx_v_b) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__mul__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_22__mul__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_v_a), ((PyObject *)__pyx_v_b));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_22__mul__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_a, PyObject *__pyx_v_b) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_A = 0;
  PyObject *__pyx_v_B_ = NULL;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_B = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  SymEngine::RCP<const SymEngine::Basic> __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__mul__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":890
 * 
 *     def __mul__(a, b):
 *         cdef Basic A = _sympify(a, False)             # <<<<<<<<<<<<<<
 *         B_ = _sympify(b, False)
 *         if A is None or B_ is None or isinstance(B_, MatrixBase): return NotImplemented
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 890, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, ((PyObject *)__pyx_v_a), Py_False};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 890, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 890, __pyx_L1_error)
  __pyx_v_A = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":891
 *     def __mul__(a, b):
 *         cdef Basic A = _sympify(a, False)
 *         B_ = _sympify(b, False)             # <<<<<<<<<<<<<<
 *         if A is None or B_ is None or isinstance(B_, MatrixBase): return NotImplemented
 *         cdef Basic B = B_
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_sympify_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 891, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_b, Py_False};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 891, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_B_ = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":892
 *         cdef Basic A = _sympify(a, False)
 *         B_ = _sympify(b, False)
 *         if A is None or B_ is None or isinstance(B_, MatrixBase): return NotImplemented             # <<<<<<<<<<<<<<
 *         cdef Basic B = B_
 *         return c2py(symengine.mul(A.thisptr, B.thisptr))
*/
  __pyx_t_6 = (((PyObject *)__pyx_v_A) == Py_None);
  if (!__pyx_t_6) {
  } else {
    __pyx_t_5 = __pyx_t_6;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_6 = (__pyx_v_B_ == Py_None);
  if (!__pyx_t_6) {
  } else {
    __pyx_t_5 = __pyx_t_6;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_6 = __Pyx_TypeCheck(__pyx_v_B_, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_MatrixBase); 
  __pyx_t_5 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_5) {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_builtin_NotImplemented);
    __pyx_r = __pyx_builtin_NotImplemented;
    goto __pyx_L0;
  }

  /* "symengine/lib/symengine_wrapper.pyx":893
 *         B_ = _sympify(b, False)
 *         if A is None or B_ is None or isinstance(B_, MatrixBase): return NotImplemented
 *         cdef Basic B = B_             # <<<<<<<<<<<<<<
 *         return c2py(symengine.mul(A.thisptr, B.thisptr))
 * 
*/
  __pyx_t_1 = __pyx_v_B_;
  __Pyx_INCREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 893, __pyx_L1_error)
  __pyx_v_B = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":894
 *         if A is None or B_ is None or isinstance(B_, MatrixBase): return NotImplemented
 *         cdef Basic B = B_
 *         return c2py(symengine.mul(A.thisptr, B.thisptr))             # <<<<<<<<<<<<<<
 * 
 *     def __rmul__(Basic self, b):
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_7 = SymEngine::mul(__pyx_v_A->thisptr, __pyx_v_B->thisptr);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 894, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_7)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 894, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":889
 *         return c2py(symengine.sub(B.thisptr, self.thisptr))
 * 
 *     def __mul__(a, b):             # <<<<<<<<<<<<<<
 *         cdef Basic A = _sympify(a, False)
 *         B_ = _sympify(b, False)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Basic.__mul__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_A);
  __Pyx_XDECREF(__pyx_v_B_);
  __Pyx_XDECREF((PyObject *)__pyx_v_B);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":896
 *         return c2py(symengine.mul(A.thisptr, B.thisptr))
 * 
 *     def __rmul__(Basic self, b):             # <<<<<<<<<<<<<<
 *         B_ = _sympify(b, False)
 *         if B_ is None or isinstance(B_, MatrixBase): return NotImplemented
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_25__rmul__(PyObject *__pyx_v_self, PyObject *__pyx_v_b); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_25__rmul__(PyObject *__pyx_v_self, PyObject *__pyx_v_b) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__rmul__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_24__rmul__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_v_self), ((PyObject *)__pyx_v_b));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_24__rmul__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self, PyObject *__pyx_v_b) {
  PyObject *__pyx_v_B_ = NULL;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_B = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  SymEngine::RCP<const SymEngine::Basic> __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__rmul__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":897
 * 
 *     def __rmul__(Basic self, b):
 *         B_ = _sympify(b, False)             # <<<<<<<<<<<<<<
 *         if B_ is None or isinstance(B_, MatrixBase): return NotImplemented
 *         cdef Basic B = B_
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 897, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_b, Py_False};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 897, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_B_ = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":898
 *     def __rmul__(Basic self, b):
 *         B_ = _sympify(b, False)
 *         if B_ is None or isinstance(B_, MatrixBase): return NotImplemented             # <<<<<<<<<<<<<<
 *         cdef Basic B = B_
 *         return c2py(symengine.mul(B.thisptr, self.thisptr))
*/
  __pyx_t_6 = (__pyx_v_B_ == Py_None);
  if (!__pyx_t_6) {
  } else {
    __pyx_t_5 = __pyx_t_6;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_6 = __Pyx_TypeCheck(__pyx_v_B_, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_MatrixBase); 
  __pyx_t_5 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_5) {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_builtin_NotImplemented);
    __pyx_r = __pyx_builtin_NotImplemented;
    goto __pyx_L0;
  }

  /* "symengine/lib/symengine_wrapper.pyx":899
 *         B_ = _sympify(b, False)
 *         if B_ is None or isinstance(B_, MatrixBase): return NotImplemented
 *         cdef Basic B = B_             # <<<<<<<<<<<<<<
 *         return c2py(symengine.mul(B.thisptr, self.thisptr))
 * 
*/
  __pyx_t_1 = __pyx_v_B_;
  __Pyx_INCREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 899, __pyx_L1_error)
  __pyx_v_B = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":900
 *         if B_ is None or isinstance(B_, MatrixBase): return NotImplemented
 *         cdef Basic B = B_
 *         return c2py(symengine.mul(B.thisptr, self.thisptr))             # <<<<<<<<<<<<<<
 * 
 *     def __truediv__(a, b):
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_7 = SymEngine::mul(__pyx_v_B->thisptr, __pyx_v_self->thisptr);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 900, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_7)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 900, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":896
 *         return c2py(symengine.mul(A.thisptr, B.thisptr))
 * 
 *     def __rmul__(Basic self, b):             # <<<<<<<<<<<<<<
 *         B_ = _sympify(b, False)
 *         if B_ is None or isinstance(B_, MatrixBase): return NotImplemented
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Basic.__rmul__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_B_);
  __Pyx_XDECREF((PyObject *)__pyx_v_B);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":902
 *         return c2py(symengine.mul(B.thisptr, self.thisptr))
 * 
 *     def __truediv__(a, b):             # <<<<<<<<<<<<<<
 *         cdef Basic A = _sympify(a, False)
 *         B_ = _sympify(b, False)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_27__truediv__(PyObject *__pyx_v_a, PyObject *__pyx_v_b); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_27__truediv__(PyObject *__pyx_v_a, PyObject *__pyx_v_b) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__truediv__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_26__truediv__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_v_a), ((PyObject *)__pyx_v_b));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_26__truediv__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_a, PyObject *__pyx_v_b) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_A = 0;
  PyObject *__pyx_v_B_ = NULL;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_B = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  SymEngine::RCP<const SymEngine::Basic> __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__truediv__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":903
 * 
 *     def __truediv__(a, b):
 *         cdef Basic A = _sympify(a, False)             # <<<<<<<<<<<<<<
 *         B_ = _sympify(b, False)
 *         if A is None or B_ is None or isinstance(B_, MatrixBase): return NotImplemented
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 903, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, ((PyObject *)__pyx_v_a), Py_False};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 903, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 903, __pyx_L1_error)
  __pyx_v_A = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":904
 *     def __truediv__(a, b):
 *         cdef Basic A = _sympify(a, False)
 *         B_ = _sympify(b, False)             # <<<<<<<<<<<<<<
 *         if A is None or B_ is None or isinstance(B_, MatrixBase): return NotImplemented
 *         cdef Basic B = B_
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_sympify_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 904, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_b, Py_False};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 904, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_B_ = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":905
 *         cdef Basic A = _sympify(a, False)
 *         B_ = _sympify(b, False)
 *         if A is None or B_ is None or isinstance(B_, MatrixBase): return NotImplemented             # <<<<<<<<<<<<<<
 *         cdef Basic B = B_
 *         return c2py(symengine.div(A.thisptr, B.thisptr))
*/
  __pyx_t_6 = (((PyObject *)__pyx_v_A) == Py_None);
  if (!__pyx_t_6) {
  } else {
    __pyx_t_5 = __pyx_t_6;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_6 = (__pyx_v_B_ == Py_None);
  if (!__pyx_t_6) {
  } else {
    __pyx_t_5 = __pyx_t_6;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_6 = __Pyx_TypeCheck(__pyx_v_B_, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_MatrixBase); 
  __pyx_t_5 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_5) {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_builtin_NotImplemented);
    __pyx_r = __pyx_builtin_NotImplemented;
    goto __pyx_L0;
  }

  /* "symengine/lib/symengine_wrapper.pyx":906
 *         B_ = _sympify(b, False)
 *         if A is None or B_ is None or isinstance(B_, MatrixBase): return NotImplemented
 *         cdef Basic B = B_             # <<<<<<<<<<<<<<
 *         return c2py(symengine.div(A.thisptr, B.thisptr))
 * 
*/
  __pyx_t_1 = __pyx_v_B_;
  __Pyx_INCREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 906, __pyx_L1_error)
  __pyx_v_B = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":907
 *         if A is None or B_ is None or isinstance(B_, MatrixBase): return NotImplemented
 *         cdef Basic B = B_
 *         return c2py(symengine.div(A.thisptr, B.thisptr))             # <<<<<<<<<<<<<<
 * 
 *     def __rtruediv__(Basic self, b):
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_7 = SymEngine::div(__pyx_v_A->thisptr, __pyx_v_B->thisptr);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 907, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_7)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 907, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":902
 *         return c2py(symengine.mul(B.thisptr, self.thisptr))
 * 
 *     def __truediv__(a, b):             # <<<<<<<<<<<<<<
 *         cdef Basic A = _sympify(a, False)
 *         B_ = _sympify(b, False)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Basic.__truediv__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_A);
  __Pyx_XDECREF(__pyx_v_B_);
  __Pyx_XDECREF((PyObject *)__pyx_v_B);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":909
 *         return c2py(symengine.div(A.thisptr, B.thisptr))
 * 
 *     def __rtruediv__(Basic self, b):             # <<<<<<<<<<<<<<
 *         B_ = _sympify(b, False)
 *         if B_ is None or isinstance(B_, MatrixBase): return NotImplemented
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_29__rtruediv__(PyObject *__pyx_v_self, PyObject *__pyx_v_b); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_29__rtruediv__(PyObject *__pyx_v_self, PyObject *__pyx_v_b) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__rtruediv__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_28__rtruediv__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_v_self), ((PyObject *)__pyx_v_b));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_28__rtruediv__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self, PyObject *__pyx_v_b) {
  PyObject *__pyx_v_B_ = NULL;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_B = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  SymEngine::RCP<const SymEngine::Basic> __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__rtruediv__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":910
 * 
 *     def __rtruediv__(Basic self, b):
 *         B_ = _sympify(b, False)             # <<<<<<<<<<<<<<
 *         if B_ is None or isinstance(B_, MatrixBase): return NotImplemented
 *         cdef Basic B = B_
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 910, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_b, Py_False};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 910, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_B_ = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":911
 *     def __rtruediv__(Basic self, b):
 *         B_ = _sympify(b, False)
 *         if B_ is None or isinstance(B_, MatrixBase): return NotImplemented             # <<<<<<<<<<<<<<
 *         cdef Basic B = B_
 *         return c2py(symengine.div(B.thisptr, self.thisptr))
*/
  __pyx_t_6 = (__pyx_v_B_ == Py_None);
  if (!__pyx_t_6) {
  } else {
    __pyx_t_5 = __pyx_t_6;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_6 = __Pyx_TypeCheck(__pyx_v_B_, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_MatrixBase); 
  __pyx_t_5 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_5) {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_builtin_NotImplemented);
    __pyx_r = __pyx_builtin_NotImplemented;
    goto __pyx_L0;
  }

  /* "symengine/lib/symengine_wrapper.pyx":912
 *         B_ = _sympify(b, False)
 *         if B_ is None or isinstance(B_, MatrixBase): return NotImplemented
 *         cdef Basic B = B_             # <<<<<<<<<<<<<<
 *         return c2py(symengine.div(B.thisptr, self.thisptr))
 * 
*/
  __pyx_t_1 = __pyx_v_B_;
  __Pyx_INCREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 912, __pyx_L1_error)
  __pyx_v_B = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":913
 *         if B_ is None or isinstance(B_, MatrixBase): return NotImplemented
 *         cdef Basic B = B_
 *         return c2py(symengine.div(B.thisptr, self.thisptr))             # <<<<<<<<<<<<<<
 * 
 *     def __floordiv__(x, y):
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_7 = SymEngine::div(__pyx_v_B->thisptr, __pyx_v_self->thisptr);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 913, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_7)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 913, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":909
 *         return c2py(symengine.div(A.thisptr, B.thisptr))
 * 
 *     def __rtruediv__(Basic self, b):             # <<<<<<<<<<<<<<
 *         B_ = _sympify(b, False)
 *         if B_ is None or isinstance(B_, MatrixBase): return NotImplemented
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Basic.__rtruediv__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_B_);
  __Pyx_XDECREF((PyObject *)__pyx_v_B);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":915
 *         return c2py(symengine.div(B.thisptr, self.thisptr))
 * 
 *     def __floordiv__(x, y):             # <<<<<<<<<<<<<<
 *         return floor(x/y)
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_31__floordiv__(PyObject *__pyx_v_x, PyObject *__pyx_v_y); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_31__floordiv__(PyObject *__pyx_v_x, PyObject *__pyx_v_y) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__floordiv__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_30__floordiv__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_v_x), ((PyObject *)__pyx_v_y));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_30__floordiv__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_x, PyObject *__pyx_v_y) {
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__floordiv__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":916
 * 
 *     def __floordiv__(x, y):
 *         return floor(x/y)             # <<<<<<<<<<<<<<
 * 
 *     def __rfloordiv__(y, x):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_floor); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 916, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyNumber_Divide(((PyObject *)__pyx_v_x), __pyx_v_y); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 916, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 916, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":915
 *         return c2py(symengine.div(B.thisptr, self.thisptr))
 * 
 *     def __floordiv__(x, y):             # <<<<<<<<<<<<<<
 *         return floor(x/y)
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Basic.__floordiv__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":918
 *         return floor(x/y)
 * 
 *     def __rfloordiv__(y, x):             # <<<<<<<<<<<<<<
 *         return floor(x/y)
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_33__rfloordiv__(PyObject *__pyx_v_y, PyObject *__pyx_v_x); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_33__rfloordiv__(PyObject *__pyx_v_y, PyObject *__pyx_v_x) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__rfloordiv__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_32__rfloordiv__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_v_y), ((PyObject *)__pyx_v_x));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_32__rfloordiv__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_y, PyObject *__pyx_v_x) {
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__rfloordiv__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":919
 * 
 *     def __rfloordiv__(y, x):
 *         return floor(x/y)             # <<<<<<<<<<<<<<
 * 
 *     def __mod__(x, y):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_floor); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 919, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyNumber_Divide(__pyx_v_x, ((PyObject *)__pyx_v_y)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 919, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 919, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":918
 *         return floor(x/y)
 * 
 *     def __rfloordiv__(y, x):             # <<<<<<<<<<<<<<
 *         return floor(x/y)
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Basic.__rfloordiv__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":921
 *         return floor(x/y)
 * 
 *     def __mod__(x, y):             # <<<<<<<<<<<<<<
 *         return x - y * floor(x/y)
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_35__mod__(PyObject *__pyx_v_x, PyObject *__pyx_v_y); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_35__mod__(PyObject *__pyx_v_x, PyObject *__pyx_v_y) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__mod__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_34__mod__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_v_x), ((PyObject *)__pyx_v_y));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_34__mod__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_x, PyObject *__pyx_v_y) {
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__mod__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":922
 * 
 *     def __mod__(x, y):
 *         return x - y * floor(x/y)             # <<<<<<<<<<<<<<
 * 
 *     def __rmod__(y, x):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_floor); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 922, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyNumber_Divide(((PyObject *)__pyx_v_x), __pyx_v_y); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 922, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 922, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_t_3 = PyNumber_Multiply(__pyx_v_y, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 922, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyNumber_Subtract(((PyObject *)__pyx_v_x), __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 922, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":921
 *         return floor(x/y)
 * 
 *     def __mod__(x, y):             # <<<<<<<<<<<<<<
 *         return x - y * floor(x/y)
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Basic.__mod__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":924
 *         return x - y * floor(x/y)
 * 
 *     def __rmod__(y, x):             # <<<<<<<<<<<<<<
 *         return x - y * floor(x/y)
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_37__rmod__(PyObject *__pyx_v_y, PyObject *__pyx_v_x); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_37__rmod__(PyObject *__pyx_v_y, PyObject *__pyx_v_x) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__rmod__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_36__rmod__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_v_y), ((PyObject *)__pyx_v_x));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_36__rmod__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_y, PyObject *__pyx_v_x) {
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__rmod__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":925
 * 
 *     def __rmod__(y, x):
 *         return x - y * floor(x/y)             # <<<<<<<<<<<<<<
 * 
 *     def __divmod__(x, y):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_floor); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 925, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyNumber_Divide(__pyx_v_x, ((PyObject *)__pyx_v_y)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 925, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 925, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_t_3 = PyNumber_Multiply(((PyObject *)__pyx_v_y), __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 925, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyNumber_Subtract(__pyx_v_x, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 925, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":924
 *         return x - y * floor(x/y)
 * 
 *     def __rmod__(y, x):             # <<<<<<<<<<<<<<
 *         return x - y * floor(x/y)
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Basic.__rmod__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":927
 *         return x - y * floor(x/y)
 * 
 *     def __divmod__(x, y):             # <<<<<<<<<<<<<<
 *         f = floor(x/y)
 *         return f, x - y * f
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_39__divmod__(PyObject *__pyx_v_x, PyObject *__pyx_v_y); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_39__divmod__(PyObject *__pyx_v_x, PyObject *__pyx_v_y) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__divmod__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_38__divmod__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_v_x), ((PyObject *)__pyx_v_y));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_38__divmod__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_x, PyObject *__pyx_v_y) {
  PyObject *__pyx_v_f = 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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__divmod__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":928
 * 
 *     def __divmod__(x, y):
 *         f = floor(x/y)             # <<<<<<<<<<<<<<
 *         return f, x - y * f
 * 
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_floor); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 928, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyNumber_Divide(((PyObject *)__pyx_v_x), __pyx_v_y); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 928, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 928, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_f = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":929
 *     def __divmod__(x, y):
 *         f = floor(x/y)
 *         return f, x - y * f             # <<<<<<<<<<<<<<
 * 
 *     def __rdivmod__(y, x):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyNumber_Multiply(__pyx_v_y, __pyx_v_f); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 929, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyNumber_Subtract(((PyObject *)__pyx_v_x), __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 929, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 929, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_f);
  __Pyx_GIVEREF(__pyx_v_f);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_f) != (0)) __PYX_ERR(0, 929, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3) != (0)) __PYX_ERR(0, 929, __pyx_L1_error);
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":927
 *         return x - y * floor(x/y)
 * 
 *     def __divmod__(x, y):             # <<<<<<<<<<<<<<
 *         f = floor(x/y)
 *         return f, x - y * f
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Basic.__divmod__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_f);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":931
 *         return f, x - y * f
 * 
 *     def __rdivmod__(y, x):             # <<<<<<<<<<<<<<
 *         f = floor(x/y)
 *         return f, x - y * f
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_41__rdivmod__(PyObject *__pyx_v_y, PyObject *__pyx_v_x); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_41__rdivmod__(PyObject *__pyx_v_y, PyObject *__pyx_v_x) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__rdivmod__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_40__rdivmod__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_v_y), ((PyObject *)__pyx_v_x));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_40__rdivmod__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_y, PyObject *__pyx_v_x) {
  PyObject *__pyx_v_f = 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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__rdivmod__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":932
 * 
 *     def __rdivmod__(y, x):
 *         f = floor(x/y)             # <<<<<<<<<<<<<<
 *         return f, x - y * f
 * 
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_floor); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 932, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyNumber_Divide(__pyx_v_x, ((PyObject *)__pyx_v_y)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 932, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 932, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_f = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":933
 *     def __rdivmod__(y, x):
 *         f = floor(x/y)
 *         return f, x - y * f             # <<<<<<<<<<<<<<
 * 
 *     def __pow__(a, b, c):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyNumber_Multiply(((PyObject *)__pyx_v_y), __pyx_v_f); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 933, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyNumber_Subtract(__pyx_v_x, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 933, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 933, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_f);
  __Pyx_GIVEREF(__pyx_v_f);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_f) != (0)) __PYX_ERR(0, 933, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3) != (0)) __PYX_ERR(0, 933, __pyx_L1_error);
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":931
 *         return f, x - y * f
 * 
 *     def __rdivmod__(y, x):             # <<<<<<<<<<<<<<
 *         f = floor(x/y)
 *         return f, x - y * f
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Basic.__rdivmod__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_f);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":935
 *         return f, x - y * f
 * 
 *     def __pow__(a, b, c):             # <<<<<<<<<<<<<<
 *         if c is not None:
 *             return powermod(a, b, c)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_43__pow__(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_43__pow__(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pow__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_42__pow__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_v_a), ((PyObject *)__pyx_v_b), ((PyObject *)__pyx_v_c));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_42__pow__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_A = 0;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_B = 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;
  size_t __pyx_t_5;
  int __pyx_t_6;
  SymEngine::RCP<const SymEngine::Basic> __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pow__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":936
 * 
 *     def __pow__(a, b, c):
 *         if c is not None:             # <<<<<<<<<<<<<<
 *             return powermod(a, b, c)
 *         cdef Basic A = _sympify(a, False)
*/
  __pyx_t_1 = (__pyx_v_c != Py_None);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":937
 *     def __pow__(a, b, c):
 *         if c is not None:
 *             return powermod(a, b, c)             # <<<<<<<<<<<<<<
 *         cdef Basic A = _sympify(a, False)
 *         cdef Basic B = _sympify(b, False)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_powermod); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 937, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
      assert(__pyx_t_3);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
      __pyx_t_5 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[4] = {__pyx_t_3, ((PyObject *)__pyx_v_a), __pyx_v_b, __pyx_v_c};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 937, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":936
 * 
 *     def __pow__(a, b, c):
 *         if c is not None:             # <<<<<<<<<<<<<<
 *             return powermod(a, b, c)
 *         cdef Basic A = _sympify(a, False)
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":938
 *         if c is not None:
 *             return powermod(a, b, c)
 *         cdef Basic A = _sympify(a, False)             # <<<<<<<<<<<<<<
 *         cdef Basic B = _sympify(b, False)
 *         if A is None or B is None: return NotImplemented
*/
  __pyx_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 938, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_4, ((PyObject *)__pyx_v_a), Py_False};
    __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 938, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 938, __pyx_L1_error)
  __pyx_v_A = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":939
 *             return powermod(a, b, c)
 *         cdef Basic A = _sympify(a, False)
 *         cdef Basic B = _sympify(b, False)             # <<<<<<<<<<<<<<
 *         if A is None or B is None: return NotImplemented
 *         return c2py(symengine.pow(A.thisptr, B.thisptr))
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_sympify_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 939, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_b, Py_False};
    __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 939, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 939, __pyx_L1_error)
  __pyx_v_B = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":940
 *         cdef Basic A = _sympify(a, False)
 *         cdef Basic B = _sympify(b, False)
 *         if A is None or B is None: return NotImplemented             # <<<<<<<<<<<<<<
 *         return c2py(symengine.pow(A.thisptr, B.thisptr))
 * 
*/
  __pyx_t_6 = (((PyObject *)__pyx_v_A) == Py_None);
  if (!__pyx_t_6) {
  } else {
    __pyx_t_1 = __pyx_t_6;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_6 = (((PyObject *)__pyx_v_B) == Py_None);
  __pyx_t_1 = __pyx_t_6;
  __pyx_L5_bool_binop_done:;
  if (__pyx_t_1) {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_builtin_NotImplemented);
    __pyx_r = __pyx_builtin_NotImplemented;
    goto __pyx_L0;
  }

  /* "symengine/lib/symengine_wrapper.pyx":941
 *         cdef Basic B = _sympify(b, False)
 *         if A is None or B is None: return NotImplemented
 *         return c2py(symengine.pow(A.thisptr, B.thisptr))             # <<<<<<<<<<<<<<
 * 
 *     def __rpow__(Basic self, b):
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_7 = SymEngine::pow(__pyx_v_A->thisptr, __pyx_v_B->thisptr);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 941, __pyx_L1_error)
  }
  __pyx_t_2 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_7)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 941, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":935
 *         return f, x - y * f
 * 
 *     def __pow__(a, b, c):             # <<<<<<<<<<<<<<
 *         if c is not None:
 *             return powermod(a, b, c)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Basic.__pow__", __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;
}

/* "symengine/lib/symengine_wrapper.pyx":943
 *         return c2py(symengine.pow(A.thisptr, B.thisptr))
 * 
 *     def __rpow__(Basic self, b):             # <<<<<<<<<<<<<<
 *         cdef Basic B = _sympify(b, False)
 *         if B is None: return NotImplemented
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_45__rpow__(PyObject *__pyx_v_self, PyObject *__pyx_v_b, CYTHON_UNUSED PyObject *unused_arg_2); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_45__rpow__(PyObject *__pyx_v_self, PyObject *__pyx_v_b, CYTHON_UNUSED PyObject *unused_arg_2) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__rpow__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  if (unlikely(unused_arg_2 != Py_None)) {
    PyErr_Format(PyExc_TypeError, "%.200s() takes %zd arguments but %zd were given", (const char*) "symengine.lib.symengine_wrapper.Basic.__rpow__", (Py_ssize_t) 3, (Py_ssize_t) 2); __PYX_ERR(0, 943, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_44__rpow__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_v_self), ((PyObject *)__pyx_v_b));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_44__rpow__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self, PyObject *__pyx_v_b) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_B = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_t_5;
  SymEngine::RCP<const SymEngine::Basic> __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__rpow__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":944
 * 
 *     def __rpow__(Basic self, b):
 *         cdef Basic B = _sympify(b, False)             # <<<<<<<<<<<<<<
 *         if B is None: return NotImplemented
 *         return c2py(symengine.pow(B.thisptr, self.thisptr))
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 944, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_b, Py_False};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 944, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 944, __pyx_L1_error)
  __pyx_v_B = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":945
 *     def __rpow__(Basic self, b):
 *         cdef Basic B = _sympify(b, False)
 *         if B is None: return NotImplemented             # <<<<<<<<<<<<<<
 *         return c2py(symengine.pow(B.thisptr, self.thisptr))
 * 
*/
  __pyx_t_5 = (((PyObject *)__pyx_v_B) == Py_None);
  if (__pyx_t_5) {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_builtin_NotImplemented);
    __pyx_r = __pyx_builtin_NotImplemented;
    goto __pyx_L0;
  }

  /* "symengine/lib/symengine_wrapper.pyx":946
 *         cdef Basic B = _sympify(b, False)
 *         if B is None: return NotImplemented
 *         return c2py(symengine.pow(B.thisptr, self.thisptr))             # <<<<<<<<<<<<<<
 * 
 *     def __neg__(Basic self not None):
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_6 = SymEngine::pow(__pyx_v_B->thisptr, __pyx_v_self->thisptr);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 946, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_6)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 946, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":943
 *         return c2py(symengine.pow(A.thisptr, B.thisptr))
 * 
 *     def __rpow__(Basic self, b):             # <<<<<<<<<<<<<<
 *         cdef Basic B = _sympify(b, False)
 *         if B is None: return NotImplemented
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Basic.__rpow__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_B);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":948
 *         return c2py(symengine.pow(B.thisptr, self.thisptr))
 * 
 *     def __neg__(Basic self not None):             # <<<<<<<<<<<<<<
 *         return c2py(symengine.neg(self.thisptr))
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_47__neg__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_47__neg__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__neg__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "self"); __PYX_ERR(0, 948, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_46__neg__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_46__neg__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  SymEngine::RCP<const SymEngine::Basic> __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__neg__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":949
 * 
 *     def __neg__(Basic self not None):
 *         return c2py(symengine.neg(self.thisptr))             # <<<<<<<<<<<<<<
 * 
 *     def __pos__(self):
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_1 = SymEngine::neg(__pyx_v_self->thisptr);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 949, __pyx_L1_error)
  }
  __pyx_t_2 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 949, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":948
 *         return c2py(symengine.pow(B.thisptr, self.thisptr))
 * 
 *     def __neg__(Basic self not None):             # <<<<<<<<<<<<<<
 *         return c2py(symengine.neg(self.thisptr))
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Basic.__neg__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":951
 *         return c2py(symengine.neg(self.thisptr))
 * 
 *     def __pos__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_49__pos__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_49__pos__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pos__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_48__pos__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_48__pos__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pos__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":952
 * 
 *     def __pos__(self):
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def __abs__(Basic self not None):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_self);
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":951
 *         return c2py(symengine.neg(self.thisptr))
 * 
 *     def __pos__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
*/

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

/* "symengine/lib/symengine_wrapper.pyx":954
 *         return self
 * 
 *     def __abs__(Basic self not None):             # <<<<<<<<<<<<<<
 *         return c2py(symengine.abs(self.thisptr))
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_51__abs__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_51__abs__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__abs__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "self"); __PYX_ERR(0, 954, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_50__abs__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_50__abs__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  SymEngine::RCP<const SymEngine::Basic> __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__abs__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":955
 * 
 *     def __abs__(Basic self not None):
 *         return c2py(symengine.abs(self.thisptr))             # <<<<<<<<<<<<<<
 * 
 *     def __richcmp__(a, b, int op):
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_1 = SymEngine::abs(__pyx_v_self->thisptr);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 955, __pyx_L1_error)
  }
  __pyx_t_2 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 955, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":954
 *         return self
 * 
 *     def __abs__(Basic self not None):             # <<<<<<<<<<<<<<
 *         return c2py(symengine.abs(self.thisptr))
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Basic.__abs__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":957
 *         return c2py(symengine.abs(self.thisptr))
 * 
 *     def __richcmp__(a, b, int op):             # <<<<<<<<<<<<<<
 *         A = _sympify(a, False)
 *         B = _sympify(b, False)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_53__richcmp__(PyObject *__pyx_v_a, PyObject *__pyx_v_b, int __pyx_v_op); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_53__richcmp__(PyObject *__pyx_v_a, PyObject *__pyx_v_b, int __pyx_v_op) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_52__richcmp__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_v_a), ((PyObject *)__pyx_v_b), ((int)__pyx_v_op));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_52__richcmp__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_a, PyObject *__pyx_v_b, int __pyx_v_op) {
  PyObject *__pyx_v_A = NULL;
  PyObject *__pyx_v_B = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__richcmp__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":958
 * 
 *     def __richcmp__(a, b, int op):
 *         A = _sympify(a, False)             # <<<<<<<<<<<<<<
 *         B = _sympify(b, False)
 *         if not (isinstance(A, Basic) and isinstance(B, Basic)):
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 958, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, ((PyObject *)__pyx_v_a), Py_False};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 958, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_A = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":959
 *     def __richcmp__(a, b, int op):
 *         A = _sympify(a, False)
 *         B = _sympify(b, False)             # <<<<<<<<<<<<<<
 *         if not (isinstance(A, Basic) and isinstance(B, Basic)):
 *             if (op == 2):
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_sympify_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 959, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_b, Py_False};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 959, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_B = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":960
 *         A = _sympify(a, False)
 *         B = _sympify(b, False)
 *         if not (isinstance(A, Basic) and isinstance(B, Basic)):             # <<<<<<<<<<<<<<
 *             if (op == 2):
 *                 return False
*/
  __pyx_t_6 = __Pyx_TypeCheck(__pyx_v_A, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic); 
  if (__pyx_t_6) {
  } else {
    __pyx_t_5 = __pyx_t_6;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_6 = __Pyx_TypeCheck(__pyx_v_B, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic); 
  __pyx_t_5 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  __pyx_t_6 = (!__pyx_t_5);
  if (__pyx_t_6) {

    /* "symengine/lib/symengine_wrapper.pyx":961
 *         B = _sympify(b, False)
 *         if not (isinstance(A, Basic) and isinstance(B, Basic)):
 *             if (op == 2):             # <<<<<<<<<<<<<<
 *                 return False
 *             elif (op == 3):
*/
    switch (__pyx_v_op) {
      case 2:

      /* "symengine/lib/symengine_wrapper.pyx":962
 *         if not (isinstance(A, Basic) and isinstance(B, Basic)):
 *             if (op == 2):
 *                 return False             # <<<<<<<<<<<<<<
 *             elif (op == 3):
 *                 return True
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_False);
      __pyx_r = Py_False;
      goto __pyx_L0;

      /* "symengine/lib/symengine_wrapper.pyx":961
 *         B = _sympify(b, False)
 *         if not (isinstance(A, Basic) and isinstance(B, Basic)):
 *             if (op == 2):             # <<<<<<<<<<<<<<
 *                 return False
 *             elif (op == 3):
*/
      break;
      case 3:

      /* "symengine/lib/symengine_wrapper.pyx":964
 *                 return False
 *             elif (op == 3):
 *                 return True             # <<<<<<<<<<<<<<
 *             else:
 *                 return NotImplemented
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_True);
      __pyx_r = Py_True;
      goto __pyx_L0;

      /* "symengine/lib/symengine_wrapper.pyx":963
 *             if (op == 2):
 *                 return False
 *             elif (op == 3):             # <<<<<<<<<<<<<<
 *                 return True
 *             else:
*/
      break;
      default:

      /* "symengine/lib/symengine_wrapper.pyx":966
 *                 return True
 *             else:
 *                 return NotImplemented             # <<<<<<<<<<<<<<
 *         return Basic._richcmp_(A, B, op)
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_builtin_NotImplemented);
      __pyx_r = __pyx_builtin_NotImplemented;
      goto __pyx_L0;
      break;
    }

    /* "symengine/lib/symengine_wrapper.pyx":960
 *         A = _sympify(a, False)
 *         B = _sympify(b, False)
 *         if not (isinstance(A, Basic) and isinstance(B, Basic)):             # <<<<<<<<<<<<<<
 *             if (op == 2):
 *                 return False
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":967
 *             else:
 *                 return NotImplemented
 *         return Basic._richcmp_(A, B, op)             # <<<<<<<<<<<<<<
 * 
 *     def _richcmp_(Basic A, Basic B, int op):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyLong_From_int(__pyx_v_op); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 967, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_2, __pyx_v_A, __pyx_v_B, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_richcmp, __pyx_callargs+__pyx_t_4, (4-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 967, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":957
 *         return c2py(symengine.abs(self.thisptr))
 * 
 *     def __richcmp__(a, b, int op):             # <<<<<<<<<<<<<<
 *         A = _sympify(a, False)
 *         B = _sympify(b, False)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Basic.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_A);
  __Pyx_XDECREF(__pyx_v_B);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":969
 *         return Basic._richcmp_(A, B, op)
 * 
 *     def _richcmp_(Basic A, Basic B, int op):             # <<<<<<<<<<<<<<
 *         if (op == 2):
 *             return symengine.eq(deref(A.thisptr), deref(B.thisptr))
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_55_richcmp_(PyObject *__pyx_v_A, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_5Basic_55_richcmp_ = {"_richcmp_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_55_richcmp_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_55_richcmp_(PyObject *__pyx_v_A, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_B = 0;
  int __pyx_v_op;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_richcmp_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_B,&__pyx_mstate_global->__pyx_n_u_op,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 969, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 969, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 969, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_richcmp_", 0) < (0)) __PYX_ERR(0, 969, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_richcmp_", 1, 2, 2, i); __PYX_ERR(0, 969, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 969, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 969, __pyx_L3_error)
    }
    __pyx_v_B = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)values[0]);
    __pyx_v_op = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_op == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 969, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_richcmp_", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 969, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Basic._richcmp_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_B), __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic, 1, "B", 0))) __PYX_ERR(0, 969, __pyx_L1_error)
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_54_richcmp_(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_v_A), __pyx_v_B, __pyx_v_op);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_54_richcmp_(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_A, struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_B, int __pyx_v_op) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  bool __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  SymEngine::RCP<SymEngine::Boolean const >  __pyx_t_3;
  SymEngine::RCP<SymEngine::Boolean const >  __pyx_t_4;
  SymEngine::RCP<SymEngine::Boolean const >  __pyx_t_5;
  SymEngine::RCP<SymEngine::Boolean const >  __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_richcmp_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":970
 * 
 *     def _richcmp_(Basic A, Basic B, int op):
 *         if (op == 2):             # <<<<<<<<<<<<<<
 *             return symengine.eq(deref(A.thisptr), deref(B.thisptr))
 *         elif (op == 3):
*/
  switch (__pyx_v_op) {
    case 2:

    /* "symengine/lib/symengine_wrapper.pyx":971
 *     def _richcmp_(Basic A, Basic B, int op):
 *         if (op == 2):
 *             return symengine.eq(deref(A.thisptr), deref(B.thisptr))             # <<<<<<<<<<<<<<
 *         elif (op == 3):
 *             return symengine.neq(deref(A.thisptr), deref(B.thisptr))
*/
    __Pyx_XDECREF(__pyx_r);
    try {
      __pyx_t_1 = SymEngine::eq((*__pyx_v_A->thisptr), (*__pyx_v_B->thisptr));
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(0, 971, __pyx_L1_error)
    }
    __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 971, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":970
 * 
 *     def _richcmp_(Basic A, Basic B, int op):
 *         if (op == 2):             # <<<<<<<<<<<<<<
 *             return symengine.eq(deref(A.thisptr), deref(B.thisptr))
 *         elif (op == 3):
*/
    break;
    case 3:

    /* "symengine/lib/symengine_wrapper.pyx":973
 *             return symengine.eq(deref(A.thisptr), deref(B.thisptr))
 *         elif (op == 3):
 *             return symengine.neq(deref(A.thisptr), deref(B.thisptr))             # <<<<<<<<<<<<<<
 *         if (op == 0):
 *             return c2py(<rcp_const_basic>(symengine.Lt(A.thisptr, B.thisptr)))
*/
    __Pyx_XDECREF(__pyx_r);
    try {
      __pyx_t_1 = SymEngine::neq((*__pyx_v_A->thisptr), (*__pyx_v_B->thisptr));
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(0, 973, __pyx_L1_error)
    }
    __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 973, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":972
 *         if (op == 2):
 *             return symengine.eq(deref(A.thisptr), deref(B.thisptr))
 *         elif (op == 3):             # <<<<<<<<<<<<<<
 *             return symengine.neq(deref(A.thisptr), deref(B.thisptr))
 *         if (op == 0):
*/
    break;
    default: break;
  }

  /* "symengine/lib/symengine_wrapper.pyx":974
 *         elif (op == 3):
 *             return symengine.neq(deref(A.thisptr), deref(B.thisptr))
 *         if (op == 0):             # <<<<<<<<<<<<<<
 *             return c2py(<rcp_const_basic>(symengine.Lt(A.thisptr, B.thisptr)))
 *         elif (op == 1):
*/
  switch (__pyx_v_op) {
    case 0:

    /* "symengine/lib/symengine_wrapper.pyx":975
 *             return symengine.neq(deref(A.thisptr), deref(B.thisptr))
 *         if (op == 0):
 *             return c2py(<rcp_const_basic>(symengine.Lt(A.thisptr, B.thisptr)))             # <<<<<<<<<<<<<<
 *         elif (op == 1):
 *             return c2py(<rcp_const_basic>(symengine.Le(A.thisptr, B.thisptr)))
*/
    __Pyx_XDECREF(__pyx_r);
    try {
      __pyx_t_3 = SymEngine::Lt(__pyx_v_A->thisptr, __pyx_v_B->thisptr);
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(0, 975, __pyx_L1_error)
    }
    __pyx_t_2 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 975, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":974
 *         elif (op == 3):
 *             return symengine.neq(deref(A.thisptr), deref(B.thisptr))
 *         if (op == 0):             # <<<<<<<<<<<<<<
 *             return c2py(<rcp_const_basic>(symengine.Lt(A.thisptr, B.thisptr)))
 *         elif (op == 1):
*/
    break;
    case 1:

    /* "symengine/lib/symengine_wrapper.pyx":977
 *             return c2py(<rcp_const_basic>(symengine.Lt(A.thisptr, B.thisptr)))
 *         elif (op == 1):
 *             return c2py(<rcp_const_basic>(symengine.Le(A.thisptr, B.thisptr)))             # <<<<<<<<<<<<<<
 *         elif (op == 4):
 *             return c2py(<rcp_const_basic>(symengine.Gt(A.thisptr, B.thisptr)))
*/
    __Pyx_XDECREF(__pyx_r);
    try {
      __pyx_t_4 = SymEngine::Le(__pyx_v_A->thisptr, __pyx_v_B->thisptr);
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(0, 977, __pyx_L1_error)
    }
    __pyx_t_2 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)__pyx_t_4)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 977, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":976
 *         if (op == 0):
 *             return c2py(<rcp_const_basic>(symengine.Lt(A.thisptr, B.thisptr)))
 *         elif (op == 1):             # <<<<<<<<<<<<<<
 *             return c2py(<rcp_const_basic>(symengine.Le(A.thisptr, B.thisptr)))
 *         elif (op == 4):
*/
    break;
    case 4:

    /* "symengine/lib/symengine_wrapper.pyx":979
 *             return c2py(<rcp_const_basic>(symengine.Le(A.thisptr, B.thisptr)))
 *         elif (op == 4):
 *             return c2py(<rcp_const_basic>(symengine.Gt(A.thisptr, B.thisptr)))             # <<<<<<<<<<<<<<
 *         elif (op == 5):
 *             return c2py(<rcp_const_basic>(symengine.Ge(A.thisptr, B.thisptr)))
*/
    __Pyx_XDECREF(__pyx_r);
    try {
      __pyx_t_5 = SymEngine::Gt(__pyx_v_A->thisptr, __pyx_v_B->thisptr);
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(0, 979, __pyx_L1_error)
    }
    __pyx_t_2 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)__pyx_t_5)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 979, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":978
 *         elif (op == 1):
 *             return c2py(<rcp_const_basic>(symengine.Le(A.thisptr, B.thisptr)))
 *         elif (op == 4):             # <<<<<<<<<<<<<<
 *             return c2py(<rcp_const_basic>(symengine.Gt(A.thisptr, B.thisptr)))
 *         elif (op == 5):
*/
    break;
    case 5:

    /* "symengine/lib/symengine_wrapper.pyx":981
 *             return c2py(<rcp_const_basic>(symengine.Gt(A.thisptr, B.thisptr)))
 *         elif (op == 5):
 *             return c2py(<rcp_const_basic>(symengine.Ge(A.thisptr, B.thisptr)))             # <<<<<<<<<<<<<<
 * 
 *     def expand(Basic self not None, cppbool deep=True):
*/
    __Pyx_XDECREF(__pyx_r);
    try {
      __pyx_t_6 = SymEngine::Ge(__pyx_v_A->thisptr, __pyx_v_B->thisptr);
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(0, 981, __pyx_L1_error)
    }
    __pyx_t_2 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)__pyx_t_6)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 981, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":980
 *         elif (op == 4):
 *             return c2py(<rcp_const_basic>(symengine.Gt(A.thisptr, B.thisptr)))
 *         elif (op == 5):             # <<<<<<<<<<<<<<
 *             return c2py(<rcp_const_basic>(symengine.Ge(A.thisptr, B.thisptr)))
 * 
*/
    break;
    default: break;
  }

  /* "symengine/lib/symengine_wrapper.pyx":969
 *         return Basic._richcmp_(A, B, op)
 * 
 *     def _richcmp_(Basic A, Basic B, int op):             # <<<<<<<<<<<<<<
 *         if (op == 2):
 *             return symengine.eq(deref(A.thisptr), deref(B.thisptr))
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Basic._richcmp_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":983
 *             return c2py(<rcp_const_basic>(symengine.Ge(A.thisptr, B.thisptr)))
 * 
 *     def expand(Basic self not None, cppbool deep=True):             # <<<<<<<<<<<<<<
 *         return c2py(symengine.expand(self.thisptr, deep))
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_57expand(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_5Basic_57expand = {"expand", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_57expand, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_57expand(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  bool __pyx_v_deep;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("expand (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_deep,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 983, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 983, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "expand", 0) < (0)) __PYX_ERR(0, 983, __pyx_L3_error)
    } else {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 983, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_deep = __Pyx_PyObject_IsTrue(values[0]); if (unlikely((__pyx_v_deep == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 983, __pyx_L3_error)
    } else {
      __pyx_v_deep = ((bool)1);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("expand", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 983, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Basic.expand", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "self"); __PYX_ERR(0, 983, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_56expand(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_v_self), __pyx_v_deep);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_56expand(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self, bool __pyx_v_deep) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  SymEngine::RCP<const SymEngine::Basic> __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("expand", 0);

  /* "symengine/lib/symengine_wrapper.pyx":984
 * 
 *     def expand(Basic self not None, cppbool deep=True):
 *         return c2py(symengine.expand(self.thisptr, deep))             # <<<<<<<<<<<<<<
 * 
 *     def _diff(Basic self not None, Basic x):
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_1 = SymEngine::expand(__pyx_v_self->thisptr, __pyx_v_deep);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 984, __pyx_L1_error)
  }
  __pyx_t_2 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 984, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":983
 *             return c2py(<rcp_const_basic>(symengine.Ge(A.thisptr, B.thisptr)))
 * 
 *     def expand(Basic self not None, cppbool deep=True):             # <<<<<<<<<<<<<<
 *         return c2py(symengine.expand(self.thisptr, deep))
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Basic.expand", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":986
 *         return c2py(symengine.expand(self.thisptr, deep))
 * 
 *     def _diff(Basic self not None, Basic x):             # <<<<<<<<<<<<<<
 *         return c2py(symengine.diff(self.thisptr, x.thisptr))
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_59_diff(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_5Basic_59_diff = {"_diff", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_59_diff, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_59_diff(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_x = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_diff (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_x,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 986, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 986, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_diff", 0) < (0)) __PYX_ERR(0, 986, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_diff", 1, 1, 1, i); __PYX_ERR(0, 986, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 986, __pyx_L3_error)
    }
    __pyx_v_x = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_diff", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 986, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Basic._diff", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "self"); __PYX_ERR(0, 986, __pyx_L1_error)
  }
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic, 1, "x", 0))) __PYX_ERR(0, 986, __pyx_L1_error)
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_58_diff(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_v_self), __pyx_v_x);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_58_diff(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self, struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_x) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  SymEngine::RCP<const SymEngine::Basic> __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_diff", 0);

  /* "symengine/lib/symengine_wrapper.pyx":987
 * 
 *     def _diff(Basic self not None, Basic x):
 *         return c2py(symengine.diff(self.thisptr, x.thisptr))             # <<<<<<<<<<<<<<
 * 
 *     def diff(self, *args):
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_1 = SymEngine::sdiff(__pyx_v_self->thisptr, __pyx_v_x->thisptr);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 987, __pyx_L1_error)
  }
  __pyx_t_2 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 987, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":986
 *         return c2py(symengine.expand(self.thisptr, deep))
 * 
 *     def _diff(Basic self not None, Basic x):             # <<<<<<<<<<<<<<
 *         return c2py(symengine.diff(self.thisptr, x.thisptr))
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Basic._diff", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":989
 *         return c2py(symengine.diff(self.thisptr, x.thisptr))
 * 
 *     def diff(self, *args):             # <<<<<<<<<<<<<<
 *         if len(args) == 0:
 *             f = self.free_symbols
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_61diff(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_5Basic_61diff = {"diff", (PyCFunction)(void(*)(void))(PyCFunctionWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_61diff, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_61diff(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_args = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("diff (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("diff", __pyx_kwds); return NULL;}
  __Pyx_INCREF(__pyx_args);
  __pyx_v_args = __pyx_args;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_60diff(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_v_self), __pyx_v_args);

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_60diff(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self, PyObject *__pyx_v_args) {
  PyObject *__pyx_v_f = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("diff", 0);

  /* "symengine/lib/symengine_wrapper.pyx":990
 * 
 *     def diff(self, *args):
 *         if len(args) == 0:             # <<<<<<<<<<<<<<
 *             f = self.free_symbols
 *             if (len(f) != 1):
*/
  __pyx_t_1 = __Pyx_PyTuple_GET_SIZE(__pyx_v_args); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 990, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_1 == 0);
  if (__pyx_t_2) {

    /* "symengine/lib/symengine_wrapper.pyx":991
 *     def diff(self, *args):
 *         if len(args) == 0:
 *             f = self.free_symbols             # <<<<<<<<<<<<<<
 *             if (len(f) != 1):
 *                 raise RuntimeError("Variable w.r.t should be given")
*/
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_free_symbols); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 991, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_f = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":992
 *         if len(args) == 0:
 *             f = self.free_symbols
 *             if (len(f) != 1):             # <<<<<<<<<<<<<<
 *                 raise RuntimeError("Variable w.r.t should be given")
 *             return self._diff(f.pop())
*/
    __pyx_t_1 = PyObject_Length(__pyx_v_f); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 992, __pyx_L1_error)
    __pyx_t_2 = (__pyx_t_1 != 1);
    if (unlikely(__pyx_t_2)) {

      /* "symengine/lib/symengine_wrapper.pyx":993
 *             f = self.free_symbols
 *             if (len(f) != 1):
 *                 raise RuntimeError("Variable w.r.t should be given")             # <<<<<<<<<<<<<<
 *             return self._diff(f.pop())
 *         return _diff(self, *args)
*/
      __pyx_t_4 = NULL;
      __pyx_t_5 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Variable_w_r_t_should_be_given};
        __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 993, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __Pyx_Raise(__pyx_t_3, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __PYX_ERR(0, 993, __pyx_L1_error)

      /* "symengine/lib/symengine_wrapper.pyx":992
 *         if len(args) == 0:
 *             f = self.free_symbols
 *             if (len(f) != 1):             # <<<<<<<<<<<<<<
 *                 raise RuntimeError("Variable w.r.t should be given")
 *             return self._diff(f.pop())
*/
    }

    /* "symengine/lib/symengine_wrapper.pyx":994
 *             if (len(f) != 1):
 *                 raise RuntimeError("Variable w.r.t should be given")
 *             return self._diff(f.pop())             # <<<<<<<<<<<<<<
 *         return _diff(self, *args)
 * 
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = ((PyObject *)__pyx_v_self);
    __Pyx_INCREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyObject_Pop(__pyx_v_f); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 994, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_5 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_6};
      __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_diff, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 994, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":990
 * 
 *     def diff(self, *args):
 *         if len(args) == 0:             # <<<<<<<<<<<<<<
 *             f = self.free_symbols
 *             if (len(f) != 1):
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":995
 *                 raise RuntimeError("Variable w.r.t should be given")
 *             return self._diff(f.pop())
 *         return _diff(self, *args)             # <<<<<<<<<<<<<<
 * 
 *     def subs_dict(Basic self not None, *args):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_diff); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 995, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 995, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF((PyObject *)__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v_self)) != (0)) __PYX_ERR(0, 995, __pyx_L1_error);
  __pyx_t_4 = PyNumber_Add(__pyx_t_6, __pyx_v_args); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 995, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 995, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_6;
  __pyx_t_6 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":989
 *         return c2py(symengine.diff(self.thisptr, x.thisptr))
 * 
 *     def diff(self, *args):             # <<<<<<<<<<<<<<
 *         if len(args) == 0:
 *             f = self.free_symbols
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Basic.diff", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_f);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":997
 *         return _diff(self, *args)
 * 
 *     def subs_dict(Basic self not None, *args):             # <<<<<<<<<<<<<<
 *         warnings.warn("subs_dict() is deprecated. Use subs() instead", DeprecationWarning)
 *         return self.subs(*args)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_63subs_dict(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_5Basic_63subs_dict = {"subs_dict", (PyCFunction)(void(*)(void))(PyCFunctionWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_63subs_dict, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_63subs_dict(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_args = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("subs_dict (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("subs_dict", __pyx_kwds); return NULL;}
  __Pyx_INCREF(__pyx_args);
  __pyx_v_args = __pyx_args;
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "self"); __PYX_ERR(0, 997, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_62subs_dict(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_v_self), __pyx_v_args);

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_62subs_dict(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self, PyObject *__pyx_v_args) {
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("subs_dict", 0);

  /* "symengine/lib/symengine_wrapper.pyx":998
 * 
 *     def subs_dict(Basic self not None, *args):
 *         warnings.warn("subs_dict() is deprecated. Use subs() instead", DeprecationWarning)             # <<<<<<<<<<<<<<
 *         return self.subs(*args)
 * 
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_warnings); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 998, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_warn); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 998, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_subs_dict_is_deprecated_Use_subs, ((PyObject *)(((PyTypeObject*)PyExc_DeprecationWarning)))};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 998, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":999
 *     def subs_dict(Basic self not None, *args):
 *         warnings.warn("subs_dict() is deprecated. Use subs() instead", DeprecationWarning)
 *         return self.subs(*args)             # <<<<<<<<<<<<<<
 * 
 *     def subs_oldnew(Basic self not None, old, new):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_subs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 999, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 999, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":997
 *         return _diff(self, *args)
 * 
 *     def subs_dict(Basic self not None, *args):             # <<<<<<<<<<<<<<
 *         warnings.warn("subs_dict() is deprecated. Use subs() instead", DeprecationWarning)
 *         return self.subs(*args)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Basic.subs_dict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1001
 *         return self.subs(*args)
 * 
 *     def subs_oldnew(Basic self not None, old, new):             # <<<<<<<<<<<<<<
 *         warnings.warn("subs_oldnew() is deprecated. Use subs() instead", DeprecationWarning)
 *         return self.subs({old: new})
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_65subs_oldnew(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_5Basic_65subs_oldnew = {"subs_oldnew", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_65subs_oldnew, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_65subs_oldnew(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_old = 0;
  PyObject *__pyx_v_new = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("subs_oldnew (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_old,&__pyx_mstate_global->__pyx_n_u_new_2,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1001, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1001, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1001, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "subs_oldnew", 0) < (0)) __PYX_ERR(0, 1001, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("subs_oldnew", 1, 2, 2, i); __PYX_ERR(0, 1001, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1001, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1001, __pyx_L3_error)
    }
    __pyx_v_old = values[0];
    __pyx_v_new = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("subs_oldnew", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1001, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Basic.subs_oldnew", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "self"); __PYX_ERR(0, 1001, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_64subs_oldnew(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_v_self), __pyx_v_old, __pyx_v_new);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_64subs_oldnew(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self, PyObject *__pyx_v_old, PyObject *__pyx_v_new) {
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("subs_oldnew", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1002
 * 
 *     def subs_oldnew(Basic self not None, old, new):
 *         warnings.warn("subs_oldnew() is deprecated. Use subs() instead", DeprecationWarning)             # <<<<<<<<<<<<<<
 *         return self.subs({old: new})
 * 
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_warnings); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1002, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_warn); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1002, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_subs_oldnew_is_deprecated_Use_su, ((PyObject *)(((PyTypeObject*)PyExc_DeprecationWarning)))};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1002, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1003
 *     def subs_oldnew(Basic self not None, old, new):
 *         warnings.warn("subs_oldnew() is deprecated. Use subs() instead", DeprecationWarning)
 *         return self.subs({old: new})             # <<<<<<<<<<<<<<
 * 
 *     def subs(Basic self not None, *args):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1003, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_v_old, __pyx_v_new) < (0)) __PYX_ERR(0, 1003, __pyx_L1_error)
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_subs, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1003, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1001
 *         return self.subs(*args)
 * 
 *     def subs_oldnew(Basic self not None, old, new):             # <<<<<<<<<<<<<<
 *         warnings.warn("subs_oldnew() is deprecated. Use subs() instead", DeprecationWarning)
 *         return self.subs({old: new})
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Basic.subs_oldnew", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1005
 *         return self.subs({old: new})
 * 
 *     def subs(Basic self not None, *args):             # <<<<<<<<<<<<<<
 *         cdef _DictBasic D = get_dict(*args)
 *         return c2py(symengine.ssubs(self.thisptr, D.c))
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_67subs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_5Basic_67subs = {"subs", (PyCFunction)(void(*)(void))(PyCFunctionWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_67subs, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_67subs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_args = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("subs (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("subs", __pyx_kwds); return NULL;}
  __Pyx_INCREF(__pyx_args);
  __pyx_v_args = __pyx_args;
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "self"); __PYX_ERR(0, 1005, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_66subs(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_v_self), __pyx_v_args);

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_66subs(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self, PyObject *__pyx_v_args) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper__DictBasic *__pyx_v_D = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  SymEngine::RCP<const SymEngine::Basic> __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("subs", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1006
 * 
 *     def subs(Basic self not None, *args):
 *         cdef _DictBasic D = get_dict(*args)             # <<<<<<<<<<<<<<
 *         return c2py(symengine.ssubs(self.thisptr, D.c))
 * 
*/
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_get_dict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1006, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1006, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper__DictBasic))))) __PYX_ERR(0, 1006, __pyx_L1_error)
  __pyx_v_D = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper__DictBasic *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1007
 *     def subs(Basic self not None, *args):
 *         cdef _DictBasic D = get_dict(*args)
 *         return c2py(symengine.ssubs(self.thisptr, D.c))             # <<<<<<<<<<<<<<
 * 
 *     def xreplace(Basic self not None, *args):
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_3 = SymEngine::ssubs(__pyx_v_self->thisptr, __pyx_v_D->c);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 1007, __pyx_L1_error)
  }
  __pyx_t_2 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1007, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1005
 *         return self.subs({old: new})
 * 
 *     def subs(Basic self not None, *args):             # <<<<<<<<<<<<<<
 *         cdef _DictBasic D = get_dict(*args)
 *         return c2py(symengine.ssubs(self.thisptr, D.c))
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Basic.subs", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_D);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1009
 *         return c2py(symengine.ssubs(self.thisptr, D.c))
 * 
 *     def xreplace(Basic self not None, *args):             # <<<<<<<<<<<<<<
 *         cdef _DictBasic D = get_dict(*args)
 *         return c2py(symengine.xreplace(self.thisptr, D.c))
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_69xreplace(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_5Basic_69xreplace = {"xreplace", (PyCFunction)(void(*)(void))(PyCFunctionWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_69xreplace, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_69xreplace(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_args = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("xreplace (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("xreplace", __pyx_kwds); return NULL;}
  __Pyx_INCREF(__pyx_args);
  __pyx_v_args = __pyx_args;
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "self"); __PYX_ERR(0, 1009, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_68xreplace(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_v_self), __pyx_v_args);

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_68xreplace(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self, PyObject *__pyx_v_args) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper__DictBasic *__pyx_v_D = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  SymEngine::RCP<const SymEngine::Basic> __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("xreplace", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1010
 * 
 *     def xreplace(Basic self not None, *args):
 *         cdef _DictBasic D = get_dict(*args)             # <<<<<<<<<<<<<<
 *         return c2py(symengine.xreplace(self.thisptr, D.c))
 * 
*/
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_get_dict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1010, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1010, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper__DictBasic))))) __PYX_ERR(0, 1010, __pyx_L1_error)
  __pyx_v_D = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper__DictBasic *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1011
 *     def xreplace(Basic self not None, *args):
 *         cdef _DictBasic D = get_dict(*args)
 *         return c2py(symengine.xreplace(self.thisptr, D.c))             # <<<<<<<<<<<<<<
 * 
 *     replace = xreplace
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_3 = SymEngine::xreplace(__pyx_v_self->thisptr, __pyx_v_D->c);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 1011, __pyx_L1_error)
  }
  __pyx_t_2 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1011, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1009
 *         return c2py(symengine.ssubs(self.thisptr, D.c))
 * 
 *     def xreplace(Basic self not None, *args):             # <<<<<<<<<<<<<<
 *         cdef _DictBasic D = get_dict(*args)
 *         return c2py(symengine.xreplace(self.thisptr, D.c))
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Basic.xreplace", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_D);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1015
 *     replace = xreplace
 * 
 *     def msubs(Basic self not None, *args):             # <<<<<<<<<<<<<<
 *         cdef _DictBasic D = get_dict(*args)
 *         return c2py(symengine.msubs(self.thisptr, D.c))
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_71msubs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_5Basic_71msubs = {"msubs", (PyCFunction)(void(*)(void))(PyCFunctionWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_71msubs, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_71msubs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_args = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("msubs (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("msubs", __pyx_kwds); return NULL;}
  __Pyx_INCREF(__pyx_args);
  __pyx_v_args = __pyx_args;
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "self"); __PYX_ERR(0, 1015, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_70msubs(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_v_self), __pyx_v_args);

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_70msubs(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self, PyObject *__pyx_v_args) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper__DictBasic *__pyx_v_D = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  SymEngine::RCP<const SymEngine::Basic> __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("msubs", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1016
 * 
 *     def msubs(Basic self not None, *args):
 *         cdef _DictBasic D = get_dict(*args)             # <<<<<<<<<<<<<<
 *         return c2py(symengine.msubs(self.thisptr, D.c))
 * 
*/
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_get_dict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1016, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1016, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper__DictBasic))))) __PYX_ERR(0, 1016, __pyx_L1_error)
  __pyx_v_D = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper__DictBasic *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1017
 *     def msubs(Basic self not None, *args):
 *         cdef _DictBasic D = get_dict(*args)
 *         return c2py(symengine.msubs(self.thisptr, D.c))             # <<<<<<<<<<<<<<
 * 
 *     def as_numer_denom(Basic self not None):
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_3 = SymEngine::msubs(__pyx_v_self->thisptr, __pyx_v_D->c);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 1017, __pyx_L1_error)
  }
  __pyx_t_2 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1017, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1015
 *     replace = xreplace
 * 
 *     def msubs(Basic self not None, *args):             # <<<<<<<<<<<<<<
 *         cdef _DictBasic D = get_dict(*args)
 *         return c2py(symengine.msubs(self.thisptr, D.c))
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Basic.msubs", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_D);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1019
 *         return c2py(symengine.msubs(self.thisptr, D.c))
 * 
 *     def as_numer_denom(Basic self not None):             # <<<<<<<<<<<<<<
 *         cdef rcp_const_basic _num, _den
 *         symengine.as_numer_denom(self.thisptr, symengine.outArg(_num), symengine.outArg(_den))
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_73as_numer_denom(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_5Basic_73as_numer_denom = {"as_numer_denom", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_73as_numer_denom, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_73as_numer_denom(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("as_numer_denom (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("as_numer_denom", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("as_numer_denom", __pyx_kwds); return NULL;}
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "self"); __PYX_ERR(0, 1019, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_72as_numer_denom(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_72as_numer_denom(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self) {
  SymEngine::RCP<const SymEngine::Basic> __pyx_v__num;
  SymEngine::RCP<const SymEngine::Basic> __pyx_v__den;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("as_numer_denom", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1021
 *     def as_numer_denom(Basic self not None):
 *         cdef rcp_const_basic _num, _den
 *         symengine.as_numer_denom(self.thisptr, symengine.outArg(_num), symengine.outArg(_den))             # <<<<<<<<<<<<<<
 *         return c2py(<rcp_const_basic>_num), c2py(<rcp_const_basic>_den)
 * 
*/
  SymEngine::as_numer_denom(__pyx_v_self->thisptr, SymEngine::outArg(__pyx_v__num), SymEngine::outArg(__pyx_v__den));

  /* "symengine/lib/symengine_wrapper.pyx":1022
 *         cdef rcp_const_basic _num, _den
 *         symengine.as_numer_denom(self.thisptr, symengine.outArg(_num), symengine.outArg(_den))
 *         return c2py(<rcp_const_basic>_num), c2py(<rcp_const_basic>_den)             # <<<<<<<<<<<<<<
 * 
 *     def as_real_imag(Basic self not None):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)__pyx_v__num)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1022, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)__pyx_v__den)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1022, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1022, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 1022, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2) != (0)) __PYX_ERR(0, 1022, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1019
 *         return c2py(symengine.msubs(self.thisptr, D.c))
 * 
 *     def as_numer_denom(Basic self not None):             # <<<<<<<<<<<<<<
 *         cdef rcp_const_basic _num, _den
 *         symengine.as_numer_denom(self.thisptr, symengine.outArg(_num), symengine.outArg(_den))
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Basic.as_numer_denom", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1024
 *         return c2py(<rcp_const_basic>_num), c2py(<rcp_const_basic>_den)
 * 
 *     def as_real_imag(Basic self not None):             # <<<<<<<<<<<<<<
 *         cdef rcp_const_basic _real, _imag
 *         symengine.as_real_imag(self.thisptr, symengine.outArg(_real), symengine.outArg(_imag))
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_75as_real_imag(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_5Basic_75as_real_imag = {"as_real_imag", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_75as_real_imag, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_75as_real_imag(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("as_real_imag (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("as_real_imag", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("as_real_imag", __pyx_kwds); return NULL;}
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "self"); __PYX_ERR(0, 1024, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_74as_real_imag(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_74as_real_imag(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self) {
  SymEngine::RCP<const SymEngine::Basic> __pyx_v__real;
  SymEngine::RCP<const SymEngine::Basic> __pyx_v__imag;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("as_real_imag", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1026
 *     def as_real_imag(Basic self not None):
 *         cdef rcp_const_basic _real, _imag
 *         symengine.as_real_imag(self.thisptr, symengine.outArg(_real), symengine.outArg(_imag))             # <<<<<<<<<<<<<<
 *         return c2py(<rcp_const_basic>_real), c2py(<rcp_const_basic>_imag)
 * 
*/
  SymEngine::as_real_imag(__pyx_v_self->thisptr, SymEngine::outArg(__pyx_v__real), SymEngine::outArg(__pyx_v__imag));

  /* "symengine/lib/symengine_wrapper.pyx":1027
 *         cdef rcp_const_basic _real, _imag
 *         symengine.as_real_imag(self.thisptr, symengine.outArg(_real), symengine.outArg(_imag))
 *         return c2py(<rcp_const_basic>_real), c2py(<rcp_const_basic>_imag)             # <<<<<<<<<<<<<<
 * 
 *     def n(self, unsigned long prec = 53, real=None):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)__pyx_v__real)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1027, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)__pyx_v__imag)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1027, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1027, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 1027, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2) != (0)) __PYX_ERR(0, 1027, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1024
 *         return c2py(<rcp_const_basic>_num), c2py(<rcp_const_basic>_den)
 * 
 *     def as_real_imag(Basic self not None):             # <<<<<<<<<<<<<<
 *         cdef rcp_const_basic _real, _imag
 *         symengine.as_real_imag(self.thisptr, symengine.outArg(_real), symengine.outArg(_imag))
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Basic.as_real_imag", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1029
 *         return c2py(<rcp_const_basic>_real), c2py(<rcp_const_basic>_imag)
 * 
 *     def n(self, unsigned long prec = 53, real=None):             # <<<<<<<<<<<<<<
 *         return evalf(self, prec, real)
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_77n(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_5Basic_77n = {"n", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_77n, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_77n(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  unsigned long __pyx_v_prec;
  PyObject *__pyx_v_real = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("n (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_prec_2,&__pyx_mstate_global->__pyx_n_u_real,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1029, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1029, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1029, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "n", 0) < (0)) __PYX_ERR(0, 1029, __pyx_L3_error)
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
    } else {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1029, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1029, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    if (values[0]) {
      __pyx_v_prec = __Pyx_PyLong_As_unsigned_long(values[0]); if (unlikely((__pyx_v_prec == (unsigned long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1029, __pyx_L3_error)
    } else {
      __pyx_v_prec = ((unsigned long)53);
    }
    __pyx_v_real = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("n", 0, 0, 2, __pyx_nargs); __PYX_ERR(0, 1029, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Basic.n", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_76n(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_v_self), __pyx_v_prec, __pyx_v_real);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_76n(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self, unsigned long __pyx_v_prec, PyObject *__pyx_v_real) {
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("n", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1030
 * 
 *     def n(self, unsigned long prec = 53, real=None):
 *         return evalf(self, prec, real)             # <<<<<<<<<<<<<<
 * 
 *     evalf = n
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_evalf); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1030, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyLong_From_unsigned_long(__pyx_v_prec); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1030, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_2, ((PyObject *)__pyx_v_self), __pyx_t_4, __pyx_v_real};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1030, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1029
 *         return c2py(<rcp_const_basic>_real), c2py(<rcp_const_basic>_imag)
 * 
 *     def n(self, unsigned long prec = 53, real=None):             # <<<<<<<<<<<<<<
 *         return evalf(self, prec, real)
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Basic.n", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1034
 *     evalf = n
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def args(self):
 *         cdef symengine.vec_basic args = deref(self.thisptr).get_args()
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_4args_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_4args_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_4args___get__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_4args___get__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self) {
  SymEngine::vec_basic __pyx_v_args;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1036
 *     @property
 *     def args(self):
 *         cdef symengine.vec_basic args = deref(self.thisptr).get_args()             # <<<<<<<<<<<<<<
 *         return vec_basic_to_tuple(args)
 * 
*/
  __pyx_v_args = (*__pyx_v_self->thisptr).get_args();

  /* "symengine/lib/symengine_wrapper.pyx":1037
 *     def args(self):
 *         cdef symengine.vec_basic args = deref(self.thisptr).get_args()
 *         return vec_basic_to_tuple(args)             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_vec_basic_to_tuple(__pyx_v_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1037, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1034
 *     evalf = n
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def args(self):
 *         cdef symengine.vec_basic args = deref(self.thisptr).get_args()
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Basic.args.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1039
 *         return vec_basic_to_tuple(args)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def free_symbols(self):
 *         cdef symengine.set_basic _set = symengine.free_symbols(deref(self.thisptr))
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_12free_symbols_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_12free_symbols_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_12free_symbols___get__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_12free_symbols___get__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self) {
  SymEngine::set_basic __pyx_v__set;
  std::set<SymEngine::RCP<const SymEngine::Basic>> ::value_type __pyx_8genexpr3__pyx_v_elem;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  SymEngine::set_basic __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  std::set<SymEngine::RCP<const SymEngine::Basic>> ::iterator __pyx_t_3;
  std::set<SymEngine::RCP<const SymEngine::Basic>> ::value_type __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1041
 *     @property
 *     def free_symbols(self):
 *         cdef symengine.set_basic _set = symengine.free_symbols(deref(self.thisptr))             # <<<<<<<<<<<<<<
 *         return {c2py(<rcp_const_basic>(elem)) for elem in _set}
 * 
*/
  try {
    __pyx_t_1 = SymEngine::free_symbols((*__pyx_v_self->thisptr));
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 1041, __pyx_L1_error)
  }
  __pyx_v__set = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_1);

  /* "symengine/lib/symengine_wrapper.pyx":1042
 *     def free_symbols(self):
 *         cdef symengine.set_basic _set = symengine.free_symbols(deref(self.thisptr))
 *         return {c2py(<rcp_const_basic>(elem)) for elem in _set}             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  { /* enter inner scope */
    __pyx_t_2 = PySet_New(NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1042, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __pyx_v__set.begin();
    for (; __pyx_t_3 != __pyx_v__set.end(); ++__pyx_t_3) {
      __pyx_t_4 = *__pyx_t_3;
      __pyx_8genexpr3__pyx_v_elem = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_4);
      __pyx_t_5 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)__pyx_8genexpr3__pyx_v_elem)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1042, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (unlikely(PySet_Add(__pyx_t_2, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 1042, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  } /* exit inner scope */
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1039
 *         return vec_basic_to_tuple(args)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def free_symbols(self):
 *         cdef symengine.set_basic _set = symengine.free_symbols(deref(self.thisptr))
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Basic.free_symbols.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1044
 *         return {c2py(<rcp_const_basic>(elem)) for elem in _set}
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_Atom(self):
 *         return False
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_7is_Atom_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_7is_Atom_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_7is_Atom___get__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_7is_Atom___get__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1046
 *     @property
 *     def is_Atom(self):
 *         return False             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_False);
  __pyx_r = Py_False;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1044
 *         return {c2py(<rcp_const_basic>(elem)) for elem in _set}
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_Atom(self):
 *         return False
*/

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

/* "symengine/lib/symengine_wrapper.pyx":1048
 *         return False
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_Symbol(self):
 *         return False
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_9is_Symbol_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_9is_Symbol_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_9is_Symbol___get__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_9is_Symbol___get__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1050
 *     @property
 *     def is_Symbol(self):
 *         return False             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_False);
  __pyx_r = Py_False;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1048
 *         return False
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_Symbol(self):
 *         return False
*/

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

/* "symengine/lib/symengine_wrapper.pyx":1052
 *         return False
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_symbol(self):
 *         return False
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_9is_symbol_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_9is_symbol_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_9is_symbol___get__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_9is_symbol___get__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1054
 *     @property
 *     def is_symbol(self):
 *         return False             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_False);
  __pyx_r = Py_False;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1052
 *         return False
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_symbol(self):
 *         return False
*/

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

/* "symengine/lib/symengine_wrapper.pyx":1056
 *         return False
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_Dummy(self):
 *         return False
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_8is_Dummy_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_8is_Dummy_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_8is_Dummy___get__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_8is_Dummy___get__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1058
 *     @property
 *     def is_Dummy(self):
 *         return False             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_False);
  __pyx_r = Py_False;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1056
 *         return False
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_Dummy(self):
 *         return False
*/

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

/* "symengine/lib/symengine_wrapper.pyx":1060
 *         return False
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_Function(self):
 *         return False
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_11is_Function_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_11is_Function_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_11is_Function___get__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_11is_Function___get__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1062
 *     @property
 *     def is_Function(self):
 *         return False             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_False);
  __pyx_r = Py_False;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1060
 *         return False
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_Function(self):
 *         return False
*/

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

/* "symengine/lib/symengine_wrapper.pyx":1064
 *         return False
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_Add(self):
 *         return False
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_6is_Add_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_6is_Add_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_6is_Add___get__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_6is_Add___get__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1066
 *     @property
 *     def is_Add(self):
 *         return False             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_False);
  __pyx_r = Py_False;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1064
 *         return False
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_Add(self):
 *         return False
*/

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

/* "symengine/lib/symengine_wrapper.pyx":1068
 *         return False
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_Mul(self):
 *         return False
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_6is_Mul_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_6is_Mul_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_6is_Mul___get__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_6is_Mul___get__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1070
 *     @property
 *     def is_Mul(self):
 *         return False             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_False);
  __pyx_r = Py_False;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1068
 *         return False
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_Mul(self):
 *         return False
*/

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

/* "symengine/lib/symengine_wrapper.pyx":1072
 *         return False
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_Pow(self):
 *         return False
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_6is_Pow_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_6is_Pow_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_6is_Pow___get__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_6is_Pow___get__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1074
 *     @property
 *     def is_Pow(self):
 *         return False             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_False);
  __pyx_r = Py_False;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1072
 *         return False
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_Pow(self):
 *         return False
*/

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

/* "symengine/lib/symengine_wrapper.pyx":1076
 *         return False
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_Number(self):
 *         return False
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_9is_Number_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_9is_Number_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_9is_Number___get__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_9is_Number___get__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1078
 *     @property
 *     def is_Number(self):
 *         return False             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_False);
  __pyx_r = Py_False;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1076
 *         return False
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_Number(self):
 *         return False
*/

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

/* "symengine/lib/symengine_wrapper.pyx":1080
 *         return False
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_number(self):
 *         return None
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_9is_number_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_9is_number_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_9is_number___get__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_9is_number___get__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1082
 *     @property
 *     def is_number(self):
 *         return None             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1080
 *         return False
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_number(self):
 *         return None
*/

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

/* "symengine/lib/symengine_wrapper.pyx":1084
 *         return None
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_Float(self):
 *         return False
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_8is_Float_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_8is_Float_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_8is_Float___get__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_8is_Float___get__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1086
 *     @property
 *     def is_Float(self):
 *         return False             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_False);
  __pyx_r = Py_False;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1084
 *         return None
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_Float(self):
 *         return False
*/

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

/* "symengine/lib/symengine_wrapper.pyx":1088
 *         return False
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_Rational(self):
 *         return False
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_11is_Rational_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_11is_Rational_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_11is_Rational___get__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_11is_Rational___get__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1090
 *     @property
 *     def is_Rational(self):
 *         return False             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_False);
  __pyx_r = Py_False;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1088
 *         return False
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_Rational(self):
 *         return False
*/

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

/* "symengine/lib/symengine_wrapper.pyx":1092
 *         return False
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_Integer(self):
 *         return False
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_10is_Integer_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_10is_Integer_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_10is_Integer___get__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_10is_Integer___get__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1094
 *     @property
 *     def is_Integer(self):
 *         return False             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_False);
  __pyx_r = Py_False;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1092
 *         return False
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_Integer(self):
 *         return False
*/

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

/* "symengine/lib/symengine_wrapper.pyx":1096
 *         return False
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_integer(self):
 *         return False
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_10is_integer_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_10is_integer_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_10is_integer___get__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_10is_integer___get__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1098
 *     @property
 *     def is_integer(self):
 *         return False             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_False);
  __pyx_r = Py_False;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1096
 *         return False
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_integer(self):
 *         return False
*/

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

/* "symengine/lib/symengine_wrapper.pyx":1100
 *         return False
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_finite(self):
 *         return None
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_9is_finite_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_9is_finite_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_9is_finite___get__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_9is_finite___get__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1102
 *     @property
 *     def is_finite(self):
 *         return None             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1100
 *         return False
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_finite(self):
 *         return None
*/

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

/* "symengine/lib/symengine_wrapper.pyx":1104
 *         return None
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_Derivative(self):
 *         return False
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_13is_Derivative_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_13is_Derivative_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_13is_Derivative___get__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_13is_Derivative___get__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1106
 *     @property
 *     def is_Derivative(self):
 *         return False             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_False);
  __pyx_r = Py_False;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1104
 *         return None
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_Derivative(self):
 *         return False
*/

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

/* "symengine/lib/symengine_wrapper.pyx":1108
 *         return False
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_AlgebraicNumber(self):
 *         return False
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_18is_AlgebraicNumber_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_18is_AlgebraicNumber_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_18is_AlgebraicNumber___get__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_18is_AlgebraicNumber___get__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1110
 *     @property
 *     def is_AlgebraicNumber(self):
 *         return False             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_False);
  __pyx_r = Py_False;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1108
 *         return False
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_AlgebraicNumber(self):
 *         return False
*/

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

/* "symengine/lib/symengine_wrapper.pyx":1112
 *         return False
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_Relational(self):
 *         return False
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_13is_Relational_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_13is_Relational_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_13is_Relational___get__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_13is_Relational___get__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1114
 *     @property
 *     def is_Relational(self):
 *         return False             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_False);
  __pyx_r = Py_False;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1112
 *         return False
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_Relational(self):
 *         return False
*/

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

/* "symengine/lib/symengine_wrapper.pyx":1116
 *         return False
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_Equality(self):
 *         return False
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_11is_Equality_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_11is_Equality_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_11is_Equality___get__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_11is_Equality___get__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1118
 *     @property
 *     def is_Equality(self):
 *         return False             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_False);
  __pyx_r = Py_False;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1116
 *         return False
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_Equality(self):
 *         return False
*/

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

/* "symengine/lib/symengine_wrapper.pyx":1120
 *         return False
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_Boolean(self):
 *         return False
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_10is_Boolean_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_10is_Boolean_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_10is_Boolean___get__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_10is_Boolean___get__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1122
 *     @property
 *     def is_Boolean(self):
 *         return False             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_False);
  __pyx_r = Py_False;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1120
 *         return False
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_Boolean(self):
 *         return False
*/

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

/* "symengine/lib/symengine_wrapper.pyx":1124
 *         return False
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_Not(self):
 *         return False
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_6is_Not_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_6is_Not_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_6is_Not___get__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_6is_Not___get__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1126
 *     @property
 *     def is_Not(self):
 *         return False             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_False);
  __pyx_r = Py_False;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1124
 *         return False
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_Not(self):
 *         return False
*/

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

/* "symengine/lib/symengine_wrapper.pyx":1128
 *         return False
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_Matrix(self):
 *         return False
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_9is_Matrix_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_9is_Matrix_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_9is_Matrix___get__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_9is_Matrix___get__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1130
 *     @property
 *     def is_Matrix(self):
 *         return False             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_False);
  __pyx_r = Py_False;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1128
 *         return False
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_Matrix(self):
 *         return False
*/

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

/* "symengine/lib/symengine_wrapper.pyx":1132
 *         return False
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_zero(self):
 *         return is_zero(self)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_7is_zero_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_7is_zero_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_7is_zero___get__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_7is_zero___get__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1134
 *     @property
 *     def is_zero(self):
 *         return is_zero(self)             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_is_zero); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, ((PyObject *)__pyx_v_self)};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1134, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1132
 *         return False
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_zero(self):
 *         return is_zero(self)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Basic.is_zero.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1136
 *         return is_zero(self)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_positive(self):
 *         return is_positive(self)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_11is_positive_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_11is_positive_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_11is_positive___get__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_11is_positive___get__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1138
 *     @property
 *     def is_positive(self):
 *         return is_positive(self)             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_is_positive); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1138, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, ((PyObject *)__pyx_v_self)};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1138, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1136
 *         return is_zero(self)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_positive(self):
 *         return is_positive(self)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Basic.is_positive.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1140
 *         return is_positive(self)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_negative(self):
 *         return is_negative(self)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_11is_negative_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_11is_negative_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_11is_negative___get__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_11is_negative___get__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1142
 *     @property
 *     def is_negative(self):
 *         return is_negative(self)             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_is_negative); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1142, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, ((PyObject *)__pyx_v_self)};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1142, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1140
 *         return is_positive(self)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_negative(self):
 *         return is_negative(self)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Basic.is_negative.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1144
 *         return is_negative(self)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_nonpositive(self):
 *         return is_nonpositive(self)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_14is_nonpositive_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_14is_nonpositive_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_14is_nonpositive___get__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_14is_nonpositive___get__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1146
 *     @property
 *     def is_nonpositive(self):
 *         return is_nonpositive(self)             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_is_nonpositive); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1146, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, ((PyObject *)__pyx_v_self)};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1146, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1144
 *         return is_negative(self)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_nonpositive(self):
 *         return is_nonpositive(self)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Basic.is_nonpositive.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1148
 *         return is_nonpositive(self)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_nonnegative(self):
 *         return is_nonnegative(self)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_14is_nonnegative_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_14is_nonnegative_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_14is_nonnegative___get__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_14is_nonnegative___get__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1150
 *     @property
 *     def is_nonnegative(self):
 *         return is_nonnegative(self)             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_is_nonnegative); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1150, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, ((PyObject *)__pyx_v_self)};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1150, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1148
 *         return is_nonpositive(self)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_nonnegative(self):
 *         return is_nonnegative(self)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Basic.is_nonnegative.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1152
 *         return is_nonnegative(self)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_real(self):
 *         return is_real(self)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_7is_real_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_7is_real_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_7is_real___get__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_7is_real___get__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1154
 *     @property
 *     def is_real(self):
 *         return is_real(self)             # <<<<<<<<<<<<<<
 * 
 *     def copy(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_is_real); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1154, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, ((PyObject *)__pyx_v_self)};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1154, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1152
 *         return is_nonnegative(self)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_real(self):
 *         return is_real(self)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Basic.is_real.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1156
 *         return is_real(self)
 * 
 *     def copy(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_79copy(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_5Basic_79copy = {"copy", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_79copy, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_79copy(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("copy (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("copy", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("copy", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_78copy(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_78copy(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("copy", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1157
 * 
 *     def copy(self):
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def _symbolic_(self, ring):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_self);
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1156
 *         return is_real(self)
 * 
 *     def copy(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
*/

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

/* "symengine/lib/symengine_wrapper.pyx":1159
 *         return self
 * 
 *     def _symbolic_(self, ring):             # <<<<<<<<<<<<<<
 *         return ring(self._sage_())
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_81_symbolic_(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_5Basic_81_symbolic_ = {"_symbolic_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_81_symbolic_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_81_symbolic_(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_ring = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_symbolic_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_ring,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1159, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1159, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_symbolic_", 0) < (0)) __PYX_ERR(0, 1159, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_symbolic_", 1, 1, 1, i); __PYX_ERR(0, 1159, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1159, __pyx_L3_error)
    }
    __pyx_v_ring = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_symbolic_", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1159, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Basic._symbolic_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_80_symbolic_(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_v_self), __pyx_v_ring);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_80_symbolic_(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self, PyObject *__pyx_v_ring) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_symbolic_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1160
 * 
 *     def _symbolic_(self, ring):
 *         return ring(self._sage_())             # <<<<<<<<<<<<<<
 * 
 *     def atoms(self, *types):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_INCREF(__pyx_v_ring);
  __pyx_t_3 = __pyx_v_ring; 
  __pyx_t_5 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_5);
  __pyx_t_6 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
    __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_sage, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1160, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1160, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1159
 *         return self
 * 
 *     def _symbolic_(self, ring):             # <<<<<<<<<<<<<<
 *         return ring(self._sage_())
 * 
*/

  /* 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("symengine.lib.symengine_wrapper.Basic._symbolic_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1162
 *         return ring(self._sage_())
 * 
 *     def atoms(self, *types):             # <<<<<<<<<<<<<<
 *         if types:
 *             s = set()
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_83atoms(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_5Basic_83atoms = {"atoms", (PyCFunction)(void(*)(void))(PyCFunctionWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_83atoms, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_83atoms(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_types = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("atoms (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("atoms", __pyx_kwds); return NULL;}
  __Pyx_INCREF(__pyx_args);
  __pyx_v_types = __pyx_args;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_82atoms(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_v_self), __pyx_v_types);

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_82atoms(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self, PyObject *__pyx_v_types) {
  PyObject *__pyx_v_s = NULL;
  PyObject *__pyx_v_arg = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  PyObject *(*__pyx_t_6)(PyObject *);
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("atoms", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1163
 * 
 *     def atoms(self, *types):
 *         if types:             # <<<<<<<<<<<<<<
 *             s = set()
 *             if (isinstance(self, types)):
*/
  {
    Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_v_types);
    if (unlikely(((!CYTHON_ASSUME_SAFE_SIZE) && __pyx_temp < 0))) __PYX_ERR(0, 1163, __pyx_L1_error)
    __pyx_t_1 = (__pyx_temp != 0);
  }

  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":1164
 *     def atoms(self, *types):
 *         if types:
 *             s = set()             # <<<<<<<<<<<<<<
 *             if (isinstance(self, types)):
 *                 s.add(self)
*/
    __pyx_t_2 = PySet_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1164, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_s = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":1165
 *         if types:
 *             s = set()
 *             if (isinstance(self, types)):             # <<<<<<<<<<<<<<
 *                 s.add(self)
 *             for arg in self.args:
*/
    __pyx_t_1 = PyObject_IsInstance(((PyObject *)__pyx_v_self), __pyx_v_types); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1165, __pyx_L1_error)
    if (__pyx_t_1) {

      /* "symengine/lib/symengine_wrapper.pyx":1166
 *             s = set()
 *             if (isinstance(self, types)):
 *                 s.add(self)             # <<<<<<<<<<<<<<
 *             for arg in self.args:
 *                 s.update(arg.atoms(*types))
*/
      __pyx_t_3 = PySet_Add(__pyx_v_s, ((PyObject *)__pyx_v_self)); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 1166, __pyx_L1_error)

      /* "symengine/lib/symengine_wrapper.pyx":1165
 *         if types:
 *             s = set()
 *             if (isinstance(self, types)):             # <<<<<<<<<<<<<<
 *                 s.add(self)
 *             for arg in self.args:
*/
    }

    /* "symengine/lib/symengine_wrapper.pyx":1167
 *             if (isinstance(self, types)):
 *                 s.add(self)
 *             for arg in self.args:             # <<<<<<<<<<<<<<
 *                 s.update(arg.atoms(*types))
 *             return s
*/
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1167, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
      __pyx_t_4 = __pyx_t_2; __Pyx_INCREF(__pyx_t_4);
      __pyx_t_5 = 0;
      __pyx_t_6 = NULL;
    } else {
      __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1167, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_6 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1167, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    for (;;) {
      if (likely(!__pyx_t_6)) {
        if (likely(PyList_CheckExact(__pyx_t_4))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_4);
            #if !CYTHON_ASSUME_SAFE_SIZE
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1167, __pyx_L1_error)
            #endif
            if (__pyx_t_5 >= __pyx_temp) break;
          }
          __pyx_t_2 = __Pyx_PyList_GetItemRefFast(__pyx_t_4, __pyx_t_5, __Pyx_ReferenceSharing_OwnStrongReference);
          ++__pyx_t_5;
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_4);
            #if !CYTHON_ASSUME_SAFE_SIZE
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1167, __pyx_L1_error)
            #endif
            if (__pyx_t_5 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5));
          #else
          __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_5);
          #endif
          ++__pyx_t_5;
        }
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1167, __pyx_L1_error)
      } else {
        __pyx_t_2 = __pyx_t_6(__pyx_t_4);
        if (unlikely(!__pyx_t_2)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1167, __pyx_L1_error)
            PyErr_Clear();
          }
          break;
        }
      }
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_XDECREF_SET(__pyx_v_arg, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "symengine/lib/symengine_wrapper.pyx":1168
 *                 s.add(self)
 *             for arg in self.args:
 *                 s.update(arg.atoms(*types))             # <<<<<<<<<<<<<<
 *             return s
 *         else:
*/
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_mstate_global->__pyx_n_u_atoms); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1168, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_v_types, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1168, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_CallUnboundCMethod1(&__pyx_mstate_global->__pyx_umethod_PySet_Type__update, __pyx_v_s, __pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1168, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "symengine/lib/symengine_wrapper.pyx":1167
 *             if (isinstance(self, types)):
 *                 s.add(self)
 *             for arg in self.args:             # <<<<<<<<<<<<<<
 *                 s.update(arg.atoms(*types))
 *             return s
*/
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":1169
 *             for arg in self.args:
 *                 s.update(arg.atoms(*types))
 *             return s             # <<<<<<<<<<<<<<
 *         else:
 *             return self.free_symbols
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_s);
    __pyx_r = __pyx_v_s;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":1163
 * 
 *     def atoms(self, *types):
 *         if types:             # <<<<<<<<<<<<<<
 *             s = set()
 *             if (isinstance(self, types)):
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":1171
 *             return s
 *         else:
 *             return self.free_symbols             # <<<<<<<<<<<<<<
 * 
 *     def simplify(self, *args, **kwargs):
*/
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_free_symbols); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1171, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "symengine/lib/symengine_wrapper.pyx":1162
 *         return ring(self._sage_())
 * 
 *     def atoms(self, *types):             # <<<<<<<<<<<<<<
 *         if types:
 *             s = set()
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Basic.atoms", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_s);
  __Pyx_XDECREF(__pyx_v_arg);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1173
 *             return self.free_symbols
 * 
 *     def simplify(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return sympify(self._sympy_().simplify(*args, **kwargs))
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_85simplify(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_5Basic_85simplify = {"simplify", (PyCFunction)(void(*)(void))(PyCFunctionWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_85simplify, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_85simplify(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_v_kwargs = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("simplify (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (__pyx_kwds_len > 0) {
    if (unlikely(__Pyx_CheckKeywordStrings("simplify", __pyx_kwds) == -1)) return NULL;
    __pyx_v_kwargs = __Pyx_KwargsAsDict_VARARGS(__pyx_kwds, __pyx_kwvalues);
    if (unlikely(!__pyx_v_kwargs)) return NULL;
    __Pyx_GOTREF(__pyx_v_kwargs);
  } else {
    __pyx_v_kwargs = PyDict_New();
    if (unlikely(!__pyx_v_kwargs)) return NULL;
    __Pyx_GOTREF(__pyx_v_kwargs);
  }
  __Pyx_INCREF(__pyx_args);
  __pyx_v_args = __pyx_args;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_84simplify(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_84simplify(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("simplify", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1174
 * 
 *     def simplify(self, *args, **kwargs):
 *         return sympify(self._sympy_().simplify(*args, **kwargs))             # <<<<<<<<<<<<<<
 * 
 *     def as_coefficients_dict(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1174, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_5);
  __pyx_t_6 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
    __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_sympy_2, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1174, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_simplify); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1174, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1174, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_v_args, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1174, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_7};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1174, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1173
 *             return self.free_symbols
 * 
 *     def simplify(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return sympify(self._sympy_().simplify(*args, **kwargs))
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Basic.simplify", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1176
 *         return sympify(self._sympy_().simplify(*args, **kwargs))
 * 
 *     def as_coefficients_dict(self):             # <<<<<<<<<<<<<<
 *         d = collections.defaultdict(int)
 *         d[self] = 1
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_87as_coefficients_dict(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_5Basic_87as_coefficients_dict = {"as_coefficients_dict", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_87as_coefficients_dict, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_87as_coefficients_dict(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("as_coefficients_dict (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("as_coefficients_dict", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("as_coefficients_dict", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_86as_coefficients_dict(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_86as_coefficients_dict(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self) {
  PyObject *__pyx_v_d = 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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("as_coefficients_dict", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1177
 * 
 *     def as_coefficients_dict(self):
 *         d = collections.defaultdict(int)             # <<<<<<<<<<<<<<
 *         d[self] = 1
 *         return d
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_collections); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1177, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_defaultdict); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1177, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, ((PyObject *)(&PyLong_Type))};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1177, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_d = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1178
 *     def as_coefficients_dict(self):
 *         d = collections.defaultdict(int)
 *         d[self] = 1             # <<<<<<<<<<<<<<
 *         return d
 * 
*/
  if (unlikely((PyObject_SetItem(__pyx_v_d, ((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_int_1) < 0))) __PYX_ERR(0, 1178, __pyx_L1_error)

  /* "symengine/lib/symengine_wrapper.pyx":1179
 *         d = collections.defaultdict(int)
 *         d[self] = 1
 *         return d             # <<<<<<<<<<<<<<
 * 
 *     def coeff(self, x, n=1):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_d);
  __pyx_r = __pyx_v_d;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1176
 *         return sympify(self._sympy_().simplify(*args, **kwargs))
 * 
 *     def as_coefficients_dict(self):             # <<<<<<<<<<<<<<
 *         d = collections.defaultdict(int)
 *         d[self] = 1
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Basic.as_coefficients_dict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_d);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1181
 *         return d
 * 
 *     def coeff(self, x, n=1):             # <<<<<<<<<<<<<<
 *         cdef Basic _x = sympify(x)
 *         require(_x, Symbol)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_89coeff(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_5Basic_89coeff = {"coeff", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_89coeff, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_89coeff(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_x = 0;
  PyObject *__pyx_v_n = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("coeff (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_x,&__pyx_mstate_global->__pyx_n_u_n,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1181, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1181, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1181, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "coeff", 0) < (0)) __PYX_ERR(0, 1181, __pyx_L3_error)
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_1));
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("coeff", 0, 1, 2, i); __PYX_ERR(0, 1181, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1181, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1181, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_1));
    }
    __pyx_v_x = values[0];
    __pyx_v_n = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("coeff", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 1181, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Basic.coeff", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_88coeff(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_v_self), __pyx_v_x, __pyx_v_n);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_88coeff(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self, PyObject *__pyx_v_x, PyObject *__pyx_v_n) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v__x = 0;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v__n = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  SymEngine::RCP<const SymEngine::Basic> __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("coeff", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1182
 * 
 *     def coeff(self, x, n=1):
 *         cdef Basic _x = sympify(x)             # <<<<<<<<<<<<<<
 *         require(_x, Symbol)
 *         cdef Basic _n = sympify(n)
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_x};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1182, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 1182, __pyx_L1_error)
  __pyx_v__x = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1183
 *     def coeff(self, x, n=1):
 *         cdef Basic _x = sympify(x)
 *         require(_x, Symbol)             # <<<<<<<<<<<<<<
 *         cdef Basic _n = sympify(n)
 *         return c2py(symengine.coeff(deref(self.thisptr), deref(_x.thisptr), deref(_n.thisptr)))
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_require); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1183, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, ((PyObject *)__pyx_v__x), ((PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Symbol)};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1183, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1184
 *         cdef Basic _x = sympify(x)
 *         require(_x, Symbol)
 *         cdef Basic _n = sympify(n)             # <<<<<<<<<<<<<<
 *         return c2py(symengine.coeff(deref(self.thisptr), deref(_x.thisptr), deref(_n.thisptr)))
 * 
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1184, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_n};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1184, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 1184, __pyx_L1_error)
  __pyx_v__n = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1185
 *         require(_x, Symbol)
 *         cdef Basic _n = sympify(n)
 *         return c2py(symengine.coeff(deref(self.thisptr), deref(_x.thisptr), deref(_n.thisptr)))             # <<<<<<<<<<<<<<
 * 
 *     def has(self, *symbols):
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_5 = SymEngine::coeff((*__pyx_v_self->thisptr), (*__pyx_v__x->thisptr), (*__pyx_v__n->thisptr));
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 1185, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1185, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1181
 *         return d
 * 
 *     def coeff(self, x, n=1):             # <<<<<<<<<<<<<<
 *         cdef Basic _x = sympify(x)
 *         require(_x, Symbol)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Basic.coeff", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v__x);
  __Pyx_XDECREF((PyObject *)__pyx_v__n);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1187
 *         return c2py(symengine.coeff(deref(self.thisptr), deref(_x.thisptr), deref(_n.thisptr)))
 * 
 *     def has(self, *symbols):             # <<<<<<<<<<<<<<
 *         return any([has_symbol(self, symbol) for symbol in symbols])
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_91has(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_5Basic_91has = {"has", (PyCFunction)(void(*)(void))(PyCFunctionWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_91has, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_91has(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_symbols = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("has (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("has", __pyx_kwds); return NULL;}
  __Pyx_INCREF(__pyx_args);
  __pyx_v_symbols = __pyx_args;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_90has(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_v_self), __pyx_v_symbols);

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_90has(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self, PyObject *__pyx_v_symbols) {
  PyObject *__pyx_8genexpr4__pyx_v_symbol = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  size_t __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("has", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1188
 * 
 *     def has(self, *symbols):
 *         return any([has_symbol(self, symbol) for symbol in symbols])             # <<<<<<<<<<<<<<
 * 
 *     def args_as_sage(Basic self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  { /* enter inner scope */
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1188, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __pyx_v_symbols; __Pyx_INCREF(__pyx_t_4);
    __pyx_t_5 = 0;
    for (;;) {
      {
        Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_4);
        #if !CYTHON_ASSUME_SAFE_SIZE
        if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1188, __pyx_L5_error)
        #endif
        if (__pyx_t_5 >= __pyx_temp) break;
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_6 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5));
      #else
      __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_5);
      #endif
      ++__pyx_t_5;
      if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1188, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_XDECREF_SET(__pyx_8genexpr4__pyx_v_symbol, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_7 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_has_symbol); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1188, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_8))) {
        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8);
        assert(__pyx_t_7);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_8, __pyx__function);
        __pyx_t_9 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_7, ((PyObject *)__pyx_v_self), __pyx_8genexpr4__pyx_v_symbol};
        __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_9, (3-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1188, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_6);
      }
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 1188, __pyx_L5_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_8genexpr4__pyx_v_symbol); __pyx_8genexpr4__pyx_v_symbol = 0;
    goto __pyx_L9_exit_scope;
    __pyx_L5_error:;
    __Pyx_XDECREF(__pyx_8genexpr4__pyx_v_symbol); __pyx_8genexpr4__pyx_v_symbol = 0;
    goto __pyx_L1_error;
    __pyx_L9_exit_scope:;
  } /* exit inner scope */
  __pyx_t_9 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_any, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1188, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1187
 *         return c2py(symengine.coeff(deref(self.thisptr), deref(_x.thisptr), deref(_n.thisptr)))
 * 
 *     def has(self, *symbols):             # <<<<<<<<<<<<<<
 *         return any([has_symbol(self, symbol) for symbol in symbols])
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Basic.has", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_8genexpr4__pyx_v_symbol);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1190
 *         return any([has_symbol(self, symbol) for symbol in symbols])
 * 
 *     def args_as_sage(Basic self):             # <<<<<<<<<<<<<<
 *         cdef symengine.vec_basic Y = deref(self.thisptr).get_args()
 *         s = []
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_93args_as_sage(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_5Basic_93args_as_sage = {"args_as_sage", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_93args_as_sage, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_93args_as_sage(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("args_as_sage (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("args_as_sage", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("args_as_sage", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_92args_as_sage(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_92args_as_sage(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self) {
  SymEngine::vec_basic __pyx_v_Y;
  PyObject *__pyx_v_s = NULL;
  std::vector<SymEngine::RCP<const SymEngine::Basic>> ::size_type __pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  std::vector<SymEngine::RCP<const SymEngine::Basic>> ::size_type __pyx_t_2;
  std::vector<SymEngine::RCP<const SymEngine::Basic>> ::size_type __pyx_t_3;
  std::vector<SymEngine::RCP<const SymEngine::Basic>> ::size_type __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  size_t __pyx_t_7;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("args_as_sage", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1191
 * 
 *     def args_as_sage(Basic self):
 *         cdef symengine.vec_basic Y = deref(self.thisptr).get_args()             # <<<<<<<<<<<<<<
 *         s = []
 *         for i in range(Y.size()):
*/
  __pyx_v_Y = (*__pyx_v_self->thisptr).get_args();

  /* "symengine/lib/symengine_wrapper.pyx":1192
 *     def args_as_sage(Basic self):
 *         cdef symengine.vec_basic Y = deref(self.thisptr).get_args()
 *         s = []             # <<<<<<<<<<<<<<
 *         for i in range(Y.size()):
 *             s.append(c2py(<rcp_const_basic>(Y[i]))._sage_())
*/
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1192, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_s = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1193
 *         cdef symengine.vec_basic Y = deref(self.thisptr).get_args()
 *         s = []
 *         for i in range(Y.size()):             # <<<<<<<<<<<<<<
 *             s.append(c2py(<rcp_const_basic>(Y[i]))._sage_())
 *         return s
*/
  __pyx_t_2 = __pyx_v_Y.size();
  __pyx_t_3 = __pyx_t_2;
  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
    __pyx_v_i = __pyx_t_4;

    /* "symengine/lib/symengine_wrapper.pyx":1194
 *         s = []
 *         for i in range(Y.size()):
 *             s.append(c2py(<rcp_const_basic>(Y[i]))._sage_())             # <<<<<<<<<<<<<<
 *         return s
 * 
*/
    __pyx_t_6 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)(__pyx_v_Y[__pyx_v_i]))); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1194, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_5 = __pyx_t_6;
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_7 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
      __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_sage, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1194, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_s, __pyx_t_1); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 1194, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "symengine/lib/symengine_wrapper.pyx":1195
 *         for i in range(Y.size()):
 *             s.append(c2py(<rcp_const_basic>(Y[i]))._sage_())
 *         return s             # <<<<<<<<<<<<<<
 * 
 *     def args_as_sympy(Basic self):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_s);
  __pyx_r = __pyx_v_s;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1190
 *         return any([has_symbol(self, symbol) for symbol in symbols])
 * 
 *     def args_as_sage(Basic self):             # <<<<<<<<<<<<<<
 *         cdef symengine.vec_basic Y = deref(self.thisptr).get_args()
 *         s = []
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Basic.args_as_sage", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_s);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1197
 *         return s
 * 
 *     def args_as_sympy(Basic self):             # <<<<<<<<<<<<<<
 *         cdef symengine.vec_basic Y = deref(self.thisptr).get_args()
 *         s = []
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_95args_as_sympy(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_5Basic_95args_as_sympy = {"args_as_sympy", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_95args_as_sympy, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_95args_as_sympy(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("args_as_sympy (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("args_as_sympy", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("args_as_sympy", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_94args_as_sympy(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_94args_as_sympy(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self) {
  SymEngine::vec_basic __pyx_v_Y;
  PyObject *__pyx_v_s = NULL;
  std::vector<SymEngine::RCP<const SymEngine::Basic>> ::size_type __pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  std::vector<SymEngine::RCP<const SymEngine::Basic>> ::size_type __pyx_t_2;
  std::vector<SymEngine::RCP<const SymEngine::Basic>> ::size_type __pyx_t_3;
  std::vector<SymEngine::RCP<const SymEngine::Basic>> ::size_type __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  size_t __pyx_t_7;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("args_as_sympy", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1198
 * 
 *     def args_as_sympy(Basic self):
 *         cdef symengine.vec_basic Y = deref(self.thisptr).get_args()             # <<<<<<<<<<<<<<
 *         s = []
 *         for i in range(Y.size()):
*/
  __pyx_v_Y = (*__pyx_v_self->thisptr).get_args();

  /* "symengine/lib/symengine_wrapper.pyx":1199
 *     def args_as_sympy(Basic self):
 *         cdef symengine.vec_basic Y = deref(self.thisptr).get_args()
 *         s = []             # <<<<<<<<<<<<<<
 *         for i in range(Y.size()):
 *             s.append(c2py(<rcp_const_basic>(Y[i]))._sympy_())
*/
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1199, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_s = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1200
 *         cdef symengine.vec_basic Y = deref(self.thisptr).get_args()
 *         s = []
 *         for i in range(Y.size()):             # <<<<<<<<<<<<<<
 *             s.append(c2py(<rcp_const_basic>(Y[i]))._sympy_())
 *         return s
*/
  __pyx_t_2 = __pyx_v_Y.size();
  __pyx_t_3 = __pyx_t_2;
  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
    __pyx_v_i = __pyx_t_4;

    /* "symengine/lib/symengine_wrapper.pyx":1201
 *         s = []
 *         for i in range(Y.size()):
 *             s.append(c2py(<rcp_const_basic>(Y[i]))._sympy_())             # <<<<<<<<<<<<<<
 *         return s
 * 
*/
    __pyx_t_6 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)(__pyx_v_Y[__pyx_v_i]))); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1201, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_5 = __pyx_t_6;
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_7 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
      __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_sympy_2, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1201, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_s, __pyx_t_1); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 1201, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "symengine/lib/symengine_wrapper.pyx":1202
 *         for i in range(Y.size()):
 *             s.append(c2py(<rcp_const_basic>(Y[i]))._sympy_())
 *         return s             # <<<<<<<<<<<<<<
 * 
 *     def __float__(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_s);
  __pyx_r = __pyx_v_s;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1197
 *         return s
 * 
 *     def args_as_sympy(Basic self):             # <<<<<<<<<<<<<<
 *         cdef symengine.vec_basic Y = deref(self.thisptr).get_args()
 *         s = []
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Basic.args_as_sympy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_s);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1204
 *         return s
 * 
 *     def __float__(self):             # <<<<<<<<<<<<<<
 *         f = self.n(real=True)
 *         if not isinstance(f, RealDouble):
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_97__float__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_97__float__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__float__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_96__float__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_96__float__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self) {
  PyObject *__pyx_v_f = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__float__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1205
 * 
 *     def __float__(self):
 *         f = self.n(real=True)             # <<<<<<<<<<<<<<
 *         if not isinstance(f, RealDouble):
 *             raise TypeError("Can't convert expression to float")
*/
  __pyx_t_2 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = 0;
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, NULL};
    __pyx_t_4 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1205, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_real, Py_True, __pyx_t_4, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 1205, __pyx_L1_error)
    __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_n, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1205, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_f = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1206
 *     def __float__(self):
 *         f = self.n(real=True)
 *         if not isinstance(f, RealDouble):             # <<<<<<<<<<<<<<
 *             raise TypeError("Can't convert expression to float")
 *         return float(f)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_RealDouble); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = PyObject_IsInstance(__pyx_v_f, __pyx_t_1); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 1206, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_6 = (!__pyx_t_5);
  if (unlikely(__pyx_t_6)) {

    /* "symengine/lib/symengine_wrapper.pyx":1207
 *         f = self.n(real=True)
 *         if not isinstance(f, RealDouble):
 *             raise TypeError("Can't convert expression to float")             # <<<<<<<<<<<<<<
 *         return float(f)
 * 
*/
    __pyx_t_4 = NULL;
    __pyx_t_3 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Can_t_convert_expression_to_floa};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1207, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 1207, __pyx_L1_error)

    /* "symengine/lib/symengine_wrapper.pyx":1206
 *     def __float__(self):
 *         f = self.n(real=True)
 *         if not isinstance(f, RealDouble):             # <<<<<<<<<<<<<<
 *             raise TypeError("Can't convert expression to float")
 *         return float(f)
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":1208
 *         if not isinstance(f, RealDouble):
 *             raise TypeError("Can't convert expression to float")
 *         return float(f)             # <<<<<<<<<<<<<<
 * 
 *     def __int__(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyNumber_Float(__pyx_v_f); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1204
 *         return s
 * 
 *     def __float__(self):             # <<<<<<<<<<<<<<
 *         f = self.n(real=True)
 *         if not isinstance(f, RealDouble):
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Basic.__float__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_f);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1210
 *         return float(f)
 * 
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return int(float(self))
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_99__int__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_99__int__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__int__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_98__int__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_98__int__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__int__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1211
 * 
 *     def __int__(self):
 *         return int(float(self))             # <<<<<<<<<<<<<<
 * 
 *     def __complex__(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyNumber_Float(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1211, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1211, __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;

  /* "symengine/lib/symengine_wrapper.pyx":1210
 *         return float(f)
 * 
 *     def __int__(self):             # <<<<<<<<<<<<<<
 *         return int(float(self))
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Basic.__int__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1213
 *         return int(float(self))
 * 
 *     def __complex__(self):             # <<<<<<<<<<<<<<
 *         f = self.n(real=False)
 *         if not isinstance(f, (ComplexDouble, RealDouble)):
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_101__complex__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_5Basic_101__complex__ = {"__complex__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_101__complex__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_101__complex__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__complex__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__complex__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__complex__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_100__complex__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_100__complex__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self) {
  PyObject *__pyx_v_f = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__complex__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1214
 * 
 *     def __complex__(self):
 *         f = self.n(real=False)             # <<<<<<<<<<<<<<
 *         if not isinstance(f, (ComplexDouble, RealDouble)):
 *             raise TypeError("Can't convert expression to float")
*/
  __pyx_t_2 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = 0;
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, NULL};
    __pyx_t_4 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1214, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_real, Py_False, __pyx_t_4, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 1214, __pyx_L1_error)
    __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_n, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1214, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_f = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1215
 *     def __complex__(self):
 *         f = self.n(real=False)
 *         if not isinstance(f, (ComplexDouble, RealDouble)):             # <<<<<<<<<<<<<<
 *             raise TypeError("Can't convert expression to float")
 *         return complex(f)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_RealDouble); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1215, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_TypeCheck(__pyx_v_f, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ComplexDouble); 
  if (!__pyx_t_6) {
  } else {
    __pyx_t_5 = __pyx_t_6;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_6 = PyObject_IsInstance(__pyx_v_f, __pyx_t_1); 
  __pyx_t_5 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_6 = (!__pyx_t_5);
  if (unlikely(__pyx_t_6)) {

    /* "symengine/lib/symengine_wrapper.pyx":1216
 *         f = self.n(real=False)
 *         if not isinstance(f, (ComplexDouble, RealDouble)):
 *             raise TypeError("Can't convert expression to float")             # <<<<<<<<<<<<<<
 *         return complex(f)
 * 
*/
    __pyx_t_4 = NULL;
    __pyx_t_3 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Can_t_convert_expression_to_floa};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1216, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 1216, __pyx_L1_error)

    /* "symengine/lib/symengine_wrapper.pyx":1215
 *     def __complex__(self):
 *         f = self.n(real=False)
 *         if not isinstance(f, (ComplexDouble, RealDouble)):             # <<<<<<<<<<<<<<
 *             raise TypeError("Can't convert expression to float")
 *         return complex(f)
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":1217
 *         if not isinstance(f, (ComplexDouble, RealDouble)):
 *             raise TypeError("Can't convert expression to float")
 *         return complex(f)             # <<<<<<<<<<<<<<
 * 
 *     def as_powers_dict(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = NULL;
  __pyx_t_3 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_f};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(&PyComplex_Type), __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1217, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1213
 *         return int(float(self))
 * 
 *     def __complex__(self):             # <<<<<<<<<<<<<<
 *         f = self.n(real=False)
 *         if not isinstance(f, (ComplexDouble, RealDouble)):
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Basic.__complex__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_f);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1219
 *         return complex(f)
 * 
 *     def as_powers_dict(self):             # <<<<<<<<<<<<<<
 *         d = collections.defaultdict(int)
 *         d[self] = 1
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_103as_powers_dict(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_5Basic_103as_powers_dict = {"as_powers_dict", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_103as_powers_dict, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_103as_powers_dict(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("as_powers_dict (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("as_powers_dict", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("as_powers_dict", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_102as_powers_dict(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Basic_102as_powers_dict(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self) {
  PyObject *__pyx_v_d = 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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("as_powers_dict", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1220
 * 
 *     def as_powers_dict(self):
 *         d = collections.defaultdict(int)             # <<<<<<<<<<<<<<
 *         d[self] = 1
 *         return d
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_collections); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1220, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_defaultdict); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1220, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, ((PyObject *)(&PyLong_Type))};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1220, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_d = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1221
 *     def as_powers_dict(self):
 *         d = collections.defaultdict(int)
 *         d[self] = 1             # <<<<<<<<<<<<<<
 *         return d
 * 
*/
  if (unlikely((PyObject_SetItem(__pyx_v_d, ((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_int_1) < 0))) __PYX_ERR(0, 1221, __pyx_L1_error)

  /* "symengine/lib/symengine_wrapper.pyx":1222
 *         d = collections.defaultdict(int)
 *         d[self] = 1
 *         return d             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_d);
  __pyx_r = __pyx_v_d;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1219
 *         return complex(f)
 * 
 *     def as_powers_dict(self):             # <<<<<<<<<<<<<<
 *         d = collections.defaultdict(int)
 *         d[self] = 1
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Basic.as_powers_dict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_d);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1225
 * 
 * 
 * def series(ex, x=None, x0=0, n=6, as_deg_coef_pair=False):             # <<<<<<<<<<<<<<
 *     # TODO: check for x0 an infinity, see sympy/core/expr.py
 *     # TODO: nonzero x0
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_17series(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_17series = {"series", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_17series, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_17series(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_ex = 0;
  PyObject *__pyx_v_x = 0;
  PyObject *__pyx_v_x0 = 0;
  PyObject *__pyx_v_n = 0;
  PyObject *__pyx_v_as_deg_coef_pair = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[5] = {0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("series (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_ex,&__pyx_mstate_global->__pyx_n_u_x,&__pyx_mstate_global->__pyx_n_u_x0,&__pyx_mstate_global->__pyx_n_u_n,&__pyx_mstate_global->__pyx_n_u_as_deg_coef_pair,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1225, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1225, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1225, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1225, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1225, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1225, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "series", 0) < (0)) __PYX_ERR(0, 1225, __pyx_L3_error)
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_int_0)));
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_int_6)));
      if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False)));
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("series", 0, 1, 5, i); __PYX_ERR(0, 1225, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1225, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1225, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1225, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1225, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1225, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_int_0)));
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_int_6)));
      if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False)));
    }
    __pyx_v_ex = values[0];
    __pyx_v_x = values[1];
    __pyx_v_x0 = values[2];
    __pyx_v_n = values[3];
    __pyx_v_as_deg_coef_pair = values[4];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("series", 0, 1, 5, __pyx_nargs); __PYX_ERR(0, 1225, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.series", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_16series(__pyx_self, __pyx_v_ex, __pyx_v_x, __pyx_v_x0, __pyx_v_n, __pyx_v_as_deg_coef_pair);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_16series(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_ex, PyObject *__pyx_v_x, PyObject *__pyx_v_x0, PyObject *__pyx_v_n, PyObject *__pyx_v_as_deg_coef_pair) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v__ex = 0;
  PyObject *__pyx_v_syms = NULL;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v__x = 0;
  SymEngine::RCP<SymEngine::Symbol const >  __pyx_v_X;
  SymEngine::umap_int_basic __pyx_v_umap;
  SymEngine::umap_int_basic::iterator __pyx_v_iter;
  SymEngine::umap_int_basic::iterator __pyx_v_iterend;
  PyObject *__pyx_v_b = NULL;
  CYTHON_UNUSED long __pyx_v_poly;
  PyObject *__pyx_v_l = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  unsigned int __pyx_t_8;
  SymEngine::RCP<const SymEngine::SeriesCoeffInterface> __pyx_t_9;
  SymEngine::RCP<const SymEngine::Basic> __pyx_t_10;
  SymEngine::umap_int_basic __pyx_t_11;
  int __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("series", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1229
 *     # TODO: nonzero x0
 *     # underscored local vars are of symengine.py type
 *     cdef Basic _ex = sympify(ex)             # <<<<<<<<<<<<<<
 *     syms = _ex.free_symbols
 *     if not syms:
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1229, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_ex};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1229, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 1229, __pyx_L1_error)
  __pyx_v__ex = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1230
 *     # underscored local vars are of symengine.py type
 *     cdef Basic _ex = sympify(ex)
 *     syms = _ex.free_symbols             # <<<<<<<<<<<<<<
 *     if not syms:
 *         return _ex
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v__ex), __pyx_mstate_global->__pyx_n_u_free_symbols); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1230, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_syms = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1231
 *     cdef Basic _ex = sympify(ex)
 *     syms = _ex.free_symbols
 *     if not syms:             # <<<<<<<<<<<<<<
 *         return _ex
 * 
*/
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_syms); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1231, __pyx_L1_error)
  __pyx_t_6 = (!__pyx_t_5);
  if (__pyx_t_6) {

    /* "symengine/lib/symengine_wrapper.pyx":1232
 *     syms = _ex.free_symbols
 *     if not syms:
 *         return _ex             # <<<<<<<<<<<<<<
 * 
 *     cdef Basic _x
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF((PyObject *)__pyx_v__ex);
    __pyx_r = ((PyObject *)__pyx_v__ex);
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":1231
 *     cdef Basic _ex = sympify(ex)
 *     syms = _ex.free_symbols
 *     if not syms:             # <<<<<<<<<<<<<<
 *         return _ex
 * 
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":1235
 * 
 *     cdef Basic _x
 *     if x is None:             # <<<<<<<<<<<<<<
 *         _x = list(syms)[0]
 *     else:
*/
  __pyx_t_6 = (__pyx_v_x == Py_None);
  if (__pyx_t_6) {

    /* "symengine/lib/symengine_wrapper.pyx":1236
 *     cdef Basic _x
 *     if x is None:
 *         _x = list(syms)[0]             # <<<<<<<<<<<<<<
 *     else:
 *         _x = sympify(x)
*/
    __pyx_t_1 = PySequence_List(__pyx_v_syms); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1236, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_t_1, 0, long, 1, __Pyx_PyLong_From_long, 1, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1236, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 1236, __pyx_L1_error)
    __pyx_v__x = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":1235
 * 
 *     cdef Basic _x
 *     if x is None:             # <<<<<<<<<<<<<<
 *         _x = list(syms)[0]
 *     else:
*/
    goto __pyx_L4;
  }

  /* "symengine/lib/symengine_wrapper.pyx":1238
 *         _x = list(syms)[0]
 *     else:
 *         _x = sympify(x)             # <<<<<<<<<<<<<<
 *     require(_x, Symbol)
 *     if not _x in syms:
*/
  /*else*/ {
    __pyx_t_1 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1238, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
      assert(__pyx_t_1);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
      __pyx_t_4 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_x};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1238, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 1238, __pyx_L1_error)
    __pyx_v__x = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_3);
    __pyx_t_3 = 0;
  }
  __pyx_L4:;

  /* "symengine/lib/symengine_wrapper.pyx":1239
 *     else:
 *         _x = sympify(x)
 *     require(_x, Symbol)             # <<<<<<<<<<<<<<
 *     if not _x in syms:
 *         return _ex
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_require); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_1, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, ((PyObject *)__pyx_v__x), ((PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Symbol)};
    __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_1, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1239, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1240
 *         _x = sympify(x)
 *     require(_x, Symbol)
 *     if not _x in syms:             # <<<<<<<<<<<<<<
 *         return _ex
 * 
*/
  __pyx_t_6 = (__Pyx_PySequence_ContainsTF(((PyObject *)__pyx_v__x), __pyx_v_syms, Py_NE)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1240, __pyx_L1_error)
  if (__pyx_t_6) {

    /* "symengine/lib/symengine_wrapper.pyx":1241
 *     require(_x, Symbol)
 *     if not _x in syms:
 *         return _ex             # <<<<<<<<<<<<<<
 * 
 *     if x0 != 0:
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF((PyObject *)__pyx_v__ex);
    __pyx_r = ((PyObject *)__pyx_v__ex);
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":1240
 *         _x = sympify(x)
 *     require(_x, Symbol)
 *     if not _x in syms:             # <<<<<<<<<<<<<<
 *         return _ex
 * 
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":1243
 *         return _ex
 * 
 *     if x0 != 0:             # <<<<<<<<<<<<<<
 *         _ex = _ex.subs({_x: _x + x0})
 * 
*/
  __pyx_t_6 = (__Pyx_PyLong_BoolNeObjC(__pyx_v_x0, __pyx_mstate_global->__pyx_int_0, 0, 0)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1243, __pyx_L1_error)
  if (__pyx_t_6) {

    /* "symengine/lib/symengine_wrapper.pyx":1244
 * 
 *     if x0 != 0:
 *         _ex = _ex.subs({_x: _x + x0})             # <<<<<<<<<<<<<<
 * 
 *     cdef RCP[const symengine.Symbol] X = symengine.rcp_static_cast_Symbol(_x.thisptr)
*/
    __pyx_t_1 = ((PyObject *)__pyx_v__ex);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1244, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_7 = PyNumber_Add(((PyObject *)__pyx_v__x), __pyx_v_x0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1244, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_v__x), __pyx_t_7) < (0)) __PYX_ERR(0, 1244, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_4 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_2};
      __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_subs, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1244, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 1244, __pyx_L1_error)
    __Pyx_DECREF_SET(__pyx_v__ex, ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":1243
 *         return _ex
 * 
 *     if x0 != 0:             # <<<<<<<<<<<<<<
 *         _ex = _ex.subs({_x: _x + x0})
 * 
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":1246
 *         _ex = _ex.subs({_x: _x + x0})
 * 
 *     cdef RCP[const symengine.Symbol] X = symengine.rcp_static_cast_Symbol(_x.thisptr)             # <<<<<<<<<<<<<<
 *     cdef umap_int_basic umap
 *     cdef umap_int_basic_iterator iter, iterend
*/
  __pyx_v_X = SymEngine::rcp_static_cast<const SymEngine::Symbol>(__pyx_v__x->thisptr);

  /* "symengine/lib/symengine_wrapper.pyx":1250
 *     cdef umap_int_basic_iterator iter, iterend
 * 
 *     if not as_deg_coef_pair:             # <<<<<<<<<<<<<<
 *         b = c2py(<symengine.rcp_const_basic>deref(symengine.series(_ex.thisptr, X, n)).as_basic())
 *         if x0 != 0:
*/
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_as_deg_coef_pair); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1250, __pyx_L1_error)
  __pyx_t_5 = (!__pyx_t_6);
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":1251
 * 
 *     if not as_deg_coef_pair:
 *         b = c2py(<symengine.rcp_const_basic>deref(symengine.series(_ex.thisptr, X, n)).as_basic())             # <<<<<<<<<<<<<<
 *         if x0 != 0:
 *             b = b.subs({_x: _x - x0})
*/
    __pyx_t_8 = __Pyx_PyLong_As_unsigned_int(__pyx_v_n); if (unlikely((__pyx_t_8 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1251, __pyx_L1_error)
    try {
      __pyx_t_9 = SymEngine::series(__pyx_v__ex->thisptr, __pyx_v_X, __pyx_t_8);
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(0, 1251, __pyx_L1_error)
    }
    try {
      __pyx_t_10 = (*__pyx_t_9).as_basic();
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(0, 1251, __pyx_L1_error)
    }
    __pyx_t_3 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)__pyx_t_10)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1251, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_b = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":1252
 *     if not as_deg_coef_pair:
 *         b = c2py(<symengine.rcp_const_basic>deref(symengine.series(_ex.thisptr, X, n)).as_basic())
 *         if x0 != 0:             # <<<<<<<<<<<<<<
 *             b = b.subs({_x: _x - x0})
 *         return b
*/
    __pyx_t_5 = (__Pyx_PyLong_BoolNeObjC(__pyx_v_x0, __pyx_mstate_global->__pyx_int_0, 0, 0)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1252, __pyx_L1_error)
    if (__pyx_t_5) {

      /* "symengine/lib/symengine_wrapper.pyx":1253
 *         b = c2py(<symengine.rcp_const_basic>deref(symengine.series(_ex.thisptr, X, n)).as_basic())
 *         if x0 != 0:
 *             b = b.subs({_x: _x - x0})             # <<<<<<<<<<<<<<
 *         return b
 * 
*/
      __pyx_t_2 = __pyx_v_b;
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1253, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_7 = PyNumber_Subtract(((PyObject *)__pyx_v__x), __pyx_v_x0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1253, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_v__x), __pyx_t_7) < (0)) __PYX_ERR(0, 1253, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_4 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_1};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_subs, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1253, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __Pyx_DECREF_SET(__pyx_v_b, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "symengine/lib/symengine_wrapper.pyx":1252
 *     if not as_deg_coef_pair:
 *         b = c2py(<symengine.rcp_const_basic>deref(symengine.series(_ex.thisptr, X, n)).as_basic())
 *         if x0 != 0:             # <<<<<<<<<<<<<<
 *             b = b.subs({_x: _x - x0})
 *         return b
*/
    }

    /* "symengine/lib/symengine_wrapper.pyx":1254
 *         if x0 != 0:
 *             b = b.subs({_x: _x - x0})
 *         return b             # <<<<<<<<<<<<<<
 * 
 *     umap = deref(symengine.series(_ex.thisptr, X, n)).as_dict()
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_b);
    __pyx_r = __pyx_v_b;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":1250
 *     cdef umap_int_basic_iterator iter, iterend
 * 
 *     if not as_deg_coef_pair:             # <<<<<<<<<<<<<<
 *         b = c2py(<symengine.rcp_const_basic>deref(symengine.series(_ex.thisptr, X, n)).as_basic())
 *         if x0 != 0:
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":1256
 *         return b
 * 
 *     umap = deref(symengine.series(_ex.thisptr, X, n)).as_dict()             # <<<<<<<<<<<<<<
 * 
 *     iter = umap.begin()
*/
  __pyx_t_8 = __Pyx_PyLong_As_unsigned_int(__pyx_v_n); if (unlikely((__pyx_t_8 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1256, __pyx_L1_error)
  try {
    __pyx_t_9 = SymEngine::series(__pyx_v__ex->thisptr, __pyx_v_X, __pyx_t_8);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 1256, __pyx_L1_error)
  }
  try {
    __pyx_t_11 = (*__pyx_t_9).as_dict();
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 1256, __pyx_L1_error)
  }
  __pyx_v_umap = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_11);

  /* "symengine/lib/symengine_wrapper.pyx":1258
 *     umap = deref(symengine.series(_ex.thisptr, X, n)).as_dict()
 * 
 *     iter = umap.begin()             # <<<<<<<<<<<<<<
 *     iterend = umap.end()
 *     poly = 0
*/
  __pyx_v_iter = __pyx_v_umap.begin();

  /* "symengine/lib/symengine_wrapper.pyx":1259
 * 
 *     iter = umap.begin()
 *     iterend = umap.end()             # <<<<<<<<<<<<<<
 *     poly = 0
 *     l = []
*/
  __pyx_v_iterend = __pyx_v_umap.end();

  /* "symengine/lib/symengine_wrapper.pyx":1260
 *     iter = umap.begin()
 *     iterend = umap.end()
 *     poly = 0             # <<<<<<<<<<<<<<
 *     l = []
 *     while iter != iterend:
*/
  __pyx_v_poly = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1261
 *     iterend = umap.end()
 *     poly = 0
 *     l = []             # <<<<<<<<<<<<<<
 *     while iter != iterend:
 *         l.append([deref(iter).first, c2py(<symengine.rcp_const_basic>(deref(iter).second))])
*/
  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1261, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_l = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1262
 *     poly = 0
 *     l = []
 *     while iter != iterend:             # <<<<<<<<<<<<<<
 *         l.append([deref(iter).first, c2py(<symengine.rcp_const_basic>(deref(iter).second))])
 *         inc(iter)
*/
  while (1) {
    __pyx_t_5 = (__pyx_v_iter != __pyx_v_iterend);
    if (!__pyx_t_5) break;

    /* "symengine/lib/symengine_wrapper.pyx":1263
 *     l = []
 *     while iter != iterend:
 *         l.append([deref(iter).first, c2py(<symengine.rcp_const_basic>(deref(iter).second))])             # <<<<<<<<<<<<<<
 *         inc(iter)
 *     if as_deg_coef_pair:
*/
    __pyx_t_3 = __Pyx_PyLong_From_int((*__pyx_v_iter).first); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1263, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)(*__pyx_v_iter).second)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1263, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1263, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_3);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_3) != (0)) __PYX_ERR(0, 1263, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_1);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 1, __pyx_t_1) != (0)) __PYX_ERR(0, 1263, __pyx_L1_error);
    __pyx_t_3 = 0;
    __pyx_t_1 = 0;
    __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_l, __pyx_t_2); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 1263, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":1264
 *     while iter != iterend:
 *         l.append([deref(iter).first, c2py(<symengine.rcp_const_basic>(deref(iter).second))])
 *         inc(iter)             # <<<<<<<<<<<<<<
 *     if as_deg_coef_pair:
 *         return l
*/
    (void)((++__pyx_v_iter));
  }

  /* "symengine/lib/symengine_wrapper.pyx":1265
 *         l.append([deref(iter).first, c2py(<symengine.rcp_const_basic>(deref(iter).second))])
 *         inc(iter)
 *     if as_deg_coef_pair:             # <<<<<<<<<<<<<<
 *         return l
 *     return add(*l)
*/
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_as_deg_coef_pair); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1265, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":1266
 *         inc(iter)
 *     if as_deg_coef_pair:
 *         return l             # <<<<<<<<<<<<<<
 *     return add(*l)
 * 
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_l);
    __pyx_r = __pyx_v_l;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":1265
 *         l.append([deref(iter).first, c2py(<symengine.rcp_const_basic>(deref(iter).second))])
 *         inc(iter)
 *     if as_deg_coef_pair:             # <<<<<<<<<<<<<<
 *         return l
 *     return add(*l)
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":1267
 *     if as_deg_coef_pair:
 *         return l
 *     return add(*l)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_add); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1267, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PySequence_Tuple(__pyx_v_l); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1267, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1267, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1225
 * 
 * 
 * def series(ex, x=None, x0=0, n=6, as_deg_coef_pair=False):             # <<<<<<<<<<<<<<
 *     # TODO: check for x0 an infinity, see sympy/core/expr.py
 *     # TODO: nonzero x0
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.series", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v__ex);
  __Pyx_XDECREF(__pyx_v_syms);
  __Pyx_XDECREF((PyObject *)__pyx_v__x);
  __Pyx_XDECREF(__pyx_v_b);
  __Pyx_XDECREF(__pyx_v_l);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1283
 *     """
 * 
 *     def __init__(Basic self, name, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         cdef cppbool store_pickle;
 *         if type(self) == Symbol:
*/

/* Python wrapper */
static int __pyx_pw_9symengine_3lib_17symengine_wrapper_6Symbol_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_9symengine_3lib_17symengine_wrapper_6Symbol_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_name = 0;
  CYTHON_UNUSED PyObject *__pyx_v_args = 0;
  PyObject *__pyx_v_kwargs = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return -1;
  __Pyx_GOTREF(__pyx_v_kwargs);
  __pyx_v_args = __Pyx_ArgsSlice_VARARGS(__pyx_args, 1, __pyx_nargs);
  if (unlikely(!__pyx_v_args)) {
    __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
    __Pyx_RefNannyFinishContext();
    return -1;
  }
  __Pyx_GOTREF(__pyx_v_args);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_name,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1283, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        default:
        case  1:
        values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1283, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      const Py_ssize_t used_pos_args = (kwd_pos_args < 1) ? kwd_pos_args : 1;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, __pyx_kwds_len, "__init__", 1) < (0)) __PYX_ERR(0, 1283, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 1, i); __PYX_ERR(0, 1283, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs < 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1283, __pyx_L3_error)
    }
    __pyx_v_name = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 1, __pyx_nargs); __PYX_ERR(0, 1283, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Symbol.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_6Symbol___init__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Symbol *)__pyx_v_self), __pyx_v_name, __pyx_v_args, __pyx_v_kwargs);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_args);
  __Pyx_DECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_9symengine_3lib_17symengine_wrapper_6Symbol___init__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Symbol *__pyx_v_self, PyObject *__pyx_v_name, CYTHON_UNUSED PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
  bool __pyx_v_store_pickle;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  std::string __pyx_t_5;
  bool __pyx_t_6;
  SymEngine::RCP<const SymEngine::Basic> __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1285
 *     def __init__(Basic self, name, *args, **kwargs):
 *         cdef cppbool store_pickle;
 *         if type(self) == Symbol:             # <<<<<<<<<<<<<<
 *             self.thisptr = symengine.make_rcp_Symbol(name.encode("utf-8"))
 *         else:
*/
  __pyx_t_1 = PyObject_RichCompare(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))), ((PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Symbol), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1285, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1285, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "symengine/lib/symengine_wrapper.pyx":1286
 *         cdef cppbool store_pickle;
 *         if type(self) == Symbol:
 *             self.thisptr = symengine.make_rcp_Symbol(name.encode("utf-8"))             # <<<<<<<<<<<<<<
 *         else:
 *             store_pickle = kwargs.pop("store_pickle", False)
*/
    __pyx_t_3 = __pyx_v_name;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_4 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_utf_8};
      __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_encode, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1286, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __pyx_t_5 = __pyx_convert_string_from_py_6libcpp_6string_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1286, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_self->__pyx_base.__pyx_base.thisptr = SymEngine::make_rcp<const SymEngine::Symbol>(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5));

    /* "symengine/lib/symengine_wrapper.pyx":1285
 *     def __init__(Basic self, name, *args, **kwargs):
 *         cdef cppbool store_pickle;
 *         if type(self) == Symbol:             # <<<<<<<<<<<<<<
 *             self.thisptr = symengine.make_rcp_Symbol(name.encode("utf-8"))
 *         else:
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":1288
 *             self.thisptr = symengine.make_rcp_Symbol(name.encode("utf-8"))
 *         else:
 *             store_pickle = kwargs.pop("store_pickle", False)             # <<<<<<<<<<<<<<
 *             if store_pickle:
 *                 # First set the pointer to a regular symbol so that when pickle.dumps
*/
  /*else*/ {
    __pyx_t_1 = __Pyx_PyDict_Pop(__pyx_v_kwargs, __pyx_mstate_global->__pyx_n_u_store_pickle, Py_False); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1288, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1288, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_store_pickle = __pyx_t_6;

    /* "symengine/lib/symengine_wrapper.pyx":1289
 *         else:
 *             store_pickle = kwargs.pop("store_pickle", False)
 *             if store_pickle:             # <<<<<<<<<<<<<<
 *                 # First set the pointer to a regular symbol so that when pickle.dumps
 *                 # is called when the PySymbol is created, methods like name works.
*/
    __pyx_t_2 = (__pyx_v_store_pickle != 0);
    if (__pyx_t_2) {

      /* "symengine/lib/symengine_wrapper.pyx":1292
 *                 # First set the pointer to a regular symbol so that when pickle.dumps
 *                 # is called when the PySymbol is created, methods like name works.
 *                 self.thisptr = symengine.make_rcp_Symbol(name.encode("utf-8"))             # <<<<<<<<<<<<<<
 *             self.thisptr = symengine.make_rcp_PySymbol(name.encode("utf-8"), <PyObject*>self,
 *                 store_pickle)
*/
      __pyx_t_3 = __pyx_v_name;
      __Pyx_INCREF(__pyx_t_3);
      __pyx_t_4 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_utf_8};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_encode, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1292, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_t_5 = __pyx_convert_string_from_py_6libcpp_6string_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1292, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v_self->__pyx_base.__pyx_base.thisptr = SymEngine::make_rcp<const SymEngine::Symbol>(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5));

      /* "symengine/lib/symengine_wrapper.pyx":1289
 *         else:
 *             store_pickle = kwargs.pop("store_pickle", False)
 *             if store_pickle:             # <<<<<<<<<<<<<<
 *                 # First set the pointer to a regular symbol so that when pickle.dumps
 *                 # is called when the PySymbol is created, methods like name works.
*/
    }

    /* "symengine/lib/symengine_wrapper.pyx":1293
 *                 # is called when the PySymbol is created, methods like name works.
 *                 self.thisptr = symengine.make_rcp_Symbol(name.encode("utf-8"))
 *             self.thisptr = symengine.make_rcp_PySymbol(name.encode("utf-8"), <PyObject*>self,             # <<<<<<<<<<<<<<
 *                 store_pickle)
 * 
*/
    __pyx_t_3 = __pyx_v_name;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_4 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_utf_8};
      __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_encode, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1293, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __pyx_t_5 = __pyx_convert_string_from_py_6libcpp_6string_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1293, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":1294
 *                 self.thisptr = symengine.make_rcp_Symbol(name.encode("utf-8"))
 *             self.thisptr = symengine.make_rcp_PySymbol(name.encode("utf-8"), <PyObject*>self,
 *                 store_pickle)             # <<<<<<<<<<<<<<
 * 
 *     def _sympy_(self):
*/
    try {
      __pyx_t_7 = SymEngine::make_rcp<const SymEngine::PySymbol>(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5), ((PyObject *)__pyx_v_self), __pyx_v_store_pickle);
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(0, 1293, __pyx_L1_error)
    }

    /* "symengine/lib/symengine_wrapper.pyx":1293
 *                 # is called when the PySymbol is created, methods like name works.
 *                 self.thisptr = symengine.make_rcp_Symbol(name.encode("utf-8"))
 *             self.thisptr = symengine.make_rcp_PySymbol(name.encode("utf-8"), <PyObject*>self,             # <<<<<<<<<<<<<<
 *                 store_pickle)
 * 
*/
    __pyx_v_self->__pyx_base.__pyx_base.thisptr = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_7);
  }
  __pyx_L3:;

  /* "symengine/lib/symengine_wrapper.pyx":1283
 *     """
 * 
 *     def __init__(Basic self, name, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         cdef cppbool store_pickle;
 *         if type(self) == Symbol:
*/

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Symbol.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1296
 *                 store_pickle)
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.Symbol(str(self))
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_6Symbol_3_sympy_(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_6Symbol_3_sympy_ = {"_sympy_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_6Symbol_3_sympy_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_6Symbol_3_sympy_(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sympy_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("_sympy_", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_6Symbol_2_sympy_(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Symbol *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_6Symbol_2_sympy_(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Symbol *__pyx_v_self) {
  PyObject *__pyx_v_sympy = 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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sympy_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1297
 * 
 *     def _sympy_(self):
 *         import sympy             # <<<<<<<<<<<<<<
 *         return sympy.Symbol(str(self))
 * 
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sympy, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1297, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sympy = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1298
 *     def _sympy_(self):
 *         import sympy
 *         return sympy.Symbol(str(self))             # <<<<<<<<<<<<<<
 * 
 *     def __reduce__(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __pyx_v_sympy;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_Unicode(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1298, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_Symbol, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1298, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1296
 *                 store_pickle)
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.Symbol(str(self))
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Symbol._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sympy);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1300
 *         return sympy.Symbol(str(self))
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         if type(self) == Symbol:
 *             return Basic.__reduce__(self)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_6Symbol_5__reduce__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_6Symbol_5__reduce__ = {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_6Symbol_5__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_6Symbol_5__reduce__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_6Symbol_4__reduce__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Symbol *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_6Symbol_4__reduce__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Symbol *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1301
 * 
 *     def __reduce__(self):
 *         if type(self) == Symbol:             # <<<<<<<<<<<<<<
 *             return Basic.__reduce__(self)
 *         else:
*/
  __pyx_t_1 = PyObject_RichCompare(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))), ((PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Symbol), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1301, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1301, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (likely(__pyx_t_2)) {

    /* "symengine/lib/symengine_wrapper.pyx":1302
 *     def __reduce__(self):
 *         if type(self) == Symbol:
 *             return Basic.__reduce__(self)             # <<<<<<<<<<<<<<
 *         else:
 *             raise NotImplementedError("pickling for Symbol subclass not implemented")
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_4 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, ((PyObject *)__pyx_v_self)};
      __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_reduce, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1302, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":1301
 * 
 *     def __reduce__(self):
 *         if type(self) == Symbol:             # <<<<<<<<<<<<<<
 *             return Basic.__reduce__(self)
 *         else:
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":1304
 *             return Basic.__reduce__(self)
 *         else:
 *             raise NotImplementedError("pickling for Symbol subclass not implemented")             # <<<<<<<<<<<<<<
 * 
 *     def _sage_(self):
*/
  /*else*/ {
    __pyx_t_3 = NULL;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_pickling_for_Symbol_subclass_not};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_NotImplementedError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1304, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 1304, __pyx_L1_error)
  }

  /* "symengine/lib/symengine_wrapper.pyx":1300
 *         return sympy.Symbol(str(self))
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         if type(self) == Symbol:
 *             return Basic.__reduce__(self)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Symbol.__reduce__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1306
 *             raise NotImplementedError("pickling for Symbol subclass not implemented")
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         import sage.all as sage
 *         return sage.SR.symbol(str(self))
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_6Symbol_7_sage_(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_6Symbol_7_sage_ = {"_sage_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_6Symbol_7_sage_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_6Symbol_7_sage_(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sage_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("_sage_", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("_sage_", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_6Symbol_6_sage_(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Symbol *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_6Symbol_6_sage_(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Symbol *__pyx_v_self) {
  PyObject *__pyx_v_sage = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  size_t __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sage_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1307
 * 
 *     def _sage_(self):
 *         import sage.all as sage             # <<<<<<<<<<<<<<
 *         return sage.SR.symbol(str(self))
 * 
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sage_all, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1307, __pyx_L1_error)
  __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_all);
  Py_DECREF(__pyx_t_2);
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1307, __pyx_L1_error)
  __pyx_t_2 = __pyx_t_3;
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sage = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1308
 *     def _sage_(self):
 *         import sage.all as sage
 *         return sage.SR.symbol(str(self))             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_sage, __pyx_mstate_global->__pyx_n_u_SR); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1308, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __pyx_t_5;
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_6 = __Pyx_PyObject_Unicode(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1308, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_6};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_symbol, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1308, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1306
 *             raise NotImplementedError("pickling for Symbol subclass not implemented")
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         import sage.all as sage
 *         return sage.SR.symbol(str(self))
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Symbol._sage_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sage);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1310
 *         return sage.SR.symbol(str(self))
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def name(self):
 *         return self.__str__()
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_6Symbol_4name_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_6Symbol_4name_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_6Symbol_4name___get__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Symbol *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_6Symbol_4name___get__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Symbol *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1312
 *     @property
 *     def name(self):
 *         return self.__str__()             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_str, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1312, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1310
 *         return sage.SR.symbol(str(self))
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def name(self):
 *         return self.__str__()
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Symbol.name.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1314
 *         return self.__str__()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_Atom(self):
 *         return True
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_6Symbol_7is_Atom_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_6Symbol_7is_Atom_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_6Symbol_7is_Atom___get__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Symbol *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_6Symbol_7is_Atom___get__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Symbol *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1316
 *     @property
 *     def is_Atom(self):
 *         return True             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_True);
  __pyx_r = Py_True;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1314
 *         return self.__str__()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_Atom(self):
 *         return True
*/

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

/* "symengine/lib/symengine_wrapper.pyx":1318
 *         return True
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_Symbol(self):
 *         return True
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_6Symbol_9is_Symbol_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_6Symbol_9is_Symbol_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_6Symbol_9is_Symbol___get__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Symbol *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_6Symbol_9is_Symbol___get__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Symbol *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1320
 *     @property
 *     def is_Symbol(self):
 *         return True             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_True);
  __pyx_r = Py_True;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1318
 *         return True
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_Symbol(self):
 *         return True
*/

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

/* "symengine/lib/symengine_wrapper.pyx":1322
 *         return True
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_symbol(self):
 *         return True
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_6Symbol_9is_symbol_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_6Symbol_9is_symbol_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_6Symbol_9is_symbol___get__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Symbol *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_6Symbol_9is_symbol___get__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Symbol *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1324
 *     @property
 *     def is_symbol(self):
 *         return True             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_True);
  __pyx_r = Py_True;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1322
 *         return True
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_symbol(self):
 *         return True
*/

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

/* "symengine/lib/symengine_wrapper.pyx":1326
 *         return True
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_commutative(self):
 *         return True
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_6Symbol_14is_commutative_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_6Symbol_14is_commutative_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_6Symbol_14is_commutative___get__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Symbol *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_6Symbol_14is_commutative___get__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Symbol *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1328
 *     @property
 *     def is_commutative(self):
 *         return True             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_True);
  __pyx_r = Py_True;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1326
 *         return True
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_commutative(self):
 *         return True
*/

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

/* "symengine/lib/symengine_wrapper.pyx":1330
 *         return True
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def func(self):
 *         return self.__class__
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_6Symbol_4func_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_6Symbol_4func_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_6Symbol_4func___get__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Symbol *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_6Symbol_4func___get__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Symbol *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1332
 *     @property
 *     def func(self):
 *         return self.__class__             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1332, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1330
 *         return True
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def func(self):
 *         return self.__class__
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Symbol.func.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1337
 * cdef class Dummy(Symbol):
 * 
 *     def __init__(Basic self, name=None, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         if name is None:
 *             self.thisptr = symengine.make_rcp_Dummy()
*/

/* Python wrapper */
static int __pyx_pw_9symengine_3lib_17symengine_wrapper_5Dummy_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_9symengine_3lib_17symengine_wrapper_5Dummy_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_name = 0;
  CYTHON_UNUSED PyObject *__pyx_v_args = 0;
  CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_v_args = __Pyx_ArgsSlice_VARARGS(__pyx_args, 1, __pyx_nargs);
  if (unlikely(!__pyx_v_args)) {
    __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
    __Pyx_RefNannyFinishContext();
    return -1;
  }
  __Pyx_GOTREF(__pyx_v_args);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_name,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1337, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        default:
        case  1:
        values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1337, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      const Py_ssize_t used_pos_args = (kwd_pos_args < 1) ? kwd_pos_args : 1;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, __pyx_kwds_len, "__init__", 1) < (0)) __PYX_ERR(0, 1337, __pyx_L3_error)
      if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
    } else {
      switch (__pyx_nargs) {
        default:
        case  1:
        values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1337, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_name = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_XDECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Dummy.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Dummy___init__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Dummy *)__pyx_v_self), __pyx_v_name, __pyx_v_args, __pyx_v_kwargs);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_9symengine_3lib_17symengine_wrapper_5Dummy___init__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Dummy *__pyx_v_self, PyObject *__pyx_v_name, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  std::string __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1338
 * 
 *     def __init__(Basic self, name=None, *args, **kwargs):
 *         if name is None:             # <<<<<<<<<<<<<<
 *             self.thisptr = symengine.make_rcp_Dummy()
 *         else:
*/
  __pyx_t_1 = (__pyx_v_name == Py_None);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":1339
 *     def __init__(Basic self, name=None, *args, **kwargs):
 *         if name is None:
 *             self.thisptr = symengine.make_rcp_Dummy()             # <<<<<<<<<<<<<<
 *         else:
 *             self.thisptr = symengine.make_rcp_Dummy(name.encode("utf-8"))
*/
    __pyx_v_self->__pyx_base.__pyx_base.__pyx_base.thisptr = SymEngine::make_rcp<const SymEngine::Dummy>();

    /* "symengine/lib/symengine_wrapper.pyx":1338
 * 
 *     def __init__(Basic self, name=None, *args, **kwargs):
 *         if name is None:             # <<<<<<<<<<<<<<
 *             self.thisptr = symengine.make_rcp_Dummy()
 *         else:
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":1341
 *             self.thisptr = symengine.make_rcp_Dummy()
 *         else:
 *             self.thisptr = symengine.make_rcp_Dummy(name.encode("utf-8"))             # <<<<<<<<<<<<<<
 * 
 *     def _sympy_(self):
*/
  /*else*/ {
    __pyx_t_3 = __pyx_v_name;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_4 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_utf_8};
      __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_encode, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1341, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __pyx_t_5 = __pyx_convert_string_from_py_6libcpp_6string_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1341, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_self->__pyx_base.__pyx_base.__pyx_base.thisptr = SymEngine::make_rcp<const SymEngine::Dummy>(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5));
  }
  __pyx_L3:;

  /* "symengine/lib/symengine_wrapper.pyx":1337
 * cdef class Dummy(Symbol):
 * 
 *     def __init__(Basic self, name=None, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         if name is None:
 *             self.thisptr = symengine.make_rcp_Dummy()
*/

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Dummy.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1343
 *             self.thisptr = symengine.make_rcp_Dummy(name.encode("utf-8"))
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.Dummy(str(self)[1:])
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Dummy_3_sympy_(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_5Dummy_3_sympy_ = {"_sympy_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_5Dummy_3_sympy_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Dummy_3_sympy_(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sympy_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("_sympy_", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Dummy_2_sympy_(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Dummy *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Dummy_2_sympy_(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Dummy *__pyx_v_self) {
  PyObject *__pyx_v_sympy = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sympy_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1344
 * 
 *     def _sympy_(self):
 *         import sympy             # <<<<<<<<<<<<<<
 *         return sympy.Dummy(str(self)[1:])
 * 
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sympy, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1344, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sympy = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1345
 *     def _sympy_(self):
 *         import sympy
 *         return sympy.Dummy(str(self)[1:])             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __pyx_v_sympy;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_Unicode(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1345, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyUnicode_Substring(__pyx_t_4, 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1345, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_6 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_Dummy, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1345, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1343
 *             self.thisptr = symengine.make_rcp_Dummy(name.encode("utf-8"))
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.Dummy(str(self)[1:])
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Dummy._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sympy);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1347
 *         return sympy.Dummy(str(self)[1:])
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_Dummy(self):
 *         return True
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Dummy_8is_Dummy_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Dummy_8is_Dummy_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Dummy_8is_Dummy___get__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Dummy *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Dummy_8is_Dummy___get__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Dummy *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1349
 *     @property
 *     def is_Dummy(self):
 *         return True             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_True);
  __pyx_r = Py_True;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1347
 *         return sympy.Dummy(str(self)[1:])
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_Dummy(self):
 *         return True
*/

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

/* "symengine/lib/symengine_wrapper.pyx":1351
 *         return True
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def func(self):
 *         return self.__class__
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Dummy_4func_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Dummy_4func_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Dummy_4func___get__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Dummy *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Dummy_4func___get__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Dummy *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1353
 *     @property
 *     def func(self):
 *         return self.__class__             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1353, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1351
 *         return True
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def func(self):
 *         return self.__class__
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Dummy.func.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1356
 * 
 * 
 * def symarray(prefix, shape, **kwargs):             # <<<<<<<<<<<<<<
 *     """ Creates an nd-array of symbols
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_19symarray(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9symengine_3lib_17symengine_wrapper_18symarray, " Creates an nd-array of symbols\n\n    Parameters\n    ----------\n    prefix: str\n    shape: tuple\n    \\*\\*kwargs:\n        Passed on to :class:`Symbol`.\n\n    Notes\n    -----\n    This function requires NumPy.\n\n    ");
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_19symarray = {"symarray", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_19symarray, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9symengine_3lib_17symengine_wrapper_18symarray};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_19symarray(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_prefix = 0;
  PyObject *__pyx_v_shape = 0;
  PyObject *__pyx_v_kwargs = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("symarray (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_prefix,&__pyx_mstate_global->__pyx_n_u_shape,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1356, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1356, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1356, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, __pyx_v_kwargs, values, kwd_pos_args, __pyx_kwds_len, "symarray", 1) < (0)) __PYX_ERR(0, 1356, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("symarray", 1, 2, 2, i); __PYX_ERR(0, 1356, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1356, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1356, __pyx_L3_error)
    }
    __pyx_v_prefix = values[0];
    __pyx_v_shape = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("symarray", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1356, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.symarray", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_18symarray(__pyx_self, __pyx_v_prefix, __pyx_v_shape, __pyx_v_kwargs);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_18symarray(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_prefix, PyObject *__pyx_v_shape, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_v_arr = NULL;
  PyObject *__pyx_v_index = 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;
  size_t __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  PyObject *(*__pyx_t_7)(PyObject *);
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10[3];
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("symarray", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1371
 * 
 *     """
 *     arr = np.empty(shape, dtype=object)             # <<<<<<<<<<<<<<
 *     for index in np.ndindex(shape):
 *         arr[index] = Symbol('%s_%s' % (prefix, '_'.join(map(str, index))), **kwargs)
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1371, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1371, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, __pyx_v_shape};
    __pyx_t_3 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1371, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dtype, __pyx_builtin_object, __pyx_t_3, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 1371, __pyx_L1_error)
    __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_3);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1371, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_arr = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1372
 *     """
 *     arr = np.empty(shape, dtype=object)
 *     for index in np.ndindex(shape):             # <<<<<<<<<<<<<<
 *         arr[index] = Symbol('%s_%s' % (prefix, '_'.join(map(str, index))), **kwargs)
 *     return arr
*/
  __pyx_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1372, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ndindex); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1372, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_shape};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1372, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2);
    __pyx_t_6 = 0;
    __pyx_t_7 = NULL;
  } else {
    __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1372, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1372, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_7)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
          #if !CYTHON_ASSUME_SAFE_SIZE
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1372, __pyx_L1_error)
          #endif
          if (__pyx_t_6 >= __pyx_temp) break;
        }
        __pyx_t_1 = __Pyx_PyList_GetItemRefFast(__pyx_t_2, __pyx_t_6, __Pyx_ReferenceSharing_OwnStrongReference);
        ++__pyx_t_6;
      } else {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
          #if !CYTHON_ASSUME_SAFE_SIZE
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1372, __pyx_L1_error)
          #endif
          if (__pyx_t_6 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_6));
        #else
        __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_6);
        #endif
        ++__pyx_t_6;
      }
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1372, __pyx_L1_error)
    } else {
      __pyx_t_1 = __pyx_t_7(__pyx_t_2);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1372, __pyx_L1_error)
          PyErr_Clear();
        }
        break;
      }
    }
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_XDECREF_SET(__pyx_v_index, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":1373
 *     arr = np.empty(shape, dtype=object)
 *     for index in np.ndindex(shape):
 *         arr[index] = Symbol('%s_%s' % (prefix, '_'.join(map(str, index))), **kwargs)             # <<<<<<<<<<<<<<
 *     return arr
 * 
*/
    __pyx_t_4 = NULL;
    __pyx_t_3 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_prefix), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1373, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1373, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_INCREF((PyObject *)(&PyUnicode_Type));
    __Pyx_GIVEREF((PyObject *)(&PyUnicode_Type));
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)(&PyUnicode_Type))) != (0)) __PYX_ERR(0, 1373, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_index);
    __Pyx_GIVEREF(__pyx_v_index);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_index) != (0)) __PYX_ERR(0, 1373, __pyx_L1_error);
    __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_map, __pyx_t_8, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1373, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = PyUnicode_Join(__pyx_mstate_global->__pyx_n_u__10, __pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1373, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_10[0] = __pyx_t_3;
    __pyx_t_10[1] = __pyx_mstate_global->__pyx_n_u__10;
    __pyx_t_10[2] = __pyx_t_8;
    __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_10, 3, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 1 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8));
    if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1373, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1373, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_9};
      __pyx_t_1 = __Pyx_PyObject_FastCallDict((PyObject*)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Symbol, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_8);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1373, __pyx_L1_error)
      __Pyx_GOTREF((PyObject *)__pyx_t_1);
    }
    if (unlikely((PyObject_SetItem(__pyx_v_arr, __pyx_v_index, ((PyObject *)__pyx_t_1)) < 0))) __PYX_ERR(0, 1373, __pyx_L1_error)
    __Pyx_DECREF((PyObject *)__pyx_t_1); __pyx_t_1 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":1372
 *     """
 *     arr = np.empty(shape, dtype=object)
 *     for index in np.ndindex(shape):             # <<<<<<<<<<<<<<
 *         arr[index] = Symbol('%s_%s' % (prefix, '_'.join(map(str, index))), **kwargs)
 *     return arr
*/
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1374
 *     for index in np.ndindex(shape):
 *         arr[index] = Symbol('%s_%s' % (prefix, '_'.join(map(str, index))), **kwargs)
 *     return arr             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_arr);
  __pyx_r = __pyx_v_arr;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1356
 * 
 * 
 * def symarray(prefix, shape, **kwargs):             # <<<<<<<<<<<<<<
 *     """ Creates an nd-array of symbols
 * 
*/

  /* 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_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.symarray", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_arr);
  __Pyx_XDECREF(__pyx_v_index);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1379
 * cdef class Constant(Expr):
 * 
 *     def __cinit__(self, name = None):             # <<<<<<<<<<<<<<
 *         if name is None:
 *             return
*/

/* Python wrapper */
static int __pyx_pw_9symengine_3lib_17symengine_wrapper_8Constant_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_9symengine_3lib_17symengine_wrapper_8Constant_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_name = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_name,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1379, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1379, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__cinit__", 0) < (0)) __PYX_ERR(0, 1379, __pyx_L3_error)
      if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
    } else {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1379, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_name = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 1379, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Constant.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_8Constant___cinit__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Constant *)__pyx_v_self), __pyx_v_name);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_9symengine_3lib_17symengine_wrapper_8Constant___cinit__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Constant *__pyx_v_self, PyObject *__pyx_v_name) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  std::string __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1380
 * 
 *     def __cinit__(self, name = None):
 *         if name is None:             # <<<<<<<<<<<<<<
 *             return
 *         self.thisptr = symengine.make_rcp_Constant(name.encode("utf-8"))
*/
  __pyx_t_1 = (__pyx_v_name == Py_None);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":1381
 *     def __cinit__(self, name = None):
 *         if name is None:
 *             return             # <<<<<<<<<<<<<<
 *         self.thisptr = symengine.make_rcp_Constant(name.encode("utf-8"))
 * 
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":1380
 * 
 *     def __cinit__(self, name = None):
 *         if name is None:             # <<<<<<<<<<<<<<
 *             return
 *         self.thisptr = symengine.make_rcp_Constant(name.encode("utf-8"))
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":1382
 *         if name is None:
 *             return
 *         self.thisptr = symengine.make_rcp_Constant(name.encode("utf-8"))             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __pyx_t_3 = __pyx_v_name;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_utf_8};
    __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_encode, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1382, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  __pyx_t_5 = __pyx_convert_string_from_py_6libcpp_6string_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1382, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_self->__pyx_base.__pyx_base.thisptr = SymEngine::make_rcp<const SymEngine::Constant>(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5));

  /* "symengine/lib/symengine_wrapper.pyx":1379
 * cdef class Constant(Expr):
 * 
 *     def __cinit__(self, name = None):             # <<<<<<<<<<<<<<
 *         if name is None:
 *             return
*/

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Constant.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1384
 *         self.thisptr = symengine.make_rcp_Constant(name.encode("utf-8"))
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_number(self):
 *         return True
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8Constant_9is_number_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8Constant_9is_number_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_8Constant_9is_number___get__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Constant *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8Constant_9is_number___get__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Constant *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1386
 *     @property
 *     def is_number(self):
 *         return True             # <<<<<<<<<<<<<<
 * 
 *     def _sympy_(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_True);
  __pyx_r = Py_True;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1384
 *         self.thisptr = symengine.make_rcp_Constant(name.encode("utf-8"))
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_number(self):
 *         return True
*/

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

/* "symengine/lib/symengine_wrapper.pyx":1388
 *         return True
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         raise Exception("Unknown Constant")
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8Constant_3_sympy_(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_8Constant_3_sympy_ = {"_sympy_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_8Constant_3_sympy_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8Constant_3_sympy_(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sympy_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("_sympy_", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_8Constant_2_sympy_(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Constant *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8Constant_2_sympy_(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Constant *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sympy_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1389
 * 
 *     def _sympy_(self):
 *         raise Exception("Unknown Constant")             # <<<<<<<<<<<<<<
 * 
 *     def _sage_(self):
*/
  __pyx_t_2 = NULL;
  __pyx_t_3 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Unknown_Constant};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_Exception)), __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1389, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(0, 1389, __pyx_L1_error)

  /* "symengine/lib/symengine_wrapper.pyx":1388
 *         return True
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         raise Exception("Unknown Constant")
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Constant._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1391
 *         raise Exception("Unknown Constant")
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         raise Exception("Unknown Constant")
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8Constant_5_sage_(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_8Constant_5_sage_ = {"_sage_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_8Constant_5_sage_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8Constant_5_sage_(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sage_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("_sage_", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("_sage_", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_8Constant_4_sage_(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Constant *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8Constant_4_sage_(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Constant *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sage_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1392
 * 
 *     def _sage_(self):
 *         raise Exception("Unknown Constant")             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_t_2 = NULL;
  __pyx_t_3 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Unknown_Constant};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_Exception)), __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1392, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(0, 1392, __pyx_L1_error)

  /* "symengine/lib/symengine_wrapper.pyx":1391
 *         raise Exception("Unknown Constant")
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         raise Exception("Unknown Constant")
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Constant._sage_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1397
 * cdef class ImaginaryUnit(Complex):
 * 
 *     def __cinit__(Basic self):             # <<<<<<<<<<<<<<
 *         self.thisptr = symengine.I
 * 
*/

/* Python wrapper */
static int __pyx_pw_9symengine_3lib_17symengine_wrapper_13ImaginaryUnit_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_9symengine_3lib_17symengine_wrapper_13ImaginaryUnit_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, __pyx_nargs); return -1; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return -1;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__cinit__", __pyx_kwds); return -1;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_13ImaginaryUnit___cinit__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_ImaginaryUnit *)__pyx_v_self));

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

static int __pyx_pf_9symengine_3lib_17symengine_wrapper_13ImaginaryUnit___cinit__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_ImaginaryUnit *__pyx_v_self) {
  int __pyx_r;

  /* "symengine/lib/symengine_wrapper.pyx":1398
 * 
 *     def __cinit__(Basic self):
 *         self.thisptr = symengine.I             # <<<<<<<<<<<<<<
 * 
 *     def as_powers_dict(self):
*/
  __pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_base.thisptr = SymEngine::I;

  /* "symengine/lib/symengine_wrapper.pyx":1397
 * cdef class ImaginaryUnit(Complex):
 * 
 *     def __cinit__(Basic self):             # <<<<<<<<<<<<<<
 *         self.thisptr = symengine.I
 * 
*/

  /* function exit code */
  __pyx_r = 0;
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1400
 *         self.thisptr = symengine.I
 * 
 *     def as_powers_dict(self):             # <<<<<<<<<<<<<<
 *         d = collections.defaultdict(int)
 *         d[minus_one] = half
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_13ImaginaryUnit_3as_powers_dict(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_13ImaginaryUnit_3as_powers_dict = {"as_powers_dict", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_13ImaginaryUnit_3as_powers_dict, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_13ImaginaryUnit_3as_powers_dict(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("as_powers_dict (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("as_powers_dict", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("as_powers_dict", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_13ImaginaryUnit_2as_powers_dict(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_ImaginaryUnit *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_13ImaginaryUnit_2as_powers_dict(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_ImaginaryUnit *__pyx_v_self) {
  PyObject *__pyx_v_d = 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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("as_powers_dict", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1401
 * 
 *     def as_powers_dict(self):
 *         d = collections.defaultdict(int)             # <<<<<<<<<<<<<<
 *         d[minus_one] = half
 *         return d
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_collections); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1401, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_defaultdict); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1401, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, ((PyObject *)(&PyLong_Type))};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1401, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_d = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1402
 *     def as_powers_dict(self):
 *         d = collections.defaultdict(int)
 *         d[minus_one] = half             # <<<<<<<<<<<<<<
 *         return d
 * 
*/
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_half); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1402, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_minus_one); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1402, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (unlikely((PyObject_SetItem(__pyx_v_d, __pyx_t_4, __pyx_t_1) < 0))) __PYX_ERR(0, 1402, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1403
 *         d = collections.defaultdict(int)
 *         d[minus_one] = half
 *         return d             # <<<<<<<<<<<<<<
 * 
 * I = ImaginaryUnit()
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_d);
  __pyx_r = __pyx_v_d;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1400
 *         self.thisptr = symengine.I
 * 
 *     def as_powers_dict(self):             # <<<<<<<<<<<<<<
 *         d = collections.defaultdict(int)
 *         d[minus_one] = half
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.ImaginaryUnit.as_powers_dict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_d);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1410
 * cdef class Pi(Constant):
 * 
 *     def __cinit__(Basic self):             # <<<<<<<<<<<<<<
 *         self.thisptr = symengine.pi
 * 
*/

/* Python wrapper */
static int __pyx_pw_9symengine_3lib_17symengine_wrapper_2Pi_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_9symengine_3lib_17symengine_wrapper_2Pi_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, __pyx_nargs); return -1; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return -1;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__cinit__", __pyx_kwds); return -1;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_2Pi___cinit__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Pi *)__pyx_v_self));

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

static int __pyx_pf_9symengine_3lib_17symengine_wrapper_2Pi___cinit__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Pi *__pyx_v_self) {
  int __pyx_r;

  /* "symengine/lib/symengine_wrapper.pyx":1411
 * 
 *     def __cinit__(Basic self):
 *         self.thisptr = symengine.pi             # <<<<<<<<<<<<<<
 * 
 *     def _sympy_(self):
*/
  __pyx_v_self->__pyx_base.__pyx_base.__pyx_base.thisptr = SymEngine::pi;

  /* "symengine/lib/symengine_wrapper.pyx":1410
 * cdef class Pi(Constant):
 * 
 *     def __cinit__(Basic self):             # <<<<<<<<<<<<<<
 *         self.thisptr = symengine.pi
 * 
*/

  /* function exit code */
  __pyx_r = 0;
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1413
 *         self.thisptr = symengine.pi
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.pi
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_2Pi_3_sympy_(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_2Pi_3_sympy_ = {"_sympy_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_2Pi_3_sympy_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_2Pi_3_sympy_(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sympy_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("_sympy_", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_2Pi_2_sympy_(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Pi *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_2Pi_2_sympy_(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Pi *__pyx_v_self) {
  PyObject *__pyx_v_sympy = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sympy_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1414
 * 
 *     def _sympy_(self):
 *         import sympy             # <<<<<<<<<<<<<<
 *         return sympy.pi
 * 
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sympy, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1414, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sympy = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1415
 *     def _sympy_(self):
 *         import sympy
 *         return sympy.pi             # <<<<<<<<<<<<<<
 * 
 *     def _sage_(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_pi); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1415, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1413
 *         self.thisptr = symengine.pi
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.pi
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Pi._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sympy);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1417
 *         return sympy.pi
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         import sage.all as sage
 *         return sage.pi
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_2Pi_5_sage_(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_2Pi_5_sage_ = {"_sage_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_2Pi_5_sage_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_2Pi_5_sage_(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sage_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("_sage_", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("_sage_", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_2Pi_4_sage_(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Pi *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_2Pi_4_sage_(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Pi *__pyx_v_self) {
  PyObject *__pyx_v_sage = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sage_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1418
 * 
 *     def _sage_(self):
 *         import sage.all as sage             # <<<<<<<<<<<<<<
 *         return sage.pi
 * 
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sage_all, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1418, __pyx_L1_error)
  __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_all);
  Py_DECREF(__pyx_t_2);
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1418, __pyx_L1_error)
  __pyx_t_2 = __pyx_t_3;
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sage = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1419
 *     def _sage_(self):
 *         import sage.all as sage
 *         return sage.pi             # <<<<<<<<<<<<<<
 * 
 * pi = Pi()
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sage, __pyx_mstate_global->__pyx_n_u_pi); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1419, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1417
 *         return sympy.pi
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         import sage.all as sage
 *         return sage.pi
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Pi._sage_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sage);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1426
 * cdef class Exp1(Constant):
 * 
 *     def __cinit__(Basic self):             # <<<<<<<<<<<<<<
 *         self.thisptr = symengine.E
 * 
*/

/* Python wrapper */
static int __pyx_pw_9symengine_3lib_17symengine_wrapper_4Exp1_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_9symengine_3lib_17symengine_wrapper_4Exp1_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, __pyx_nargs); return -1; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return -1;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__cinit__", __pyx_kwds); return -1;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_4Exp1___cinit__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Exp1 *)__pyx_v_self));

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

static int __pyx_pf_9symengine_3lib_17symengine_wrapper_4Exp1___cinit__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Exp1 *__pyx_v_self) {
  int __pyx_r;

  /* "symengine/lib/symengine_wrapper.pyx":1427
 * 
 *     def __cinit__(Basic self):
 *         self.thisptr = symengine.E             # <<<<<<<<<<<<<<
 * 
 *     def _sympy_(self):
*/
  __pyx_v_self->__pyx_base.__pyx_base.__pyx_base.thisptr = SymEngine::E;

  /* "symengine/lib/symengine_wrapper.pyx":1426
 * cdef class Exp1(Constant):
 * 
 *     def __cinit__(Basic self):             # <<<<<<<<<<<<<<
 *         self.thisptr = symengine.E
 * 
*/

  /* function exit code */
  __pyx_r = 0;
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1429
 *         self.thisptr = symengine.E
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.E
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_4Exp1_3_sympy_(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_4Exp1_3_sympy_ = {"_sympy_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_4Exp1_3_sympy_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_4Exp1_3_sympy_(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sympy_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("_sympy_", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_4Exp1_2_sympy_(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Exp1 *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_4Exp1_2_sympy_(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Exp1 *__pyx_v_self) {
  PyObject *__pyx_v_sympy = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sympy_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1430
 * 
 *     def _sympy_(self):
 *         import sympy             # <<<<<<<<<<<<<<
 *         return sympy.E
 * 
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sympy, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1430, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sympy = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1431
 *     def _sympy_(self):
 *         import sympy
 *         return sympy.E             # <<<<<<<<<<<<<<
 * 
 *     def _sage_(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_E); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1431, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1429
 *         self.thisptr = symengine.E
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.E
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Exp1._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sympy);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1433
 *         return sympy.E
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         import sage.all as sage
 *         return sage.e
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_4Exp1_5_sage_(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_4Exp1_5_sage_ = {"_sage_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_4Exp1_5_sage_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_4Exp1_5_sage_(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sage_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("_sage_", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("_sage_", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_4Exp1_4_sage_(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Exp1 *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_4Exp1_4_sage_(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Exp1 *__pyx_v_self) {
  PyObject *__pyx_v_sage = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sage_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1434
 * 
 *     def _sage_(self):
 *         import sage.all as sage             # <<<<<<<<<<<<<<
 *         return sage.e
 * 
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sage_all, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1434, __pyx_L1_error)
  __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_all);
  Py_DECREF(__pyx_t_2);
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1434, __pyx_L1_error)
  __pyx_t_2 = __pyx_t_3;
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sage = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1435
 *     def _sage_(self):
 *         import sage.all as sage
 *         return sage.e             # <<<<<<<<<<<<<<
 * 
 * E = Exp1()
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sage, __pyx_mstate_global->__pyx_n_u_e); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1435, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1433
 *         return sympy.E
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         import sage.all as sage
 *         return sage.e
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Exp1._sage_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sage);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1442
 * cdef class GoldenRatio(Constant):
 * 
 *     def __cinit__(Basic self):             # <<<<<<<<<<<<<<
 *         self.thisptr = symengine.GoldenRatio
 * 
*/

/* Python wrapper */
static int __pyx_pw_9symengine_3lib_17symengine_wrapper_11GoldenRatio_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_9symengine_3lib_17symengine_wrapper_11GoldenRatio_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, __pyx_nargs); return -1; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return -1;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__cinit__", __pyx_kwds); return -1;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_11GoldenRatio___cinit__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_GoldenRatio *)__pyx_v_self));

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

static int __pyx_pf_9symengine_3lib_17symengine_wrapper_11GoldenRatio___cinit__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_GoldenRatio *__pyx_v_self) {
  int __pyx_r;

  /* "symengine/lib/symengine_wrapper.pyx":1443
 * 
 *     def __cinit__(Basic self):
 *         self.thisptr = symengine.GoldenRatio             # <<<<<<<<<<<<<<
 * 
 *     def _sympy_(self):
*/
  __pyx_v_self->__pyx_base.__pyx_base.__pyx_base.thisptr = SymEngine::GoldenRatio;

  /* "symengine/lib/symengine_wrapper.pyx":1442
 * cdef class GoldenRatio(Constant):
 * 
 *     def __cinit__(Basic self):             # <<<<<<<<<<<<<<
 *         self.thisptr = symengine.GoldenRatio
 * 
*/

  /* function exit code */
  __pyx_r = 0;
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1445
 *         self.thisptr = symengine.GoldenRatio
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.GoldenRatio
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_11GoldenRatio_3_sympy_(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_11GoldenRatio_3_sympy_ = {"_sympy_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_11GoldenRatio_3_sympy_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_11GoldenRatio_3_sympy_(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sympy_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("_sympy_", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_11GoldenRatio_2_sympy_(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_GoldenRatio *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_11GoldenRatio_2_sympy_(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_GoldenRatio *__pyx_v_self) {
  PyObject *__pyx_v_sympy = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sympy_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1446
 * 
 *     def _sympy_(self):
 *         import sympy             # <<<<<<<<<<<<<<
 *         return sympy.GoldenRatio
 * 
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sympy, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1446, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sympy = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1447
 *     def _sympy_(self):
 *         import sympy
 *         return sympy.GoldenRatio             # <<<<<<<<<<<<<<
 * 
 *     def _sage_(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_GoldenRatio); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1447, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1445
 *         self.thisptr = symengine.GoldenRatio
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.GoldenRatio
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.GoldenRatio._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sympy);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1449
 *         return sympy.GoldenRatio
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         import sage.all as sage
 *         return sage.golden_ratio
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_11GoldenRatio_5_sage_(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_11GoldenRatio_5_sage_ = {"_sage_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_11GoldenRatio_5_sage_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_11GoldenRatio_5_sage_(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sage_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("_sage_", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("_sage_", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_11GoldenRatio_4_sage_(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_GoldenRatio *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_11GoldenRatio_4_sage_(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_GoldenRatio *__pyx_v_self) {
  PyObject *__pyx_v_sage = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sage_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1450
 * 
 *     def _sage_(self):
 *         import sage.all as sage             # <<<<<<<<<<<<<<
 *         return sage.golden_ratio
 * 
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sage_all, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1450, __pyx_L1_error)
  __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_all);
  Py_DECREF(__pyx_t_2);
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1450, __pyx_L1_error)
  __pyx_t_2 = __pyx_t_3;
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sage = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1451
 *     def _sage_(self):
 *         import sage.all as sage
 *         return sage.golden_ratio             # <<<<<<<<<<<<<<
 * 
 * golden_ratio = GoldenRatio()
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sage, __pyx_mstate_global->__pyx_n_u_golden_ratio); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1451, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1449
 *         return sympy.GoldenRatio
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         import sage.all as sage
 *         return sage.golden_ratio
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.GoldenRatio._sage_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sage);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1458
 * cdef class Catalan(Constant):
 * 
 *     def __cinit__(Basic self):             # <<<<<<<<<<<<<<
 *         self.thisptr = symengine.Catalan
 * 
*/

/* Python wrapper */
static int __pyx_pw_9symengine_3lib_17symengine_wrapper_7Catalan_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_9symengine_3lib_17symengine_wrapper_7Catalan_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, __pyx_nargs); return -1; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return -1;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__cinit__", __pyx_kwds); return -1;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_7Catalan___cinit__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Catalan *)__pyx_v_self));

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

static int __pyx_pf_9symengine_3lib_17symengine_wrapper_7Catalan___cinit__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Catalan *__pyx_v_self) {
  int __pyx_r;

  /* "symengine/lib/symengine_wrapper.pyx":1459
 * 
 *     def __cinit__(Basic self):
 *         self.thisptr = symengine.Catalan             # <<<<<<<<<<<<<<
 * 
 *     def _sympy_(self):
*/
  __pyx_v_self->__pyx_base.__pyx_base.__pyx_base.thisptr = SymEngine::Catalan;

  /* "symengine/lib/symengine_wrapper.pyx":1458
 * cdef class Catalan(Constant):
 * 
 *     def __cinit__(Basic self):             # <<<<<<<<<<<<<<
 *         self.thisptr = symengine.Catalan
 * 
*/

  /* function exit code */
  __pyx_r = 0;
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1461
 *         self.thisptr = symengine.Catalan
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.Catalan
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_7Catalan_3_sympy_(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_7Catalan_3_sympy_ = {"_sympy_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_7Catalan_3_sympy_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_7Catalan_3_sympy_(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sympy_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("_sympy_", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_7Catalan_2_sympy_(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Catalan *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_7Catalan_2_sympy_(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Catalan *__pyx_v_self) {
  PyObject *__pyx_v_sympy = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sympy_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1462
 * 
 *     def _sympy_(self):
 *         import sympy             # <<<<<<<<<<<<<<
 *         return sympy.Catalan
 * 
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sympy, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1462, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sympy = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1463
 *     def _sympy_(self):
 *         import sympy
 *         return sympy.Catalan             # <<<<<<<<<<<<<<
 * 
 *     def _sage_(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_Catalan); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1463, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1461
 *         self.thisptr = symengine.Catalan
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.Catalan
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Catalan._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sympy);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1465
 *         return sympy.Catalan
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         import sage.all as sage
 *         return sage.catalan
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_7Catalan_5_sage_(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_7Catalan_5_sage_ = {"_sage_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_7Catalan_5_sage_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_7Catalan_5_sage_(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sage_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("_sage_", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("_sage_", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_7Catalan_4_sage_(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Catalan *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_7Catalan_4_sage_(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Catalan *__pyx_v_self) {
  PyObject *__pyx_v_sage = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sage_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1466
 * 
 *     def _sage_(self):
 *         import sage.all as sage             # <<<<<<<<<<<<<<
 *         return sage.catalan
 * 
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sage_all, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1466, __pyx_L1_error)
  __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_all);
  Py_DECREF(__pyx_t_2);
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1466, __pyx_L1_error)
  __pyx_t_2 = __pyx_t_3;
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sage = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1467
 *     def _sage_(self):
 *         import sage.all as sage
 *         return sage.catalan             # <<<<<<<<<<<<<<
 * 
 * catalan = Catalan()
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sage, __pyx_mstate_global->__pyx_n_u_catalan); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1467, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1465
 *         return sympy.Catalan
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         import sage.all as sage
 *         return sage.catalan
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Catalan._sage_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sage);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1474
 * cdef class EulerGamma(Constant):
 * 
 *     def __cinit__(Basic self):             # <<<<<<<<<<<<<<
 *         self.thisptr = symengine.EulerGamma
 * 
*/

/* Python wrapper */
static int __pyx_pw_9symengine_3lib_17symengine_wrapper_10EulerGamma_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_9symengine_3lib_17symengine_wrapper_10EulerGamma_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, __pyx_nargs); return -1; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return -1;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__cinit__", __pyx_kwds); return -1;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_10EulerGamma___cinit__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_EulerGamma *)__pyx_v_self));

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

static int __pyx_pf_9symengine_3lib_17symengine_wrapper_10EulerGamma___cinit__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_EulerGamma *__pyx_v_self) {
  int __pyx_r;

  /* "symengine/lib/symengine_wrapper.pyx":1475
 * 
 *     def __cinit__(Basic self):
 *         self.thisptr = symengine.EulerGamma             # <<<<<<<<<<<<<<
 * 
 *     def _sympy_(self):
*/
  __pyx_v_self->__pyx_base.__pyx_base.__pyx_base.thisptr = SymEngine::EulerGamma;

  /* "symengine/lib/symengine_wrapper.pyx":1474
 * cdef class EulerGamma(Constant):
 * 
 *     def __cinit__(Basic self):             # <<<<<<<<<<<<<<
 *         self.thisptr = symengine.EulerGamma
 * 
*/

  /* function exit code */
  __pyx_r = 0;
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1477
 *         self.thisptr = symengine.EulerGamma
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.EulerGamma
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10EulerGamma_3_sympy_(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_10EulerGamma_3_sympy_ = {"_sympy_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_10EulerGamma_3_sympy_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10EulerGamma_3_sympy_(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sympy_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("_sympy_", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_10EulerGamma_2_sympy_(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_EulerGamma *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10EulerGamma_2_sympy_(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_EulerGamma *__pyx_v_self) {
  PyObject *__pyx_v_sympy = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sympy_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1478
 * 
 *     def _sympy_(self):
 *         import sympy             # <<<<<<<<<<<<<<
 *         return sympy.EulerGamma
 * 
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sympy, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1478, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sympy = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1479
 *     def _sympy_(self):
 *         import sympy
 *         return sympy.EulerGamma             # <<<<<<<<<<<<<<
 * 
 *     def _sage_(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_EulerGamma); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1479, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1477
 *         self.thisptr = symengine.EulerGamma
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.EulerGamma
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.EulerGamma._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sympy);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1481
 *         return sympy.EulerGamma
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         import sage.all as sage
 *         return sage.euler_gamma
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10EulerGamma_5_sage_(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_10EulerGamma_5_sage_ = {"_sage_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_10EulerGamma_5_sage_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10EulerGamma_5_sage_(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sage_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("_sage_", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("_sage_", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_10EulerGamma_4_sage_(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_EulerGamma *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10EulerGamma_4_sage_(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_EulerGamma *__pyx_v_self) {
  PyObject *__pyx_v_sage = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sage_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1482
 * 
 *     def _sage_(self):
 *         import sage.all as sage             # <<<<<<<<<<<<<<
 *         return sage.euler_gamma
 * 
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sage_all, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1482, __pyx_L1_error)
  __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_all);
  Py_DECREF(__pyx_t_2);
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1482, __pyx_L1_error)
  __pyx_t_2 = __pyx_t_3;
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sage = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1483
 *     def _sage_(self):
 *         import sage.all as sage
 *         return sage.euler_gamma             # <<<<<<<<<<<<<<
 * 
 * eulergamma = EulerGamma()
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sage, __pyx_mstate_global->__pyx_n_u_euler_gamma); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1483, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1481
 *         return sympy.EulerGamma
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         import sage.all as sage
 *         return sage.euler_gamma
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.EulerGamma._sage_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sage);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1490
 * cdef class Boolean(Expr):
 * 
 *     def logical_not(self):             # <<<<<<<<<<<<<<
 *         return c2py(<rcp_const_basic>(deref(symengine.rcp_static_cast_Boolean(self.thisptr)).logical_not()))
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_7Boolean_1logical_not(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_7Boolean_1logical_not = {"logical_not", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_7Boolean_1logical_not, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_7Boolean_1logical_not(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("logical_not (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("logical_not", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("logical_not", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_7Boolean_logical_not(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Boolean *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_7Boolean_logical_not(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Boolean *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  SymEngine::RCP<SymEngine::Boolean const >  __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("logical_not", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1491
 * 
 *     def logical_not(self):
 *         return c2py(<rcp_const_basic>(deref(symengine.rcp_static_cast_Boolean(self.thisptr)).logical_not()))             # <<<<<<<<<<<<<<
 * 
 *     def __bool__(self):
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_1 = (*SymEngine::rcp_static_cast<const SymEngine::Boolean>(__pyx_v_self->__pyx_base.__pyx_base.thisptr)).logical_not();
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 1491, __pyx_L1_error)
  }
  __pyx_t_2 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1491, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1490
 * cdef class Boolean(Expr):
 * 
 *     def logical_not(self):             # <<<<<<<<<<<<<<
 *         return c2py(<rcp_const_basic>(deref(symengine.rcp_static_cast_Boolean(self.thisptr)).logical_not()))
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Boolean.logical_not", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1493
 *         return c2py(<rcp_const_basic>(deref(symengine.rcp_static_cast_Boolean(self.thisptr)).logical_not()))
 * 
 *     def __bool__(self):             # <<<<<<<<<<<<<<
 *         raise TypeError("cannot determine truth value of Boolean")
 * 
*/

/* Python wrapper */
static int __pyx_pw_9symengine_3lib_17symengine_wrapper_7Boolean_3__bool__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_9symengine_3lib_17symengine_wrapper_7Boolean_3__bool__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__bool__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_7Boolean_2__bool__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Boolean *)__pyx_v_self));

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

static int __pyx_pf_9symengine_3lib_17symengine_wrapper_7Boolean_2__bool__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Boolean *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__bool__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1494
 * 
 *     def __bool__(self):
 *         raise TypeError("cannot determine truth value of Boolean")             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_t_2 = NULL;
  __pyx_t_3 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_cannot_determine_truth_value_of};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1494, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(0, 1494, __pyx_L1_error)

  /* "symengine/lib/symengine_wrapper.pyx":1493
 *         return c2py(<rcp_const_basic>(deref(symengine.rcp_static_cast_Boolean(self.thisptr)).logical_not()))
 * 
 *     def __bool__(self):             # <<<<<<<<<<<<<<
 *         raise TypeError("cannot determine truth value of Boolean")
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Boolean.__bool__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1499
 * cdef class BooleanAtom(Boolean):
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_Boolean(self):
 *         return True
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_11BooleanAtom_10is_Boolean_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_11BooleanAtom_10is_Boolean_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_11BooleanAtom_10is_Boolean___get__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_BooleanAtom *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_11BooleanAtom_10is_Boolean___get__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_BooleanAtom *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1501
 *     @property
 *     def is_Boolean(self):
 *         return True             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_True);
  __pyx_r = Py_True;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1499
 * cdef class BooleanAtom(Boolean):
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_Boolean(self):
 *         return True
*/

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

/* "symengine/lib/symengine_wrapper.pyx":1503
 *         return True
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_Atom(self):
 *         return True
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_11BooleanAtom_7is_Atom_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_11BooleanAtom_7is_Atom_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_11BooleanAtom_7is_Atom___get__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_BooleanAtom *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_11BooleanAtom_7is_Atom___get__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_BooleanAtom *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1505
 *     @property
 *     def is_Atom(self):
 *         return True             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_True);
  __pyx_r = Py_True;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1503
 *         return True
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_Atom(self):
 *         return True
*/

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

/* "symengine/lib/symengine_wrapper.pyx":1510
 * cdef class BooleanTrue(BooleanAtom):
 * 
 *     def __cinit__(Basic self):             # <<<<<<<<<<<<<<
 *         self.thisptr = symengine.boolTrue
 * 
*/

/* Python wrapper */
static int __pyx_pw_9symengine_3lib_17symengine_wrapper_11BooleanTrue_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_9symengine_3lib_17symengine_wrapper_11BooleanTrue_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, __pyx_nargs); return -1; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return -1;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__cinit__", __pyx_kwds); return -1;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_11BooleanTrue___cinit__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_BooleanTrue *)__pyx_v_self));

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

static int __pyx_pf_9symengine_3lib_17symengine_wrapper_11BooleanTrue___cinit__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_BooleanTrue *__pyx_v_self) {
  int __pyx_r;

  /* "symengine/lib/symengine_wrapper.pyx":1511
 * 
 *     def __cinit__(Basic self):
 *         self.thisptr = symengine.boolTrue             # <<<<<<<<<<<<<<
 * 
 *     def _sympy_(self):
*/
  __pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base.thisptr = SymEngine::boolTrue;

  /* "symengine/lib/symengine_wrapper.pyx":1510
 * cdef class BooleanTrue(BooleanAtom):
 * 
 *     def __cinit__(Basic self):             # <<<<<<<<<<<<<<
 *         self.thisptr = symengine.boolTrue
 * 
*/

  /* function exit code */
  __pyx_r = 0;
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1513
 *         self.thisptr = symengine.boolTrue
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.S.true
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_11BooleanTrue_3_sympy_(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_11BooleanTrue_3_sympy_ = {"_sympy_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_11BooleanTrue_3_sympy_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_11BooleanTrue_3_sympy_(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sympy_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("_sympy_", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_11BooleanTrue_2_sympy_(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_BooleanTrue *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_11BooleanTrue_2_sympy_(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_BooleanTrue *__pyx_v_self) {
  PyObject *__pyx_v_sympy = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sympy_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1514
 * 
 *     def _sympy_(self):
 *         import sympy             # <<<<<<<<<<<<<<
 *         return sympy.S.true
 * 
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sympy, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1514, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sympy = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1515
 *     def _sympy_(self):
 *         import sympy
 *         return sympy.S.true             # <<<<<<<<<<<<<<
 * 
 *     def _sage_(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_S); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1515, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_true); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1515, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1513
 *         self.thisptr = symengine.boolTrue
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.S.true
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.BooleanTrue._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sympy);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1517
 *         return sympy.S.true
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         return True
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_11BooleanTrue_5_sage_(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_11BooleanTrue_5_sage_ = {"_sage_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_11BooleanTrue_5_sage_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_11BooleanTrue_5_sage_(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sage_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("_sage_", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("_sage_", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_11BooleanTrue_4_sage_(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_BooleanTrue *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_11BooleanTrue_4_sage_(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_BooleanTrue *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sage_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1518
 * 
 *     def _sage_(self):
 *         return True             # <<<<<<<<<<<<<<
 * 
 *     def __bool__(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_True);
  __pyx_r = Py_True;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1517
 *         return sympy.S.true
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         return True
 * 
*/

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

/* "symengine/lib/symengine_wrapper.pyx":1520
 *         return True
 * 
 *     def __bool__(self):             # <<<<<<<<<<<<<<
 *         return True
 * 
*/

/* Python wrapper */
static int __pyx_pw_9symengine_3lib_17symengine_wrapper_11BooleanTrue_7__bool__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_9symengine_3lib_17symengine_wrapper_11BooleanTrue_7__bool__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__bool__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_11BooleanTrue_6__bool__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_BooleanTrue *)__pyx_v_self));

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

static int __pyx_pf_9symengine_3lib_17symengine_wrapper_11BooleanTrue_6__bool__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_BooleanTrue *__pyx_v_self) {
  int __pyx_r;

  /* "symengine/lib/symengine_wrapper.pyx":1521
 * 
 *     def __bool__(self):
 *         return True             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_r = 1;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1520
 *         return True
 * 
 *     def __bool__(self):             # <<<<<<<<<<<<<<
 *         return True
 * 
*/

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

/* "symengine/lib/symengine_wrapper.pyx":1529
 * cdef class BooleanFalse(BooleanAtom):
 * 
 *     def __cinit__(Basic self):             # <<<<<<<<<<<<<<
 *         self.thisptr = symengine.boolFalse
 * 
*/

/* Python wrapper */
static int __pyx_pw_9symengine_3lib_17symengine_wrapper_12BooleanFalse_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_9symengine_3lib_17symengine_wrapper_12BooleanFalse_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, __pyx_nargs); return -1; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return -1;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__cinit__", __pyx_kwds); return -1;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_12BooleanFalse___cinit__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_BooleanFalse *)__pyx_v_self));

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

static int __pyx_pf_9symengine_3lib_17symengine_wrapper_12BooleanFalse___cinit__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_BooleanFalse *__pyx_v_self) {
  int __pyx_r;

  /* "symengine/lib/symengine_wrapper.pyx":1530
 * 
 *     def __cinit__(Basic self):
 *         self.thisptr = symengine.boolFalse             # <<<<<<<<<<<<<<
 * 
 *     def _sympy_(self):
*/
  __pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base.thisptr = SymEngine::boolFalse;

  /* "symengine/lib/symengine_wrapper.pyx":1529
 * cdef class BooleanFalse(BooleanAtom):
 * 
 *     def __cinit__(Basic self):             # <<<<<<<<<<<<<<
 *         self.thisptr = symengine.boolFalse
 * 
*/

  /* function exit code */
  __pyx_r = 0;
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1532
 *         self.thisptr = symengine.boolFalse
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.S.false
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_12BooleanFalse_3_sympy_(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_12BooleanFalse_3_sympy_ = {"_sympy_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_12BooleanFalse_3_sympy_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_12BooleanFalse_3_sympy_(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sympy_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("_sympy_", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_12BooleanFalse_2_sympy_(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_BooleanFalse *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_12BooleanFalse_2_sympy_(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_BooleanFalse *__pyx_v_self) {
  PyObject *__pyx_v_sympy = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sympy_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1533
 * 
 *     def _sympy_(self):
 *         import sympy             # <<<<<<<<<<<<<<
 *         return sympy.S.false
 * 
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sympy, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1533, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sympy = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1534
 *     def _sympy_(self):
 *         import sympy
 *         return sympy.S.false             # <<<<<<<<<<<<<<
 * 
 *     def _sage_(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_S); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1534, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_false); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1534, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1532
 *         self.thisptr = symengine.boolFalse
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.S.false
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.BooleanFalse._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sympy);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1536
 *         return sympy.S.false
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         return False
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_12BooleanFalse_5_sage_(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_12BooleanFalse_5_sage_ = {"_sage_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_12BooleanFalse_5_sage_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_12BooleanFalse_5_sage_(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sage_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("_sage_", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("_sage_", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_12BooleanFalse_4_sage_(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_BooleanFalse *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_12BooleanFalse_4_sage_(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_BooleanFalse *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sage_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1537
 * 
 *     def _sage_(self):
 *         return False             # <<<<<<<<<<<<<<
 * 
 *     def __nonzero__(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_False);
  __pyx_r = Py_False;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1536
 *         return sympy.S.false
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         return False
 * 
*/

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

/* "symengine/lib/symengine_wrapper.pyx":1539
 *         return False
 * 
 *     def __nonzero__(self):             # <<<<<<<<<<<<<<
 *         return False
 * 
*/

/* Python wrapper */
static int __pyx_pw_9symengine_3lib_17symengine_wrapper_12BooleanFalse_7__nonzero__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_9symengine_3lib_17symengine_wrapper_12BooleanFalse_7__nonzero__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__nonzero__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_12BooleanFalse_6__nonzero__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_BooleanFalse *)__pyx_v_self));

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

static int __pyx_pf_9symengine_3lib_17symengine_wrapper_12BooleanFalse_6__nonzero__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_BooleanFalse *__pyx_v_self) {
  int __pyx_r;

  /* "symengine/lib/symengine_wrapper.pyx":1540
 * 
 *     def __nonzero__(self):
 *         return False             # <<<<<<<<<<<<<<
 * 
 *     def __bool__(self):
*/
  __pyx_r = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1539
 *         return False
 * 
 *     def __nonzero__(self):             # <<<<<<<<<<<<<<
 *         return False
 * 
*/

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

/* "symengine/lib/symengine_wrapper.pyx":1542
 *         return False
 * 
 *     def __bool__(self):             # <<<<<<<<<<<<<<
 *         return False
 * 
*/

/* Python wrapper */
static int __pyx_pw_9symengine_3lib_17symengine_wrapper_12BooleanFalse_9__bool__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_9symengine_3lib_17symengine_wrapper_12BooleanFalse_9__bool__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__bool__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_12BooleanFalse_8__bool__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_BooleanFalse *)__pyx_v_self));

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

static int __pyx_pf_9symengine_3lib_17symengine_wrapper_12BooleanFalse_8__bool__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_BooleanFalse *__pyx_v_self) {
  int __pyx_r;

  /* "symengine/lib/symengine_wrapper.pyx":1543
 * 
 *     def __bool__(self):
 *         return False             # <<<<<<<<<<<<<<
 * 
 * false = BooleanFalse()
*/
  __pyx_r = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1542
 *         return False
 * 
 *     def __bool__(self):             # <<<<<<<<<<<<<<
 *         return False
 * 
*/

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

/* "symengine/lib/symengine_wrapper.pyx":1550
 * class And(Boolean):
 * 
 *     def __new__(cls, *args):             # <<<<<<<<<<<<<<
 *         return logical_and(*args)
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3And_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_3And_1__new__ = {"__new__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_3And_1__new__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3And_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_args = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  __pyx_v_args = __Pyx_ArgsSlice_FASTCALL(__pyx_args, 1, __pyx_nargs);
  if (unlikely(!__pyx_v_args)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_v_args);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1550, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        default:
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1550, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      const Py_ssize_t used_pos_args = (kwd_pos_args < 1) ? kwd_pos_args : 1;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, used_pos_args, __pyx_kwds_len, "__new__", 0) < (0)) __PYX_ERR(0, 1550, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__new__", 0, 1, 1, i); __PYX_ERR(0, 1550, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs < 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1550, __pyx_L3_error)
    }
    __pyx_v_cls = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 0, 1, 1, __pyx_nargs); __PYX_ERR(0, 1550, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.And.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_3And___new__(__pyx_self, __pyx_v_cls, __pyx_v_args);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_args);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3And___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_args) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__new__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1551
 * 
 *     def __new__(cls, *args):
 *         return logical_and(*args)             # <<<<<<<<<<<<<<
 * 
 *     def _sympy_(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_logical_and); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1551, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1551, __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;

  /* "symengine/lib/symengine_wrapper.pyx":1550
 * class And(Boolean):
 * 
 *     def __new__(cls, *args):             # <<<<<<<<<<<<<<
 *         return logical_and(*args)
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.And.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1553
 *         return logical_and(*args)
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         s = self.args_as_sympy()
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3And_3_sympy_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_3And_3_sympy_ = {"_sympy_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_3And_3_sympy_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3And_3_sympy_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sympy_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1553, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1553, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_sympy_", 0) < (0)) __PYX_ERR(0, 1553, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 1, 1, i); __PYX_ERR(0, 1553, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1553, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1553, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.And._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_3And_2_sympy_(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3And_2_sympy_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_sympy = 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;
  size_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sympy_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1554
 * 
 *     def _sympy_(self):
 *         import sympy             # <<<<<<<<<<<<<<
 *         s = self.args_as_sympy()
 *         return sympy.And(*s)
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sympy, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1554, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sympy = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1555
 *     def _sympy_(self):
 *         import sympy
 *         s = self.args_as_sympy()             # <<<<<<<<<<<<<<
 *         return sympy.And(*s)
 * 
*/
  __pyx_t_3 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_args_as_sympy, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1555, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_s = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1556
 *         import sympy
 *         s = self.args_as_sympy()
 *         return sympy.And(*s)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_And); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1556, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PySequence_Tuple(__pyx_v_s); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1556, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1556, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1553
 *         return logical_and(*args)
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         s = self.args_as_sympy()
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.And._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sympy);
  __Pyx_XDECREF(__pyx_v_s);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1561
 * class Or(Boolean):
 * 
 *     def __new__(cls, *args):             # <<<<<<<<<<<<<<
 *         return logical_or(*args)
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_2Or_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_2Or_1__new__ = {"__new__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_2Or_1__new__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_2Or_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_args = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  __pyx_v_args = __Pyx_ArgsSlice_FASTCALL(__pyx_args, 1, __pyx_nargs);
  if (unlikely(!__pyx_v_args)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_v_args);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1561, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        default:
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1561, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      const Py_ssize_t used_pos_args = (kwd_pos_args < 1) ? kwd_pos_args : 1;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, used_pos_args, __pyx_kwds_len, "__new__", 0) < (0)) __PYX_ERR(0, 1561, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__new__", 0, 1, 1, i); __PYX_ERR(0, 1561, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs < 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1561, __pyx_L3_error)
    }
    __pyx_v_cls = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 0, 1, 1, __pyx_nargs); __PYX_ERR(0, 1561, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Or.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_2Or___new__(__pyx_self, __pyx_v_cls, __pyx_v_args);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_args);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_2Or___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_args) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__new__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1562
 * 
 *     def __new__(cls, *args):
 *         return logical_or(*args)             # <<<<<<<<<<<<<<
 * 
 *     def _sympy_(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_logical_or); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1562, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1562, __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;

  /* "symengine/lib/symengine_wrapper.pyx":1561
 * class Or(Boolean):
 * 
 *     def __new__(cls, *args):             # <<<<<<<<<<<<<<
 *         return logical_or(*args)
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Or.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1564
 *         return logical_or(*args)
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         s = self.args_as_sympy()
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_2Or_3_sympy_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_2Or_3_sympy_ = {"_sympy_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_2Or_3_sympy_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_2Or_3_sympy_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sympy_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1564, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1564, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_sympy_", 0) < (0)) __PYX_ERR(0, 1564, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 1, 1, i); __PYX_ERR(0, 1564, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1564, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1564, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Or._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_2Or_2_sympy_(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_2Or_2_sympy_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_sympy = 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;
  size_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sympy_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1565
 * 
 *     def _sympy_(self):
 *         import sympy             # <<<<<<<<<<<<<<
 *         s = self.args_as_sympy()
 *         return sympy.Or(*s)
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sympy, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1565, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sympy = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1566
 *     def _sympy_(self):
 *         import sympy
 *         s = self.args_as_sympy()             # <<<<<<<<<<<<<<
 *         return sympy.Or(*s)
 * 
*/
  __pyx_t_3 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_args_as_sympy, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1566, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_s = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1567
 *         import sympy
 *         s = self.args_as_sympy()
 *         return sympy.Or(*s)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_Or); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1567, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PySequence_Tuple(__pyx_v_s); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1567, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1567, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1564
 *         return logical_or(*args)
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         s = self.args_as_sympy()
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Or._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sympy);
  __Pyx_XDECREF(__pyx_v_s);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1572
 * class Not(Boolean):
 * 
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         return logical_not(x)
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3Not_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_3Not_1__new__ = {"__new__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_3Not_1__new__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3Not_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_x = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,&__pyx_mstate_global->__pyx_n_u_x,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1572, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1572, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1572, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__new__", 0) < (0)) __PYX_ERR(0, 1572, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__new__", 1, 2, 2, i); __PYX_ERR(0, 1572, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1572, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1572, __pyx_L3_error)
    }
    __pyx_v_cls = values[0];
    __pyx_v_x = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1572, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Not.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_3Not___new__(__pyx_self, __pyx_v_cls, __pyx_v_x);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3Not___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_x) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__new__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1573
 * 
 *     def __new__(cls, x):
 *         return logical_not(x)             # <<<<<<<<<<<<<<
 * 
 *     def _sympy_(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_logical_not); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1573, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_x};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1573, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1572
 * class Not(Boolean):
 * 
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         return logical_not(x)
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Not.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1575
 *         return logical_not(x)
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         s = self.args_as_sympy()[0]
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3Not_3_sympy_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_3Not_3_sympy_ = {"_sympy_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_3Not_3_sympy_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3Not_3_sympy_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sympy_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1575, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1575, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_sympy_", 0) < (0)) __PYX_ERR(0, 1575, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 1, 1, i); __PYX_ERR(0, 1575, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1575, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1575, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Not._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_3Not_2_sympy_(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3Not_2_sympy_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_sympy = 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;
  size_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sympy_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1576
 * 
 *     def _sympy_(self):
 *         import sympy             # <<<<<<<<<<<<<<
 *         s = self.args_as_sympy()[0]
 *         return sympy.Not(s)
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sympy, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1576, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sympy = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1577
 *     def _sympy_(self):
 *         import sympy
 *         s = self.args_as_sympy()[0]             # <<<<<<<<<<<<<<
 *         return sympy.Not(s)
 * 
*/
  __pyx_t_3 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_args_as_sympy, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1577, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1577, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_s = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1578
 *         import sympy
 *         s = self.args_as_sympy()[0]
 *         return sympy.Not(s)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_v_sympy;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_s};
    __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_Not, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1578, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1575
 *         return logical_not(x)
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         s = self.args_as_sympy()[0]
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Not._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sympy);
  __Pyx_XDECREF(__pyx_v_s);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1583
 * class Xor(Boolean):
 * 
 *     def __new__(cls, *args):             # <<<<<<<<<<<<<<
 *         return logical_xor(*args)
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3Xor_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_3Xor_1__new__ = {"__new__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_3Xor_1__new__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3Xor_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_args = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  __pyx_v_args = __Pyx_ArgsSlice_FASTCALL(__pyx_args, 1, __pyx_nargs);
  if (unlikely(!__pyx_v_args)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_v_args);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1583, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        default:
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1583, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      const Py_ssize_t used_pos_args = (kwd_pos_args < 1) ? kwd_pos_args : 1;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, used_pos_args, __pyx_kwds_len, "__new__", 0) < (0)) __PYX_ERR(0, 1583, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__new__", 0, 1, 1, i); __PYX_ERR(0, 1583, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs < 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1583, __pyx_L3_error)
    }
    __pyx_v_cls = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 0, 1, 1, __pyx_nargs); __PYX_ERR(0, 1583, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Xor.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_3Xor___new__(__pyx_self, __pyx_v_cls, __pyx_v_args);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_args);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3Xor___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_args) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__new__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1584
 * 
 *     def __new__(cls, *args):
 *         return logical_xor(*args)             # <<<<<<<<<<<<<<
 * 
 *     def _sympy_(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_logical_xor); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1584, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1584, __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;

  /* "symengine/lib/symengine_wrapper.pyx":1583
 * class Xor(Boolean):
 * 
 *     def __new__(cls, *args):             # <<<<<<<<<<<<<<
 *         return logical_xor(*args)
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Xor.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1586
 *         return logical_xor(*args)
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         s = self.args_as_sympy()
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3Xor_3_sympy_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_3Xor_3_sympy_ = {"_sympy_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_3Xor_3_sympy_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3Xor_3_sympy_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sympy_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1586, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1586, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_sympy_", 0) < (0)) __PYX_ERR(0, 1586, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 1, 1, i); __PYX_ERR(0, 1586, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1586, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1586, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Xor._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_3Xor_2_sympy_(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3Xor_2_sympy_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_sympy = 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;
  size_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sympy_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1587
 * 
 *     def _sympy_(self):
 *         import sympy             # <<<<<<<<<<<<<<
 *         s = self.args_as_sympy()
 *         return sympy.Xor(*s)
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sympy, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1587, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sympy = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1588
 *     def _sympy_(self):
 *         import sympy
 *         s = self.args_as_sympy()             # <<<<<<<<<<<<<<
 *         return sympy.Xor(*s)
 * 
*/
  __pyx_t_3 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_args_as_sympy, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1588, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_s = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1589
 *         import sympy
 *         s = self.args_as_sympy()
 *         return sympy.Xor(*s)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_Xor); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1589, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PySequence_Tuple(__pyx_v_s); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1589, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1589, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1586
 *         return logical_xor(*args)
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         s = self.args_as_sympy()
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Xor._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sympy);
  __Pyx_XDECREF(__pyx_v_s);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1594
 * class Relational(Boolean):
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_Relational(self):
 *         return True
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10Relational_1is_Relational(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_10Relational_1is_Relational = {"is_Relational", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_10Relational_1is_Relational, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10Relational_1is_Relational(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_Relational (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1594, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1594, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "is_Relational", 0) < (0)) __PYX_ERR(0, 1594, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("is_Relational", 1, 1, 1, i); __PYX_ERR(0, 1594, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1594, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_Relational", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1594, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Relational.is_Relational", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_10Relational_is_Relational(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10Relational_is_Relational(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_Relational", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1596
 *     @property
 *     def is_Relational(self):
 *         return True             # <<<<<<<<<<<<<<
 * 
 *     def __bool__(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_True);
  __pyx_r = Py_True;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1594
 * class Relational(Boolean):
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_Relational(self):
 *         return True
*/

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

/* "symengine/lib/symengine_wrapper.pyx":1598
 *         return True
 * 
 *     def __bool__(self):             # <<<<<<<<<<<<<<
 *         raise TypeError("cannot determine truth value of Relational")
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10Relational_3__bool__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_10Relational_3__bool__ = {"__bool__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_10Relational_3__bool__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10Relational_3__bool__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__bool__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1598, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1598, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__bool__", 0) < (0)) __PYX_ERR(0, 1598, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__bool__", 1, 1, 1, i); __PYX_ERR(0, 1598, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1598, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__bool__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1598, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Relational.__bool__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_10Relational_2__bool__(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10Relational_2__bool__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__bool__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1599
 * 
 *     def __bool__(self):
 *         raise TypeError("cannot determine truth value of Relational")             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_t_2 = NULL;
  __pyx_t_3 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_cannot_determine_truth_value_of_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1599, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(0, 1599, __pyx_L1_error)

  /* "symengine/lib/symengine_wrapper.pyx":1598
 *         return True
 * 
 *     def __bool__(self):             # <<<<<<<<<<<<<<
 *         raise TypeError("cannot determine truth value of Relational")
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Relational.__bool__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1607
 * class Equality(Relational):
 * 
 *     def __new__(cls, *args):             # <<<<<<<<<<<<<<
 *         return eq(*args)
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8Equality_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_8Equality_1__new__ = {"__new__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_8Equality_1__new__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8Equality_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_args = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  __pyx_v_args = __Pyx_ArgsSlice_FASTCALL(__pyx_args, 1, __pyx_nargs);
  if (unlikely(!__pyx_v_args)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_v_args);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1607, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        default:
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1607, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      const Py_ssize_t used_pos_args = (kwd_pos_args < 1) ? kwd_pos_args : 1;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, used_pos_args, __pyx_kwds_len, "__new__", 0) < (0)) __PYX_ERR(0, 1607, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__new__", 0, 1, 1, i); __PYX_ERR(0, 1607, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs < 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1607, __pyx_L3_error)
    }
    __pyx_v_cls = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 0, 1, 1, __pyx_nargs); __PYX_ERR(0, 1607, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Equality.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_8Equality___new__(__pyx_self, __pyx_v_cls, __pyx_v_args);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_args);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8Equality___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_args) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__new__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1608
 * 
 *     def __new__(cls, *args):
 *         return eq(*args)             # <<<<<<<<<<<<<<
 * 
 *     def _sympy_(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_eq); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1608, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1608, __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;

  /* "symengine/lib/symengine_wrapper.pyx":1607
 * class Equality(Relational):
 * 
 *     def __new__(cls, *args):             # <<<<<<<<<<<<<<
 *         return eq(*args)
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Equality.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1610
 *         return eq(*args)
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         s = self.args_as_sympy()
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8Equality_3_sympy_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_8Equality_3_sympy_ = {"_sympy_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_8Equality_3_sympy_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8Equality_3_sympy_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sympy_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1610, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1610, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_sympy_", 0) < (0)) __PYX_ERR(0, 1610, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 1, 1, i); __PYX_ERR(0, 1610, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1610, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1610, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Equality._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_8Equality_2_sympy_(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8Equality_2_sympy_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_sympy = 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;
  size_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sympy_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1611
 * 
 *     def _sympy_(self):
 *         import sympy             # <<<<<<<<<<<<<<
 *         s = self.args_as_sympy()
 *         return sympy.Equality(*s)
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sympy, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1611, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sympy = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1612
 *     def _sympy_(self):
 *         import sympy
 *         s = self.args_as_sympy()             # <<<<<<<<<<<<<<
 *         return sympy.Equality(*s)
 * 
*/
  __pyx_t_3 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_args_as_sympy, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1612, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_s = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1613
 *         import sympy
 *         s = self.args_as_sympy()
 *         return sympy.Equality(*s)             # <<<<<<<<<<<<<<
 * 
 *     def _sage_(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_Equality); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1613, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PySequence_Tuple(__pyx_v_s); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1613, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1613, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1610
 *         return eq(*args)
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         s = self.args_as_sympy()
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Equality._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sympy);
  __Pyx_XDECREF(__pyx_v_s);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1615
 *         return sympy.Equality(*s)
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         import sage.all as sage
 *         s = self.args_as_sage()
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8Equality_5_sage_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_8Equality_5_sage_ = {"_sage_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_8Equality_5_sage_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8Equality_5_sage_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sage_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1615, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1615, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_sage_", 0) < (0)) __PYX_ERR(0, 1615, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_sage_", 1, 1, 1, i); __PYX_ERR(0, 1615, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1615, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_sage_", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1615, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Equality._sage_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_8Equality_4_sage_(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8Equality_4_sage_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_sage = 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;
  size_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sage_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1616
 * 
 *     def _sage_(self):
 *         import sage.all as sage             # <<<<<<<<<<<<<<
 *         s = self.args_as_sage()
 *         return sage.eq(*s)
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sage_all, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1616, __pyx_L1_error)
  __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_all);
  Py_DECREF(__pyx_t_2);
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1616, __pyx_L1_error)
  __pyx_t_2 = __pyx_t_3;
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sage = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1617
 *     def _sage_(self):
 *         import sage.all as sage
 *         s = self.args_as_sage()             # <<<<<<<<<<<<<<
 *         return sage.eq(*s)
 * 
*/
  __pyx_t_4 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_args_as_sage, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1617, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_s = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1618
 *         import sage.all as sage
 *         s = self.args_as_sage()
 *         return sage.eq(*s)             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sage, __pyx_mstate_global->__pyx_n_u_eq); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1618, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_v_s); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1618, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1618, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_6;
  __pyx_t_6 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1615
 *         return sympy.Equality(*s)
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         import sage.all as sage
 *         s = self.args_as_sage()
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Equality._sage_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sage);
  __Pyx_XDECREF(__pyx_v_s);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1620
 *         return sage.eq(*s)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_Equality(self):
 *         return True
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8Equality_7is_Equality(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_8Equality_7is_Equality = {"is_Equality", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_8Equality_7is_Equality, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8Equality_7is_Equality(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_Equality (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1620, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1620, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "is_Equality", 0) < (0)) __PYX_ERR(0, 1620, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("is_Equality", 1, 1, 1, i); __PYX_ERR(0, 1620, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1620, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_Equality", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1620, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Equality.is_Equality", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_8Equality_6is_Equality(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8Equality_6is_Equality(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_Equality", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1622
 *     @property
 *     def is_Equality(self):
 *         return True             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_True);
  __pyx_r = Py_True;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1620
 *         return sage.eq(*s)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_Equality(self):
 *         return True
*/

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

/* "symengine/lib/symengine_wrapper.pyx":1624
 *         return True
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def func(self):
 *         return self.__class__
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8Equality_9func(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_8Equality_9func = {"func", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_8Equality_9func, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8Equality_9func(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("func (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1624, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1624, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "func", 0) < (0)) __PYX_ERR(0, 1624, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("func", 1, 1, 1, i); __PYX_ERR(0, 1624, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1624, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("func", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1624, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Equality.func", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_8Equality_8func(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8Equality_8func(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("func", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1626
 *     @property
 *     def func(self):
 *         return self.__class__             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1626, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1624
 *         return True
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def func(self):
 *         return self.__class__
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Equality.func", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1634
 * class Unequality(Relational):
 * 
 *     def __new__(cls, *args):             # <<<<<<<<<<<<<<
 *         return ne(*args)
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10Unequality_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_10Unequality_1__new__ = {"__new__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_10Unequality_1__new__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10Unequality_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_args = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  __pyx_v_args = __Pyx_ArgsSlice_FASTCALL(__pyx_args, 1, __pyx_nargs);
  if (unlikely(!__pyx_v_args)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_v_args);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1634, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        default:
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1634, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      const Py_ssize_t used_pos_args = (kwd_pos_args < 1) ? kwd_pos_args : 1;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, used_pos_args, __pyx_kwds_len, "__new__", 0) < (0)) __PYX_ERR(0, 1634, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__new__", 0, 1, 1, i); __PYX_ERR(0, 1634, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs < 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1634, __pyx_L3_error)
    }
    __pyx_v_cls = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 0, 1, 1, __pyx_nargs); __PYX_ERR(0, 1634, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Unequality.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_10Unequality___new__(__pyx_self, __pyx_v_cls, __pyx_v_args);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_args);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10Unequality___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_args) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__new__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1635
 * 
 *     def __new__(cls, *args):
 *         return ne(*args)             # <<<<<<<<<<<<<<
 * 
 *     def _sympy_(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_ne); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1635, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1635, __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;

  /* "symengine/lib/symengine_wrapper.pyx":1634
 * class Unequality(Relational):
 * 
 *     def __new__(cls, *args):             # <<<<<<<<<<<<<<
 *         return ne(*args)
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Unequality.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1637
 *         return ne(*args)
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         s = self.args_as_sympy()
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10Unequality_3_sympy_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_10Unequality_3_sympy_ = {"_sympy_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_10Unequality_3_sympy_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10Unequality_3_sympy_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sympy_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1637, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1637, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_sympy_", 0) < (0)) __PYX_ERR(0, 1637, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 1, 1, i); __PYX_ERR(0, 1637, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1637, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1637, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Unequality._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_10Unequality_2_sympy_(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10Unequality_2_sympy_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_sympy = 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;
  size_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sympy_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1638
 * 
 *     def _sympy_(self):
 *         import sympy             # <<<<<<<<<<<<<<
 *         s = self.args_as_sympy()
 *         return sympy.Unequality(*s)
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sympy, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1638, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sympy = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1639
 *     def _sympy_(self):
 *         import sympy
 *         s = self.args_as_sympy()             # <<<<<<<<<<<<<<
 *         return sympy.Unequality(*s)
 * 
*/
  __pyx_t_3 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_args_as_sympy, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1639, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_s = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1640
 *         import sympy
 *         s = self.args_as_sympy()
 *         return sympy.Unequality(*s)             # <<<<<<<<<<<<<<
 * 
 *     def _sage_(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_Unequality); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1640, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PySequence_Tuple(__pyx_v_s); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1640, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1640, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1637
 *         return ne(*args)
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         s = self.args_as_sympy()
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Unequality._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sympy);
  __Pyx_XDECREF(__pyx_v_s);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1642
 *         return sympy.Unequality(*s)
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         import sage.all as sage
 *         s = self.args_as_sage()
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10Unequality_5_sage_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_10Unequality_5_sage_ = {"_sage_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_10Unequality_5_sage_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10Unequality_5_sage_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sage_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1642, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1642, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_sage_", 0) < (0)) __PYX_ERR(0, 1642, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_sage_", 1, 1, 1, i); __PYX_ERR(0, 1642, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1642, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_sage_", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1642, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Unequality._sage_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_10Unequality_4_sage_(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10Unequality_4_sage_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_sage = 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;
  size_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sage_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1643
 * 
 *     def _sage_(self):
 *         import sage.all as sage             # <<<<<<<<<<<<<<
 *         s = self.args_as_sage()
 *         return sage.ne(*s)
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sage_all, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1643, __pyx_L1_error)
  __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_all);
  Py_DECREF(__pyx_t_2);
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1643, __pyx_L1_error)
  __pyx_t_2 = __pyx_t_3;
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sage = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1644
 *     def _sage_(self):
 *         import sage.all as sage
 *         s = self.args_as_sage()             # <<<<<<<<<<<<<<
 *         return sage.ne(*s)
 * 
*/
  __pyx_t_4 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_args_as_sage, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1644, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_s = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1645
 *         import sage.all as sage
 *         s = self.args_as_sage()
 *         return sage.ne(*s)             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sage, __pyx_mstate_global->__pyx_n_u_ne); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1645, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_v_s); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1645, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1645, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_6;
  __pyx_t_6 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1642
 *         return sympy.Unequality(*s)
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         import sage.all as sage
 *         s = self.args_as_sage()
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Unequality._sage_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sage);
  __Pyx_XDECREF(__pyx_v_s);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1647
 *         return sage.ne(*s)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def func(self):
 *         return self.__class__
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10Unequality_7func(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_10Unequality_7func = {"func", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_10Unequality_7func, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10Unequality_7func(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("func (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1647, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1647, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "func", 0) < (0)) __PYX_ERR(0, 1647, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("func", 1, 1, 1, i); __PYX_ERR(0, 1647, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1647, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("func", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1647, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Unequality.func", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_10Unequality_6func(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10Unequality_6func(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("func", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1649
 *     @property
 *     def func(self):
 *         return self.__class__             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1649, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1647
 *         return sage.ne(*s)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def func(self):
 *         return self.__class__
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Unequality.func", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1657
 * class LessThan(Relational):
 * 
 *     def __new__(cls, *args):             # <<<<<<<<<<<<<<
 *         return le(*args)
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8LessThan_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_8LessThan_1__new__ = {"__new__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_8LessThan_1__new__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8LessThan_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_args = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  __pyx_v_args = __Pyx_ArgsSlice_FASTCALL(__pyx_args, 1, __pyx_nargs);
  if (unlikely(!__pyx_v_args)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_v_args);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1657, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        default:
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1657, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      const Py_ssize_t used_pos_args = (kwd_pos_args < 1) ? kwd_pos_args : 1;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, used_pos_args, __pyx_kwds_len, "__new__", 0) < (0)) __PYX_ERR(0, 1657, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__new__", 0, 1, 1, i); __PYX_ERR(0, 1657, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs < 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1657, __pyx_L3_error)
    }
    __pyx_v_cls = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 0, 1, 1, __pyx_nargs); __PYX_ERR(0, 1657, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.LessThan.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_8LessThan___new__(__pyx_self, __pyx_v_cls, __pyx_v_args);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_args);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8LessThan___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_args) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__new__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1658
 * 
 *     def __new__(cls, *args):
 *         return le(*args)             # <<<<<<<<<<<<<<
 * 
 *     def _sympy_(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_le); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1658, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1658, __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;

  /* "symengine/lib/symengine_wrapper.pyx":1657
 * class LessThan(Relational):
 * 
 *     def __new__(cls, *args):             # <<<<<<<<<<<<<<
 *         return le(*args)
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.LessThan.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1660
 *         return le(*args)
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         s = self.args_as_sympy()
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8LessThan_3_sympy_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_8LessThan_3_sympy_ = {"_sympy_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_8LessThan_3_sympy_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8LessThan_3_sympy_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sympy_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1660, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1660, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_sympy_", 0) < (0)) __PYX_ERR(0, 1660, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 1, 1, i); __PYX_ERR(0, 1660, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1660, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1660, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.LessThan._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_8LessThan_2_sympy_(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8LessThan_2_sympy_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_sympy = 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;
  size_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sympy_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1661
 * 
 *     def _sympy_(self):
 *         import sympy             # <<<<<<<<<<<<<<
 *         s = self.args_as_sympy()
 *         return sympy.LessThan(*s)
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sympy, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1661, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sympy = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1662
 *     def _sympy_(self):
 *         import sympy
 *         s = self.args_as_sympy()             # <<<<<<<<<<<<<<
 *         return sympy.LessThan(*s)
 * 
*/
  __pyx_t_3 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_args_as_sympy, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1662, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_s = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1663
 *         import sympy
 *         s = self.args_as_sympy()
 *         return sympy.LessThan(*s)             # <<<<<<<<<<<<<<
 * 
 *     def _sage_(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_LessThan); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1663, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PySequence_Tuple(__pyx_v_s); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1663, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1663, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1660
 *         return le(*args)
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         s = self.args_as_sympy()
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.LessThan._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sympy);
  __Pyx_XDECREF(__pyx_v_s);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1665
 *         return sympy.LessThan(*s)
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         import sage.all as sage
 *         s = self.args_as_sage()
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8LessThan_5_sage_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_8LessThan_5_sage_ = {"_sage_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_8LessThan_5_sage_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8LessThan_5_sage_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sage_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1665, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1665, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_sage_", 0) < (0)) __PYX_ERR(0, 1665, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_sage_", 1, 1, 1, i); __PYX_ERR(0, 1665, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1665, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_sage_", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1665, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.LessThan._sage_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_8LessThan_4_sage_(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8LessThan_4_sage_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_sage = 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;
  size_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sage_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1666
 * 
 *     def _sage_(self):
 *         import sage.all as sage             # <<<<<<<<<<<<<<
 *         s = self.args_as_sage()
 *         return sage.le(*s)
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sage_all, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1666, __pyx_L1_error)
  __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_all);
  Py_DECREF(__pyx_t_2);
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1666, __pyx_L1_error)
  __pyx_t_2 = __pyx_t_3;
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sage = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1667
 *     def _sage_(self):
 *         import sage.all as sage
 *         s = self.args_as_sage()             # <<<<<<<<<<<<<<
 *         return sage.le(*s)
 * 
*/
  __pyx_t_4 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_args_as_sage, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1667, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_s = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1668
 *         import sage.all as sage
 *         s = self.args_as_sage()
 *         return sage.le(*s)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sage, __pyx_mstate_global->__pyx_n_u_le); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1668, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_v_s); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1668, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1668, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_6;
  __pyx_t_6 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1665
 *         return sympy.LessThan(*s)
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         import sage.all as sage
 *         s = self.args_as_sage()
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.LessThan._sage_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sage);
  __Pyx_XDECREF(__pyx_v_s);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1676
 * class StrictLessThan(Relational):
 * 
 *     def __new__(cls, *args):             # <<<<<<<<<<<<<<
 *         return lt(*args)
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_14StrictLessThan_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_14StrictLessThan_1__new__ = {"__new__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_14StrictLessThan_1__new__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_14StrictLessThan_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_args = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  __pyx_v_args = __Pyx_ArgsSlice_FASTCALL(__pyx_args, 1, __pyx_nargs);
  if (unlikely(!__pyx_v_args)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_v_args);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1676, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        default:
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1676, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      const Py_ssize_t used_pos_args = (kwd_pos_args < 1) ? kwd_pos_args : 1;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, used_pos_args, __pyx_kwds_len, "__new__", 0) < (0)) __PYX_ERR(0, 1676, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__new__", 0, 1, 1, i); __PYX_ERR(0, 1676, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs < 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1676, __pyx_L3_error)
    }
    __pyx_v_cls = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 0, 1, 1, __pyx_nargs); __PYX_ERR(0, 1676, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.StrictLessThan.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_14StrictLessThan___new__(__pyx_self, __pyx_v_cls, __pyx_v_args);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_args);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_14StrictLessThan___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_args) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__new__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1677
 * 
 *     def __new__(cls, *args):
 *         return lt(*args)             # <<<<<<<<<<<<<<
 * 
 *     def _sympy_(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_lt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1677, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1677, __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;

  /* "symengine/lib/symengine_wrapper.pyx":1676
 * class StrictLessThan(Relational):
 * 
 *     def __new__(cls, *args):             # <<<<<<<<<<<<<<
 *         return lt(*args)
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.StrictLessThan.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1679
 *         return lt(*args)
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         s = self.args_as_sympy()
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_14StrictLessThan_3_sympy_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_14StrictLessThan_3_sympy_ = {"_sympy_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_14StrictLessThan_3_sympy_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_14StrictLessThan_3_sympy_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sympy_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1679, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1679, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_sympy_", 0) < (0)) __PYX_ERR(0, 1679, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 1, 1, i); __PYX_ERR(0, 1679, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1679, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1679, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.StrictLessThan._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_14StrictLessThan_2_sympy_(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_14StrictLessThan_2_sympy_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_sympy = 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;
  size_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sympy_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1680
 * 
 *     def _sympy_(self):
 *         import sympy             # <<<<<<<<<<<<<<
 *         s = self.args_as_sympy()
 *         return sympy.StrictLessThan(*s)
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sympy, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1680, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sympy = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1681
 *     def _sympy_(self):
 *         import sympy
 *         s = self.args_as_sympy()             # <<<<<<<<<<<<<<
 *         return sympy.StrictLessThan(*s)
 * 
*/
  __pyx_t_3 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_args_as_sympy, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1681, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_s = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1682
 *         import sympy
 *         s = self.args_as_sympy()
 *         return sympy.StrictLessThan(*s)             # <<<<<<<<<<<<<<
 * 
 *     def _sage_(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_StrictLessThan); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1682, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PySequence_Tuple(__pyx_v_s); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1682, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1682, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1679
 *         return lt(*args)
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         s = self.args_as_sympy()
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.StrictLessThan._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sympy);
  __Pyx_XDECREF(__pyx_v_s);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1684
 *         return sympy.StrictLessThan(*s)
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         import sage.all as sage
 *         s = self.args_as_sage()
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_14StrictLessThan_5_sage_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_14StrictLessThan_5_sage_ = {"_sage_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_14StrictLessThan_5_sage_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_14StrictLessThan_5_sage_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sage_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1684, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1684, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_sage_", 0) < (0)) __PYX_ERR(0, 1684, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_sage_", 1, 1, 1, i); __PYX_ERR(0, 1684, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1684, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_sage_", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1684, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.StrictLessThan._sage_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_14StrictLessThan_4_sage_(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_14StrictLessThan_4_sage_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_sage = 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;
  size_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sage_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1685
 * 
 *     def _sage_(self):
 *         import sage.all as sage             # <<<<<<<<<<<<<<
 *         s = self.args_as_sage()
 *         return sage.lt(*s)
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sage_all, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1685, __pyx_L1_error)
  __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_all);
  Py_DECREF(__pyx_t_2);
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1685, __pyx_L1_error)
  __pyx_t_2 = __pyx_t_3;
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sage = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1686
 *     def _sage_(self):
 *         import sage.all as sage
 *         s = self.args_as_sage()             # <<<<<<<<<<<<<<
 *         return sage.lt(*s)
 * 
*/
  __pyx_t_4 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_args_as_sage, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1686, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_s = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1687
 *         import sage.all as sage
 *         s = self.args_as_sage()
 *         return sage.lt(*s)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sage, __pyx_mstate_global->__pyx_n_u_lt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1687, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_v_s); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1687, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1687, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_6;
  __pyx_t_6 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1684
 *         return sympy.StrictLessThan(*s)
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         import sage.all as sage
 *         s = self.args_as_sage()
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.StrictLessThan._sage_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sage);
  __Pyx_XDECREF(__pyx_v_s);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1694
 * 
 * cdef class Number(Expr):
 *     @property             # <<<<<<<<<<<<<<
 *     def is_Atom(self):
 *         return True
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_6Number_7is_Atom_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_6Number_7is_Atom_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_6Number_7is_Atom___get__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Number *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_6Number_7is_Atom___get__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Number *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1696
 *     @property
 *     def is_Atom(self):
 *         return True             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_True);
  __pyx_r = Py_True;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1694
 * 
 * cdef class Number(Expr):
 *     @property             # <<<<<<<<<<<<<<
 *     def is_Atom(self):
 *         return True
*/

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

/* "symengine/lib/symengine_wrapper.pyx":1698
 *         return True
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_Number(self):
 *         return True
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_6Number_9is_Number_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_6Number_9is_Number_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_6Number_9is_Number___get__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Number *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_6Number_9is_Number___get__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Number *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1700
 *     @property
 *     def is_Number(self):
 *         return True             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_True);
  __pyx_r = Py_True;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1698
 *         return True
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_Number(self):
 *         return True
*/

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

/* "symengine/lib/symengine_wrapper.pyx":1702
 *         return True
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_number(self):
 *         return True
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_6Number_9is_number_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_6Number_9is_number_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_6Number_9is_number___get__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Number *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_6Number_9is_number___get__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Number *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1704
 *     @property
 *     def is_number(self):
 *         return True             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_True);
  __pyx_r = Py_True;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1702
 *         return True
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_number(self):
 *         return True
*/

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

/* "symengine/lib/symengine_wrapper.pyx":1706
 *         return True
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_commutative(self):
 *         return True
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_6Number_14is_commutative_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_6Number_14is_commutative_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_6Number_14is_commutative___get__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Number *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_6Number_14is_commutative___get__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Number *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1708
 *     @property
 *     def is_commutative(self):
 *         return True             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_True);
  __pyx_r = Py_True;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1706
 *         return True
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_commutative(self):
 *         return True
*/

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

/* "symengine/lib/symengine_wrapper.pyx":1710
 *         return True
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_positive(Basic self):
 *         return deref(symengine.rcp_static_cast_Number(self.thisptr)).is_positive()
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_6Number_11is_positive_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_6Number_11is_positive_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_6Number_11is_positive___get__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Number *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_6Number_11is_positive___get__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Number *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1712
 *     @property
 *     def is_positive(Basic self):
 *         return deref(symengine.rcp_static_cast_Number(self.thisptr)).is_positive()             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong((*SymEngine::rcp_static_cast<const SymEngine::Number>(__pyx_v_self->__pyx_base.__pyx_base.thisptr)).is_positive()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1712, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1710
 *         return True
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_positive(Basic self):
 *         return deref(symengine.rcp_static_cast_Number(self.thisptr)).is_positive()
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Number.is_positive.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1714
 *         return deref(symengine.rcp_static_cast_Number(self.thisptr)).is_positive()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_negative(Basic self):
 *         return deref(symengine.rcp_static_cast_Number(self.thisptr)).is_negative()
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_6Number_11is_negative_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_6Number_11is_negative_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_6Number_11is_negative___get__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Number *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_6Number_11is_negative___get__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Number *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1716
 *     @property
 *     def is_negative(Basic self):
 *         return deref(symengine.rcp_static_cast_Number(self.thisptr)).is_negative()             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong((*SymEngine::rcp_static_cast<const SymEngine::Number>(__pyx_v_self->__pyx_base.__pyx_base.thisptr)).is_negative()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1716, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1714
 *         return deref(symengine.rcp_static_cast_Number(self.thisptr)).is_positive()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_negative(Basic self):
 *         return deref(symengine.rcp_static_cast_Number(self.thisptr)).is_negative()
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Number.is_negative.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1718
 *         return deref(symengine.rcp_static_cast_Number(self.thisptr)).is_negative()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_nonzero(self):
 *         return not (self.is_complex or self.is_zero)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_6Number_10is_nonzero_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_6Number_10is_nonzero_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_6Number_10is_nonzero___get__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Number *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_6Number_10is_nonzero___get__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Number *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1720
 *     @property
 *     def is_nonzero(self):
 *         return not (self.is_complex or self.is_zero)             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_is_complex); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1720, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 1720, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (!__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_is_zero); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1720, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 1720, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_1 = __pyx_t_3;
  __pyx_L3_bool_binop_done:;
  __pyx_t_2 = __Pyx_PyBool_FromLong((!__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1720, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1718
 *         return deref(symengine.rcp_static_cast_Number(self.thisptr)).is_negative()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_nonzero(self):
 *         return not (self.is_complex or self.is_zero)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Number.is_nonzero.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1722
 *         return not (self.is_complex or self.is_zero)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_nonnegative(self):
 *         return not (self.is_complex or self.is_negative)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_6Number_14is_nonnegative_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_6Number_14is_nonnegative_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_6Number_14is_nonnegative___get__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Number *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_6Number_14is_nonnegative___get__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Number *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1724
 *     @property
 *     def is_nonnegative(self):
 *         return not (self.is_complex or self.is_negative)             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_is_complex); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1724, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 1724, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (!__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_is_negative); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1724, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 1724, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_1 = __pyx_t_3;
  __pyx_L3_bool_binop_done:;
  __pyx_t_2 = __Pyx_PyBool_FromLong((!__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1724, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1722
 *         return not (self.is_complex or self.is_zero)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_nonnegative(self):
 *         return not (self.is_complex or self.is_negative)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Number.is_nonnegative.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1726
 *         return not (self.is_complex or self.is_negative)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_nonpositive(self):
 *         return not (self.is_complex or self.is_positive)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_6Number_14is_nonpositive_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_6Number_14is_nonpositive_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_6Number_14is_nonpositive___get__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Number *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_6Number_14is_nonpositive___get__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Number *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1728
 *     @property
 *     def is_nonpositive(self):
 *         return not (self.is_complex or self.is_positive)             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_is_complex); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1728, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 1728, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (!__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_is_positive); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1728, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 1728, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_1 = __pyx_t_3;
  __pyx_L3_bool_binop_done:;
  __pyx_t_2 = __Pyx_PyBool_FromLong((!__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1728, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1726
 *         return not (self.is_complex or self.is_negative)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_nonpositive(self):
 *         return not (self.is_complex or self.is_positive)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Number.is_nonpositive.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1730
 *         return not (self.is_complex or self.is_positive)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_complex(Basic self):
 *         return deref(symengine.rcp_static_cast_Number(self.thisptr)).is_complex()
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_6Number_10is_complex_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_6Number_10is_complex_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_6Number_10is_complex___get__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Number *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_6Number_10is_complex___get__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Number *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1732
 *     @property
 *     def is_complex(Basic self):
 *         return deref(symengine.rcp_static_cast_Number(self.thisptr)).is_complex()             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong((*SymEngine::rcp_static_cast<const SymEngine::Number>(__pyx_v_self->__pyx_base.__pyx_base.thisptr)).is_complex()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1732, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1730
 *         return not (self.is_complex or self.is_positive)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_complex(Basic self):
 *         return deref(symengine.rcp_static_cast_Number(self.thisptr)).is_complex()
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Number.is_complex.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1734
 *         return deref(symengine.rcp_static_cast_Number(self.thisptr)).is_complex()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def real(self):
 *         return self
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_6Number_4real_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_6Number_4real_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_6Number_4real___get__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Number *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_6Number_4real___get__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Number *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1736
 *     @property
 *     def real(self):
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_self);
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1734
 *         return deref(symengine.rcp_static_cast_Number(self.thisptr)).is_complex()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def real(self):
 *         return self
*/

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

/* "symengine/lib/symengine_wrapper.pyx":1738
 *         return self
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def imag(self):
 *         return S.Zero
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_6Number_4imag_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_6Number_4imag_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_6Number_4imag___get__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Number *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_6Number_4imag___get__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Number *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1740
 *     @property
 *     def imag(self):
 *         return S.Zero             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_S); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1740, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_Zero); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1740, __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;

  /* "symengine/lib/symengine_wrapper.pyx":1738
 *         return self
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def imag(self):
 *         return S.Zero
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Number.imag.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1745
 * class Rational(Number):
 * 
 *     def __new__(cls, p, q):             # <<<<<<<<<<<<<<
 *         p = int(p)
 *         q = int(q)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8Rational_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_8Rational_1__new__ = {"__new__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_8Rational_1__new__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8Rational_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_p = 0;
  PyObject *__pyx_v_q = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,&__pyx_mstate_global->__pyx_n_u_p,&__pyx_mstate_global->__pyx_n_u_q,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1745, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1745, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1745, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1745, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__new__", 0) < (0)) __PYX_ERR(0, 1745, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__new__", 1, 3, 3, i); __PYX_ERR(0, 1745, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1745, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1745, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1745, __pyx_L3_error)
    }
    __pyx_v_cls = values[0];
    __pyx_v_p = values[1];
    __pyx_v_q = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 1745, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Rational.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_8Rational___new__(__pyx_self, __pyx_v_cls, __pyx_v_p, __pyx_v_q);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8Rational___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_p, PyObject *__pyx_v_q) {
  int __pyx_v_p_;
  int __pyx_v_q_;
  SymEngine::integer_class __pyx_v_p__;
  SymEngine::integer_class __pyx_v_q__;
  std::string __pyx_v_tmp;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  std::string __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__new__", 0);
  __Pyx_INCREF(__pyx_v_p);
  __Pyx_INCREF(__pyx_v_q);

  /* "symengine/lib/symengine_wrapper.pyx":1746
 * 
 *     def __new__(cls, p, q):
 *         p = int(p)             # <<<<<<<<<<<<<<
 *         q = int(q)
 *         cdef int p_
*/
  __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_v_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1746, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF_SET(__pyx_v_p, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1747
 *     def __new__(cls, p, q):
 *         p = int(p)
 *         q = int(q)             # <<<<<<<<<<<<<<
 *         cdef int p_
 *         cdef int q_
*/
  __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_v_q); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1747, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF_SET(__pyx_v_q, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1753
 *         cdef symengine.integer_class q__
 *         cdef string tmp
 *         try:             # <<<<<<<<<<<<<<
 *             # Try to convert p and q to int
 *             p_ = p
*/
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_4);
    /*try:*/ {

      /* "symengine/lib/symengine_wrapper.pyx":1755
 *         try:
 *             # Try to convert p and q to int
 *             p_ = p             # <<<<<<<<<<<<<<
 *             q_ = q
 *             return c2py(<rcp_const_basic>symengine.Rational.from_two_ints(p_, q_));
*/
      __pyx_t_5 = __Pyx_PyLong_As_int(__pyx_v_p); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1755, __pyx_L3_error)
      __pyx_v_p_ = __pyx_t_5;

      /* "symengine/lib/symengine_wrapper.pyx":1756
 *             # Try to convert p and q to int
 *             p_ = p
 *             q_ = q             # <<<<<<<<<<<<<<
 *             return c2py(<rcp_const_basic>symengine.Rational.from_two_ints(p_, q_));
 *         except OverflowError:
*/
      __pyx_t_5 = __Pyx_PyLong_As_int(__pyx_v_q); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1756, __pyx_L3_error)
      __pyx_v_q_ = __pyx_t_5;

      /* "symengine/lib/symengine_wrapper.pyx":1757
 *             p_ = p
 *             q_ = q
 *             return c2py(<rcp_const_basic>symengine.Rational.from_two_ints(p_, q_));             # <<<<<<<<<<<<<<
 *         except OverflowError:
 *             # Too big, need to use mpz
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)SymEngine::Rational::from_two_ints(__pyx_v_p_, __pyx_v_q_))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1757, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L7_try_return;

      /* "symengine/lib/symengine_wrapper.pyx":1753
 *         cdef symengine.integer_class q__
 *         cdef string tmp
 *         try:             # <<<<<<<<<<<<<<
 *             # Try to convert p and q to int
 *             p_ = p
*/
    }
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":1758
 *             q_ = q
 *             return c2py(<rcp_const_basic>symengine.Rational.from_two_ints(p_, q_));
 *         except OverflowError:             # <<<<<<<<<<<<<<
 *             # Too big, need to use mpz
 *             tmp = hex(p).encode("utf-8")
*/
    __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_OverflowError))));
    if (__pyx_t_5) {
      __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Rational.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 1758, __pyx_L5_except_error)
      __Pyx_XGOTREF(__pyx_t_1);
      __Pyx_XGOTREF(__pyx_t_6);
      __Pyx_XGOTREF(__pyx_t_7);

      /* "symengine/lib/symengine_wrapper.pyx":1760
 *         except OverflowError:
 *             # Too big, need to use mpz
 *             tmp = hex(p).encode("utf-8")             # <<<<<<<<<<<<<<
 *             symengine.mp_set_str(p__, tmp)
 *             tmp = hex(q).encode("utf-8")
*/
      __pyx_t_8 = __Pyx_PyNumber_Hex(__pyx_v_p); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1760, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      if (unlikely(__pyx_t_8 == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode");
        __PYX_ERR(0, 1760, __pyx_L5_except_error)
      }
      __pyx_t_9 = PyUnicode_AsUTF8String(((PyObject*)__pyx_t_8)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1760, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_10 = __pyx_convert_string_from_py_6libcpp_6string_std__in_string(__pyx_t_9); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1760, __pyx_L5_except_error)
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_v_tmp = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_10);

      /* "symengine/lib/symengine_wrapper.pyx":1761
 *             # Too big, need to use mpz
 *             tmp = hex(p).encode("utf-8")
 *             symengine.mp_set_str(p__, tmp)             # <<<<<<<<<<<<<<
 *             tmp = hex(q).encode("utf-8")
 *             symengine.mp_set_str(q__, tmp)
*/
      SymEngine::mp_set_str(__pyx_v_p__, __pyx_v_tmp);

      /* "symengine/lib/symengine_wrapper.pyx":1762
 *             tmp = hex(p).encode("utf-8")
 *             symengine.mp_set_str(p__, tmp)
 *             tmp = hex(q).encode("utf-8")             # <<<<<<<<<<<<<<
 *             symengine.mp_set_str(q__, tmp)
 *             return c2py(<rcp_const_basic>symengine.Integer(p__).divint(symengine.Integer(q__)))
*/
      __pyx_t_9 = __Pyx_PyNumber_Hex(__pyx_v_q); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1762, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (unlikely(__pyx_t_9 == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode");
        __PYX_ERR(0, 1762, __pyx_L5_except_error)
      }
      __pyx_t_8 = PyUnicode_AsUTF8String(((PyObject*)__pyx_t_9)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1762, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_10 = __pyx_convert_string_from_py_6libcpp_6string_std__in_string(__pyx_t_8); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1762, __pyx_L5_except_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_v_tmp = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_10);

      /* "symengine/lib/symengine_wrapper.pyx":1763
 *             symengine.mp_set_str(p__, tmp)
 *             tmp = hex(q).encode("utf-8")
 *             symengine.mp_set_str(q__, tmp)             # <<<<<<<<<<<<<<
 *             return c2py(<rcp_const_basic>symengine.Integer(p__).divint(symengine.Integer(q__)))
 * 
*/
      SymEngine::mp_set_str(__pyx_v_q__, __pyx_v_tmp);

      /* "symengine/lib/symengine_wrapper.pyx":1764
 *             tmp = hex(q).encode("utf-8")
 *             symengine.mp_set_str(q__, tmp)
 *             return c2py(<rcp_const_basic>symengine.Integer(p__).divint(symengine.Integer(q__)))             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_8 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)SymEngine::Integer(__pyx_v_p__).divint(SymEngine::Integer(__pyx_v_q__)))); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1764, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_r = __pyx_t_8;
      __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L6_except_return;
    }
    goto __pyx_L5_except_error;

    /* "symengine/lib/symengine_wrapper.pyx":1753
 *         cdef symengine.integer_class q__
 *         cdef string tmp
 *         try:             # <<<<<<<<<<<<<<
 *             # Try to convert p and q to int
 *             p_ = p
*/
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    goto __pyx_L1_error;
    __pyx_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    goto __pyx_L0;
    __pyx_L6_except_return:;
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    goto __pyx_L0;
  }

  /* "symengine/lib/symengine_wrapper.pyx":1745
 * class Rational(Number):
 * 
 *     def __new__(cls, p, q):             # <<<<<<<<<<<<<<
 *         p = int(p)
 *         q = int(q)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Rational.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_p);
  __Pyx_XDECREF(__pyx_v_q);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1766
 *             return c2py(<rcp_const_basic>symengine.Integer(p__).divint(symengine.Integer(q__)))
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_Rational(self):
 *         return True
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8Rational_3is_Rational(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_8Rational_3is_Rational = {"is_Rational", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_8Rational_3is_Rational, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8Rational_3is_Rational(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_Rational (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1766, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1766, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "is_Rational", 0) < (0)) __PYX_ERR(0, 1766, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("is_Rational", 1, 1, 1, i); __PYX_ERR(0, 1766, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1766, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_Rational", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1766, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Rational.is_Rational", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_8Rational_2is_Rational(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8Rational_2is_Rational(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_Rational", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1768
 *     @property
 *     def is_Rational(self):
 *         return True             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_True);
  __pyx_r = Py_True;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1766
 *             return c2py(<rcp_const_basic>symengine.Integer(p__).divint(symengine.Integer(q__)))
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_Rational(self):
 *         return True
*/

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

/* "symengine/lib/symengine_wrapper.pyx":1770
 *         return True
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_rational(self):
 *         return True
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8Rational_5is_rational(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_8Rational_5is_rational = {"is_rational", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_8Rational_5is_rational, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8Rational_5is_rational(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_rational (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1770, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1770, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "is_rational", 0) < (0)) __PYX_ERR(0, 1770, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("is_rational", 1, 1, 1, i); __PYX_ERR(0, 1770, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1770, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_rational", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1770, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Rational.is_rational", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_8Rational_4is_rational(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8Rational_4is_rational(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_rational", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1772
 *     @property
 *     def is_rational(self):
 *         return True             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_True);
  __pyx_r = Py_True;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1770
 *         return True
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_rational(self):
 *         return True
*/

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

/* "symengine/lib/symengine_wrapper.pyx":1774
 *         return True
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_real(self):
 *         return True
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8Rational_7is_real(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_8Rational_7is_real = {"is_real", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_8Rational_7is_real, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8Rational_7is_real(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_real (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1774, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1774, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "is_real", 0) < (0)) __PYX_ERR(0, 1774, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("is_real", 1, 1, 1, i); __PYX_ERR(0, 1774, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1774, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_real", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1774, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Rational.is_real", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_8Rational_6is_real(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8Rational_6is_real(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_real", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1776
 *     @property
 *     def is_real(self):
 *         return True             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_True);
  __pyx_r = Py_True;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1774
 *         return True
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_real(self):
 *         return True
*/

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

/* "symengine/lib/symengine_wrapper.pyx":1778
 *         return True
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_finite(self):
 *         return True
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8Rational_9is_finite(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_8Rational_9is_finite = {"is_finite", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_8Rational_9is_finite, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8Rational_9is_finite(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_finite (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1778, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1778, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "is_finite", 0) < (0)) __PYX_ERR(0, 1778, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("is_finite", 1, 1, 1, i); __PYX_ERR(0, 1778, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1778, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_finite", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1778, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Rational.is_finite", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_8Rational_8is_finite(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8Rational_8is_finite(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_finite", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1780
 *     @property
 *     def is_finite(self):
 *         return True             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_True);
  __pyx_r = Py_True;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1778
 *         return True
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_finite(self):
 *         return True
*/

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

/* "symengine/lib/symengine_wrapper.pyx":1782
 *         return True
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_integer(self):
 *         return False
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8Rational_11is_integer(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_8Rational_11is_integer = {"is_integer", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_8Rational_11is_integer, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8Rational_11is_integer(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_integer (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1782, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1782, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "is_integer", 0) < (0)) __PYX_ERR(0, 1782, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("is_integer", 1, 1, 1, i); __PYX_ERR(0, 1782, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1782, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_integer", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1782, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Rational.is_integer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_8Rational_10is_integer(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8Rational_10is_integer(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_integer", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1784
 *     @property
 *     def is_integer(self):
 *         return False             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_False);
  __pyx_r = Py_False;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1782
 *         return True
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_integer(self):
 *         return False
*/

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

/* "symengine/lib/symengine_wrapper.pyx":1786
 *         return False
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def p(self):
 *         return self.get_num_den()[0]
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8Rational_13p(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_8Rational_13p = {"p", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_8Rational_13p, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8Rational_13p(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("p (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1786, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1786, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "p", 0) < (0)) __PYX_ERR(0, 1786, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("p", 1, 1, 1, i); __PYX_ERR(0, 1786, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1786, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("p", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1786, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Rational.p", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_8Rational_12p(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8Rational_12p(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("p", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1788
 *     @property
 *     def p(self):
 *         return self.get_num_den()[0]             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_num_den, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1788, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1788, __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;

  /* "symengine/lib/symengine_wrapper.pyx":1786
 *         return False
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def p(self):
 *         return self.get_num_den()[0]
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Rational.p", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1790
 *         return self.get_num_den()[0]
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def q(self):
 *         return self.get_num_den()[1]
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8Rational_15q(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_8Rational_15q = {"q", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_8Rational_15q, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8Rational_15q(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("q (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1790, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1790, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "q", 0) < (0)) __PYX_ERR(0, 1790, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("q", 1, 1, 1, i); __PYX_ERR(0, 1790, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1790, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("q", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1790, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Rational.q", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_8Rational_14q(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8Rational_14q(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("q", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1792
 *     @property
 *     def q(self):
 *         return self.get_num_den()[1]             # <<<<<<<<<<<<<<
 * 
 *     def get_num_den(Basic self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_num_den, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1792, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1792, __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;

  /* "symengine/lib/symengine_wrapper.pyx":1790
 *         return self.get_num_den()[0]
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def q(self):
 *         return self.get_num_den()[1]
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Rational.q", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1794
 *         return self.get_num_den()[1]
 * 
 *     def get_num_den(Basic self):             # <<<<<<<<<<<<<<
 *         cdef RCP[const symengine.Integer] _num, _den
 *         symengine.get_num_den(deref(symengine.rcp_static_cast_Rational(self.thisptr)),
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8Rational_17get_num_den(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_8Rational_17get_num_den = {"get_num_den", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_8Rational_17get_num_den, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8Rational_17get_num_den(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_num_den (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1794, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1794, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "get_num_den", 0) < (0)) __PYX_ERR(0, 1794, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("get_num_den", 1, 1, 1, i); __PYX_ERR(0, 1794, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1794, __pyx_L3_error)
    }
    __pyx_v_self = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("get_num_den", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1794, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Rational.get_num_den", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic, 1, "self", 0))) __PYX_ERR(0, 1794, __pyx_L1_error)
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_8Rational_16get_num_den(__pyx_self, __pyx_v_self);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8Rational_16get_num_den(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self) {
  SymEngine::RCP<SymEngine::Integer const >  __pyx_v__num;
  SymEngine::RCP<SymEngine::Integer const >  __pyx_v__den;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_num_den", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1796
 *     def get_num_den(Basic self):
 *         cdef RCP[const symengine.Integer] _num, _den
 *         symengine.get_num_den(deref(symengine.rcp_static_cast_Rational(self.thisptr)),             # <<<<<<<<<<<<<<
 *                            symengine.outArg_Integer(_num), symengine.outArg_Integer(_den))
 *         return [c2py(<rcp_const_basic>_num), c2py(<rcp_const_basic>_den)]
*/
  SymEngine::get_num_den((*SymEngine::rcp_static_cast<const SymEngine::Rational>(__pyx_v_self->thisptr)), SymEngine::outArg<SymEngine::RCP<const SymEngine::Integer>>(__pyx_v__num), SymEngine::outArg<SymEngine::RCP<const SymEngine::Integer>>(__pyx_v__den));

  /* "symengine/lib/symengine_wrapper.pyx":1798
 *         symengine.get_num_den(deref(symengine.rcp_static_cast_Rational(self.thisptr)),
 *                            symengine.outArg_Integer(_num), symengine.outArg_Integer(_den))
 *         return [c2py(<rcp_const_basic>_num), c2py(<rcp_const_basic>_den)]             # <<<<<<<<<<<<<<
 * 
 *     def _sympy_(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)__pyx_v__num)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1798, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)__pyx_v__den)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1798, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1798, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 1798, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 1, __pyx_t_2) != (0)) __PYX_ERR(0, 1798, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1794
 *         return self.get_num_den()[1]
 * 
 *     def get_num_den(Basic self):             # <<<<<<<<<<<<<<
 *         cdef RCP[const symengine.Integer] _num, _den
 *         symengine.get_num_den(deref(symengine.rcp_static_cast_Rational(self.thisptr)),
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Rational.get_num_den", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1800
 *         return [c2py(<rcp_const_basic>_num), c2py(<rcp_const_basic>_den)]
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         rat = self.get_num_den()
 *         return rat[0]._sympy_() / rat[1]._sympy_()
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8Rational_19_sympy_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_8Rational_19_sympy_ = {"_sympy_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_8Rational_19_sympy_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8Rational_19_sympy_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sympy_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1800, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1800, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_sympy_", 0) < (0)) __PYX_ERR(0, 1800, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 1, 1, i); __PYX_ERR(0, 1800, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1800, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1800, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Rational._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_8Rational_18_sympy_(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8Rational_18_sympy_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_rat = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sympy_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1801
 * 
 *     def _sympy_(self):
 *         rat = self.get_num_den()             # <<<<<<<<<<<<<<
 *         return rat[0]._sympy_() / rat[1]._sympy_()
 * 
*/
  __pyx_t_2 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_num_den, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1801, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_rat = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1802
 *     def _sympy_(self):
 *         rat = self.get_num_den()
 *         return rat[0]._sympy_() / rat[1]._sympy_()             # <<<<<<<<<<<<<<
 * 
 *     def _sage_(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_rat, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1802, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __pyx_t_4;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_sympy_2, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1802, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_rat, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1802, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = __pyx_t_5;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_sympy_2, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1802, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  __pyx_t_5 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1802, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1800
 *         return [c2py(<rcp_const_basic>_num), c2py(<rcp_const_basic>_den)]
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         rat = self.get_num_den()
 *         return rat[0]._sympy_() / rat[1]._sympy_()
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Rational._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_rat);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1804
 *         return rat[0]._sympy_() / rat[1]._sympy_()
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         try:
 *             from sage.symbolic.symengine_conversions import convert_to_rational
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8Rational_21_sage_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_8Rational_21_sage_ = {"_sage_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_8Rational_21_sage_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8Rational_21_sage_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sage_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1804, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1804, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_sage_", 0) < (0)) __PYX_ERR(0, 1804, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_sage_", 1, 1, 1, i); __PYX_ERR(0, 1804, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1804, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_sage_", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1804, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Rational._sage_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_8Rational_20_sage_(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8Rational_20_sage_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_convert_to_rational = NULL;
  PyObject *__pyx_v_rat = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  size_t __pyx_t_9;
  int __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sage_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1805
 * 
 *     def _sage_(self):
 *         try:             # <<<<<<<<<<<<<<
 *             from sage.symbolic.symengine_conversions import convert_to_rational
 *             return convert_to_rational(self)
*/
  {
    __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:*/ {

      /* "symengine/lib/symengine_wrapper.pyx":1806
 *     def _sage_(self):
 *         try:
 *             from sage.symbolic.symengine_conversions import convert_to_rational             # <<<<<<<<<<<<<<
 *             return convert_to_rational(self)
 *         except ImportError:
*/
      {
        PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_convert_to_rational};
        __pyx_t_5 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sage_symbolic_symengine_conversi, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1806, __pyx_L3_error)
      }
      __pyx_t_4 = __pyx_t_5;
      __Pyx_GOTREF(__pyx_t_4);
      {
        PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_convert_to_rational};
        __pyx_t_6 = 0; {
          __pyx_t_7 = __Pyx_ImportFrom(__pyx_t_4, __pyx_imported_names[__pyx_t_6]); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1806, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_7);
          switch (__pyx_t_6) {
            case 0:
            __Pyx_INCREF(__pyx_t_7);
            __pyx_v_convert_to_rational = __pyx_t_7;
            break;
            default:;
          }
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "symengine/lib/symengine_wrapper.pyx":1807
 *         try:
 *             from sage.symbolic.symengine_conversions import convert_to_rational
 *             return convert_to_rational(self)             # <<<<<<<<<<<<<<
 *         except ImportError:
 *             rat = self.get_num_den()
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_7 = NULL;
      __Pyx_INCREF(__pyx_v_convert_to_rational);
      __pyx_t_8 = __pyx_v_convert_to_rational; 
      __pyx_t_9 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_8))) {
        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8);
        assert(__pyx_t_7);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_8, __pyx__function);
        __pyx_t_9 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_self};
        __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1807, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_4);
      }
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L7_try_return;

      /* "symengine/lib/symengine_wrapper.pyx":1805
 * 
 *     def _sage_(self):
 *         try:             # <<<<<<<<<<<<<<
 *             from sage.symbolic.symengine_conversions import convert_to_rational
 *             return convert_to_rational(self)
*/
    }
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":1808
 *             from sage.symbolic.symengine_conversions import convert_to_rational
 *             return convert_to_rational(self)
 *         except ImportError:             # <<<<<<<<<<<<<<
 *             rat = self.get_num_den()
 *             return rat[0]._sage_() / rat[1]._sage_()
*/
    __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_ImportError))));
    if (__pyx_t_10) {
      __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Rational._sage_", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_8, &__pyx_t_7) < 0) __PYX_ERR(0, 1808, __pyx_L5_except_error)
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_8);
      __Pyx_XGOTREF(__pyx_t_7);

      /* "symengine/lib/symengine_wrapper.pyx":1809
 *             return convert_to_rational(self)
 *         except ImportError:
 *             rat = self.get_num_den()             # <<<<<<<<<<<<<<
 *             return rat[0]._sage_() / rat[1]._sage_()
 * 
*/
      __pyx_t_12 = __pyx_v_self;
      __Pyx_INCREF(__pyx_t_12);
      __pyx_t_9 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_12, NULL};
        __pyx_t_11 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_num_den, __pyx_callargs+__pyx_t_9, (1-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
        if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1809, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_11);
      }
      __pyx_v_rat = __pyx_t_11;
      __pyx_t_11 = 0;

      /* "symengine/lib/symengine_wrapper.pyx":1810
 *         except ImportError:
 *             rat = self.get_num_den()
 *             return rat[0]._sage_() / rat[1]._sage_()             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_13 = __Pyx_GetItemInt(__pyx_v_rat, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1810, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_13);
      __pyx_t_12 = __pyx_t_13;
      __Pyx_INCREF(__pyx_t_12);
      __pyx_t_9 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_12, NULL};
        __pyx_t_11 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_sage, __pyx_callargs+__pyx_t_9, (1-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1810, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_11);
      }
      __pyx_t_14 = __Pyx_GetItemInt(__pyx_v_rat, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1810, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_14);
      __pyx_t_12 = __pyx_t_14;
      __Pyx_INCREF(__pyx_t_12);
      __pyx_t_9 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_12, NULL};
        __pyx_t_13 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_sage, __pyx_callargs+__pyx_t_9, (1-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1810, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_13);
      }
      __pyx_t_14 = __Pyx_PyNumber_Divide(__pyx_t_11, __pyx_t_13); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1810, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_14);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      __pyx_r = __pyx_t_14;
      __pyx_t_14 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      goto __pyx_L6_except_return;
    }
    goto __pyx_L5_except_error;

    /* "symengine/lib/symengine_wrapper.pyx":1805
 * 
 *     def _sage_(self):
 *         try:             # <<<<<<<<<<<<<<
 *             from sage.symbolic.symengine_conversions import convert_to_rational
 *             return convert_to_rational(self)
*/
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
    __pyx_L6_except_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
  }

  /* "symengine/lib/symengine_wrapper.pyx":1804
 *         return rat[0]._sympy_() / rat[1]._sympy_()
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         try:
 *             from sage.symbolic.symengine_conversions import convert_to_rational
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Rational._sage_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_convert_to_rational);
  __Pyx_XDECREF(__pyx_v_rat);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1812
 *             return rat[0]._sage_() / rat[1]._sage_()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def func(self):
 *         return self.__class__
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8Rational_23func(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_8Rational_23func = {"func", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_8Rational_23func, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8Rational_23func(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("func (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1812, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1812, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "func", 0) < (0)) __PYX_ERR(0, 1812, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("func", 1, 1, 1, i); __PYX_ERR(0, 1812, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1812, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("func", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1812, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Rational.func", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_8Rational_22func(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8Rational_22func(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("func", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1814
 *     @property
 *     def func(self):
 *         return self.__class__             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1814, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1812
 *             return rat[0]._sage_() / rat[1]._sage_()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def func(self):
 *         return self.__class__
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Rational.func", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1819
 * class Integer(Rational):
 * 
 *     def __new__(cls, i):             # <<<<<<<<<<<<<<
 *         i = int(i)
 *         cdef int i_
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_7Integer_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_7Integer_1__new__ = {"__new__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_7Integer_1__new__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_7Integer_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_i = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,&__pyx_mstate_global->__pyx_n_u_i,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1819, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1819, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1819, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__new__", 0) < (0)) __PYX_ERR(0, 1819, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__new__", 1, 2, 2, i); __PYX_ERR(0, 1819, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1819, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1819, __pyx_L3_error)
    }
    __pyx_v_cls = values[0];
    __pyx_v_i = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1819, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Integer.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_7Integer___new__(__pyx_self, __pyx_v_cls, __pyx_v_i);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_7Integer___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_i) {
  int __pyx_v_i_;
  SymEngine::integer_class __pyx_v_i__;
  std::string __pyx_v_tmp;
  int __pyx_v_int_ok;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  std::string __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__new__", 0);
  __Pyx_INCREF(__pyx_v_i);

  /* "symengine/lib/symengine_wrapper.pyx":1820
 * 
 *     def __new__(cls, i):
 *         i = int(i)             # <<<<<<<<<<<<<<
 *         cdef int i_
 *         cdef symengine.integer_class i__
*/
  __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_v_i); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1820, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF_SET(__pyx_v_i, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1824
 *         cdef symengine.integer_class i__
 *         cdef string tmp
 *         try:             # <<<<<<<<<<<<<<
 *             # Try to convert "i" to int
 *             i_ = i
*/
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_4);
    /*try:*/ {

      /* "symengine/lib/symengine_wrapper.pyx":1826
 *         try:
 *             # Try to convert "i" to int
 *             i_ = i             # <<<<<<<<<<<<<<
 *             int_ok = True
 *         except OverflowError:
*/
      __pyx_t_5 = __Pyx_PyLong_As_int(__pyx_v_i); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1826, __pyx_L3_error)
      __pyx_v_i_ = __pyx_t_5;

      /* "symengine/lib/symengine_wrapper.pyx":1827
 *             # Try to convert "i" to int
 *             i_ = i
 *             int_ok = True             # <<<<<<<<<<<<<<
 *         except OverflowError:
 *             # Too big, need to use mpz
*/
      __pyx_v_int_ok = 1;

      /* "symengine/lib/symengine_wrapper.pyx":1824
 *         cdef symengine.integer_class i__
 *         cdef string tmp
 *         try:             # <<<<<<<<<<<<<<
 *             # Try to convert "i" to int
 *             i_ = i
*/
    }
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    goto __pyx_L8_try_end;
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":1828
 *             i_ = i
 *             int_ok = True
 *         except OverflowError:             # <<<<<<<<<<<<<<
 *             # Too big, need to use mpz
 *             int_ok = False
*/
    __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_OverflowError))));
    if (__pyx_t_5) {
      __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Integer.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 1828, __pyx_L5_except_error)
      __Pyx_XGOTREF(__pyx_t_1);
      __Pyx_XGOTREF(__pyx_t_6);
      __Pyx_XGOTREF(__pyx_t_7);

      /* "symengine/lib/symengine_wrapper.pyx":1830
 *         except OverflowError:
 *             # Too big, need to use mpz
 *             int_ok = False             # <<<<<<<<<<<<<<
 *             tmp = hex(i).encode("utf-8")
 *             symengine.mp_set_str(i__, tmp)
*/
      __pyx_v_int_ok = 0;

      /* "symengine/lib/symengine_wrapper.pyx":1831
 *             # Too big, need to use mpz
 *             int_ok = False
 *             tmp = hex(i).encode("utf-8")             # <<<<<<<<<<<<<<
 *             symengine.mp_set_str(i__, tmp)
 *         # Note: all other exceptions are left intact
*/
      __pyx_t_8 = __Pyx_PyNumber_Hex(__pyx_v_i); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1831, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      if (unlikely(__pyx_t_8 == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode");
        __PYX_ERR(0, 1831, __pyx_L5_except_error)
      }
      __pyx_t_9 = PyUnicode_AsUTF8String(((PyObject*)__pyx_t_8)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1831, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_10 = __pyx_convert_string_from_py_6libcpp_6string_std__in_string(__pyx_t_9); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1831, __pyx_L5_except_error)
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_v_tmp = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_10);

      /* "symengine/lib/symengine_wrapper.pyx":1832
 *             int_ok = False
 *             tmp = hex(i).encode("utf-8")
 *             symengine.mp_set_str(i__, tmp)             # <<<<<<<<<<<<<<
 *         # Note: all other exceptions are left intact
 *         if int_ok:
*/
      SymEngine::mp_set_str(__pyx_v_i__, __pyx_v_tmp);
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L4_exception_handled;
    }
    goto __pyx_L5_except_error;

    /* "symengine/lib/symengine_wrapper.pyx":1824
 *         cdef symengine.integer_class i__
 *         cdef string tmp
 *         try:             # <<<<<<<<<<<<<<
 *             # Try to convert "i" to int
 *             i_ = i
*/
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    goto __pyx_L1_error;
    __pyx_L4_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    __pyx_L8_try_end:;
  }

  /* "symengine/lib/symengine_wrapper.pyx":1834
 *             symengine.mp_set_str(i__, tmp)
 *         # Note: all other exceptions are left intact
 *         if int_ok:             # <<<<<<<<<<<<<<
 *             return c2py(<rcp_const_basic>symengine.integer(i_))
 *         else:
*/
  if (__pyx_v_int_ok) {

    /* "symengine/lib/symengine_wrapper.pyx":1835
 *         # Note: all other exceptions are left intact
 *         if int_ok:
 *             return c2py(<rcp_const_basic>symengine.integer(i_))             # <<<<<<<<<<<<<<
 *         else:
 *             return c2py(<rcp_const_basic>symengine.integer(i__))
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)SymEngine::integer(__pyx_v_i_))); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1835, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":1834
 *             symengine.mp_set_str(i__, tmp)
 *         # Note: all other exceptions are left intact
 *         if int_ok:             # <<<<<<<<<<<<<<
 *             return c2py(<rcp_const_basic>symengine.integer(i_))
 *         else:
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":1837
 *             return c2py(<rcp_const_basic>symengine.integer(i_))
 *         else:
 *             return c2py(<rcp_const_basic>symengine.integer(i__))             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)SymEngine::integer(__pyx_v_i__))); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1837, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;
  }

  /* "symengine/lib/symengine_wrapper.pyx":1819
 * class Integer(Rational):
 * 
 *     def __new__(cls, i):             # <<<<<<<<<<<<<<
 *         i = int(i)
 *         cdef int i_
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Integer.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1839
 *             return c2py(<rcp_const_basic>symengine.integer(i__))
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_Integer(self):
 *         return True
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_7Integer_3is_Integer(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_7Integer_3is_Integer = {"is_Integer", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_7Integer_3is_Integer, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_7Integer_3is_Integer(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_Integer (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1839, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1839, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "is_Integer", 0) < (0)) __PYX_ERR(0, 1839, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("is_Integer", 1, 1, 1, i); __PYX_ERR(0, 1839, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1839, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_Integer", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1839, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Integer.is_Integer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_7Integer_2is_Integer(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_7Integer_2is_Integer(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_Integer", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1841
 *     @property
 *     def is_Integer(self):
 *         return True             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_True);
  __pyx_r = Py_True;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1839
 *             return c2py(<rcp_const_basic>symengine.integer(i__))
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_Integer(self):
 *         return True
*/

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

/* "symengine/lib/symengine_wrapper.pyx":1843
 *         return True
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_integer(self):
 *         return True
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_7Integer_5is_integer(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_7Integer_5is_integer = {"is_integer", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_7Integer_5is_integer, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_7Integer_5is_integer(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_integer (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1843, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1843, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "is_integer", 0) < (0)) __PYX_ERR(0, 1843, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("is_integer", 1, 1, 1, i); __PYX_ERR(0, 1843, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1843, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_integer", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1843, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Integer.is_integer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_7Integer_4is_integer(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_7Integer_4is_integer(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_integer", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1845
 *     @property
 *     def is_integer(self):
 *         return True             # <<<<<<<<<<<<<<
 * 
 *     def doit(self, **hints):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_True);
  __pyx_r = Py_True;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1843
 *         return True
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_integer(self):
 *         return True
*/

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

/* "symengine/lib/symengine_wrapper.pyx":1847
 *         return True
 * 
 *     def doit(self, **hints):             # <<<<<<<<<<<<<<
 *         return self
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_7Integer_7doit(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_7Integer_7doit = {"doit", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_7Integer_7doit, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_7Integer_7doit(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  CYTHON_UNUSED PyObject *__pyx_v_hints = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("doit (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1847, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1847, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, __pyx_v_hints, values, kwd_pos_args, __pyx_kwds_len, "doit", 1) < (0)) __PYX_ERR(0, 1847, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("doit", 1, 1, 1, i); __PYX_ERR(0, 1847, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1847, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("doit", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1847, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_XDECREF(__pyx_v_hints); __pyx_v_hints = 0;
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Integer.doit", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_7Integer_6doit(__pyx_self, __pyx_v_self, __pyx_v_hints);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_XDECREF(__pyx_v_hints);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_7Integer_6doit(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_hints) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("doit", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1848
 * 
 *     def doit(self, **hints):
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def __hash__(Basic self):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self);
  __pyx_r = __pyx_v_self;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1847
 *         return True
 * 
 *     def doit(self, **hints):             # <<<<<<<<<<<<<<
 *         return self
 * 
*/

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

/* "symengine/lib/symengine_wrapper.pyx":1850
 *         return self
 * 
 *     def __hash__(Basic self):             # <<<<<<<<<<<<<<
 *         return deref(self.thisptr).hash()
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_7Integer_9__hash__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_7Integer_9__hash__ = {"__hash__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_7Integer_9__hash__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_7Integer_9__hash__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__hash__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1850, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1850, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__hash__", 0) < (0)) __PYX_ERR(0, 1850, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__hash__", 1, 1, 1, i); __PYX_ERR(0, 1850, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1850, __pyx_L3_error)
    }
    __pyx_v_self = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__hash__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1850, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Integer.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic, 1, "self", 0))) __PYX_ERR(0, 1850, __pyx_L1_error)
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_7Integer_8__hash__(__pyx_self, __pyx_v_self);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_7Integer_8__hash__(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  unsigned int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__hash__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1851
 * 
 *     def __hash__(Basic self):
 *         return deref(self.thisptr).hash()             # <<<<<<<<<<<<<<
 * 
 *     def __richcmp__(a, b, int op):
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_1 = (*__pyx_v_self->thisptr).hash();
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 1851, __pyx_L1_error)
  }
  __pyx_t_2 = __Pyx_PyLong_From_unsigned_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1851, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1850
 *         return self
 * 
 *     def __hash__(Basic self):             # <<<<<<<<<<<<<<
 *         return deref(self.thisptr).hash()
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Integer.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1853
 *         return deref(self.thisptr).hash()
 * 
 *     def __richcmp__(a, b, int op):             # <<<<<<<<<<<<<<
 *         A = _sympify(a, False)
 *         B = _sympify(b, False)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_7Integer_11__richcmp__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_7Integer_11__richcmp__ = {"__richcmp__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_7Integer_11__richcmp__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_7Integer_11__richcmp__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_a = 0;
  PyObject *__pyx_v_b = 0;
  int __pyx_v_op;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_a,&__pyx_mstate_global->__pyx_n_u_b,&__pyx_mstate_global->__pyx_n_u_op,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1853, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1853, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1853, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1853, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__richcmp__", 0) < (0)) __PYX_ERR(0, 1853, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__richcmp__", 1, 3, 3, i); __PYX_ERR(0, 1853, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1853, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1853, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1853, __pyx_L3_error)
    }
    __pyx_v_a = values[0];
    __pyx_v_b = values[1];
    __pyx_v_op = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_op == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1853, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__richcmp__", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 1853, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Integer.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_7Integer_10__richcmp__(__pyx_self, __pyx_v_a, __pyx_v_b, __pyx_v_op);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_7Integer_10__richcmp__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_a, PyObject *__pyx_v_b, int __pyx_v_op) {
  PyObject *__pyx_v_A = NULL;
  PyObject *__pyx_v_B = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__richcmp__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1854
 * 
 *     def __richcmp__(a, b, int op):
 *         A = _sympify(a, False)             # <<<<<<<<<<<<<<
 *         B = _sympify(b, False)
 *         if not (isinstance(A, Integer) and isinstance(B, Integer)):
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1854, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_a, Py_False};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1854, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_A = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1855
 *     def __richcmp__(a, b, int op):
 *         A = _sympify(a, False)
 *         B = _sympify(b, False)             # <<<<<<<<<<<<<<
 *         if not (isinstance(A, Integer) and isinstance(B, Integer)):
 *             if (op == 2):
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_sympify_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1855, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_b, Py_False};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1855, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_B = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1856
 *         A = _sympify(a, False)
 *         B = _sympify(b, False)
 *         if not (isinstance(A, Integer) and isinstance(B, Integer)):             # <<<<<<<<<<<<<<
 *             if (op == 2):
 *                 return False
*/
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_Integer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1856, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = PyObject_IsInstance(__pyx_v_A, __pyx_t_1); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1856, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_6) {
  } else {
    __pyx_t_5 = __pyx_t_6;
    goto __pyx_L4_bool_binop_done;
  }
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_Integer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1856, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = PyObject_IsInstance(__pyx_v_B, __pyx_t_1); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1856, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_5 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  __pyx_t_6 = (!__pyx_t_5);
  if (__pyx_t_6) {

    /* "symengine/lib/symengine_wrapper.pyx":1857
 *         B = _sympify(b, False)
 *         if not (isinstance(A, Integer) and isinstance(B, Integer)):
 *             if (op == 2):             # <<<<<<<<<<<<<<
 *                 return False
 *             elif (op == 3):
*/
    switch (__pyx_v_op) {
      case 2:

      /* "symengine/lib/symengine_wrapper.pyx":1858
 *         if not (isinstance(A, Integer) and isinstance(B, Integer)):
 *             if (op == 2):
 *                 return False             # <<<<<<<<<<<<<<
 *             elif (op == 3):
 *                 return True
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_False);
      __pyx_r = Py_False;
      goto __pyx_L0;

      /* "symengine/lib/symengine_wrapper.pyx":1857
 *         B = _sympify(b, False)
 *         if not (isinstance(A, Integer) and isinstance(B, Integer)):
 *             if (op == 2):             # <<<<<<<<<<<<<<
 *                 return False
 *             elif (op == 3):
*/
      break;
      case 3:

      /* "symengine/lib/symengine_wrapper.pyx":1860
 *                 return False
 *             elif (op == 3):
 *                 return True             # <<<<<<<<<<<<<<
 *             return NotImplemented
 *         return Integer._richcmp_(A, B, op)
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_True);
      __pyx_r = Py_True;
      goto __pyx_L0;

      /* "symengine/lib/symengine_wrapper.pyx":1859
 *             if (op == 2):
 *                 return False
 *             elif (op == 3):             # <<<<<<<<<<<<<<
 *                 return True
 *             return NotImplemented
*/
      break;
      default: break;
    }

    /* "symengine/lib/symengine_wrapper.pyx":1861
 *             elif (op == 3):
 *                 return True
 *             return NotImplemented             # <<<<<<<<<<<<<<
 *         return Integer._richcmp_(A, B, op)
 * 
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_builtin_NotImplemented);
    __pyx_r = __pyx_builtin_NotImplemented;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":1856
 *         A = _sympify(a, False)
 *         B = _sympify(b, False)
 *         if not (isinstance(A, Integer) and isinstance(B, Integer)):             # <<<<<<<<<<<<<<
 *             if (op == 2):
 *                 return False
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":1862
 *                 return True
 *             return NotImplemented
 *         return Integer._richcmp_(A, B, op)             # <<<<<<<<<<<<<<
 * 
 *     def _richcmp_(Basic A, Basic B, int op):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Integer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1862, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_richcmp); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1862, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyLong_From_int(__pyx_v_op); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1862, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_7);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_2, __pyx_v_A, __pyx_v_B, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_4, (4-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1862, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1853
 *         return deref(self.thisptr).hash()
 * 
 *     def __richcmp__(a, b, int op):             # <<<<<<<<<<<<<<
 *         A = _sympify(a, False)
 *         B = _sympify(b, False)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Integer.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_A);
  __Pyx_XDECREF(__pyx_v_B);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1864
 *         return Integer._richcmp_(A, B, op)
 * 
 *     def _richcmp_(Basic A, Basic B, int op):             # <<<<<<<<<<<<<<
 *         cdef int i = deref(symengine.rcp_static_cast_Integer(A.thisptr)).compare(deref(symengine.rcp_static_cast_Integer(B.thisptr)))
 *         if (op == 0):
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_7Integer_13_richcmp_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_7Integer_13_richcmp_ = {"_richcmp_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_7Integer_13_richcmp_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_7Integer_13_richcmp_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_A = 0;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_B = 0;
  int __pyx_v_op;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_richcmp_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_A,&__pyx_mstate_global->__pyx_n_u_B,&__pyx_mstate_global->__pyx_n_u_op,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1864, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1864, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1864, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1864, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_richcmp_", 0) < (0)) __PYX_ERR(0, 1864, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_richcmp_", 1, 3, 3, i); __PYX_ERR(0, 1864, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1864, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1864, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1864, __pyx_L3_error)
    }
    __pyx_v_A = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)values[0]);
    __pyx_v_B = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)values[1]);
    __pyx_v_op = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_op == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1864, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_richcmp_", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 1864, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Integer._richcmp_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_A), __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic, 1, "A", 0))) __PYX_ERR(0, 1864, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_B), __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic, 1, "B", 0))) __PYX_ERR(0, 1864, __pyx_L1_error)
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_7Integer_12_richcmp_(__pyx_self, __pyx_v_A, __pyx_v_B, __pyx_v_op);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_7Integer_12_richcmp_(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_A, struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_B, int __pyx_v_op) {
  int __pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_richcmp_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1865
 * 
 *     def _richcmp_(Basic A, Basic B, int op):
 *         cdef int i = deref(symengine.rcp_static_cast_Integer(A.thisptr)).compare(deref(symengine.rcp_static_cast_Integer(B.thisptr)))             # <<<<<<<<<<<<<<
 *         if (op == 0):
 *             return i < 0
*/
  __pyx_v_i = (*SymEngine::rcp_static_cast<const SymEngine::Integer>(__pyx_v_A->thisptr)).compare((*SymEngine::rcp_static_cast<const SymEngine::Integer>(__pyx_v_B->thisptr)));

  /* "symengine/lib/symengine_wrapper.pyx":1866
 *     def _richcmp_(Basic A, Basic B, int op):
 *         cdef int i = deref(symengine.rcp_static_cast_Integer(A.thisptr)).compare(deref(symengine.rcp_static_cast_Integer(B.thisptr)))
 *         if (op == 0):             # <<<<<<<<<<<<<<
 *             return i < 0
 *         elif (op == 1):
*/
  switch (__pyx_v_op) {
    case 0:

    /* "symengine/lib/symengine_wrapper.pyx":1867
 *         cdef int i = deref(symengine.rcp_static_cast_Integer(A.thisptr)).compare(deref(symengine.rcp_static_cast_Integer(B.thisptr)))
 *         if (op == 0):
 *             return i < 0             # <<<<<<<<<<<<<<
 *         elif (op == 1):
 *             return i <= 0
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_i < 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1867, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":1866
 *     def _richcmp_(Basic A, Basic B, int op):
 *         cdef int i = deref(symengine.rcp_static_cast_Integer(A.thisptr)).compare(deref(symengine.rcp_static_cast_Integer(B.thisptr)))
 *         if (op == 0):             # <<<<<<<<<<<<<<
 *             return i < 0
 *         elif (op == 1):
*/
    break;
    case 1:

    /* "symengine/lib/symengine_wrapper.pyx":1869
 *             return i < 0
 *         elif (op == 1):
 *             return i <= 0             # <<<<<<<<<<<<<<
 *         elif (op == 2):
 *             return i == 0
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_i <= 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1869, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":1868
 *         if (op == 0):
 *             return i < 0
 *         elif (op == 1):             # <<<<<<<<<<<<<<
 *             return i <= 0
 *         elif (op == 2):
*/
    break;
    case 2:

    /* "symengine/lib/symengine_wrapper.pyx":1871
 *             return i <= 0
 *         elif (op == 2):
 *             return i == 0             # <<<<<<<<<<<<<<
 *         elif (op == 3):
 *             return i != 0
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_i == 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1871, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":1870
 *         elif (op == 1):
 *             return i <= 0
 *         elif (op == 2):             # <<<<<<<<<<<<<<
 *             return i == 0
 *         elif (op == 3):
*/
    break;
    case 3:

    /* "symengine/lib/symengine_wrapper.pyx":1873
 *             return i == 0
 *         elif (op == 3):
 *             return i != 0             # <<<<<<<<<<<<<<
 *         elif (op == 4):
 *             return i > 0
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_i != 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1873, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":1872
 *         elif (op == 2):
 *             return i == 0
 *         elif (op == 3):             # <<<<<<<<<<<<<<
 *             return i != 0
 *         elif (op == 4):
*/
    break;
    case 4:

    /* "symengine/lib/symengine_wrapper.pyx":1875
 *             return i != 0
 *         elif (op == 4):
 *             return i > 0             # <<<<<<<<<<<<<<
 *         elif (op == 5):
 *             return i >= 0
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_i > 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1875, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":1874
 *         elif (op == 3):
 *             return i != 0
 *         elif (op == 4):             # <<<<<<<<<<<<<<
 *             return i > 0
 *         elif (op == 5):
*/
    break;
    case 5:

    /* "symengine/lib/symengine_wrapper.pyx":1877
 *             return i > 0
 *         elif (op == 5):
 *             return i >= 0             # <<<<<<<<<<<<<<
 *         else:
 *             return NotImplemented
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_i >= 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1877, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":1876
 *         elif (op == 4):
 *             return i > 0
 *         elif (op == 5):             # <<<<<<<<<<<<<<
 *             return i >= 0
 *         else:
*/
    break;
    default:

    /* "symengine/lib/symengine_wrapper.pyx":1879
 *             return i >= 0
 *         else:
 *             return NotImplemented             # <<<<<<<<<<<<<<
 * 
 *     def _sympy_(Basic self):
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_builtin_NotImplemented);
    __pyx_r = __pyx_builtin_NotImplemented;
    goto __pyx_L0;
    break;
  }

  /* "symengine/lib/symengine_wrapper.pyx":1864
 *         return Integer._richcmp_(A, B, op)
 * 
 *     def _richcmp_(Basic A, Basic B, int op):             # <<<<<<<<<<<<<<
 *         cdef int i = deref(symengine.rcp_static_cast_Integer(A.thisptr)).compare(deref(symengine.rcp_static_cast_Integer(B.thisptr)))
 *         if (op == 0):
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Integer._richcmp_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1881
 *             return NotImplemented
 * 
 *     def _sympy_(Basic self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.Integer(int(self))
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_7Integer_15_sympy_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_7Integer_15_sympy_ = {"_sympy_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_7Integer_15_sympy_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_7Integer_15_sympy_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sympy_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1881, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1881, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_sympy_", 0) < (0)) __PYX_ERR(0, 1881, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 1, 1, i); __PYX_ERR(0, 1881, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1881, __pyx_L3_error)
    }
    __pyx_v_self = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1881, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Integer._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic, 1, "self", 0))) __PYX_ERR(0, 1881, __pyx_L1_error)
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_7Integer_14_sympy_(__pyx_self, __pyx_v_self);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_7Integer_14_sympy_(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self) {
  PyObject *__pyx_v_sympy = 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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sympy_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1882
 * 
 *     def _sympy_(Basic self):
 *         import sympy             # <<<<<<<<<<<<<<
 *         return sympy.Integer(int(self))
 * 
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sympy, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1882, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sympy = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1883
 *     def _sympy_(Basic self):
 *         import sympy
 *         return sympy.Integer(int(self))             # <<<<<<<<<<<<<<
 * 
 *     def _sage_(Basic self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __pyx_v_sympy;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyNumber_Int(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1883, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_Integer, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1883, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1881
 *             return NotImplemented
 * 
 *     def _sympy_(Basic self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.Integer(int(self))
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Integer._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sympy);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1885
 *         return sympy.Integer(int(self))
 * 
 *     def _sage_(Basic self):             # <<<<<<<<<<<<<<
 *         try:
 *             from sage.symbolic.symengine_conversions import convert_to_integer
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_7Integer_17_sage_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_7Integer_17_sage_ = {"_sage_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_7Integer_17_sage_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_7Integer_17_sage_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sage_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1885, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1885, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_sage_", 0) < (0)) __PYX_ERR(0, 1885, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_sage_", 1, 1, 1, i); __PYX_ERR(0, 1885, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1885, __pyx_L3_error)
    }
    __pyx_v_self = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_sage_", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1885, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Integer._sage_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic, 1, "self", 0))) __PYX_ERR(0, 1885, __pyx_L1_error)
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_7Integer_16_sage_(__pyx_self, __pyx_v_self);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_7Integer_16_sage_(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self) {
  PyObject *__pyx_v_convert_to_integer = NULL;
  PyObject *__pyx_v_sage = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  size_t __pyx_t_9;
  int __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sage_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1886
 * 
 *     def _sage_(Basic self):
 *         try:             # <<<<<<<<<<<<<<
 *             from sage.symbolic.symengine_conversions import convert_to_integer
 *             return convert_to_integer(self)
*/
  {
    __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:*/ {

      /* "symengine/lib/symengine_wrapper.pyx":1887
 *     def _sage_(Basic self):
 *         try:
 *             from sage.symbolic.symengine_conversions import convert_to_integer             # <<<<<<<<<<<<<<
 *             return convert_to_integer(self)
 *         except ImportError:
*/
      {
        PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_convert_to_integer};
        __pyx_t_5 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sage_symbolic_symengine_conversi, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1887, __pyx_L3_error)
      }
      __pyx_t_4 = __pyx_t_5;
      __Pyx_GOTREF(__pyx_t_4);
      {
        PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_convert_to_integer};
        __pyx_t_6 = 0; {
          __pyx_t_7 = __Pyx_ImportFrom(__pyx_t_4, __pyx_imported_names[__pyx_t_6]); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1887, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_7);
          switch (__pyx_t_6) {
            case 0:
            __Pyx_INCREF(__pyx_t_7);
            __pyx_v_convert_to_integer = __pyx_t_7;
            break;
            default:;
          }
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "symengine/lib/symengine_wrapper.pyx":1888
 *         try:
 *             from sage.symbolic.symengine_conversions import convert_to_integer
 *             return convert_to_integer(self)             # <<<<<<<<<<<<<<
 *         except ImportError:
 *             import sage.all as sage
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_7 = NULL;
      __Pyx_INCREF(__pyx_v_convert_to_integer);
      __pyx_t_8 = __pyx_v_convert_to_integer; 
      __pyx_t_9 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_8))) {
        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8);
        assert(__pyx_t_7);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_8, __pyx__function);
        __pyx_t_9 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_7, ((PyObject *)__pyx_v_self)};
        __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1888, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_4);
      }
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L7_try_return;

      /* "symengine/lib/symengine_wrapper.pyx":1886
 * 
 *     def _sage_(Basic self):
 *         try:             # <<<<<<<<<<<<<<
 *             from sage.symbolic.symengine_conversions import convert_to_integer
 *             return convert_to_integer(self)
*/
    }
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":1889
 *             from sage.symbolic.symengine_conversions import convert_to_integer
 *             return convert_to_integer(self)
 *         except ImportError:             # <<<<<<<<<<<<<<
 *             import sage.all as sage
 *             return sage.Integer(str(self))
*/
    __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_ImportError))));
    if (__pyx_t_10) {
      __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Integer._sage_", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_8, &__pyx_t_7) < 0) __PYX_ERR(0, 1889, __pyx_L5_except_error)
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_8);
      __Pyx_XGOTREF(__pyx_t_7);

      /* "symengine/lib/symengine_wrapper.pyx":1890
 *             return convert_to_integer(self)
 *         except ImportError:
 *             import sage.all as sage             # <<<<<<<<<<<<<<
 *             return sage.Integer(str(self))
 * 
*/
      __pyx_t_5 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sage_all, 0, 0, NULL, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1890, __pyx_L5_except_error)
      __pyx_t_12 = __Pyx_ImportFrom(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_all);
      Py_DECREF(__pyx_t_5);
      if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1890, __pyx_L5_except_error)
      __pyx_t_5 = __pyx_t_12;
      __pyx_t_11 = __pyx_t_5;
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_v_sage = __pyx_t_11;
      __pyx_t_11 = 0;

      /* "symengine/lib/symengine_wrapper.pyx":1891
 *         except ImportError:
 *             import sage.all as sage
 *             return sage.Integer(str(self))             # <<<<<<<<<<<<<<
 * 
 *     def __int__(Basic self):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_13 = __pyx_v_sage;
      __Pyx_INCREF(__pyx_t_13);
      __pyx_t_14 = __Pyx_PyObject_Unicode(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1891, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_14);
      __pyx_t_9 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_13, __pyx_t_14};
        __pyx_t_11 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_Integer, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1891, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_11);
      }
      __pyx_r = __pyx_t_11;
      __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      goto __pyx_L6_except_return;
    }
    goto __pyx_L5_except_error;

    /* "symengine/lib/symengine_wrapper.pyx":1886
 * 
 *     def _sage_(Basic self):
 *         try:             # <<<<<<<<<<<<<<
 *             from sage.symbolic.symengine_conversions import convert_to_integer
 *             return convert_to_integer(self)
*/
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
    __pyx_L6_except_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
  }

  /* "symengine/lib/symengine_wrapper.pyx":1885
 *         return sympy.Integer(int(self))
 * 
 *     def _sage_(Basic self):             # <<<<<<<<<<<<<<
 *         try:
 *             from sage.symbolic.symengine_conversions import convert_to_integer
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Integer._sage_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_convert_to_integer);
  __Pyx_XDECREF(__pyx_v_sage);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1893
 *             return sage.Integer(str(self))
 * 
 *     def __int__(Basic self):             # <<<<<<<<<<<<<<
 *         cdef string s = symengine.mp_get_hex_str(
 *             deref(symengine.rcp_static_cast_Integer(self.thisptr)).as_integer_class())
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_7Integer_19__int__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_7Integer_19__int__ = {"__int__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_7Integer_19__int__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_7Integer_19__int__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__int__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1893, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1893, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__int__", 0) < (0)) __PYX_ERR(0, 1893, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__int__", 1, 1, 1, i); __PYX_ERR(0, 1893, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1893, __pyx_L3_error)
    }
    __pyx_v_self = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__int__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1893, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Integer.__int__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic, 1, "self", 0))) __PYX_ERR(0, 1893, __pyx_L1_error)
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_7Integer_18__int__(__pyx_self, __pyx_v_self);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_7Integer_18__int__(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self) {
  std::string __pyx_v_s;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__int__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1894
 * 
 *     def __int__(Basic self):
 *         cdef string s = symengine.mp_get_hex_str(             # <<<<<<<<<<<<<<
 *             deref(symengine.rcp_static_cast_Integer(self.thisptr)).as_integer_class())
 *         return int(s.decode("utf-8"), base=16)
*/
  __pyx_v_s = SymEngine::mp_get_hex_str((*SymEngine::rcp_static_cast<const SymEngine::Integer>(__pyx_v_self->thisptr)).as_integer_class());

  /* "symengine/lib/symengine_wrapper.pyx":1896
 *         cdef string s = symengine.mp_get_hex_str(
 *             deref(symengine.rcp_static_cast_Integer(self.thisptr)).as_integer_class())
 *         return int(s.decode("utf-8"), base=16)             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __pyx_t_3 = __Pyx_decode_cpp_string(__pyx_v_s, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1896, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, __pyx_t_3};
    __pyx_t_5 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1896, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_base, __pyx_mstate_global->__pyx_int_16, __pyx_t_5, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 1896, __pyx_L1_error)
    __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)(&PyLong_Type), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_5);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1896, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1893
 *             return sage.Integer(str(self))
 * 
 *     def __int__(Basic self):             # <<<<<<<<<<<<<<
 *         cdef string s = symengine.mp_get_hex_str(
 *             deref(symengine.rcp_static_cast_Integer(self.thisptr)).as_integer_class())
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Integer.__int__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1898
 *         return int(s.decode("utf-8"), base=16)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def p(self):
 *         return int(self)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_7Integer_21p(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_7Integer_21p = {"p", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_7Integer_21p, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_7Integer_21p(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("p (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1898, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1898, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "p", 0) < (0)) __PYX_ERR(0, 1898, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("p", 1, 1, 1, i); __PYX_ERR(0, 1898, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1898, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("p", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1898, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Integer.p", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_7Integer_20p(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_7Integer_20p(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("p", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1900
 *     @property
 *     def p(self):
 *         return int(self)             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1900, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1898
 *         return int(s.decode("utf-8"), base=16)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def p(self):
 *         return int(self)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Integer.p", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1902
 *         return int(self)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def q(self):
 *         return 1
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_7Integer_23q(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_7Integer_23q = {"q", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_7Integer_23q, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_7Integer_23q(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("q (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1902, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1902, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "q", 0) < (0)) __PYX_ERR(0, 1902, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("q", 1, 1, 1, i); __PYX_ERR(0, 1902, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1902, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("q", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1902, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Integer.q", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_7Integer_22q(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_7Integer_22q(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("q", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1904
 *     @property
 *     def q(self):
 *         return 1             # <<<<<<<<<<<<<<
 * 
 *     def get_num_den(Basic self):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_int_1);
  __pyx_r = __pyx_mstate_global->__pyx_int_1;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1902
 *         return int(self)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def q(self):
 *         return 1
*/

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

/* "symengine/lib/symengine_wrapper.pyx":1906
 *         return 1
 * 
 *     def get_num_den(Basic self):             # <<<<<<<<<<<<<<
 *         return self, 1
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_7Integer_25get_num_den(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_7Integer_25get_num_den = {"get_num_den", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_7Integer_25get_num_den, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_7Integer_25get_num_den(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_num_den (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1906, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1906, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "get_num_den", 0) < (0)) __PYX_ERR(0, 1906, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("get_num_den", 1, 1, 1, i); __PYX_ERR(0, 1906, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1906, __pyx_L3_error)
    }
    __pyx_v_self = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("get_num_den", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1906, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Integer.get_num_den", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic, 1, "self", 0))) __PYX_ERR(0, 1906, __pyx_L1_error)
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_7Integer_24get_num_den(__pyx_self, __pyx_v_self);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_7Integer_24get_num_den(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_num_den", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1907
 * 
 *     def get_num_den(Basic self):
 *         return self, 1             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1907, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF((PyObject *)__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self)) != (0)) __PYX_ERR(0, 1907, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_int_1);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_1) != (0)) __PYX_ERR(0, 1907, __pyx_L1_error);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1906
 *         return 1
 * 
 *     def get_num_den(Basic self):             # <<<<<<<<<<<<<<
 *         return self, 1
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Integer.get_num_den", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1909
 *         return self, 1
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def func(self):
 *         return self.__class__
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_7Integer_27func(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_7Integer_27func = {"func", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_7Integer_27func, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_7Integer_27func(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("func (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1909, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1909, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "func", 0) < (0)) __PYX_ERR(0, 1909, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("func", 1, 1, 1, i); __PYX_ERR(0, 1909, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1909, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("func", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1909, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Integer.func", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_7Integer_26func(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_7Integer_26func(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("func", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1911
 *     @property
 *     def func(self):
 *         return self.__class__             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1911, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1909
 *         return self, 1
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def func(self):
 *         return self.__class__
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Integer.func", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1914
 * 
 * 
 * def dps_to_prec(n):             # <<<<<<<<<<<<<<
 *     """Return the number of bits required to represent n decimals accurately."""
 *     return max(1, int(round((int(n)+1)*3.3219280948873626)))
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_21dps_to_prec(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9symengine_3lib_17symengine_wrapper_20dps_to_prec, "Return the number of bits required to represent n decimals accurately.");
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_21dps_to_prec = {"dps_to_prec", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_21dps_to_prec, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9symengine_3lib_17symengine_wrapper_20dps_to_prec};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_21dps_to_prec(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_n = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("dps_to_prec (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_n,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1914, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1914, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "dps_to_prec", 0) < (0)) __PYX_ERR(0, 1914, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("dps_to_prec", 1, 1, 1, i); __PYX_ERR(0, 1914, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1914, __pyx_L3_error)
    }
    __pyx_v_n = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("dps_to_prec", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1914, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.dps_to_prec", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_20dps_to_prec(__pyx_self, __pyx_v_n);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_20dps_to_prec(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_n) {
  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;
  double __pyx_t_5;
  size_t __pyx_t_6;
  long __pyx_t_7;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dps_to_prec", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1916
 * def dps_to_prec(n):
 *     """Return the number of bits required to represent n decimals accurately."""
 *     return max(1, int(round((int(n)+1)*3.3219280948873626)))             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_n); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1916, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyLong_AddObjC(__pyx_t_3, __pyx_mstate_global->__pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1916, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyNumber_Multiply(__pyx_t_4, __pyx_mstate_global->__pyx_float_3_3219280948873626); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1916, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_5 = __Pyx_PyFloat_AsDouble(__pyx_t_3); if (unlikely((__pyx_t_5 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1916, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyFloat_FromDouble(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1916, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_round, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1916, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1916, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_7 = 1;
  __pyx_t_2 = __Pyx_PyLong_From_long(__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1916, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_t_2, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1916, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 1916, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_8) {
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
  } else {
    __pyx_t_4 = __Pyx_PyLong_From_long(__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1916, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (__Pyx_PyInt_FromNumber(&__pyx_t_4, NULL, 0) < (0)) __PYX_ERR(0, 1916, __pyx_L1_error)
    __pyx_t_1 = __pyx_t_4;
    __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1914
 * 
 * 
 * def dps_to_prec(n):             # <<<<<<<<<<<<<<
 *     """Return the number of bits required to represent n decimals accurately."""
 *     return max(1, int(round((int(n)+1)*3.3219280948873626)))
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.dps_to_prec", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1920
 * 
 * class BasicMeta(type):
 *     def __instancecheck__(self, instance):             # <<<<<<<<<<<<<<
 *         return isinstance(instance, self._classes)
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9BasicMeta_1__instancecheck__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_9BasicMeta_1__instancecheck__ = {"__instancecheck__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_9BasicMeta_1__instancecheck__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9BasicMeta_1__instancecheck__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_instance = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__instancecheck__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_instance,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1920, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1920, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1920, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__instancecheck__", 0) < (0)) __PYX_ERR(0, 1920, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__instancecheck__", 1, 2, 2, i); __PYX_ERR(0, 1920, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1920, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1920, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
    __pyx_v_instance = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__instancecheck__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1920, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.BasicMeta.__instancecheck__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_9BasicMeta___instancecheck__(__pyx_self, __pyx_v_self, __pyx_v_instance);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_9BasicMeta___instancecheck__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_instance) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__instancecheck__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1921
 * class BasicMeta(type):
 *     def __instancecheck__(self, instance):
 *         return isinstance(instance, self._classes)             # <<<<<<<<<<<<<<
 * 
 * class Float(Number):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_classes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1921, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_IsInstance(__pyx_v_instance, __pyx_t_1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 1921, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1921, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1920
 * 
 * class BasicMeta(type):
 *     def __instancecheck__(self, instance):             # <<<<<<<<<<<<<<
 *         return isinstance(instance, self._classes)
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.BasicMeta.__instancecheck__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1925
 * class Float(Number):
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_rational(self):
 *         return None
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Float_1is_rational(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_5Float_1is_rational = {"is_rational", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_5Float_1is_rational, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Float_1is_rational(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_rational (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1925, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1925, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "is_rational", 0) < (0)) __PYX_ERR(0, 1925, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("is_rational", 1, 1, 1, i); __PYX_ERR(0, 1925, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1925, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_rational", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1925, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Float.is_rational", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Float_is_rational(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Float_is_rational(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_rational", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1927
 *     @property
 *     def is_rational(self):
 *         return None             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1925
 * class Float(Number):
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_rational(self):
 *         return None
*/

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

/* "symengine/lib/symengine_wrapper.pyx":1929
 *         return None
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_irrational(self):
 *         return None
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Float_3is_irrational(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_5Float_3is_irrational = {"is_irrational", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_5Float_3is_irrational, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Float_3is_irrational(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_irrational (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1929, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1929, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "is_irrational", 0) < (0)) __PYX_ERR(0, 1929, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("is_irrational", 1, 1, 1, i); __PYX_ERR(0, 1929, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1929, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_irrational", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1929, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Float.is_irrational", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Float_2is_irrational(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Float_2is_irrational(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_irrational", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1931
 *     @property
 *     def is_irrational(self):
 *         return None             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1929
 *         return None
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_irrational(self):
 *         return None
*/

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

/* "symengine/lib/symengine_wrapper.pyx":1933
 *         return None
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_real(self):
 *         return True
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Float_5is_real(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_5Float_5is_real = {"is_real", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_5Float_5is_real, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Float_5is_real(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_real (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1933, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1933, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "is_real", 0) < (0)) __PYX_ERR(0, 1933, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("is_real", 1, 1, 1, i); __PYX_ERR(0, 1933, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1933, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_real", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1933, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Float.is_real", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Float_4is_real(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Float_4is_real(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_real", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1935
 *     @property
 *     def is_real(self):
 *         return True             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_True);
  __pyx_r = Py_True;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1933
 *         return None
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_real(self):
 *         return True
*/

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

/* "symengine/lib/symengine_wrapper.pyx":1937
 *         return True
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_Float(self):
 *         return True
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Float_7is_Float(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_5Float_7is_Float = {"is_Float", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_5Float_7is_Float, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Float_7is_Float(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_Float (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1937, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1937, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "is_Float", 0) < (0)) __PYX_ERR(0, 1937, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("is_Float", 1, 1, 1, i); __PYX_ERR(0, 1937, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1937, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_Float", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1937, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Float.is_Float", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Float_6is_Float(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Float_6is_Float(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_Float", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1939
 *     @property
 *     def is_Float(self):
 *         return True             # <<<<<<<<<<<<<<
 * 
 *     def __new__(cls, num, dps=None, precision=None):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_True);
  __pyx_r = Py_True;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1937
 *         return True
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_Float(self):
 *         return True
*/

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

/* "symengine/lib/symengine_wrapper.pyx":1941
 *         return True
 * 
 *     def __new__(cls, num, dps=None, precision=None):             # <<<<<<<<<<<<<<
 *         if cls is not Float:
 *             return super(Float, cls).__new__(cls)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Float_9__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_5Float_9__new__ = {"__new__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_5Float_9__new__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Float_9__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_num = 0;
  PyObject *__pyx_v_dps = 0;
  PyObject *__pyx_v_precision = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,&__pyx_mstate_global->__pyx_n_u_num,&__pyx_mstate_global->__pyx_n_u_dps,&__pyx_mstate_global->__pyx_n_u_precision,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1941, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1941, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1941, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1941, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1941, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__new__", 0) < (0)) __PYX_ERR(0, 1941, __pyx_L3_error)
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__new__", 0, 2, 4, i); __PYX_ERR(0, 1941, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1941, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1941, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1941, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1941, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_cls = values[0];
    __pyx_v_num = values[1];
    __pyx_v_dps = values[2];
    __pyx_v_precision = values[3];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 0, 2, 4, __pyx_nargs); __PYX_ERR(0, 1941, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Float.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Float_8__new__(__pyx_self, __pyx_v_cls, __pyx_v_num, __pyx_v_dps, __pyx_v_precision);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Float_8__new__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_num, PyObject *__pyx_v_dps, PyObject *__pyx_v_precision) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  size_t __pyx_t_7;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__new__", 0);
  __Pyx_INCREF(__pyx_v_dps);
  __Pyx_INCREF(__pyx_v_precision);

  /* "symengine/lib/symengine_wrapper.pyx":1942
 * 
 *     def __new__(cls, num, dps=None, precision=None):
 *         if cls is not Float:             # <<<<<<<<<<<<<<
 *             return super(Float, cls).__new__(cls)
 * 
*/
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_Float); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1942, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__pyx_v_cls != __pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "symengine/lib/symengine_wrapper.pyx":1943
 *     def __new__(cls, num, dps=None, precision=None):
 *         if cls is not Float:
 *             return super(Float, cls).__new__(cls)             # <<<<<<<<<<<<<<
 * 
 *         if dps is not None and precision is not None:
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_5 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_Float); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1943, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_t_6, __pyx_v_cls};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_super, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1943, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    __pyx_t_3 = __pyx_t_4;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_7 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_cls};
      __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1943, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":1942
 * 
 *     def __new__(cls, num, dps=None, precision=None):
 *         if cls is not Float:             # <<<<<<<<<<<<<<
 *             return super(Float, cls).__new__(cls)
 * 
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":1945
 *             return super(Float, cls).__new__(cls)
 * 
 *         if dps is not None and precision is not None:             # <<<<<<<<<<<<<<
 *             raise ValueError('Both decimal and binary precision supplied. '
 *                              'Supply only one. ')
*/
  __pyx_t_8 = (__pyx_v_dps != Py_None);
  if (__pyx_t_8) {
  } else {
    __pyx_t_2 = __pyx_t_8;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_8 = (__pyx_v_precision != Py_None);
  __pyx_t_2 = __pyx_t_8;
  __pyx_L5_bool_binop_done:;
  if (unlikely(__pyx_t_2)) {

    /* "symengine/lib/symengine_wrapper.pyx":1946
 * 
 *         if dps is not None and precision is not None:
 *             raise ValueError('Both decimal and binary precision supplied. '             # <<<<<<<<<<<<<<
 *                              'Supply only one. ')
 *         if dps is None and precision is None:
*/
    __pyx_t_4 = NULL;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Both_decimal_and_binary_precisio};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1946, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 1946, __pyx_L1_error)

    /* "symengine/lib/symengine_wrapper.pyx":1945
 *             return super(Float, cls).__new__(cls)
 * 
 *         if dps is not None and precision is not None:             # <<<<<<<<<<<<<<
 *             raise ValueError('Both decimal and binary precision supplied. '
 *                              'Supply only one. ')
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":1948
 *             raise ValueError('Both decimal and binary precision supplied. '
 *                              'Supply only one. ')
 *         if dps is None and precision is None:             # <<<<<<<<<<<<<<
 *             dps = 15
 *         if precision is None:
*/
  __pyx_t_8 = (__pyx_v_dps == Py_None);
  if (__pyx_t_8) {
  } else {
    __pyx_t_2 = __pyx_t_8;
    goto __pyx_L8_bool_binop_done;
  }
  __pyx_t_8 = (__pyx_v_precision == Py_None);
  __pyx_t_2 = __pyx_t_8;
  __pyx_L8_bool_binop_done:;
  if (__pyx_t_2) {

    /* "symengine/lib/symengine_wrapper.pyx":1949
 *                              'Supply only one. ')
 *         if dps is None and precision is None:
 *             dps = 15             # <<<<<<<<<<<<<<
 *         if precision is None:
 *             precision = dps_to_prec(dps)
*/
    __Pyx_INCREF(__pyx_mstate_global->__pyx_int_15);
    __Pyx_DECREF_SET(__pyx_v_dps, __pyx_mstate_global->__pyx_int_15);

    /* "symengine/lib/symengine_wrapper.pyx":1948
 *             raise ValueError('Both decimal and binary precision supplied. '
 *                              'Supply only one. ')
 *         if dps is None and precision is None:             # <<<<<<<<<<<<<<
 *             dps = 15
 *         if precision is None:
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":1950
 *         if dps is None and precision is None:
 *             dps = 15
 *         if precision is None:             # <<<<<<<<<<<<<<
 *             precision = dps_to_prec(dps)
 * 
*/
  __pyx_t_2 = (__pyx_v_precision == Py_None);
  if (__pyx_t_2) {

    /* "symengine/lib/symengine_wrapper.pyx":1951
 *             dps = 15
 *         if precision is None:
 *             precision = dps_to_prec(dps)             # <<<<<<<<<<<<<<
 * 
 *         if precision > 53:
*/
    __pyx_t_4 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_dps_to_prec); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1951, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_7 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      assert(__pyx_t_4);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
      __pyx_t_7 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_dps};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1951, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_DECREF_SET(__pyx_v_precision, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":1950
 *         if dps is None and precision is None:
 *             dps = 15
 *         if precision is None:             # <<<<<<<<<<<<<<
 *             precision = dps_to_prec(dps)
 * 
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":1953
 *             precision = dps_to_prec(dps)
 * 
 *         if precision > 53:             # <<<<<<<<<<<<<<
 *             if isinstance(num, RealMPFR) and precision == num.get_prec():
 *                 return num
*/
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_precision, __pyx_mstate_global->__pyx_int_53, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1953, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1953, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "symengine/lib/symengine_wrapper.pyx":1954
 * 
 *         if precision > 53:
 *             if isinstance(num, RealMPFR) and precision == num.get_prec():             # <<<<<<<<<<<<<<
 *                 return num
 *             return RealMPFR(str(num), precision)
*/
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_RealMPFR); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1954, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_8 = PyObject_IsInstance(__pyx_v_num, __pyx_t_1); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 1954, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_8) {
    } else {
      __pyx_t_2 = __pyx_t_8;
      goto __pyx_L13_bool_binop_done;
    }
    __pyx_t_3 = __pyx_v_num;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_7 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
      __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_prec, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1954, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __pyx_t_3 = PyObject_RichCompare(__pyx_v_precision, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1954, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 1954, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_2 = __pyx_t_8;
    __pyx_L13_bool_binop_done:;
    if (__pyx_t_2) {

      /* "symengine/lib/symengine_wrapper.pyx":1955
 *         if precision > 53:
 *             if isinstance(num, RealMPFR) and precision == num.get_prec():
 *                 return num             # <<<<<<<<<<<<<<
 *             return RealMPFR(str(num), precision)
 *         if precision > 53:
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_num);
      __pyx_r = __pyx_v_num;
      goto __pyx_L0;

      /* "symengine/lib/symengine_wrapper.pyx":1954
 * 
 *         if precision > 53:
 *             if isinstance(num, RealMPFR) and precision == num.get_prec():             # <<<<<<<<<<<<<<
 *                 return num
 *             return RealMPFR(str(num), precision)
*/
    }

    /* "symengine/lib/symengine_wrapper.pyx":1956
 *             if isinstance(num, RealMPFR) and precision == num.get_prec():
 *                 return num
 *             return RealMPFR(str(num), precision)             # <<<<<<<<<<<<<<
 *         if precision > 53:
 *             raise ValueError('RealMPFR unavailable for high precision numerical values.')
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_RealMPFR); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1956, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyObject_Unicode(__pyx_v_num); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1956, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4);
      assert(__pyx_t_1);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
      __pyx_t_7 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_1, __pyx_t_6, __pyx_v_precision};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1956, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":1953
 *             precision = dps_to_prec(dps)
 * 
 *         if precision > 53:             # <<<<<<<<<<<<<<
 *             if isinstance(num, RealMPFR) and precision == num.get_prec():
 *                 return num
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":1957
 *                 return num
 *             return RealMPFR(str(num), precision)
 *         if precision > 53:             # <<<<<<<<<<<<<<
 *             raise ValueError('RealMPFR unavailable for high precision numerical values.')
 *         elif isinstance(num, RealDouble):
*/
  __pyx_t_3 = PyObject_RichCompare(__pyx_v_precision, __pyx_mstate_global->__pyx_int_53, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1957, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1957, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(__pyx_t_2)) {

    /* "symengine/lib/symengine_wrapper.pyx":1958
 *             return RealMPFR(str(num), precision)
 *         if precision > 53:
 *             raise ValueError('RealMPFR unavailable for high precision numerical values.')             # <<<<<<<<<<<<<<
 *         elif isinstance(num, RealDouble):
 *             return num
*/
    __pyx_t_4 = NULL;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_RealMPFR_unavailable_for_high_pr};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1958, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 1958, __pyx_L1_error)

    /* "symengine/lib/symengine_wrapper.pyx":1957
 *                 return num
 *             return RealMPFR(str(num), precision)
 *         if precision > 53:             # <<<<<<<<<<<<<<
 *             raise ValueError('RealMPFR unavailable for high precision numerical values.')
 *         elif isinstance(num, RealDouble):
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":1959
 *         if precision > 53:
 *             raise ValueError('RealMPFR unavailable for high precision numerical values.')
 *         elif isinstance(num, RealDouble):             # <<<<<<<<<<<<<<
 *             return num
 *         else:
*/
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_RealDouble); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1959, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyObject_IsInstance(__pyx_v_num, __pyx_t_3); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 1959, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_2) {

    /* "symengine/lib/symengine_wrapper.pyx":1960
 *             raise ValueError('RealMPFR unavailable for high precision numerical values.')
 *         elif isinstance(num, RealDouble):
 *             return num             # <<<<<<<<<<<<<<
 *         else:
 *             return RealDouble(float(num))
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_num);
    __pyx_r = __pyx_v_num;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":1959
 *         if precision > 53:
 *             raise ValueError('RealMPFR unavailable for high precision numerical values.')
 *         elif isinstance(num, RealDouble):             # <<<<<<<<<<<<<<
 *             return num
 *         else:
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":1962
 *             return num
 *         else:
 *             return RealDouble(float(num))             # <<<<<<<<<<<<<<
 * 
 * 
*/
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_RealDouble); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1962, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = __Pyx_PyNumber_Float(__pyx_v_num); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1962, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_7 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
      assert(__pyx_t_4);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
      __pyx_t_7 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_1};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1962, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
  }

  /* "symengine/lib/symengine_wrapper.pyx":1941
 *         return True
 * 
 *     def __new__(cls, num, dps=None, precision=None):             # <<<<<<<<<<<<<<
 *         if cls is not Float:
 *             return super(Float, cls).__new__(cls)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Float.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_dps);
  __Pyx_XDECREF(__pyx_v_precision);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1970
 * class RealDouble(Float):
 * 
 *     def __new__(cls, i):             # <<<<<<<<<<<<<<
 *         cdef double i_ = i
 *         return c2py(symengine.make_rcp_RealDouble(i_))
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10RealDouble_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_10RealDouble_1__new__ = {"__new__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_10RealDouble_1__new__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10RealDouble_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_i = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,&__pyx_mstate_global->__pyx_n_u_i,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1970, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1970, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1970, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__new__", 0) < (0)) __PYX_ERR(0, 1970, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__new__", 1, 2, 2, i); __PYX_ERR(0, 1970, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1970, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1970, __pyx_L3_error)
    }
    __pyx_v_cls = values[0];
    __pyx_v_i = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1970, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.RealDouble.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_10RealDouble___new__(__pyx_self, __pyx_v_cls, __pyx_v_i);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10RealDouble___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_i) {
  double __pyx_v_i_;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__new__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1971
 * 
 *     def __new__(cls, i):
 *         cdef double i_ = i             # <<<<<<<<<<<<<<
 *         return c2py(symengine.make_rcp_RealDouble(i_))
 * 
*/
  __pyx_t_1 = __Pyx_PyFloat_AsDouble(__pyx_v_i); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1971, __pyx_L1_error)
  __pyx_v_i_ = __pyx_t_1;

  /* "symengine/lib/symengine_wrapper.pyx":1972
 *     def __new__(cls, i):
 *         cdef double i_ = i
 *         return c2py(symengine.make_rcp_RealDouble(i_))             # <<<<<<<<<<<<<<
 * 
 *     def _sympy_(Basic self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(SymEngine::make_rcp<const SymEngine::RealDouble>(__pyx_v_i_)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1972, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1970
 * class RealDouble(Float):
 * 
 *     def __new__(cls, i):             # <<<<<<<<<<<<<<
 *         cdef double i_ = i
 *         return c2py(symengine.make_rcp_RealDouble(i_))
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.RealDouble.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1974
 *         return c2py(symengine.make_rcp_RealDouble(i_))
 * 
 *     def _sympy_(Basic self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.Float(float(self))
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10RealDouble_3_sympy_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_10RealDouble_3_sympy_ = {"_sympy_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_10RealDouble_3_sympy_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10RealDouble_3_sympy_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sympy_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1974, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1974, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_sympy_", 0) < (0)) __PYX_ERR(0, 1974, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 1, 1, i); __PYX_ERR(0, 1974, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1974, __pyx_L3_error)
    }
    __pyx_v_self = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1974, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.RealDouble._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic, 1, "self", 0))) __PYX_ERR(0, 1974, __pyx_L1_error)
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_10RealDouble_2_sympy_(__pyx_self, __pyx_v_self);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10RealDouble_2_sympy_(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self) {
  PyObject *__pyx_v_sympy = 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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sympy_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1975
 * 
 *     def _sympy_(Basic self):
 *         import sympy             # <<<<<<<<<<<<<<
 *         return sympy.Float(float(self))
 * 
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sympy, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1975, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sympy = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1976
 *     def _sympy_(Basic self):
 *         import sympy
 *         return sympy.Float(float(self))             # <<<<<<<<<<<<<<
 * 
 *     def _sage_(Basic self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __pyx_v_sympy;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyNumber_Float(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1976, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_Float, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1976, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1974
 *         return c2py(symengine.make_rcp_RealDouble(i_))
 * 
 *     def _sympy_(Basic self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.Float(float(self))
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.RealDouble._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sympy);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1978
 *         return sympy.Float(float(self))
 * 
 *     def _sage_(Basic self):             # <<<<<<<<<<<<<<
 *         import sage.all as sage
 *         return sage.RealDoubleField()(float(self))
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10RealDouble_5_sage_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_10RealDouble_5_sage_ = {"_sage_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_10RealDouble_5_sage_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10RealDouble_5_sage_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sage_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1978, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1978, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_sage_", 0) < (0)) __PYX_ERR(0, 1978, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_sage_", 1, 1, 1, i); __PYX_ERR(0, 1978, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1978, __pyx_L3_error)
    }
    __pyx_v_self = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_sage_", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1978, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.RealDouble._sage_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic, 1, "self", 0))) __PYX_ERR(0, 1978, __pyx_L1_error)
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_10RealDouble_4_sage_(__pyx_self, __pyx_v_self);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10RealDouble_4_sage_(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self) {
  PyObject *__pyx_v_sage = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  size_t __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sage_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1979
 * 
 *     def _sage_(Basic self):
 *         import sage.all as sage             # <<<<<<<<<<<<<<
 *         return sage.RealDoubleField()(float(self))
 * 
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sage_all, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1979, __pyx_L1_error)
  __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_all);
  Py_DECREF(__pyx_t_2);
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1979, __pyx_L1_error)
  __pyx_t_2 = __pyx_t_3;
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sage = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1980
 *     def _sage_(Basic self):
 *         import sage.all as sage
 *         return sage.RealDoubleField()(float(self))             # <<<<<<<<<<<<<<
 * 
 *     def __float__(Basic self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = NULL;
  __pyx_t_6 = __pyx_v_sage;
  __Pyx_INCREF(__pyx_t_6);
  __pyx_t_7 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
    __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_RealDoubleField, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1980, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
  }
  __pyx_t_6 = __Pyx_PyNumber_Float(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1980, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_7 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_6};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1980, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1978
 *         return sympy.Float(float(self))
 * 
 *     def _sage_(Basic self):             # <<<<<<<<<<<<<<
 *         import sage.all as sage
 *         return sage.RealDoubleField()(float(self))
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.RealDouble._sage_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sage);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1982
 *         return sage.RealDoubleField()(float(self))
 * 
 *     def __float__(Basic self):             # <<<<<<<<<<<<<<
 *         return deref(symengine.rcp_static_cast_RealDouble(self.thisptr)).as_double()
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10RealDouble_7__float__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_10RealDouble_7__float__ = {"__float__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_10RealDouble_7__float__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10RealDouble_7__float__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__float__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1982, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1982, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__float__", 0) < (0)) __PYX_ERR(0, 1982, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__float__", 1, 1, 1, i); __PYX_ERR(0, 1982, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1982, __pyx_L3_error)
    }
    __pyx_v_self = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__float__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1982, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.RealDouble.__float__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic, 1, "self", 0))) __PYX_ERR(0, 1982, __pyx_L1_error)
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_10RealDouble_6__float__(__pyx_self, __pyx_v_self);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10RealDouble_6__float__(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__float__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1983
 * 
 *     def __float__(Basic self):
 *         return deref(symengine.rcp_static_cast_RealDouble(self.thisptr)).as_double()             # <<<<<<<<<<<<<<
 * 
 *     def __complex__(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble((*SymEngine::rcp_static_cast<const SymEngine::RealDouble>(__pyx_v_self->thisptr)).as_double()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1983, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1982
 *         return sage.RealDoubleField()(float(self))
 * 
 *     def __float__(Basic self):             # <<<<<<<<<<<<<<
 *         return deref(symengine.rcp_static_cast_RealDouble(self.thisptr)).as_double()
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.RealDouble.__float__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1985
 *         return deref(symengine.rcp_static_cast_RealDouble(self.thisptr)).as_double()
 * 
 *     def __complex__(self):             # <<<<<<<<<<<<<<
 *         return complex(float(self))
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10RealDouble_9__complex__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_10RealDouble_9__complex__ = {"__complex__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_10RealDouble_9__complex__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10RealDouble_9__complex__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__complex__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1985, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1985, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__complex__", 0) < (0)) __PYX_ERR(0, 1985, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__complex__", 1, 1, 1, i); __PYX_ERR(0, 1985, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1985, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__complex__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1985, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.RealDouble.__complex__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_10RealDouble_8__complex__(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10RealDouble_8__complex__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__complex__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1986
 * 
 *     def __complex__(self):
 *         return complex(float(self))             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __pyx_t_3 = __Pyx_PyNumber_Float(__pyx_v_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1986, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(&PyComplex_Type), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1986, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1985
 *         return deref(symengine.rcp_static_cast_RealDouble(self.thisptr)).as_double()
 * 
 *     def __complex__(self):             # <<<<<<<<<<<<<<
 *         return complex(float(self))
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.RealDouble.__complex__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1991
 * cdef class ComplexBase(Number):
 * 
 *     def real_part(Basic self):             # <<<<<<<<<<<<<<
 *         return c2py(<rcp_const_basic>deref(symengine.rcp_static_cast_ComplexBase(self.thisptr)).real_part())
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_11ComplexBase_1real_part(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_11ComplexBase_1real_part = {"real_part", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_11ComplexBase_1real_part, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_11ComplexBase_1real_part(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("real_part (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("real_part", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("real_part", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_11ComplexBase_real_part(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_ComplexBase *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_11ComplexBase_real_part(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_ComplexBase *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("real_part", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1992
 * 
 *     def real_part(Basic self):
 *         return c2py(<rcp_const_basic>deref(symengine.rcp_static_cast_ComplexBase(self.thisptr)).real_part())             # <<<<<<<<<<<<<<
 * 
 *     def imaginary_part(Basic self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)(*SymEngine::rcp_static_cast<const SymEngine::ComplexBase>(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.thisptr)).real_part())); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1992, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1991
 * cdef class ComplexBase(Number):
 * 
 *     def real_part(Basic self):             # <<<<<<<<<<<<<<
 *         return c2py(<rcp_const_basic>deref(symengine.rcp_static_cast_ComplexBase(self.thisptr)).real_part())
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.ComplexBase.real_part", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1994
 *         return c2py(<rcp_const_basic>deref(symengine.rcp_static_cast_ComplexBase(self.thisptr)).real_part())
 * 
 *     def imaginary_part(Basic self):             # <<<<<<<<<<<<<<
 *         return c2py(<rcp_const_basic>deref(symengine.rcp_static_cast_ComplexBase(self.thisptr)).imaginary_part())
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_11ComplexBase_3imaginary_part(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_11ComplexBase_3imaginary_part = {"imaginary_part", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_11ComplexBase_3imaginary_part, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_11ComplexBase_3imaginary_part(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("imaginary_part (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("imaginary_part", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("imaginary_part", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_11ComplexBase_2imaginary_part(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_ComplexBase *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_11ComplexBase_2imaginary_part(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_ComplexBase *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("imaginary_part", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1995
 * 
 *     def imaginary_part(Basic self):
 *         return c2py(<rcp_const_basic>deref(symengine.rcp_static_cast_ComplexBase(self.thisptr)).imaginary_part())             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)(*SymEngine::rcp_static_cast<const SymEngine::ComplexBase>(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.thisptr)).imaginary_part())); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1995, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1994
 *         return c2py(<rcp_const_basic>deref(symengine.rcp_static_cast_ComplexBase(self.thisptr)).real_part())
 * 
 *     def imaginary_part(Basic self):             # <<<<<<<<<<<<<<
 *         return c2py(<rcp_const_basic>deref(symengine.rcp_static_cast_ComplexBase(self.thisptr)).imaginary_part())
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.ComplexBase.imaginary_part", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":1997
 *         return c2py(<rcp_const_basic>deref(symengine.rcp_static_cast_ComplexBase(self.thisptr)).imaginary_part())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def real(self):
 *         return self.real_part()
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_11ComplexBase_4real_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_11ComplexBase_4real_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_11ComplexBase_4real___get__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_ComplexBase *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_11ComplexBase_4real___get__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_ComplexBase *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":1999
 *     @property
 *     def real(self):
 *         return self.real_part()             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_real_part, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1999, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":1997
 *         return c2py(<rcp_const_basic>deref(symengine.rcp_static_cast_ComplexBase(self.thisptr)).imaginary_part())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def real(self):
 *         return self.real_part()
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.ComplexBase.real.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2001
 *         return self.real_part()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def imag(self):
 *         return self.imaginary_part()
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_11ComplexBase_4imag_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_11ComplexBase_4imag_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_11ComplexBase_4imag___get__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_ComplexBase *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_11ComplexBase_4imag___get__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_ComplexBase *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2003
 *     @property
 *     def imag(self):
 *         return self.imaginary_part()             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_imaginary_part, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2003, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2001
 *         return self.real_part()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def imag(self):
 *         return self.imaginary_part()
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.ComplexBase.imag.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2008
 * cdef class ComplexDouble(ComplexBase):
 * 
 *     def __cinit__(self, i = None):             # <<<<<<<<<<<<<<
 *         if i is None:
 *             return
*/

/* Python wrapper */
static int __pyx_pw_9symengine_3lib_17symengine_wrapper_13ComplexDouble_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_9symengine_3lib_17symengine_wrapper_13ComplexDouble_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_i = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_i,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2008, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2008, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__cinit__", 0) < (0)) __PYX_ERR(0, 2008, __pyx_L3_error)
      if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
    } else {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2008, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_i = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 2008, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.ComplexDouble.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_13ComplexDouble___cinit__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_ComplexDouble *)__pyx_v_self), __pyx_v_i);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_9symengine_3lib_17symengine_wrapper_13ComplexDouble___cinit__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_ComplexDouble *__pyx_v_self, PyObject *__pyx_v_i) {
  __pyx_t_double_complex __pyx_v_i_;
  int __pyx_r;
  int __pyx_t_1;
  __pyx_t_double_complex __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2009
 * 
 *     def __cinit__(self, i = None):
 *         if i is None:             # <<<<<<<<<<<<<<
 *             return
 *         cdef double complex i_ = i
*/
  __pyx_t_1 = (__pyx_v_i == Py_None);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":2010
 *     def __cinit__(self, i = None):
 *         if i is None:
 *             return             # <<<<<<<<<<<<<<
 *         cdef double complex i_ = i
 *         self.thisptr = symengine.make_rcp_ComplexDouble(i_)
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":2009
 * 
 *     def __cinit__(self, i = None):
 *         if i is None:             # <<<<<<<<<<<<<<
 *             return
 *         cdef double complex i_ = i
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":2011
 *         if i is None:
 *             return
 *         cdef double complex i_ = i             # <<<<<<<<<<<<<<
 *         self.thisptr = symengine.make_rcp_ComplexDouble(i_)
 * 
*/
  __pyx_t_2 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_v_i); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2011, __pyx_L1_error)
  __pyx_v_i_ = __pyx_t_2;

  /* "symengine/lib/symengine_wrapper.pyx":2012
 *             return
 *         cdef double complex i_ = i
 *         self.thisptr = symengine.make_rcp_ComplexDouble(i_)             # <<<<<<<<<<<<<<
 * 
 *     def _sympy_(self):
*/
  __pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base.thisptr = SymEngine::make_rcp<const SymEngine::ComplexDouble>(__pyx_v_i_);

  /* "symengine/lib/symengine_wrapper.pyx":2008
 * cdef class ComplexDouble(ComplexBase):
 * 
 *     def __cinit__(self, i = None):             # <<<<<<<<<<<<<<
 *         if i is None:
 *             return
*/

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.ComplexDouble.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2014
 *         self.thisptr = symengine.make_rcp_ComplexDouble(i_)
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return self.real_part()._sympy_() + sympy.I * self.imaginary_part()._sympy_()
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_13ComplexDouble_3_sympy_(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_13ComplexDouble_3_sympy_ = {"_sympy_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_13ComplexDouble_3_sympy_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_13ComplexDouble_3_sympy_(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sympy_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("_sympy_", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_13ComplexDouble_2_sympy_(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_ComplexDouble *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_13ComplexDouble_2_sympy_(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_ComplexDouble *__pyx_v_self) {
  PyObject *__pyx_v_sympy = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sympy_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2015
 * 
 *     def _sympy_(self):
 *         import sympy             # <<<<<<<<<<<<<<
 *         return self.real_part()._sympy_() + sympy.I * self.imaginary_part()._sympy_()
 * 
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sympy, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2015, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sympy = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2016
 *     def _sympy_(self):
 *         import sympy
 *         return self.real_part()._sympy_() + sympy.I * self.imaginary_part()._sympy_()             # <<<<<<<<<<<<<<
 * 
 *     def _sage_(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_5);
  __pyx_t_6 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
    __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_real_part, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2016, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  __pyx_t_3 = __pyx_t_4;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_6 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_sympy_2, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2016, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_I); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2016, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_8 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_8);
  __pyx_t_6 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL};
    __pyx_t_7 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_imaginary_part, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2016, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
  }
  __pyx_t_5 = __pyx_t_7;
  __Pyx_INCREF(__pyx_t_5);
  __pyx_t_6 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_sympy_2, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2016, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __pyx_t_7 = PyNumber_Multiply(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2016, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2016, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2014
 *         self.thisptr = symengine.make_rcp_ComplexDouble(i_)
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return self.real_part()._sympy_() + sympy.I * self.imaginary_part()._sympy_()
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.ComplexDouble._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sympy);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2018
 *         return self.real_part()._sympy_() + sympy.I * self.imaginary_part()._sympy_()
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         import sage.all as sage
 *         return self.real_part()._sage_() + sage.I * self.imaginary_part()._sage_()
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_13ComplexDouble_5_sage_(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_13ComplexDouble_5_sage_ = {"_sage_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_13ComplexDouble_5_sage_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_13ComplexDouble_5_sage_(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sage_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("_sage_", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("_sage_", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_13ComplexDouble_4_sage_(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_ComplexDouble *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_13ComplexDouble_4_sage_(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_ComplexDouble *__pyx_v_self) {
  PyObject *__pyx_v_sage = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  size_t __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sage_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2019
 * 
 *     def _sage_(self):
 *         import sage.all as sage             # <<<<<<<<<<<<<<
 *         return self.real_part()._sage_() + sage.I * self.imaginary_part()._sage_()
 * 
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sage_all, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2019, __pyx_L1_error)
  __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_all);
  Py_DECREF(__pyx_t_2);
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2019, __pyx_L1_error)
  __pyx_t_2 = __pyx_t_3;
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sage = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2020
 *     def _sage_(self):
 *         import sage.all as sage
 *         return self.real_part()._sage_() + sage.I * self.imaginary_part()._sage_()             # <<<<<<<<<<<<<<
 * 
 *     def __complex__(Basic self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_6 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_6);
  __pyx_t_7 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
    __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_real_part, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2020, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
  }
  __pyx_t_4 = __pyx_t_5;
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_7 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_sage, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2020, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_sage, __pyx_mstate_global->__pyx_n_u_I); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2020, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_9 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_9);
  __pyx_t_7 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL};
    __pyx_t_8 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_imaginary_part, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2020, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
  }
  __pyx_t_6 = __pyx_t_8;
  __Pyx_INCREF(__pyx_t_6);
  __pyx_t_7 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
    __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_sage, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2020, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  __pyx_t_8 = PyNumber_Multiply(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2020, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyNumber_Add(__pyx_t_1, __pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2020, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2018
 *         return self.real_part()._sympy_() + sympy.I * self.imaginary_part()._sympy_()
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         import sage.all as sage
 *         return self.real_part()._sage_() + sage.I * self.imaginary_part()._sage_()
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.ComplexDouble._sage_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sage);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2022
 *         return self.real_part()._sage_() + sage.I * self.imaginary_part()._sage_()
 * 
 *     def __complex__(Basic self):             # <<<<<<<<<<<<<<
 *         return deref(symengine.rcp_static_cast_ComplexDouble(self.thisptr)).as_complex_double()
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_13ComplexDouble_7__complex__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_13ComplexDouble_7__complex__ = {"__complex__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_13ComplexDouble_7__complex__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_13ComplexDouble_7__complex__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__complex__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__complex__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__complex__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_13ComplexDouble_6__complex__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_ComplexDouble *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_13ComplexDouble_6__complex__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_ComplexDouble *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __pyx_t_double_complex __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__complex__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2023
 * 
 *     def __complex__(Basic self):
 *         return deref(symengine.rcp_static_cast_ComplexDouble(self.thisptr)).as_complex_double()             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = (*SymEngine::rcp_static_cast<const SymEngine::ComplexDouble>(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base.thisptr)).as_complex_double();
  __pyx_t_2 = __pyx_PyComplex_FromComplex(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2023, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2022
 *         return self.real_part()._sage_() + sage.I * self.imaginary_part()._sage_()
 * 
 *     def __complex__(Basic self):             # <<<<<<<<<<<<<<
 *         return deref(symengine.rcp_static_cast_ComplexDouble(self.thisptr)).as_complex_double()
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.ComplexDouble.__complex__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2028
 * class RealMPFR(Float):
 * 
 *     def __new__(cls, i = None, long prec = 53, unsigned base = 10):             # <<<<<<<<<<<<<<
 *         if i is None:
 *             return
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8RealMPFR_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_8RealMPFR_1__new__ = {"__new__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_8RealMPFR_1__new__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8RealMPFR_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_i = 0;
  long __pyx_v_prec;
  unsigned int __pyx_v_base;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,&__pyx_mstate_global->__pyx_n_u_i,&__pyx_mstate_global->__pyx_n_u_prec_2,&__pyx_mstate_global->__pyx_n_u_base,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2028, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 2028, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2028, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2028, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2028, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__new__", 0) < (0)) __PYX_ERR(0, 2028, __pyx_L3_error)
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__new__", 0, 1, 4, i); __PYX_ERR(0, 2028, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 2028, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2028, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2028, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2028, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_cls = values[0];
    __pyx_v_i = values[1];
    if (values[2]) {
      __pyx_v_prec = __Pyx_PyLong_As_long(values[2]); if (unlikely((__pyx_v_prec == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 2028, __pyx_L3_error)
    } else {
      __pyx_v_prec = ((long)((long)53));
    }
    if (values[3]) {
      __pyx_v_base = __Pyx_PyLong_As_unsigned_int(values[3]); if (unlikely((__pyx_v_base == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2028, __pyx_L3_error)
    } else {
      __pyx_v_base = ((unsigned int)((unsigned int)10));
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 0, 1, 4, __pyx_nargs); __PYX_ERR(0, 2028, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.RealMPFR.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_8RealMPFR___new__(__pyx_self, __pyx_v_cls, __pyx_v_i, __pyx_v_prec, __pyx_v_base);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8RealMPFR___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_i, long __pyx_v_prec, unsigned int __pyx_v_base) {
  std::string __pyx_v_i_;
  SymEngine::mpfr_class __pyx_v_m;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  std::string __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__new__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2029
 * 
 *     def __new__(cls, i = None, long prec = 53, unsigned base = 10):
 *         if i is None:             # <<<<<<<<<<<<<<
 *             return
 *         cdef string i_ = str(i).encode("utf-8")
*/
  __pyx_t_1 = (__pyx_v_i == Py_None);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":2030
 *     def __new__(cls, i = None, long prec = 53, unsigned base = 10):
 *         if i is None:
 *             return             # <<<<<<<<<<<<<<
 *         cdef string i_ = str(i).encode("utf-8")
 *         cdef symengine.mpfr_class m
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":2029
 * 
 *     def __new__(cls, i = None, long prec = 53, unsigned base = 10):
 *         if i is None:             # <<<<<<<<<<<<<<
 *             return
 *         cdef string i_ = str(i).encode("utf-8")
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":2031
 *         if i is None:
 *             return
 *         cdef string i_ = str(i).encode("utf-8")             # <<<<<<<<<<<<<<
 *         cdef symengine.mpfr_class m
 *         m = symengine.mpfr_class(i_, prec, base)
*/
  __pyx_t_2 = __Pyx_PyObject_Unicode(__pyx_v_i); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2031, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyUnicode_AsUTF8String(((PyObject*)__pyx_t_2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2031, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __pyx_convert_string_from_py_6libcpp_6string_std__in_string(__pyx_t_3); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2031, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_i_ = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_4);

  /* "symengine/lib/symengine_wrapper.pyx":2033
 *         cdef string i_ = str(i).encode("utf-8")
 *         cdef symengine.mpfr_class m
 *         m = symengine.mpfr_class(i_, prec, base)             # <<<<<<<<<<<<<<
 *         return c2py(<rcp_const_basic>symengine.real_mpfr(move[symengine.mpfr_class](m)))
 * 
*/
  __pyx_v_m = SymEngine::mpfr_class(__pyx_v_i_, __pyx_v_prec, __pyx_v_base);

  /* "symengine/lib/symengine_wrapper.pyx":2034
 *         cdef symengine.mpfr_class m
 *         m = symengine.mpfr_class(i_, prec, base)
 *         return c2py(<rcp_const_basic>symengine.real_mpfr(move[symengine.mpfr_class](m)))             # <<<<<<<<<<<<<<
 * 
 *     def get_prec(Basic self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)SymEngine::real_mpfr(cython_std::move<SymEngine::mpfr_class>(__pyx_v_m)))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2034, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2028
 * class RealMPFR(Float):
 * 
 *     def __new__(cls, i = None, long prec = 53, unsigned base = 10):             # <<<<<<<<<<<<<<
 *         if i is None:
 *             return
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.RealMPFR.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2036
 *         return c2py(<rcp_const_basic>symengine.real_mpfr(move[symengine.mpfr_class](m)))
 * 
 *     def get_prec(Basic self):             # <<<<<<<<<<<<<<
 *         return Integer(deref(symengine.rcp_static_cast_RealMPFR(self.thisptr)).get_prec())
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8RealMPFR_3get_prec(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_8RealMPFR_3get_prec = {"get_prec", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_8RealMPFR_3get_prec, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8RealMPFR_3get_prec(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_prec (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2036, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2036, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "get_prec", 0) < (0)) __PYX_ERR(0, 2036, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("get_prec", 1, 1, 1, i); __PYX_ERR(0, 2036, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2036, __pyx_L3_error)
    }
    __pyx_v_self = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("get_prec", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2036, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.RealMPFR.get_prec", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic, 1, "self", 0))) __PYX_ERR(0, 2036, __pyx_L1_error)
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_8RealMPFR_2get_prec(__pyx_self, __pyx_v_self);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8RealMPFR_2get_prec(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_prec", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2037
 * 
 *     def get_prec(Basic self):
 *         return Integer(deref(symengine.rcp_static_cast_RealMPFR(self.thisptr)).get_prec())             # <<<<<<<<<<<<<<
 * 
 *     def _sympy_(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Integer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2037, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyLong_From_mpfr_prec_t((*SymEngine::rcp_static_cast<const SymEngine::RealMPFR>(__pyx_v_self->thisptr)).get_prec()); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2037, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2037, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2036
 *         return c2py(<rcp_const_basic>symengine.real_mpfr(move[symengine.mpfr_class](m)))
 * 
 *     def get_prec(Basic self):             # <<<<<<<<<<<<<<
 *         return Integer(deref(symengine.rcp_static_cast_RealMPFR(self.thisptr)).get_prec())
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.RealMPFR.get_prec", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2039
 *         return Integer(deref(symengine.rcp_static_cast_RealMPFR(self.thisptr)).get_prec())
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         cdef long prec_ = self.get_prec()
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8RealMPFR_5_sympy_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_8RealMPFR_5_sympy_ = {"_sympy_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_8RealMPFR_5_sympy_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8RealMPFR_5_sympy_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sympy_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2039, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2039, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_sympy_", 0) < (0)) __PYX_ERR(0, 2039, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 1, 1, i); __PYX_ERR(0, 2039, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2039, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2039, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.RealMPFR._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_8RealMPFR_4_sympy_(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8RealMPFR_4_sympy_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_sympy = NULL;
  long __pyx_v_prec_;
  PyObject *__pyx_v_prec = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  long __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sympy_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2040
 * 
 *     def _sympy_(self):
 *         import sympy             # <<<<<<<<<<<<<<
 *         cdef long prec_ = self.get_prec()
 *         prec = max(1, int(round(prec_/3.3219280948873626)-1))
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sympy, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2040, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sympy = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2041
 *     def _sympy_(self):
 *         import sympy
 *         cdef long prec_ = self.get_prec()             # <<<<<<<<<<<<<<
 *         prec = max(1, int(round(prec_/3.3219280948873626)-1))
 *         return sympy.Float(str(self), prec)
*/
  __pyx_t_3 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_prec, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2041, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_t_5 = __Pyx_PyLong_As_long(__pyx_t_1); if (unlikely((__pyx_t_5 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 2041, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_prec_ = __pyx_t_5;

  /* "symengine/lib/symengine_wrapper.pyx":2042
 *         import sympy
 *         cdef long prec_ = self.get_prec()
 *         prec = max(1, int(round(prec_/3.3219280948873626)-1))             # <<<<<<<<<<<<<<
 *         return sympy.Float(str(self), prec)
 * 
*/
  __pyx_t_3 = NULL;
  __pyx_t_6 = PyFloat_FromDouble((((double)__pyx_v_prec_) / 3.3219280948873626)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2042, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_6};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_round, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2042, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_t_6 = __Pyx_PyLong_SubtractObjC(__pyx_t_1, __pyx_mstate_global->__pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2042, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2042, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_5 = 1;
  __pyx_t_3 = __Pyx_PyLong_From_long(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2042, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_GT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2042, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 2042, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (__pyx_t_8) {
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_6 = __pyx_t_1;
  } else {
    __pyx_t_7 = __Pyx_PyLong_From_long(__pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2042, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (__Pyx_PyInt_FromNumber(&__pyx_t_7, NULL, 0) < (0)) __PYX_ERR(0, 2042, __pyx_L1_error)
    __pyx_t_6 = __pyx_t_7;
    __pyx_t_7 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __pyx_t_6;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_v_prec = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2043
 *         cdef long prec_ = self.get_prec()
 *         prec = max(1, int(round(prec_/3.3219280948873626)-1))
 *         return sympy.Float(str(self), prec)             # <<<<<<<<<<<<<<
 * 
 *     def _sage_(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_6 = __pyx_v_sympy;
  __Pyx_INCREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_Unicode(__pyx_v_self); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2043, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_t_7, __pyx_v_prec};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_Float, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2043, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2039
 *         return Integer(deref(symengine.rcp_static_cast_RealMPFR(self.thisptr)).get_prec())
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         cdef long prec_ = self.get_prec()
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.RealMPFR._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sympy);
  __Pyx_XDECREF(__pyx_v_prec);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2045
 *         return sympy.Float(str(self), prec)
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         try:
 *             from sage.symbolic.symengine_conversions import convert_to_real_number
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8RealMPFR_7_sage_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_8RealMPFR_7_sage_ = {"_sage_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_8RealMPFR_7_sage_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8RealMPFR_7_sage_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sage_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2045, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2045, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_sage_", 0) < (0)) __PYX_ERR(0, 2045, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_sage_", 1, 1, 1, i); __PYX_ERR(0, 2045, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2045, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_sage_", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2045, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.RealMPFR._sage_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_8RealMPFR_6_sage_(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8RealMPFR_6_sage_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_convert_to_real_number = NULL;
  PyObject *__pyx_v_sage = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  size_t __pyx_t_9;
  int __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sage_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2046
 * 
 *     def _sage_(self):
 *         try:             # <<<<<<<<<<<<<<
 *             from sage.symbolic.symengine_conversions import convert_to_real_number
 *             return convert_to_real_number(self)
*/
  {
    __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:*/ {

      /* "symengine/lib/symengine_wrapper.pyx":2047
 *     def _sage_(self):
 *         try:
 *             from sage.symbolic.symengine_conversions import convert_to_real_number             # <<<<<<<<<<<<<<
 *             return convert_to_real_number(self)
 *         except ImportError:
*/
      {
        PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_convert_to_real_number};
        __pyx_t_5 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sage_symbolic_symengine_conversi, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2047, __pyx_L3_error)
      }
      __pyx_t_4 = __pyx_t_5;
      __Pyx_GOTREF(__pyx_t_4);
      {
        PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_convert_to_real_number};
        __pyx_t_6 = 0; {
          __pyx_t_7 = __Pyx_ImportFrom(__pyx_t_4, __pyx_imported_names[__pyx_t_6]); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2047, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_7);
          switch (__pyx_t_6) {
            case 0:
            __Pyx_INCREF(__pyx_t_7);
            __pyx_v_convert_to_real_number = __pyx_t_7;
            break;
            default:;
          }
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "symengine/lib/symengine_wrapper.pyx":2048
 *         try:
 *             from sage.symbolic.symengine_conversions import convert_to_real_number
 *             return convert_to_real_number(self)             # <<<<<<<<<<<<<<
 *         except ImportError:
 *             import sage.all as sage
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_7 = NULL;
      __Pyx_INCREF(__pyx_v_convert_to_real_number);
      __pyx_t_8 = __pyx_v_convert_to_real_number; 
      __pyx_t_9 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_8))) {
        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8);
        assert(__pyx_t_7);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_8, __pyx__function);
        __pyx_t_9 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_self};
        __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2048, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_4);
      }
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L7_try_return;

      /* "symengine/lib/symengine_wrapper.pyx":2046
 * 
 *     def _sage_(self):
 *         try:             # <<<<<<<<<<<<<<
 *             from sage.symbolic.symengine_conversions import convert_to_real_number
 *             return convert_to_real_number(self)
*/
    }
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":2049
 *             from sage.symbolic.symengine_conversions import convert_to_real_number
 *             return convert_to_real_number(self)
 *         except ImportError:             # <<<<<<<<<<<<<<
 *             import sage.all as sage
 *             return sage.RealField(int(self.get_prec()))(str(self))
*/
    __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_ImportError))));
    if (__pyx_t_10) {
      __Pyx_AddTraceback("symengine.lib.symengine_wrapper.RealMPFR._sage_", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_8, &__pyx_t_7) < 0) __PYX_ERR(0, 2049, __pyx_L5_except_error)
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_8);
      __Pyx_XGOTREF(__pyx_t_7);

      /* "symengine/lib/symengine_wrapper.pyx":2050
 *             return convert_to_real_number(self)
 *         except ImportError:
 *             import sage.all as sage             # <<<<<<<<<<<<<<
 *             return sage.RealField(int(self.get_prec()))(str(self))
 * 
*/
      __pyx_t_5 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sage_all, 0, 0, NULL, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2050, __pyx_L5_except_error)
      __pyx_t_12 = __Pyx_ImportFrom(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_all);
      Py_DECREF(__pyx_t_5);
      if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2050, __pyx_L5_except_error)
      __pyx_t_5 = __pyx_t_12;
      __pyx_t_11 = __pyx_t_5;
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_v_sage = __pyx_t_11;
      __pyx_t_11 = 0;

      /* "symengine/lib/symengine_wrapper.pyx":2051
 *         except ImportError:
 *             import sage.all as sage
 *             return sage.RealField(int(self.get_prec()))(str(self))             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_13 = NULL;
      __pyx_t_15 = __pyx_v_sage;
      __Pyx_INCREF(__pyx_t_15);
      __pyx_t_17 = __pyx_v_self;
      __Pyx_INCREF(__pyx_t_17);
      __pyx_t_9 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_17, NULL};
        __pyx_t_16 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_prec, __pyx_callargs+__pyx_t_9, (1-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
        if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 2051, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_16);
      }
      __pyx_t_17 = __Pyx_PyNumber_Int(__pyx_t_16); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 2051, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_17);
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
      __pyx_t_9 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_15, __pyx_t_17};
        __pyx_t_14 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_RealField, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
        __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
        if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2051, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_14);
      }
      __pyx_t_17 = __Pyx_PyObject_Unicode(__pyx_v_self); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 2051, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_17);
      __pyx_t_9 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_14))) {
        __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_14);
        assert(__pyx_t_13);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_14);
        __Pyx_INCREF(__pyx_t_13);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_14, __pyx__function);
        __pyx_t_9 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_13, __pyx_t_17};
        __pyx_t_11 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_14, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2051, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_11);
      }
      __pyx_r = __pyx_t_11;
      __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      goto __pyx_L6_except_return;
    }
    goto __pyx_L5_except_error;

    /* "symengine/lib/symengine_wrapper.pyx":2046
 * 
 *     def _sage_(self):
 *         try:             # <<<<<<<<<<<<<<
 *             from sage.symbolic.symengine_conversions import convert_to_real_number
 *             return convert_to_real_number(self)
*/
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
    __pyx_L6_except_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
  }

  /* "symengine/lib/symengine_wrapper.pyx":2045
 *         return sympy.Float(str(self), prec)
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         try:
 *             from sage.symbolic.symengine_conversions import convert_to_real_number
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_XDECREF(__pyx_t_17);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.RealMPFR._sage_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_convert_to_real_number);
  __Pyx_XDECREF(__pyx_v_sage);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2055
 * 
 * cdef class ComplexMPC(ComplexBase):
 *     def __cinit__(self, i = None, j = 0, long prec = 53, unsigned base = 10):             # <<<<<<<<<<<<<<
 *         if i is None:
 *             return
*/

/* Python wrapper */
static int __pyx_pw_9symengine_3lib_17symengine_wrapper_10ComplexMPC_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_9symengine_3lib_17symengine_wrapper_10ComplexMPC_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_i = 0;
  PyObject *__pyx_v_j = 0;
  long __pyx_v_prec;
  unsigned int __pyx_v_base;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_i,&__pyx_mstate_global->__pyx_n_u_j,&__pyx_mstate_global->__pyx_n_u_prec_2,&__pyx_mstate_global->__pyx_n_u_base,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2055, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  4:
        values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 2055, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2055, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2055, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2055, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__cinit__", 0) < (0)) __PYX_ERR(0, 2055, __pyx_L3_error)
      if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_0));
    } else {
      switch (__pyx_nargs) {
        case  4:
        values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 2055, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2055, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2055, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2055, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_0));
    }
    __pyx_v_i = values[0];
    __pyx_v_j = values[1];
    if (values[2]) {
      __pyx_v_prec = __Pyx_PyLong_As_long(values[2]); if (unlikely((__pyx_v_prec == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 2055, __pyx_L3_error)
    } else {
      __pyx_v_prec = ((long)53);
    }
    if (values[3]) {
      __pyx_v_base = __Pyx_PyLong_As_unsigned_int(values[3]); if (unlikely((__pyx_v_base == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2055, __pyx_L3_error)
    } else {
      __pyx_v_base = ((unsigned int)10);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 4, __pyx_nargs); __PYX_ERR(0, 2055, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.ComplexMPC.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_10ComplexMPC___cinit__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_ComplexMPC *)__pyx_v_self), __pyx_v_i, __pyx_v_j, __pyx_v_prec, __pyx_v_base);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_9symengine_3lib_17symengine_wrapper_10ComplexMPC___cinit__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_ComplexMPC *__pyx_v_self, PyObject *__pyx_v_i, PyObject *__pyx_v_j, long __pyx_v_prec, unsigned int __pyx_v_base) {
  std::string __pyx_v_i_;
  SymEngine::mpc_class __pyx_v_m;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  std::string __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2056
 * cdef class ComplexMPC(ComplexBase):
 *     def __cinit__(self, i = None, j = 0, long prec = 53, unsigned base = 10):
 *         if i is None:             # <<<<<<<<<<<<<<
 *             return
 *         cdef string i_ = ("(" + str(i) + " " + str(j) + ")").encode("utf-8")
*/
  __pyx_t_1 = (__pyx_v_i == Py_None);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":2057
 *     def __cinit__(self, i = None, j = 0, long prec = 53, unsigned base = 10):
 *         if i is None:
 *             return             # <<<<<<<<<<<<<<
 *         cdef string i_ = ("(" + str(i) + " " + str(j) + ")").encode("utf-8")
 *         cdef symengine.mpc_class m = symengine.mpc_class(i_, prec, base)
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":2056
 * cdef class ComplexMPC(ComplexBase):
 *     def __cinit__(self, i = None, j = 0, long prec = 53, unsigned base = 10):
 *         if i is None:             # <<<<<<<<<<<<<<
 *             return
 *         cdef string i_ = ("(" + str(i) + " " + str(j) + ")").encode("utf-8")
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":2058
 *         if i is None:
 *             return
 *         cdef string i_ = ("(" + str(i) + " " + str(j) + ")").encode("utf-8")             # <<<<<<<<<<<<<<
 *         cdef symengine.mpc_class m = symengine.mpc_class(i_, prec, base)
 *         self.thisptr = <rcp_const_basic>symengine.complex_mpc(move[symengine.mpc_class](m))
*/
  __pyx_t_2 = __Pyx_PyObject_Unicode(__pyx_v_i); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2058, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u__11, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2058, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_t_3, __pyx_mstate_global->__pyx_kp_u__12); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2058, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Unicode(__pyx_v_j); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2058, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2058, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_t_4, __pyx_mstate_global->__pyx_kp_u__5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2058, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyUnicode_AsUTF8String(((PyObject*)__pyx_t_3)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2058, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = __pyx_convert_string_from_py_6libcpp_6string_std__in_string(__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2058, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_i_ = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5);

  /* "symengine/lib/symengine_wrapper.pyx":2059
 *             return
 *         cdef string i_ = ("(" + str(i) + " " + str(j) + ")").encode("utf-8")
 *         cdef symengine.mpc_class m = symengine.mpc_class(i_, prec, base)             # <<<<<<<<<<<<<<
 *         self.thisptr = <rcp_const_basic>symengine.complex_mpc(move[symengine.mpc_class](m))
 * 
*/
  __pyx_v_m = SymEngine::mpc_class(__pyx_v_i_, __pyx_v_prec, __pyx_v_base);

  /* "symengine/lib/symengine_wrapper.pyx":2060
 *         cdef string i_ = ("(" + str(i) + " " + str(j) + ")").encode("utf-8")
 *         cdef symengine.mpc_class m = symengine.mpc_class(i_, prec, base)
 *         self.thisptr = <rcp_const_basic>symengine.complex_mpc(move[symengine.mpc_class](m))             # <<<<<<<<<<<<<<
 * 
 *     def _sympy_(self):
*/
  __pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base.thisptr = ((SymEngine::RCP<const SymEngine::Basic>)SymEngine::complex_mpc(cython_std::move<SymEngine::mpc_class>(__pyx_v_m)));

  /* "symengine/lib/symengine_wrapper.pyx":2055
 * 
 * cdef class ComplexMPC(ComplexBase):
 *     def __cinit__(self, i = None, j = 0, long prec = 53, unsigned base = 10):             # <<<<<<<<<<<<<<
 *         if i is None:
 *             return
*/

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.ComplexMPC.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2062
 *         self.thisptr = <rcp_const_basic>symengine.complex_mpc(move[symengine.mpc_class](m))
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return self.real_part()._sympy_() + sympy.I * self.imaginary_part()._sympy_()
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10ComplexMPC_3_sympy_(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_10ComplexMPC_3_sympy_ = {"_sympy_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_10ComplexMPC_3_sympy_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10ComplexMPC_3_sympy_(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sympy_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("_sympy_", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_10ComplexMPC_2_sympy_(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_ComplexMPC *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10ComplexMPC_2_sympy_(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_ComplexMPC *__pyx_v_self) {
  PyObject *__pyx_v_sympy = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sympy_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2063
 * 
 *     def _sympy_(self):
 *         import sympy             # <<<<<<<<<<<<<<
 *         return self.real_part()._sympy_() + sympy.I * self.imaginary_part()._sympy_()
 * 
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sympy, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2063, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sympy = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2064
 *     def _sympy_(self):
 *         import sympy
 *         return self.real_part()._sympy_() + sympy.I * self.imaginary_part()._sympy_()             # <<<<<<<<<<<<<<
 * 
 *     def _sage_(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_5);
  __pyx_t_6 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
    __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_real_part, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2064, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  __pyx_t_3 = __pyx_t_4;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_6 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_sympy_2, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2064, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_I); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2064, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_8 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_8);
  __pyx_t_6 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL};
    __pyx_t_7 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_imaginary_part, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2064, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
  }
  __pyx_t_5 = __pyx_t_7;
  __Pyx_INCREF(__pyx_t_5);
  __pyx_t_6 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_sympy_2, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2064, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __pyx_t_7 = PyNumber_Multiply(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2064, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2064, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2062
 *         self.thisptr = <rcp_const_basic>symengine.complex_mpc(move[symengine.mpc_class](m))
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return self.real_part()._sympy_() + sympy.I * self.imaginary_part()._sympy_()
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.ComplexMPC._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sympy);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2066
 *         return self.real_part()._sympy_() + sympy.I * self.imaginary_part()._sympy_()
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         try:
 *             from sage.symbolic.symengine_conversions import convert_to_mpcomplex_number
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10ComplexMPC_5_sage_(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_10ComplexMPC_5_sage_ = {"_sage_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_10ComplexMPC_5_sage_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10ComplexMPC_5_sage_(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sage_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("_sage_", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("_sage_", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_10ComplexMPC_4_sage_(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_ComplexMPC *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10ComplexMPC_4_sage_(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_ComplexMPC *__pyx_v_self) {
  PyObject *__pyx_v_convert_to_mpcomplex_number = NULL;
  PyObject *__pyx_v_sage = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  size_t __pyx_t_9;
  int __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sage_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2067
 * 
 *     def _sage_(self):
 *         try:             # <<<<<<<<<<<<<<
 *             from sage.symbolic.symengine_conversions import convert_to_mpcomplex_number
 *             return convert_to_mpcomplex_number(self)
*/
  {
    __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:*/ {

      /* "symengine/lib/symengine_wrapper.pyx":2068
 *     def _sage_(self):
 *         try:
 *             from sage.symbolic.symengine_conversions import convert_to_mpcomplex_number             # <<<<<<<<<<<<<<
 *             return convert_to_mpcomplex_number(self)
 *         except ImportError:
*/
      {
        PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_convert_to_mpcomplex_number};
        __pyx_t_5 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sage_symbolic_symengine_conversi, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2068, __pyx_L3_error)
      }
      __pyx_t_4 = __pyx_t_5;
      __Pyx_GOTREF(__pyx_t_4);
      {
        PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_convert_to_mpcomplex_number};
        __pyx_t_6 = 0; {
          __pyx_t_7 = __Pyx_ImportFrom(__pyx_t_4, __pyx_imported_names[__pyx_t_6]); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2068, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_7);
          switch (__pyx_t_6) {
            case 0:
            __Pyx_INCREF(__pyx_t_7);
            __pyx_v_convert_to_mpcomplex_number = __pyx_t_7;
            break;
            default:;
          }
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "symengine/lib/symengine_wrapper.pyx":2069
 *         try:
 *             from sage.symbolic.symengine_conversions import convert_to_mpcomplex_number
 *             return convert_to_mpcomplex_number(self)             # <<<<<<<<<<<<<<
 *         except ImportError:
 *             import sage.all as sage
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_7 = NULL;
      __Pyx_INCREF(__pyx_v_convert_to_mpcomplex_number);
      __pyx_t_8 = __pyx_v_convert_to_mpcomplex_number; 
      __pyx_t_9 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_8))) {
        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8);
        assert(__pyx_t_7);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_8, __pyx__function);
        __pyx_t_9 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_7, ((PyObject *)__pyx_v_self)};
        __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2069, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_4);
      }
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L7_try_return;

      /* "symengine/lib/symengine_wrapper.pyx":2067
 * 
 *     def _sage_(self):
 *         try:             # <<<<<<<<<<<<<<
 *             from sage.symbolic.symengine_conversions import convert_to_mpcomplex_number
 *             return convert_to_mpcomplex_number(self)
*/
    }
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":2070
 *             from sage.symbolic.symengine_conversions import convert_to_mpcomplex_number
 *             return convert_to_mpcomplex_number(self)
 *         except ImportError:             # <<<<<<<<<<<<<<
 *             import sage.all as sage
 *             return sage.MPComplexField(int(self.get_prec()))(str(self.real_part()), str(self.imaginary_part()))
*/
    __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_ImportError))));
    if (__pyx_t_10) {
      __Pyx_AddTraceback("symengine.lib.symengine_wrapper.ComplexMPC._sage_", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_8, &__pyx_t_7) < 0) __PYX_ERR(0, 2070, __pyx_L5_except_error)
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_8);
      __Pyx_XGOTREF(__pyx_t_7);

      /* "symengine/lib/symengine_wrapper.pyx":2071
 *             return convert_to_mpcomplex_number(self)
 *         except ImportError:
 *             import sage.all as sage             # <<<<<<<<<<<<<<
 *             return sage.MPComplexField(int(self.get_prec()))(str(self.real_part()), str(self.imaginary_part()))
 * 
*/
      __pyx_t_5 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sage_all, 0, 0, NULL, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2071, __pyx_L5_except_error)
      __pyx_t_12 = __Pyx_ImportFrom(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_all);
      Py_DECREF(__pyx_t_5);
      if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2071, __pyx_L5_except_error)
      __pyx_t_5 = __pyx_t_12;
      __pyx_t_11 = __pyx_t_5;
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_v_sage = __pyx_t_11;
      __pyx_t_11 = 0;

      /* "symengine/lib/symengine_wrapper.pyx":2072
 *         except ImportError:
 *             import sage.all as sage
 *             return sage.MPComplexField(int(self.get_prec()))(str(self.real_part()), str(self.imaginary_part()))             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_13 = NULL;
      __pyx_t_15 = __pyx_v_sage;
      __Pyx_INCREF(__pyx_t_15);
      __pyx_t_17 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_17);
      __pyx_t_9 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_17, NULL};
        __pyx_t_16 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_prec, __pyx_callargs+__pyx_t_9, (1-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
        if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 2072, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_16);
      }
      __pyx_t_17 = __Pyx_PyNumber_Int(__pyx_t_16); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 2072, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_17);
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
      __pyx_t_9 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_15, __pyx_t_17};
        __pyx_t_14 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_MPComplexField, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
        __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
        if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2072, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_14);
      }
      __pyx_t_15 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_15);
      __pyx_t_9 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_15, NULL};
        __pyx_t_17 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_real_part, __pyx_callargs+__pyx_t_9, (1-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
        if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 2072, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_17);
      }
      __pyx_t_15 = __Pyx_PyObject_Unicode(__pyx_t_17); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2072, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_15);
      __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
      __pyx_t_16 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_16);
      __pyx_t_9 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_16, NULL};
        __pyx_t_17 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_imaginary_part, __pyx_callargs+__pyx_t_9, (1-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
        if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 2072, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_17);
      }
      __pyx_t_16 = __Pyx_PyObject_Unicode(__pyx_t_17); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 2072, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_16);
      __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
      __pyx_t_9 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_14))) {
        __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_14);
        assert(__pyx_t_13);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_14);
        __Pyx_INCREF(__pyx_t_13);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_14, __pyx__function);
        __pyx_t_9 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_13, __pyx_t_15, __pyx_t_16};
        __pyx_t_11 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_14, __pyx_callargs+__pyx_t_9, (3-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2072, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_11);
      }
      __pyx_r = __pyx_t_11;
      __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      goto __pyx_L6_except_return;
    }
    goto __pyx_L5_except_error;

    /* "symengine/lib/symengine_wrapper.pyx":2067
 * 
 *     def _sage_(self):
 *         try:             # <<<<<<<<<<<<<<
 *             from sage.symbolic.symengine_conversions import convert_to_mpcomplex_number
 *             return convert_to_mpcomplex_number(self)
*/
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
    __pyx_L6_except_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
  }

  /* "symengine/lib/symengine_wrapper.pyx":2066
 *         return self.real_part()._sympy_() + sympy.I * self.imaginary_part()._sympy_()
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         try:
 *             from sage.symbolic.symengine_conversions import convert_to_mpcomplex_number
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_XDECREF(__pyx_t_17);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.ComplexMPC._sage_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_convert_to_mpcomplex_number);
  __Pyx_XDECREF(__pyx_v_sage);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2077
 * cdef class Complex(ComplexBase):
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return self.real_part()._sympy_() + sympy.I * self.imaginary_part()._sympy_()
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_7Complex_1_sympy_(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_7Complex_1_sympy_ = {"_sympy_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_7Complex_1_sympy_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_7Complex_1_sympy_(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sympy_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("_sympy_", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_7Complex__sympy_(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Complex *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_7Complex__sympy_(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Complex *__pyx_v_self) {
  PyObject *__pyx_v_sympy = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sympy_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2078
 * 
 *     def _sympy_(self):
 *         import sympy             # <<<<<<<<<<<<<<
 *         return self.real_part()._sympy_() + sympy.I * self.imaginary_part()._sympy_()
 * 
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sympy, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2078, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sympy = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2079
 *     def _sympy_(self):
 *         import sympy
 *         return self.real_part()._sympy_() + sympy.I * self.imaginary_part()._sympy_()             # <<<<<<<<<<<<<<
 * 
 *     def _sage_(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_5);
  __pyx_t_6 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
    __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_real_part, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2079, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  __pyx_t_3 = __pyx_t_4;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_6 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_sympy_2, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2079, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_I); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2079, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_8 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_8);
  __pyx_t_6 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL};
    __pyx_t_7 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_imaginary_part, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2079, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
  }
  __pyx_t_5 = __pyx_t_7;
  __Pyx_INCREF(__pyx_t_5);
  __pyx_t_6 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_sympy_2, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2079, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __pyx_t_7 = PyNumber_Multiply(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2079, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2079, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2077
 * cdef class Complex(ComplexBase):
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return self.real_part()._sympy_() + sympy.I * self.imaginary_part()._sympy_()
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Complex._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sympy);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2081
 *         return self.real_part()._sympy_() + sympy.I * self.imaginary_part()._sympy_()
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         import sage.all as sage
 *         return self.real_part()._sage_() + sage.I * self.imaginary_part()._sage_()
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_7Complex_3_sage_(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_7Complex_3_sage_ = {"_sage_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_7Complex_3_sage_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_7Complex_3_sage_(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sage_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("_sage_", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("_sage_", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_7Complex_2_sage_(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Complex *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_7Complex_2_sage_(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Complex *__pyx_v_self) {
  PyObject *__pyx_v_sage = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  size_t __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sage_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2082
 * 
 *     def _sage_(self):
 *         import sage.all as sage             # <<<<<<<<<<<<<<
 *         return self.real_part()._sage_() + sage.I * self.imaginary_part()._sage_()
 * 
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sage_all, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2082, __pyx_L1_error)
  __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_all);
  Py_DECREF(__pyx_t_2);
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2082, __pyx_L1_error)
  __pyx_t_2 = __pyx_t_3;
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sage = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2083
 *     def _sage_(self):
 *         import sage.all as sage
 *         return self.real_part()._sage_() + sage.I * self.imaginary_part()._sage_()             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_6 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_6);
  __pyx_t_7 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
    __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_real_part, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2083, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
  }
  __pyx_t_4 = __pyx_t_5;
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_7 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_sage, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2083, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_sage, __pyx_mstate_global->__pyx_n_u_I); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2083, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_9 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_9);
  __pyx_t_7 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL};
    __pyx_t_8 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_imaginary_part, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2083, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
  }
  __pyx_t_6 = __pyx_t_8;
  __Pyx_INCREF(__pyx_t_6);
  __pyx_t_7 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
    __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_sage, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2083, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  __pyx_t_8 = PyNumber_Multiply(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2083, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyNumber_Add(__pyx_t_1, __pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2083, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2081
 *         return self.real_part()._sympy_() + sympy.I * self.imaginary_part()._sympy_()
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         import sage.all as sage
 *         return self.real_part()._sage_() + sage.I * self.imaginary_part()._sage_()
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Complex._sage_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sage);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2088
 * cdef class Infinity(Number):
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_infinite(self):
 *         return True
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8Infinity_11is_infinite_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8Infinity_11is_infinite_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_8Infinity_11is_infinite___get__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Infinity *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8Infinity_11is_infinite___get__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Infinity *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2090
 *     @property
 *     def is_infinite(self):
 *         return True             # <<<<<<<<<<<<<<
 * 
 *     def __cinit__(Basic self):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_True);
  __pyx_r = Py_True;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2088
 * cdef class Infinity(Number):
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_infinite(self):
 *         return True
*/

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

/* "symengine/lib/symengine_wrapper.pyx":2092
 *         return True
 * 
 *     def __cinit__(Basic self):             # <<<<<<<<<<<<<<
 *         self.thisptr = symengine.Inf
 * 
*/

/* Python wrapper */
static int __pyx_pw_9symengine_3lib_17symengine_wrapper_8Infinity_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_9symengine_3lib_17symengine_wrapper_8Infinity_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, __pyx_nargs); return -1; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return -1;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__cinit__", __pyx_kwds); return -1;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_8Infinity___cinit__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Infinity *)__pyx_v_self));

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

static int __pyx_pf_9symengine_3lib_17symengine_wrapper_8Infinity___cinit__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Infinity *__pyx_v_self) {
  int __pyx_r;

  /* "symengine/lib/symengine_wrapper.pyx":2093
 * 
 *     def __cinit__(Basic self):
 *         self.thisptr = symengine.Inf             # <<<<<<<<<<<<<<
 * 
 *     def _sympy_(self):
*/
  __pyx_v_self->__pyx_base.__pyx_base.__pyx_base.thisptr = SymEngine::Inf;

  /* "symengine/lib/symengine_wrapper.pyx":2092
 *         return True
 * 
 *     def __cinit__(Basic self):             # <<<<<<<<<<<<<<
 *         self.thisptr = symengine.Inf
 * 
*/

  /* function exit code */
  __pyx_r = 0;
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2095
 *         self.thisptr = symengine.Inf
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.oo
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8Infinity_3_sympy_(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_8Infinity_3_sympy_ = {"_sympy_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_8Infinity_3_sympy_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8Infinity_3_sympy_(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sympy_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("_sympy_", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_8Infinity_2_sympy_(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Infinity *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8Infinity_2_sympy_(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Infinity *__pyx_v_self) {
  PyObject *__pyx_v_sympy = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sympy_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2096
 * 
 *     def _sympy_(self):
 *         import sympy             # <<<<<<<<<<<<<<
 *         return sympy.oo
 * 
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sympy, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2096, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sympy = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2097
 *     def _sympy_(self):
 *         import sympy
 *         return sympy.oo             # <<<<<<<<<<<<<<
 * 
 *     def _sage_(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_oo); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2097, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2095
 *         self.thisptr = symengine.Inf
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.oo
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Infinity._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sympy);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2099
 *         return sympy.oo
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         import sage.all as sage
 *         return sage.oo
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8Infinity_5_sage_(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_8Infinity_5_sage_ = {"_sage_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_8Infinity_5_sage_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8Infinity_5_sage_(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sage_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("_sage_", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("_sage_", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_8Infinity_4_sage_(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Infinity *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8Infinity_4_sage_(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Infinity *__pyx_v_self) {
  PyObject *__pyx_v_sage = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sage_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2100
 * 
 *     def _sage_(self):
 *         import sage.all as sage             # <<<<<<<<<<<<<<
 *         return sage.oo
 * 
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sage_all, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2100, __pyx_L1_error)
  __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_all);
  Py_DECREF(__pyx_t_2);
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2100, __pyx_L1_error)
  __pyx_t_2 = __pyx_t_3;
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sage = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2101
 *     def _sage_(self):
 *         import sage.all as sage
 *         return sage.oo             # <<<<<<<<<<<<<<
 * 
 * oo = Infinity()
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sage, __pyx_mstate_global->__pyx_n_u_oo); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2101, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2099
 *         return sympy.oo
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         import sage.all as sage
 *         return sage.oo
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Infinity._sage_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sage);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2108
 * cdef class NegativeInfinity(Number):
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_infinite(self):
 *         return True
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_16NegativeInfinity_11is_infinite_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_16NegativeInfinity_11is_infinite_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_16NegativeInfinity_11is_infinite___get__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_NegativeInfinity *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_16NegativeInfinity_11is_infinite___get__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_NegativeInfinity *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2110
 *     @property
 *     def is_infinite(self):
 *         return True             # <<<<<<<<<<<<<<
 * 
 *     def __cinit__(Basic self):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_True);
  __pyx_r = Py_True;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2108
 * cdef class NegativeInfinity(Number):
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_infinite(self):
 *         return True
*/

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

/* "symengine/lib/symengine_wrapper.pyx":2112
 *         return True
 * 
 *     def __cinit__(Basic self):             # <<<<<<<<<<<<<<
 *         self.thisptr = symengine.neg(symengine.Inf)
 * 
*/

/* Python wrapper */
static int __pyx_pw_9symengine_3lib_17symengine_wrapper_16NegativeInfinity_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_9symengine_3lib_17symengine_wrapper_16NegativeInfinity_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, __pyx_nargs); return -1; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return -1;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__cinit__", __pyx_kwds); return -1;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_16NegativeInfinity___cinit__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_NegativeInfinity *)__pyx_v_self));

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

static int __pyx_pf_9symengine_3lib_17symengine_wrapper_16NegativeInfinity___cinit__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_NegativeInfinity *__pyx_v_self) {
  int __pyx_r;
  SymEngine::RCP<const SymEngine::Basic> __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2113
 * 
 *     def __cinit__(Basic self):
 *         self.thisptr = symengine.neg(symengine.Inf)             # <<<<<<<<<<<<<<
 * 
 *     def _sympy_(self):
*/
  try {
    __pyx_t_1 = SymEngine::neg(SymEngine::Inf);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 2113, __pyx_L1_error)
  }
  __pyx_v_self->__pyx_base.__pyx_base.__pyx_base.thisptr = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_1);

  /* "symengine/lib/symengine_wrapper.pyx":2112
 *         return True
 * 
 *     def __cinit__(Basic self):             # <<<<<<<<<<<<<<
 *         self.thisptr = symengine.neg(symengine.Inf)
 * 
*/

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.NegativeInfinity.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2115
 *         self.thisptr = symengine.neg(symengine.Inf)
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return -sympy.oo
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_16NegativeInfinity_3_sympy_(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_16NegativeInfinity_3_sympy_ = {"_sympy_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_16NegativeInfinity_3_sympy_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_16NegativeInfinity_3_sympy_(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sympy_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("_sympy_", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_16NegativeInfinity_2_sympy_(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_NegativeInfinity *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_16NegativeInfinity_2_sympy_(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_NegativeInfinity *__pyx_v_self) {
  PyObject *__pyx_v_sympy = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sympy_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2116
 * 
 *     def _sympy_(self):
 *         import sympy             # <<<<<<<<<<<<<<
 *         return -sympy.oo
 * 
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sympy, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2116, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sympy = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2117
 *     def _sympy_(self):
 *         import sympy
 *         return -sympy.oo             # <<<<<<<<<<<<<<
 * 
 *     def _sage_(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_oo); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2117, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyNumber_Negative(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2117, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2115
 *         self.thisptr = symengine.neg(symengine.Inf)
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return -sympy.oo
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.NegativeInfinity._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sympy);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2119
 *         return -sympy.oo
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         import sage.all as sage
 *         return -sage.oo
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_16NegativeInfinity_5_sage_(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_16NegativeInfinity_5_sage_ = {"_sage_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_16NegativeInfinity_5_sage_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_16NegativeInfinity_5_sage_(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sage_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("_sage_", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("_sage_", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_16NegativeInfinity_4_sage_(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_NegativeInfinity *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_16NegativeInfinity_4_sage_(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_NegativeInfinity *__pyx_v_self) {
  PyObject *__pyx_v_sage = 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_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sage_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2120
 * 
 *     def _sage_(self):
 *         import sage.all as sage             # <<<<<<<<<<<<<<
 *         return -sage.oo
 * 
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sage_all, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2120, __pyx_L1_error)
  __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_all);
  Py_DECREF(__pyx_t_2);
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2120, __pyx_L1_error)
  __pyx_t_2 = __pyx_t_3;
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sage = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2121
 *     def _sage_(self):
 *         import sage.all as sage
 *         return -sage.oo             # <<<<<<<<<<<<<<
 * 
 *     def as_powers_dict(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sage, __pyx_mstate_global->__pyx_n_u_oo); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2121, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyNumber_Negative(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2121, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2119
 *         return -sympy.oo
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         import sage.all as sage
 *         return -sage.oo
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.NegativeInfinity._sage_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sage);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2123
 *         return -sage.oo
 * 
 *     def as_powers_dict(self):             # <<<<<<<<<<<<<<
 *         d = collections.defaultdict(int)
 *         d[minus_one] = 1
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_16NegativeInfinity_7as_powers_dict(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_16NegativeInfinity_7as_powers_dict = {"as_powers_dict", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_16NegativeInfinity_7as_powers_dict, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_16NegativeInfinity_7as_powers_dict(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("as_powers_dict (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("as_powers_dict", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("as_powers_dict", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_16NegativeInfinity_6as_powers_dict(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_NegativeInfinity *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_16NegativeInfinity_6as_powers_dict(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_NegativeInfinity *__pyx_v_self) {
  PyObject *__pyx_v_d = 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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("as_powers_dict", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2124
 * 
 *     def as_powers_dict(self):
 *         d = collections.defaultdict(int)             # <<<<<<<<<<<<<<
 *         d[minus_one] = 1
 *         d[oo] = 1
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_collections); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2124, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_defaultdict); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2124, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, ((PyObject *)(&PyLong_Type))};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2124, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_d = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2125
 *     def as_powers_dict(self):
 *         d = collections.defaultdict(int)
 *         d[minus_one] = 1             # <<<<<<<<<<<<<<
 *         d[oo] = 1
 *         return d
*/
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_minus_one); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2125, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely((PyObject_SetItem(__pyx_v_d, __pyx_t_1, __pyx_mstate_global->__pyx_int_1) < 0))) __PYX_ERR(0, 2125, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2126
 *         d = collections.defaultdict(int)
 *         d[minus_one] = 1
 *         d[oo] = 1             # <<<<<<<<<<<<<<
 *         return d
 * 
*/
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_oo); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2126, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely((PyObject_SetItem(__pyx_v_d, __pyx_t_1, __pyx_mstate_global->__pyx_int_1) < 0))) __PYX_ERR(0, 2126, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2127
 *         d[minus_one] = 1
 *         d[oo] = 1
 *         return d             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_d);
  __pyx_r = __pyx_v_d;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2123
 *         return -sage.oo
 * 
 *     def as_powers_dict(self):             # <<<<<<<<<<<<<<
 *         d = collections.defaultdict(int)
 *         d[minus_one] = 1
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.NegativeInfinity.as_powers_dict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_d);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2135
 * cdef class ComplexInfinity(Number):
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_infinite(self):
 *         return True
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15ComplexInfinity_11is_infinite_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15ComplexInfinity_11is_infinite_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15ComplexInfinity_11is_infinite___get__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_ComplexInfinity *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15ComplexInfinity_11is_infinite___get__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_ComplexInfinity *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2137
 *     @property
 *     def is_infinite(self):
 *         return True             # <<<<<<<<<<<<<<
 * 
 *     def __cinit__(Basic self):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_True);
  __pyx_r = Py_True;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2135
 * cdef class ComplexInfinity(Number):
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_infinite(self):
 *         return True
*/

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

/* "symengine/lib/symengine_wrapper.pyx":2139
 *         return True
 * 
 *     def __cinit__(Basic self):             # <<<<<<<<<<<<<<
 *         self.thisptr = symengine.ComplexInf
 * 
*/

/* Python wrapper */
static int __pyx_pw_9symengine_3lib_17symengine_wrapper_15ComplexInfinity_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_9symengine_3lib_17symengine_wrapper_15ComplexInfinity_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, __pyx_nargs); return -1; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return -1;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__cinit__", __pyx_kwds); return -1;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15ComplexInfinity___cinit__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_ComplexInfinity *)__pyx_v_self));

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

static int __pyx_pf_9symengine_3lib_17symengine_wrapper_15ComplexInfinity___cinit__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_ComplexInfinity *__pyx_v_self) {
  int __pyx_r;

  /* "symengine/lib/symengine_wrapper.pyx":2140
 * 
 *     def __cinit__(Basic self):
 *         self.thisptr = symengine.ComplexInf             # <<<<<<<<<<<<<<
 * 
 *     def _sympy_(self):
*/
  __pyx_v_self->__pyx_base.__pyx_base.__pyx_base.thisptr = SymEngine::ComplexInf;

  /* "symengine/lib/symengine_wrapper.pyx":2139
 *         return True
 * 
 *     def __cinit__(Basic self):             # <<<<<<<<<<<<<<
 *         self.thisptr = symengine.ComplexInf
 * 
*/

  /* function exit code */
  __pyx_r = 0;
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2142
 *         self.thisptr = symengine.ComplexInf
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.zoo
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15ComplexInfinity_3_sympy_(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_15ComplexInfinity_3_sympy_ = {"_sympy_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15ComplexInfinity_3_sympy_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15ComplexInfinity_3_sympy_(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sympy_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("_sympy_", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15ComplexInfinity_2_sympy_(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_ComplexInfinity *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15ComplexInfinity_2_sympy_(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_ComplexInfinity *__pyx_v_self) {
  PyObject *__pyx_v_sympy = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sympy_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2143
 * 
 *     def _sympy_(self):
 *         import sympy             # <<<<<<<<<<<<<<
 *         return sympy.zoo
 * 
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sympy, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2143, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sympy = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2144
 *     def _sympy_(self):
 *         import sympy
 *         return sympy.zoo             # <<<<<<<<<<<<<<
 * 
 *     def _sage_(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_zoo); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2144, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2142
 *         self.thisptr = symengine.ComplexInf
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.zoo
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.ComplexInfinity._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sympy);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2146
 *         return sympy.zoo
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         import sage.all as sage
 *         return sage.unsigned_infinity
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15ComplexInfinity_5_sage_(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_15ComplexInfinity_5_sage_ = {"_sage_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15ComplexInfinity_5_sage_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15ComplexInfinity_5_sage_(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sage_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("_sage_", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("_sage_", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15ComplexInfinity_4_sage_(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_ComplexInfinity *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15ComplexInfinity_4_sage_(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_ComplexInfinity *__pyx_v_self) {
  PyObject *__pyx_v_sage = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sage_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2147
 * 
 *     def _sage_(self):
 *         import sage.all as sage             # <<<<<<<<<<<<<<
 *         return sage.unsigned_infinity
 * 
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sage_all, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2147, __pyx_L1_error)
  __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_all);
  Py_DECREF(__pyx_t_2);
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2147, __pyx_L1_error)
  __pyx_t_2 = __pyx_t_3;
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sage = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2148
 *     def _sage_(self):
 *         import sage.all as sage
 *         return sage.unsigned_infinity             # <<<<<<<<<<<<<<
 * 
 * zoo = ComplexInfinity()
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sage, __pyx_mstate_global->__pyx_n_u_unsigned_infinity); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2148, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2146
 *         return sympy.zoo
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         import sage.all as sage
 *         return sage.unsigned_infinity
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.ComplexInfinity._sage_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sage);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2155
 * cdef class NaN(Number):
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_rational(self):
 *         return None
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3NaN_11is_rational_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3NaN_11is_rational_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_3NaN_11is_rational___get__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_NaN *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3NaN_11is_rational___get__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_NaN *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2157
 *     @property
 *     def is_rational(self):
 *         return None             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2155
 * cdef class NaN(Number):
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_rational(self):
 *         return None
*/

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

/* "symengine/lib/symengine_wrapper.pyx":2159
 *         return None
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_integer(self):
 *         return None
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3NaN_10is_integer_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3NaN_10is_integer_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_3NaN_10is_integer___get__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_NaN *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3NaN_10is_integer___get__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_NaN *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2161
 *     @property
 *     def is_integer(self):
 *         return None             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2159
 *         return None
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_integer(self):
 *         return None
*/

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

/* "symengine/lib/symengine_wrapper.pyx":2163
 *         return None
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_real(self):
 *         return None
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3NaN_7is_real_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3NaN_7is_real_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_3NaN_7is_real___get__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_NaN *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3NaN_7is_real___get__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_NaN *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2165
 *     @property
 *     def is_real(self):
 *         return None             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2163
 *         return None
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_real(self):
 *         return None
*/

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

/* "symengine/lib/symengine_wrapper.pyx":2167
 *         return None
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_finite(self):
 *         return None
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3NaN_9is_finite_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3NaN_9is_finite_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_3NaN_9is_finite___get__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_NaN *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3NaN_9is_finite___get__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_NaN *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2169
 *     @property
 *     def is_finite(self):
 *         return None             # <<<<<<<<<<<<<<
 * 
 *     def __cinit__(Basic self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2167
 *         return None
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_finite(self):
 *         return None
*/

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

/* "symengine/lib/symengine_wrapper.pyx":2171
 *         return None
 * 
 *     def __cinit__(Basic self):             # <<<<<<<<<<<<<<
 *         self.thisptr = symengine.Nan
 * 
*/

/* Python wrapper */
static int __pyx_pw_9symengine_3lib_17symengine_wrapper_3NaN_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_9symengine_3lib_17symengine_wrapper_3NaN_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, __pyx_nargs); return -1; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return -1;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__cinit__", __pyx_kwds); return -1;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_3NaN___cinit__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_NaN *)__pyx_v_self));

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

static int __pyx_pf_9symengine_3lib_17symengine_wrapper_3NaN___cinit__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_NaN *__pyx_v_self) {
  int __pyx_r;

  /* "symengine/lib/symengine_wrapper.pyx":2172
 * 
 *     def __cinit__(Basic self):
 *         self.thisptr = symengine.Nan             # <<<<<<<<<<<<<<
 * 
 *     def _sympy_(self):
*/
  __pyx_v_self->__pyx_base.__pyx_base.__pyx_base.thisptr = SymEngine::Nan;

  /* "symengine/lib/symengine_wrapper.pyx":2171
 *         return None
 * 
 *     def __cinit__(Basic self):             # <<<<<<<<<<<<<<
 *         self.thisptr = symengine.Nan
 * 
*/

  /* function exit code */
  __pyx_r = 0;
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2174
 *         self.thisptr = symengine.Nan
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.nan
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3NaN_3_sympy_(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_3NaN_3_sympy_ = {"_sympy_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_3NaN_3_sympy_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3NaN_3_sympy_(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sympy_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("_sympy_", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_3NaN_2_sympy_(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_NaN *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3NaN_2_sympy_(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_NaN *__pyx_v_self) {
  PyObject *__pyx_v_sympy = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sympy_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2175
 * 
 *     def _sympy_(self):
 *         import sympy             # <<<<<<<<<<<<<<
 *         return sympy.nan
 * 
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sympy, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2175, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sympy = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2176
 *     def _sympy_(self):
 *         import sympy
 *         return sympy.nan             # <<<<<<<<<<<<<<
 * 
 *     def _sage_(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_nan); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2176, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2174
 *         self.thisptr = symengine.Nan
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.nan
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.NaN._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sympy);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2178
 *         return sympy.nan
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         import sage.all as sage
 *         return sage.NaN
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3NaN_5_sage_(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_3NaN_5_sage_ = {"_sage_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_3NaN_5_sage_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3NaN_5_sage_(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sage_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("_sage_", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("_sage_", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_3NaN_4_sage_(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_NaN *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3NaN_4_sage_(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_NaN *__pyx_v_self) {
  PyObject *__pyx_v_sage = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sage_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2179
 * 
 *     def _sage_(self):
 *         import sage.all as sage             # <<<<<<<<<<<<<<
 *         return sage.NaN
 * 
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sage_all, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2179, __pyx_L1_error)
  __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_all);
  Py_DECREF(__pyx_t_2);
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2179, __pyx_L1_error)
  __pyx_t_2 = __pyx_t_3;
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sage = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2180
 *     def _sage_(self):
 *         import sage.all as sage
 *         return sage.NaN             # <<<<<<<<<<<<<<
 * 
 * nan = NaN()
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sage, __pyx_mstate_global->__pyx_n_u_NaN); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2180, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2178
 *         return sympy.nan
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         import sage.all as sage
 *         return sage.NaN
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.NaN._sage_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sage);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2186
 * 
 * class Zero(Integer):
 *     def __new__(cls):             # <<<<<<<<<<<<<<
 *         cdef Basic r = Number.__new__(Zero)
 *         r.thisptr = <rcp_const_basic>symengine.integer(0)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_4Zero_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_4Zero_1__new__ = {"__new__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_4Zero_1__new__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_4Zero_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_cls = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2186, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2186, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__new__", 0) < (0)) __PYX_ERR(0, 2186, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__new__", 1, 1, 1, i); __PYX_ERR(0, 2186, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2186, __pyx_L3_error)
    }
    __pyx_v_cls = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2186, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Zero.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_4Zero___new__(__pyx_self, __pyx_v_cls);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_4Zero___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_r = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__new__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2187
 * class Zero(Integer):
 *     def __new__(cls):
 *         cdef Basic r = Number.__new__(Zero)             # <<<<<<<<<<<<<<
 *         r.thisptr = <rcp_const_basic>symengine.integer(0)
 *         return r
*/
  __pyx_t_2 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Number);
  __Pyx_INCREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Zero); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2187, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2187, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 2187, __pyx_L1_error)
  __pyx_v_r = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2188
 *     def __new__(cls):
 *         cdef Basic r = Number.__new__(Zero)
 *         r.thisptr = <rcp_const_basic>symengine.integer(0)             # <<<<<<<<<<<<<<
 *         return r
 * 
*/
  __pyx_v_r->thisptr = ((SymEngine::RCP<const SymEngine::Basic>)SymEngine::integer(0));

  /* "symengine/lib/symengine_wrapper.pyx":2189
 *         cdef Basic r = Number.__new__(Zero)
 *         r.thisptr = <rcp_const_basic>symengine.integer(0)
 *         return r             # <<<<<<<<<<<<<<
 * 
 * zero = Zero()
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_r);
  __pyx_r = ((PyObject *)__pyx_v_r);
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2186
 * 
 * class Zero(Integer):
 *     def __new__(cls):             # <<<<<<<<<<<<<<
 *         cdef Basic r = Number.__new__(Zero)
 *         r.thisptr = <rcp_const_basic>symengine.integer(0)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Zero.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_r);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2195
 * 
 * class One(Integer):
 *     def __new__(cls):             # <<<<<<<<<<<<<<
 *         cdef Basic r = Number.__new__(One)
 *         r.thisptr = <rcp_const_basic>symengine.integer(1)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3One_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_3One_1__new__ = {"__new__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_3One_1__new__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3One_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_cls = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2195, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2195, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__new__", 0) < (0)) __PYX_ERR(0, 2195, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__new__", 1, 1, 1, i); __PYX_ERR(0, 2195, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2195, __pyx_L3_error)
    }
    __pyx_v_cls = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2195, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.One.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_3One___new__(__pyx_self, __pyx_v_cls);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3One___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_r = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__new__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2196
 * class One(Integer):
 *     def __new__(cls):
 *         cdef Basic r = Number.__new__(One)             # <<<<<<<<<<<<<<
 *         r.thisptr = <rcp_const_basic>symengine.integer(1)
 *         return r
*/
  __pyx_t_2 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Number);
  __Pyx_INCREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_One); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2196, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2196, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 2196, __pyx_L1_error)
  __pyx_v_r = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2197
 *     def __new__(cls):
 *         cdef Basic r = Number.__new__(One)
 *         r.thisptr = <rcp_const_basic>symengine.integer(1)             # <<<<<<<<<<<<<<
 *         return r
 * 
*/
  __pyx_v_r->thisptr = ((SymEngine::RCP<const SymEngine::Basic>)SymEngine::integer(1));

  /* "symengine/lib/symengine_wrapper.pyx":2198
 *         cdef Basic r = Number.__new__(One)
 *         r.thisptr = <rcp_const_basic>symengine.integer(1)
 *         return r             # <<<<<<<<<<<<<<
 * 
 * one = One()
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_r);
  __pyx_r = ((PyObject *)__pyx_v_r);
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2195
 * 
 * class One(Integer):
 *     def __new__(cls):             # <<<<<<<<<<<<<<
 *         cdef Basic r = Number.__new__(One)
 *         r.thisptr = <rcp_const_basic>symengine.integer(1)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.One.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_r);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2204
 * 
 * class NegativeOne(Integer):
 *     def __new__(cls):             # <<<<<<<<<<<<<<
 *         cdef Basic r = Number.__new__(NegativeOne)
 *         r.thisptr = <rcp_const_basic>symengine.integer(-1)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_11NegativeOne_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_11NegativeOne_1__new__ = {"__new__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_11NegativeOne_1__new__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_11NegativeOne_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_cls = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2204, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2204, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__new__", 0) < (0)) __PYX_ERR(0, 2204, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__new__", 1, 1, 1, i); __PYX_ERR(0, 2204, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2204, __pyx_L3_error)
    }
    __pyx_v_cls = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2204, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.NegativeOne.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_11NegativeOne___new__(__pyx_self, __pyx_v_cls);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_11NegativeOne___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_r = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__new__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2205
 * class NegativeOne(Integer):
 *     def __new__(cls):
 *         cdef Basic r = Number.__new__(NegativeOne)             # <<<<<<<<<<<<<<
 *         r.thisptr = <rcp_const_basic>symengine.integer(-1)
 *         return r
*/
  __pyx_t_2 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Number);
  __Pyx_INCREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_NegativeOne); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2205, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2205, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 2205, __pyx_L1_error)
  __pyx_v_r = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2206
 *     def __new__(cls):
 *         cdef Basic r = Number.__new__(NegativeOne)
 *         r.thisptr = <rcp_const_basic>symengine.integer(-1)             # <<<<<<<<<<<<<<
 *         return r
 * 
*/
  __pyx_v_r->thisptr = ((SymEngine::RCP<const SymEngine::Basic>)SymEngine::integer(-1));

  /* "symengine/lib/symengine_wrapper.pyx":2207
 *         cdef Basic r = Number.__new__(NegativeOne)
 *         r.thisptr = <rcp_const_basic>symengine.integer(-1)
 *         return r             # <<<<<<<<<<<<<<
 * 
 * minus_one = NegativeOne()
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_r);
  __pyx_r = ((PyObject *)__pyx_v_r);
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2204
 * 
 * class NegativeOne(Integer):
 *     def __new__(cls):             # <<<<<<<<<<<<<<
 *         cdef Basic r = Number.__new__(NegativeOne)
 *         r.thisptr = <rcp_const_basic>symengine.integer(-1)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.NegativeOne.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_r);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2213
 * 
 * class Half(Rational):
 *     def __new__(cls):             # <<<<<<<<<<<<<<
 *         cdef Basic q = Number.__new__(Half)
 *         q.thisptr = <rcp_const_basic>symengine.rational(1, 2)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_4Half_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_4Half_1__new__ = {"__new__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_4Half_1__new__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_4Half_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_cls = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2213, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2213, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__new__", 0) < (0)) __PYX_ERR(0, 2213, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__new__", 1, 1, 1, i); __PYX_ERR(0, 2213, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2213, __pyx_L3_error)
    }
    __pyx_v_cls = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2213, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Half.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_4Half___new__(__pyx_self, __pyx_v_cls);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_4Half___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_q = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__new__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2214
 * class Half(Rational):
 *     def __new__(cls):
 *         cdef Basic q = Number.__new__(Half)             # <<<<<<<<<<<<<<
 *         q.thisptr = <rcp_const_basic>symengine.rational(1, 2)
 *         return q
*/
  __pyx_t_2 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Number);
  __Pyx_INCREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Half); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2214, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2214, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 2214, __pyx_L1_error)
  __pyx_v_q = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2215
 *     def __new__(cls):
 *         cdef Basic q = Number.__new__(Half)
 *         q.thisptr = <rcp_const_basic>symengine.rational(1, 2)             # <<<<<<<<<<<<<<
 *         return q
 * 
*/
  __pyx_v_q->thisptr = ((SymEngine::RCP<const SymEngine::Basic>)SymEngine::rational(1, 2));

  /* "symengine/lib/symengine_wrapper.pyx":2216
 *         cdef Basic q = Number.__new__(Half)
 *         q.thisptr = <rcp_const_basic>symengine.rational(1, 2)
 *         return q             # <<<<<<<<<<<<<<
 * 
 * half = Half()
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_q);
  __pyx_r = ((PyObject *)__pyx_v_q);
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2213
 * 
 * class Half(Rational):
 *     def __new__(cls):             # <<<<<<<<<<<<<<
 *         cdef Basic q = Number.__new__(Half)
 *         q.thisptr = <rcp_const_basic>symengine.rational(1, 2)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Half.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_q);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2223
 * class AssocOp(Expr):
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def make_args(cls, expr):
 *         if isinstance(expr, cls):
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_7AssocOp_1make_args(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_7AssocOp_1make_args = {"make_args", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_7AssocOp_1make_args, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_7AssocOp_1make_args(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_expr = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_args (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,&__pyx_mstate_global->__pyx_n_u_expr,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2223, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2223, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2223, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "make_args", 0) < (0)) __PYX_ERR(0, 2223, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("make_args", 1, 2, 2, i); __PYX_ERR(0, 2223, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2223, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2223, __pyx_L3_error)
    }
    __pyx_v_cls = values[0];
    __pyx_v_expr = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("make_args", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 2223, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.AssocOp.make_args", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_7AssocOp_make_args(__pyx_self, __pyx_v_cls, __pyx_v_expr);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_7AssocOp_make_args(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_expr) {
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_args", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2225
 *     @classmethod
 *     def make_args(cls, expr):
 *         if isinstance(expr, cls):             # <<<<<<<<<<<<<<
 *             return expr.args
 *         else:
*/
  __pyx_t_1 = PyObject_IsInstance(__pyx_v_expr, __pyx_v_cls); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2225, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":2226
 *     def make_args(cls, expr):
 *         if isinstance(expr, cls):
 *             return expr.args             # <<<<<<<<<<<<<<
 *         else:
 *             return (sympify(expr),)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_expr, __pyx_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2226, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":2225
 *     @classmethod
 *     def make_args(cls, expr):
 *         if isinstance(expr, cls):             # <<<<<<<<<<<<<<
 *             return expr.args
 *         else:
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":2228
 *             return expr.args
 *         else:
 *             return (sympify(expr),)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2228, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
      assert(__pyx_t_3);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
      __pyx_t_5 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_expr};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2228, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2228, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_2);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2) != (0)) __PYX_ERR(0, 2228, __pyx_L1_error);
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "symengine/lib/symengine_wrapper.pyx":2223
 * class AssocOp(Expr):
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def make_args(cls, expr):
 *         if isinstance(expr, cls):
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.AssocOp.make_args", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2235
 *     identity = 0
 * 
 *     def __new__(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         cdef symengine.vec_basic v_ = iter_to_vec_basic(args)
 *         return c2py(symengine.add(v_))
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3Add_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_3Add_1__new__ = {"__new__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_3Add_1__new__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3Add_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_args = 0;
  CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  __pyx_v_args = __Pyx_ArgsSlice_FASTCALL(__pyx_args, 1, __pyx_nargs);
  if (unlikely(!__pyx_v_args)) {
    __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_v_args);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2235, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        default:
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2235, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      const Py_ssize_t used_pos_args = (kwd_pos_args < 1) ? kwd_pos_args : 1;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, __pyx_kwds_len, "__new__", 1) < (0)) __PYX_ERR(0, 2235, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__new__", 0, 1, 1, i); __PYX_ERR(0, 2235, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs < 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2235, __pyx_L3_error)
    }
    __pyx_v_cls = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 0, 1, 1, __pyx_nargs); __PYX_ERR(0, 2235, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_XDECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Add.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_3Add___new__(__pyx_self, __pyx_v_cls, __pyx_v_args, __pyx_v_kwargs);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3Add___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
  SymEngine::vec_basic __pyx_v_v_;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  SymEngine::vec_basic __pyx_t_1;
  SymEngine::RCP<const SymEngine::Basic> __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__new__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2236
 * 
 *     def __new__(cls, *args, **kwargs):
 *         cdef symengine.vec_basic v_ = iter_to_vec_basic(args)             # <<<<<<<<<<<<<<
 *         return c2py(symengine.add(v_))
 * 
*/
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_iter_to_vec_basic(__pyx_v_args); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2236, __pyx_L1_error)
  __pyx_v_v_ = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_1);

  /* "symengine/lib/symengine_wrapper.pyx":2237
 *     def __new__(cls, *args, **kwargs):
 *         cdef symengine.vec_basic v_ = iter_to_vec_basic(args)
 *         return c2py(symengine.add(v_))             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_2 = SymEngine::add(__pyx_v_v_);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 2237, __pyx_L1_error)
  }
  __pyx_t_3 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2237, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2235
 *     identity = 0
 * 
 *     def __new__(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         cdef symengine.vec_basic v_ = iter_to_vec_basic(args)
 *         return c2py(symengine.add(v_))
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Add.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2239
 *         return c2py(symengine.add(v_))
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def _from_args(self, args):
 *         if len(args) == 0:
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3Add_3_from_args(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_3Add_3_from_args = {"_from_args", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_3Add_3_from_args, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3Add_3_from_args(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_args = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_from_args (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_args,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2239, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2239, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2239, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_from_args", 0) < (0)) __PYX_ERR(0, 2239, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_from_args", 1, 2, 2, i); __PYX_ERR(0, 2239, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2239, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2239, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
    __pyx_v_args = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_from_args", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 2239, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Add._from_args", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_3Add_2_from_args(__pyx_self, __pyx_v_self, __pyx_v_args);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3Add_2_from_args(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_from_args", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2241
 *     @classmethod
 *     def _from_args(self, args):
 *         if len(args) == 0:             # <<<<<<<<<<<<<<
 *             return self.identity
 *         elif len(args) == 1:
*/
  __pyx_t_1 = PyObject_Length(__pyx_v_args); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2241, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_1 == 0);
  if (__pyx_t_2) {

    /* "symengine/lib/symengine_wrapper.pyx":2242
 *     def _from_args(self, args):
 *         if len(args) == 0:
 *             return self.identity             # <<<<<<<<<<<<<<
 *         elif len(args) == 1:
 *             return args[0]
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_identity); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2242, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":2241
 *     @classmethod
 *     def _from_args(self, args):
 *         if len(args) == 0:             # <<<<<<<<<<<<<<
 *             return self.identity
 *         elif len(args) == 1:
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":2243
 *         if len(args) == 0:
 *             return self.identity
 *         elif len(args) == 1:             # <<<<<<<<<<<<<<
 *             return args[0]
 * 
*/
  __pyx_t_1 = PyObject_Length(__pyx_v_args); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2243, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_1 == 1);
  if (__pyx_t_2) {

    /* "symengine/lib/symengine_wrapper.pyx":2244
 *             return self.identity
 *         elif len(args) == 1:
 *             return args[0]             # <<<<<<<<<<<<<<
 * 
 *         return Add(*args)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_args, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2244, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":2243
 *         if len(args) == 0:
 *             return self.identity
 *         elif len(args) == 1:             # <<<<<<<<<<<<<<
 *             return args[0]
 * 
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":2246
 *             return args[0]
 * 
 *         return Add(*args)             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Add); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2246, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_v_args); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2246, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2246, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2239
 *         return c2py(symengine.add(v_))
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def _from_args(self, args):
 *         if len(args) == 0:
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Add._from_args", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2248
 *         return Add(*args)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_Add(self):
 *         return True
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3Add_5is_Add(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_3Add_5is_Add = {"is_Add", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_3Add_5is_Add, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3Add_5is_Add(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_Add (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2248, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2248, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "is_Add", 0) < (0)) __PYX_ERR(0, 2248, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("is_Add", 1, 1, 1, i); __PYX_ERR(0, 2248, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2248, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_Add", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2248, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Add.is_Add", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_3Add_4is_Add(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3Add_4is_Add(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_Add", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2250
 *     @property
 *     def is_Add(self):
 *         return True             # <<<<<<<<<<<<<<
 * 
 *     def _sympy_(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_True);
  __pyx_r = Py_True;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2248
 *         return Add(*args)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_Add(self):
 *         return True
*/

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

/* "symengine/lib/symengine_wrapper.pyx":2252
 *         return True
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         from sympy import Add
 *         return Add(*self.args)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3Add_7_sympy_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_3Add_7_sympy_ = {"_sympy_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_3Add_7_sympy_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3Add_7_sympy_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sympy_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2252, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2252, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_sympy_", 0) < (0)) __PYX_ERR(0, 2252, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 1, 1, i); __PYX_ERR(0, 2252, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2252, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2252, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Add._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_3Add_6_sympy_(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3Add_6_sympy_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_Add = 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 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sympy_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2253
 * 
 *     def _sympy_(self):
 *         from sympy import Add             # <<<<<<<<<<<<<<
 *         return Add(*self.args)
 * 
*/
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Add};
    __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sympy, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2253, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Add};
    __pyx_t_3 = 0; {
      __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_1, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2253, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      switch (__pyx_t_3) {
        case 0:
        __Pyx_INCREF(__pyx_t_4);
        __pyx_v_Add = __pyx_t_4;
        break;
        default:;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2254
 *     def _sympy_(self):
 *         from sympy import Add
 *         return Add(*self.args)             # <<<<<<<<<<<<<<
 * 
 *     def _sage_(Basic self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2254, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2254, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_v_Add, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2254, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2252
 *         return True
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         from sympy import Add
 *         return Add(*self.args)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Add._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_Add);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2256
 *         return Add(*self.args)
 * 
 *     def _sage_(Basic self):             # <<<<<<<<<<<<<<
 *         cdef RCP[const symengine.Add] X = symengine.rcp_static_cast_Add(self.thisptr)
 *         cdef rcp_const_basic a, b
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3Add_9_sage_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_3Add_9_sage_ = {"_sage_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_3Add_9_sage_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3Add_9_sage_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sage_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2256, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2256, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_sage_", 0) < (0)) __PYX_ERR(0, 2256, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_sage_", 1, 1, 1, i); __PYX_ERR(0, 2256, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2256, __pyx_L3_error)
    }
    __pyx_v_self = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_sage_", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2256, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Add._sage_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic, 1, "self", 0))) __PYX_ERR(0, 2256, __pyx_L1_error)
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_3Add_8_sage_(__pyx_self, __pyx_v_self);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3Add_8_sage_(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self) {
  SymEngine::RCP<SymEngine::Add const >  __pyx_v_X;
  SymEngine::RCP<const SymEngine::Basic> __pyx_v_a;
  SymEngine::RCP<const SymEngine::Basic> __pyx_v_b;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sage_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2257
 * 
 *     def _sage_(Basic self):
 *         cdef RCP[const symengine.Add] X = symengine.rcp_static_cast_Add(self.thisptr)             # <<<<<<<<<<<<<<
 *         cdef rcp_const_basic a, b
 *         deref(X).as_two_terms(symengine.outArg(a), symengine.outArg(b))
*/
  __pyx_v_X = SymEngine::rcp_static_cast<const SymEngine::Add>(__pyx_v_self->thisptr);

  /* "symengine/lib/symengine_wrapper.pyx":2259
 *         cdef RCP[const symengine.Add] X = symengine.rcp_static_cast_Add(self.thisptr)
 *         cdef rcp_const_basic a, b
 *         deref(X).as_two_terms(symengine.outArg(a), symengine.outArg(b))             # <<<<<<<<<<<<<<
 *         return c2py(a)._sage_() + c2py(b)._sage_()
 * 
*/
  (*__pyx_v_X).as_two_terms(SymEngine::outArg(__pyx_v_a), SymEngine::outArg(__pyx_v_b));

  /* "symengine/lib/symengine_wrapper.pyx":2260
 *         cdef rcp_const_basic a, b
 *         deref(X).as_two_terms(symengine.outArg(a), symengine.outArg(b))
 *         return c2py(a)._sage_() + c2py(b)._sage_()             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(__pyx_v_a); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2260, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __pyx_t_3;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_sage, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2260, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_t_5 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(__pyx_v_b); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2260, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = __pyx_t_5;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_sage, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2260, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __pyx_t_5 = PyNumber_Add(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2260, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2256
 *         return Add(*self.args)
 * 
 *     def _sage_(Basic self):             # <<<<<<<<<<<<<<
 *         cdef RCP[const symengine.Add] X = symengine.rcp_static_cast_Add(self.thisptr)
 *         cdef rcp_const_basic a, b
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Add._sage_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2262
 *         return c2py(a)._sage_() + c2py(b)._sage_()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def func(self):
 *         return self.__class__
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3Add_11func(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_3Add_11func = {"func", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_3Add_11func, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3Add_11func(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("func (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2262, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2262, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "func", 0) < (0)) __PYX_ERR(0, 2262, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("func", 1, 1, 1, i); __PYX_ERR(0, 2262, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2262, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("func", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2262, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Add.func", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_3Add_10func(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3Add_10func(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("func", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2264
 *     @property
 *     def func(self):
 *         return self.__class__             # <<<<<<<<<<<<<<
 * 
 *     def as_coefficients_dict(Basic self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2264, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2262
 *         return c2py(a)._sage_() + c2py(b)._sage_()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def func(self):
 *         return self.__class__
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Add.func", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2266
 *         return self.__class__
 * 
 *     def as_coefficients_dict(Basic self):             # <<<<<<<<<<<<<<
 *         cdef RCP[const symengine.Add] X = symengine.rcp_static_cast_Add(self.thisptr)
 *         cdef umap_basic_num umap
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3Add_13as_coefficients_dict(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_3Add_13as_coefficients_dict = {"as_coefficients_dict", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_3Add_13as_coefficients_dict, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3Add_13as_coefficients_dict(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("as_coefficients_dict (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2266, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2266, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "as_coefficients_dict", 0) < (0)) __PYX_ERR(0, 2266, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("as_coefficients_dict", 1, 1, 1, i); __PYX_ERR(0, 2266, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2266, __pyx_L3_error)
    }
    __pyx_v_self = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("as_coefficients_dict", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2266, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Add.as_coefficients_dict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic, 1, "self", 0))) __PYX_ERR(0, 2266, __pyx_L1_error)
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_3Add_12as_coefficients_dict(__pyx_self, __pyx_v_self);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3Add_12as_coefficients_dict(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self) {
  SymEngine::RCP<SymEngine::Add const >  __pyx_v_X;
  SymEngine::umap_basic_num __pyx_v_umap;
  SymEngine::umap_basic_num::iterator __pyx_v_iter;
  SymEngine::umap_basic_num::iterator __pyx_v_iterend;
  PyObject *__pyx_v_d = 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;
  size_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("as_coefficients_dict", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2267
 * 
 *     def as_coefficients_dict(Basic self):
 *         cdef RCP[const symengine.Add] X = symengine.rcp_static_cast_Add(self.thisptr)             # <<<<<<<<<<<<<<
 *         cdef umap_basic_num umap
 *         cdef umap_basic_num_iterator iter, iterend
*/
  __pyx_v_X = SymEngine::rcp_static_cast<const SymEngine::Add>(__pyx_v_self->thisptr);

  /* "symengine/lib/symengine_wrapper.pyx":2270
 *         cdef umap_basic_num umap
 *         cdef umap_basic_num_iterator iter, iterend
 *         d = collections.defaultdict(int)             # <<<<<<<<<<<<<<
 *         d[Integer(1)] = c2py(<rcp_const_basic>(deref(X).get_coef()))
 *         umap = deref(X).get_dict()
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_collections); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2270, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_defaultdict); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2270, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, ((PyObject *)(&PyLong_Type))};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2270, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_d = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2271
 *         cdef umap_basic_num_iterator iter, iterend
 *         d = collections.defaultdict(int)
 *         d[Integer(1)] = c2py(<rcp_const_basic>(deref(X).get_coef()))             # <<<<<<<<<<<<<<
 *         umap = deref(X).get_dict()
 *         iter = umap.begin()
*/
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)(*__pyx_v_X).get_coef())); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2271, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Integer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2271, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_int_1};
    __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2271, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  if (unlikely((PyObject_SetItem(__pyx_v_d, __pyx_t_4, __pyx_t_1) < 0))) __PYX_ERR(0, 2271, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2272
 *         d = collections.defaultdict(int)
 *         d[Integer(1)] = c2py(<rcp_const_basic>(deref(X).get_coef()))
 *         umap = deref(X).get_dict()             # <<<<<<<<<<<<<<
 *         iter = umap.begin()
 *         iterend = umap.end()
*/
  __pyx_v_umap = (*__pyx_v_X).get_dict();

  /* "symengine/lib/symengine_wrapper.pyx":2273
 *         d[Integer(1)] = c2py(<rcp_const_basic>(deref(X).get_coef()))
 *         umap = deref(X).get_dict()
 *         iter = umap.begin()             # <<<<<<<<<<<<<<
 *         iterend = umap.end()
 *         while iter != iterend:
*/
  __pyx_v_iter = __pyx_v_umap.begin();

  /* "symengine/lib/symengine_wrapper.pyx":2274
 *         umap = deref(X).get_dict()
 *         iter = umap.begin()
 *         iterend = umap.end()             # <<<<<<<<<<<<<<
 *         while iter != iterend:
 *             d[c2py(<rcp_const_basic>(deref(iter).first))] =\
*/
  __pyx_v_iterend = __pyx_v_umap.end();

  /* "symengine/lib/symengine_wrapper.pyx":2275
 *         iter = umap.begin()
 *         iterend = umap.end()
 *         while iter != iterend:             # <<<<<<<<<<<<<<
 *             d[c2py(<rcp_const_basic>(deref(iter).first))] =\
 *                     c2py(<rcp_const_basic>(deref(iter).second))
*/
  while (1) {
    __pyx_t_6 = (__pyx_v_iter != __pyx_v_iterend);
    if (!__pyx_t_6) break;

    /* "symengine/lib/symengine_wrapper.pyx":2277
 *         while iter != iterend:
 *             d[c2py(<rcp_const_basic>(deref(iter).first))] =\
 *                     c2py(<rcp_const_basic>(deref(iter).second))             # <<<<<<<<<<<<<<
 *             inc(iter)
 *         return d
*/
    __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)(*__pyx_v_iter).second)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2277, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);

    /* "symengine/lib/symengine_wrapper.pyx":2276
 *         iterend = umap.end()
 *         while iter != iterend:
 *             d[c2py(<rcp_const_basic>(deref(iter).first))] =\             # <<<<<<<<<<<<<<
 *                     c2py(<rcp_const_basic>(deref(iter).second))
 *             inc(iter)
*/
    __pyx_t_4 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)(*__pyx_v_iter).first)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2276, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (unlikely((PyObject_SetItem(__pyx_v_d, __pyx_t_4, __pyx_t_1) < 0))) __PYX_ERR(0, 2276, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":2278
 *             d[c2py(<rcp_const_basic>(deref(iter).first))] =\
 *                     c2py(<rcp_const_basic>(deref(iter).second))
 *             inc(iter)             # <<<<<<<<<<<<<<
 *         return d
 * 
*/
    (void)((++__pyx_v_iter));
  }

  /* "symengine/lib/symengine_wrapper.pyx":2279
 *                     c2py(<rcp_const_basic>(deref(iter).second))
 *             inc(iter)
 *         return d             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_d);
  __pyx_r = __pyx_v_d;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2266
 *         return self.__class__
 * 
 *     def as_coefficients_dict(Basic self):             # <<<<<<<<<<<<<<
 *         cdef RCP[const symengine.Add] X = symengine.rcp_static_cast_Add(self.thisptr)
 *         cdef umap_basic_num umap
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Add.as_coefficients_dict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_d);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2286
 *     identity = 1
 * 
 *     def __new__(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         cdef symengine.vec_basic v_ = iter_to_vec_basic(args)
 *         return c2py(symengine.mul(v_))
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3Mul_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_3Mul_1__new__ = {"__new__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_3Mul_1__new__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3Mul_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_args = 0;
  CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  __pyx_v_args = __Pyx_ArgsSlice_FASTCALL(__pyx_args, 1, __pyx_nargs);
  if (unlikely(!__pyx_v_args)) {
    __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_v_args);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2286, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        default:
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2286, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      const Py_ssize_t used_pos_args = (kwd_pos_args < 1) ? kwd_pos_args : 1;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, __pyx_kwds_len, "__new__", 1) < (0)) __PYX_ERR(0, 2286, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__new__", 0, 1, 1, i); __PYX_ERR(0, 2286, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs < 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2286, __pyx_L3_error)
    }
    __pyx_v_cls = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 0, 1, 1, __pyx_nargs); __PYX_ERR(0, 2286, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_XDECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Mul.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_3Mul___new__(__pyx_self, __pyx_v_cls, __pyx_v_args, __pyx_v_kwargs);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3Mul___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
  SymEngine::vec_basic __pyx_v_v_;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  SymEngine::vec_basic __pyx_t_1;
  SymEngine::RCP<const SymEngine::Basic> __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__new__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2287
 * 
 *     def __new__(cls, *args, **kwargs):
 *         cdef symengine.vec_basic v_ = iter_to_vec_basic(args)             # <<<<<<<<<<<<<<
 *         return c2py(symengine.mul(v_))
 * 
*/
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_iter_to_vec_basic(__pyx_v_args); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2287, __pyx_L1_error)
  __pyx_v_v_ = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_1);

  /* "symengine/lib/symengine_wrapper.pyx":2288
 *     def __new__(cls, *args, **kwargs):
 *         cdef symengine.vec_basic v_ = iter_to_vec_basic(args)
 *         return c2py(symengine.mul(v_))             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_2 = SymEngine::mul(__pyx_v_v_);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 2288, __pyx_L1_error)
  }
  __pyx_t_3 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2288, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2286
 *     identity = 1
 * 
 *     def __new__(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         cdef symengine.vec_basic v_ = iter_to_vec_basic(args)
 *         return c2py(symengine.mul(v_))
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Mul.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2290
 *         return c2py(symengine.mul(v_))
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def _from_args(self, args):
 *         if len(args) == 0:
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3Mul_3_from_args(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_3Mul_3_from_args = {"_from_args", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_3Mul_3_from_args, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3Mul_3_from_args(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_args = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_from_args (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_args,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2290, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2290, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2290, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_from_args", 0) < (0)) __PYX_ERR(0, 2290, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_from_args", 1, 2, 2, i); __PYX_ERR(0, 2290, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2290, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2290, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
    __pyx_v_args = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_from_args", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 2290, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Mul._from_args", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_3Mul_2_from_args(__pyx_self, __pyx_v_self, __pyx_v_args);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3Mul_2_from_args(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_from_args", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2292
 *     @classmethod
 *     def _from_args(self, args):
 *         if len(args) == 0:             # <<<<<<<<<<<<<<
 *             return self.identity
 *         elif len(args) == 1:
*/
  __pyx_t_1 = PyObject_Length(__pyx_v_args); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2292, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_1 == 0);
  if (__pyx_t_2) {

    /* "symengine/lib/symengine_wrapper.pyx":2293
 *     def _from_args(self, args):
 *         if len(args) == 0:
 *             return self.identity             # <<<<<<<<<<<<<<
 *         elif len(args) == 1:
 *             return args[0]
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_identity); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2293, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":2292
 *     @classmethod
 *     def _from_args(self, args):
 *         if len(args) == 0:             # <<<<<<<<<<<<<<
 *             return self.identity
 *         elif len(args) == 1:
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":2294
 *         if len(args) == 0:
 *             return self.identity
 *         elif len(args) == 1:             # <<<<<<<<<<<<<<
 *             return args[0]
 * 
*/
  __pyx_t_1 = PyObject_Length(__pyx_v_args); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2294, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_1 == 1);
  if (__pyx_t_2) {

    /* "symengine/lib/symengine_wrapper.pyx":2295
 *             return self.identity
 *         elif len(args) == 1:
 *             return args[0]             # <<<<<<<<<<<<<<
 * 
 *         return Mul(*args)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_args, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2295, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":2294
 *         if len(args) == 0:
 *             return self.identity
 *         elif len(args) == 1:             # <<<<<<<<<<<<<<
 *             return args[0]
 * 
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":2297
 *             return args[0]
 * 
 *         return Mul(*args)             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Mul); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2297, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_v_args); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2297, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2297, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2290
 *         return c2py(symengine.mul(v_))
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def _from_args(self, args):
 *         if len(args) == 0:
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Mul._from_args", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2299
 *         return Mul(*args)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_Mul(self):
 *         return True
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3Mul_5is_Mul(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_3Mul_5is_Mul = {"is_Mul", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_3Mul_5is_Mul, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3Mul_5is_Mul(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_Mul (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2299, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2299, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "is_Mul", 0) < (0)) __PYX_ERR(0, 2299, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("is_Mul", 1, 1, 1, i); __PYX_ERR(0, 2299, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2299, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_Mul", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2299, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Mul.is_Mul", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_3Mul_4is_Mul(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3Mul_4is_Mul(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_Mul", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2301
 *     @property
 *     def is_Mul(self):
 *         return True             # <<<<<<<<<<<<<<
 * 
 *     def _sympy_(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_True);
  __pyx_r = Py_True;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2299
 *         return Mul(*args)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_Mul(self):
 *         return True
*/

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

/* "symengine/lib/symengine_wrapper.pyx":2303
 *         return True
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         from sympy import Mul
 *         return Mul(*self.args)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3Mul_7_sympy_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_3Mul_7_sympy_ = {"_sympy_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_3Mul_7_sympy_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3Mul_7_sympy_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sympy_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2303, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2303, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_sympy_", 0) < (0)) __PYX_ERR(0, 2303, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 1, 1, i); __PYX_ERR(0, 2303, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2303, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2303, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Mul._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_3Mul_6_sympy_(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3Mul_6_sympy_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_Mul = 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 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sympy_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2304
 * 
 *     def _sympy_(self):
 *         from sympy import Mul             # <<<<<<<<<<<<<<
 *         return Mul(*self.args)
 * 
*/
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Mul};
    __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sympy, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2304, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Mul};
    __pyx_t_3 = 0; {
      __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_1, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2304, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      switch (__pyx_t_3) {
        case 0:
        __Pyx_INCREF(__pyx_t_4);
        __pyx_v_Mul = __pyx_t_4;
        break;
        default:;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2305
 *     def _sympy_(self):
 *         from sympy import Mul
 *         return Mul(*self.args)             # <<<<<<<<<<<<<<
 * 
 *     def _sage_(Basic self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2305, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2305, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_v_Mul, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2305, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2303
 *         return True
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         from sympy import Mul
 *         return Mul(*self.args)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Mul._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_Mul);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2307
 *         return Mul(*self.args)
 * 
 *     def _sage_(Basic self):             # <<<<<<<<<<<<<<
 *         cdef RCP[const symengine.Mul] X = symengine.rcp_static_cast_Mul(self.thisptr)
 *         cdef rcp_const_basic a, b
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3Mul_9_sage_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_3Mul_9_sage_ = {"_sage_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_3Mul_9_sage_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3Mul_9_sage_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sage_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2307, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2307, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_sage_", 0) < (0)) __PYX_ERR(0, 2307, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_sage_", 1, 1, 1, i); __PYX_ERR(0, 2307, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2307, __pyx_L3_error)
    }
    __pyx_v_self = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_sage_", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2307, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Mul._sage_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic, 1, "self", 0))) __PYX_ERR(0, 2307, __pyx_L1_error)
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_3Mul_8_sage_(__pyx_self, __pyx_v_self);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3Mul_8_sage_(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self) {
  SymEngine::RCP<SymEngine::Mul const >  __pyx_v_X;
  SymEngine::RCP<const SymEngine::Basic> __pyx_v_a;
  SymEngine::RCP<const SymEngine::Basic> __pyx_v_b;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sage_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2308
 * 
 *     def _sage_(Basic self):
 *         cdef RCP[const symengine.Mul] X = symengine.rcp_static_cast_Mul(self.thisptr)             # <<<<<<<<<<<<<<
 *         cdef rcp_const_basic a, b
 *         deref(X).as_two_terms(symengine.outArg(a), symengine.outArg(b))
*/
  __pyx_v_X = SymEngine::rcp_static_cast<const SymEngine::Mul>(__pyx_v_self->thisptr);

  /* "symengine/lib/symengine_wrapper.pyx":2310
 *         cdef RCP[const symengine.Mul] X = symengine.rcp_static_cast_Mul(self.thisptr)
 *         cdef rcp_const_basic a, b
 *         deref(X).as_two_terms(symengine.outArg(a), symengine.outArg(b))             # <<<<<<<<<<<<<<
 *         return c2py(a)._sage_() * c2py(b)._sage_()
 * 
*/
  (*__pyx_v_X).as_two_terms(SymEngine::outArg(__pyx_v_a), SymEngine::outArg(__pyx_v_b));

  /* "symengine/lib/symengine_wrapper.pyx":2311
 *         cdef rcp_const_basic a, b
 *         deref(X).as_two_terms(symengine.outArg(a), symengine.outArg(b))
 *         return c2py(a)._sage_() * c2py(b)._sage_()             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(__pyx_v_a); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2311, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __pyx_t_3;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_sage, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2311, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_t_5 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(__pyx_v_b); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2311, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = __pyx_t_5;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_sage, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2311, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __pyx_t_5 = PyNumber_Multiply(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2311, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2307
 *         return Mul(*self.args)
 * 
 *     def _sage_(Basic self):             # <<<<<<<<<<<<<<
 *         cdef RCP[const symengine.Mul] X = symengine.rcp_static_cast_Mul(self.thisptr)
 *         cdef rcp_const_basic a, b
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Mul._sage_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2313
 *         return c2py(a)._sage_() * c2py(b)._sage_()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def func(self):
 *         return self.__class__
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3Mul_11func(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_3Mul_11func = {"func", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_3Mul_11func, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3Mul_11func(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("func (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2313, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2313, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "func", 0) < (0)) __PYX_ERR(0, 2313, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("func", 1, 1, 1, i); __PYX_ERR(0, 2313, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2313, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("func", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2313, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Mul.func", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_3Mul_10func(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3Mul_10func(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("func", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2315
 *     @property
 *     def func(self):
 *         return self.__class__             # <<<<<<<<<<<<<<
 * 
 *     def as_coefficients_dict(Basic self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2315, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2313
 *         return c2py(a)._sage_() * c2py(b)._sage_()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def func(self):
 *         return self.__class__
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Mul.func", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2317
 *         return self.__class__
 * 
 *     def as_coefficients_dict(Basic self):             # <<<<<<<<<<<<<<
 *         cdef RCP[const symengine.Mul] X = symengine.rcp_static_cast_Mul(self.thisptr)
 *         cdef RCP[const symengine.Integer] one = symengine.integer(1)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3Mul_13as_coefficients_dict(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_3Mul_13as_coefficients_dict = {"as_coefficients_dict", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_3Mul_13as_coefficients_dict, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3Mul_13as_coefficients_dict(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("as_coefficients_dict (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2317, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2317, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "as_coefficients_dict", 0) < (0)) __PYX_ERR(0, 2317, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("as_coefficients_dict", 1, 1, 1, i); __PYX_ERR(0, 2317, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2317, __pyx_L3_error)
    }
    __pyx_v_self = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("as_coefficients_dict", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2317, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Mul.as_coefficients_dict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic, 1, "self", 0))) __PYX_ERR(0, 2317, __pyx_L1_error)
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_3Mul_12as_coefficients_dict(__pyx_self, __pyx_v_self);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3Mul_12as_coefficients_dict(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self) {
  SymEngine::RCP<SymEngine::Mul const >  __pyx_v_X;
  SymEngine::RCP<SymEngine::Integer const >  __pyx_v_one;
  SymEngine::map_basic_basic __pyx_v_dict;
  PyObject *__pyx_v_d = 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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("as_coefficients_dict", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2318
 * 
 *     def as_coefficients_dict(Basic self):
 *         cdef RCP[const symengine.Mul] X = symengine.rcp_static_cast_Mul(self.thisptr)             # <<<<<<<<<<<<<<
 *         cdef RCP[const symengine.Integer] one = symengine.integer(1)
 *         cdef map_basic_basic dict = deref(X).get_dict()
*/
  __pyx_v_X = SymEngine::rcp_static_cast<const SymEngine::Mul>(__pyx_v_self->thisptr);

  /* "symengine/lib/symengine_wrapper.pyx":2319
 *     def as_coefficients_dict(Basic self):
 *         cdef RCP[const symengine.Mul] X = symengine.rcp_static_cast_Mul(self.thisptr)
 *         cdef RCP[const symengine.Integer] one = symengine.integer(1)             # <<<<<<<<<<<<<<
 *         cdef map_basic_basic dict = deref(X).get_dict()
 *         d = collections.defaultdict(int)
*/
  __pyx_v_one = SymEngine::integer(1);

  /* "symengine/lib/symengine_wrapper.pyx":2320
 *         cdef RCP[const symengine.Mul] X = symengine.rcp_static_cast_Mul(self.thisptr)
 *         cdef RCP[const symengine.Integer] one = symengine.integer(1)
 *         cdef map_basic_basic dict = deref(X).get_dict()             # <<<<<<<<<<<<<<
 *         d = collections.defaultdict(int)
 *         d[c2py(<rcp_const_basic>symengine.mul_from_dict(\
*/
  __pyx_v_dict = (*__pyx_v_X).get_dict();

  /* "symengine/lib/symengine_wrapper.pyx":2321
 *         cdef RCP[const symengine.Integer] one = symengine.integer(1)
 *         cdef map_basic_basic dict = deref(X).get_dict()
 *         d = collections.defaultdict(int)             # <<<<<<<<<<<<<<
 *         d[c2py(<rcp_const_basic>symengine.mul_from_dict(\
 *                 <RCP[const symengine.Number]>(one),
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_collections); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2321, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_defaultdict); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2321, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, ((PyObject *)(&PyLong_Type))};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2321, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_d = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2325
 *                 <RCP[const symengine.Number]>(one),
 *                 move[symengine.map_basic_basic](dict)))] =\
 *                 c2py(<rcp_const_basic>deref(X).get_coef())             # <<<<<<<<<<<<<<
 *         return d
 * 
*/
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)(*__pyx_v_X).get_coef())); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2325, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "symengine/lib/symengine_wrapper.pyx":2322
 *         cdef map_basic_basic dict = deref(X).get_dict()
 *         d = collections.defaultdict(int)
 *         d[c2py(<rcp_const_basic>symengine.mul_from_dict(\             # <<<<<<<<<<<<<<
 *                 <RCP[const symengine.Number]>(one),
 *                 move[symengine.map_basic_basic](dict)))] =\
*/
  __pyx_t_4 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)SymEngine::Mul::from_dict(((SymEngine::RCP<SymEngine::Number const > )__pyx_v_one), cython_std::move<SymEngine::map_basic_basic>(__pyx_v_dict)))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2322, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (unlikely((PyObject_SetItem(__pyx_v_d, __pyx_t_4, __pyx_t_1) < 0))) __PYX_ERR(0, 2322, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2326
 *                 move[symengine.map_basic_basic](dict)))] =\
 *                 c2py(<rcp_const_basic>deref(X).get_coef())
 *         return d             # <<<<<<<<<<<<<<
 * 
 *     def as_powers_dict(Basic self):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_d);
  __pyx_r = __pyx_v_d;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2317
 *         return self.__class__
 * 
 *     def as_coefficients_dict(Basic self):             # <<<<<<<<<<<<<<
 *         cdef RCP[const symengine.Mul] X = symengine.rcp_static_cast_Mul(self.thisptr)
 *         cdef RCP[const symengine.Integer] one = symengine.integer(1)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Mul.as_coefficients_dict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_d);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2328
 *         return d
 * 
 *     def as_powers_dict(Basic self):             # <<<<<<<<<<<<<<
 *         cdef RCP[const symengine.Mul] X = symengine.rcp_static_cast_Mul(self.thisptr)
 *         cdef map_basic_basic m = deref(X).get_dict()
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3Mul_15as_powers_dict(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_3Mul_15as_powers_dict = {"as_powers_dict", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_3Mul_15as_powers_dict, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3Mul_15as_powers_dict(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("as_powers_dict (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2328, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2328, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "as_powers_dict", 0) < (0)) __PYX_ERR(0, 2328, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("as_powers_dict", 1, 1, 1, i); __PYX_ERR(0, 2328, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2328, __pyx_L3_error)
    }
    __pyx_v_self = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("as_powers_dict", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2328, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Mul.as_powers_dict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic, 1, "self", 0))) __PYX_ERR(0, 2328, __pyx_L1_error)
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_3Mul_14as_powers_dict(__pyx_self, __pyx_v_self);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3Mul_14as_powers_dict(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self) {
  SymEngine::RCP<SymEngine::Mul const >  __pyx_v_X;
  SymEngine::map_basic_basic __pyx_v_m;
  PyObject *__pyx_v_coef = NULL;
  PyObject *__pyx_v_d = NULL;
  SymEngine::map_basic_basic::iterator __pyx_v_it;
  SymEngine::map_basic_basic::iterator __pyx_v_it_end;
  PyObject *__pyx_v_base = NULL;
  PyObject *__pyx_v_exp = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("as_powers_dict", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2329
 * 
 *     def as_powers_dict(Basic self):
 *         cdef RCP[const symengine.Mul] X = symengine.rcp_static_cast_Mul(self.thisptr)             # <<<<<<<<<<<<<<
 *         cdef map_basic_basic m = deref(X).get_dict()
 *         coef = c2py(<rcp_const_basic>(deref(X).get_coef()))
*/
  __pyx_v_X = SymEngine::rcp_static_cast<const SymEngine::Mul>(__pyx_v_self->thisptr);

  /* "symengine/lib/symengine_wrapper.pyx":2330
 *     def as_powers_dict(Basic self):
 *         cdef RCP[const symengine.Mul] X = symengine.rcp_static_cast_Mul(self.thisptr)
 *         cdef map_basic_basic m = deref(X).get_dict()             # <<<<<<<<<<<<<<
 *         coef = c2py(<rcp_const_basic>(deref(X).get_coef()))
 *         if coef == 1:
*/
  __pyx_v_m = (*__pyx_v_X).get_dict();

  /* "symengine/lib/symengine_wrapper.pyx":2331
 *         cdef RCP[const symengine.Mul] X = symengine.rcp_static_cast_Mul(self.thisptr)
 *         cdef map_basic_basic m = deref(X).get_dict()
 *         coef = c2py(<rcp_const_basic>(deref(X).get_coef()))             # <<<<<<<<<<<<<<
 *         if coef == 1:
 *             d = collections.defaultdict(int)
*/
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)(*__pyx_v_X).get_coef())); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2331, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_coef = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2332
 *         cdef map_basic_basic m = deref(X).get_dict()
 *         coef = c2py(<rcp_const_basic>(deref(X).get_coef()))
 *         if coef == 1:             # <<<<<<<<<<<<<<
 *             d = collections.defaultdict(int)
 *         else:
*/
  __pyx_t_2 = (__Pyx_PyLong_BoolEqObjC(__pyx_v_coef, __pyx_mstate_global->__pyx_int_1, 1, 0)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 2332, __pyx_L1_error)
  if (__pyx_t_2) {

    /* "symengine/lib/symengine_wrapper.pyx":2333
 *         coef = c2py(<rcp_const_basic>(deref(X).get_coef()))
 *         if coef == 1:
 *             d = collections.defaultdict(int)             # <<<<<<<<<<<<<<
 *         else:
 *             d = coef.as_powers_dict()
*/
    __pyx_t_3 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_collections); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2333, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_defaultdict); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2333, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_6 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
      assert(__pyx_t_3);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
      __pyx_t_6 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, ((PyObject *)(&PyLong_Type))};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2333, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __pyx_v_d = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":2332
 *         cdef map_basic_basic m = deref(X).get_dict()
 *         coef = c2py(<rcp_const_basic>(deref(X).get_coef()))
 *         if coef == 1:             # <<<<<<<<<<<<<<
 *             d = collections.defaultdict(int)
 *         else:
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":2335
 *             d = collections.defaultdict(int)
 *         else:
 *             d = coef.as_powers_dict()             # <<<<<<<<<<<<<<
 * 
 *         it = m.begin()
*/
  /*else*/ {
    __pyx_t_5 = __pyx_v_coef;
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_6 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
      __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_as_powers_dict, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2335, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __pyx_v_d = __pyx_t_1;
    __pyx_t_1 = 0;
  }
  __pyx_L3:;

  /* "symengine/lib/symengine_wrapper.pyx":2337
 *             d = coef.as_powers_dict()
 * 
 *         it = m.begin()             # <<<<<<<<<<<<<<
 *         it_end = m.end()
 *         while it != it_end:
*/
  __pyx_v_it = __pyx_v_m.begin();

  /* "symengine/lib/symengine_wrapper.pyx":2338
 * 
 *         it = m.begin()
 *         it_end = m.end()             # <<<<<<<<<<<<<<
 *         while it != it_end:
 *             base = c2py(<rcp_const_basic>(deref(it).first))
*/
  __pyx_v_it_end = __pyx_v_m.end();

  /* "symengine/lib/symengine_wrapper.pyx":2339
 *         it = m.begin()
 *         it_end = m.end()
 *         while it != it_end:             # <<<<<<<<<<<<<<
 *             base = c2py(<rcp_const_basic>(deref(it).first))
 *             exp = c2py(<rcp_const_basic>(deref(it).second))
*/
  while (1) {
    __pyx_t_2 = (__pyx_v_it != __pyx_v_it_end);
    if (!__pyx_t_2) break;

    /* "symengine/lib/symengine_wrapper.pyx":2340
 *         it_end = m.end()
 *         while it != it_end:
 *             base = c2py(<rcp_const_basic>(deref(it).first))             # <<<<<<<<<<<<<<
 *             exp = c2py(<rcp_const_basic>(deref(it).second))
 *             if base.is_Rational and base.p < base.q and base.p > 0:
*/
    __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)(*__pyx_v_it).first)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2340, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_XDECREF_SET(__pyx_v_base, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":2341
 *         while it != it_end:
 *             base = c2py(<rcp_const_basic>(deref(it).first))
 *             exp = c2py(<rcp_const_basic>(deref(it).second))             # <<<<<<<<<<<<<<
 *             if base.is_Rational and base.p < base.q and base.p > 0:
 *                 d[1/base] -= exp
*/
    __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)(*__pyx_v_it).second)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2341, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_XDECREF_SET(__pyx_v_exp, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":2342
 *             base = c2py(<rcp_const_basic>(deref(it).first))
 *             exp = c2py(<rcp_const_basic>(deref(it).second))
 *             if base.is_Rational and base.p < base.q and base.p > 0:             # <<<<<<<<<<<<<<
 *                 d[1/base] -= exp
 *             else:
*/
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_base, __pyx_mstate_global->__pyx_n_u_is_Rational); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2342, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 2342, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_7) {
    } else {
      __pyx_t_2 = __pyx_t_7;
      goto __pyx_L7_bool_binop_done;
    }
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_base, __pyx_mstate_global->__pyx_n_u_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2342, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_base, __pyx_mstate_global->__pyx_n_u_q); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2342, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_5, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2342, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 2342, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_7) {
    } else {
      __pyx_t_2 = __pyx_t_7;
      goto __pyx_L7_bool_binop_done;
    }
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_base, __pyx_mstate_global->__pyx_n_u_p); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2342, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_mstate_global->__pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2342, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 2342, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_2 = __pyx_t_7;
    __pyx_L7_bool_binop_done:;
    if (__pyx_t_2) {

      /* "symengine/lib/symengine_wrapper.pyx":2343
 *             exp = c2py(<rcp_const_basic>(deref(it).second))
 *             if base.is_Rational and base.p < base.q and base.p > 0:
 *                 d[1/base] -= exp             # <<<<<<<<<<<<<<
 *             else:
 *                 d[base] += exp
*/
      __pyx_t_5 = __Pyx_PyNumber_Divide(__pyx_mstate_global->__pyx_int_1, __pyx_v_base); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2343, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_d, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2343, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = PyNumber_InPlaceSubtract(__pyx_t_3, __pyx_v_exp); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2343, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely((PyObject_SetItem(__pyx_v_d, __pyx_t_5, __pyx_t_1) < 0))) __PYX_ERR(0, 2343, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "symengine/lib/symengine_wrapper.pyx":2342
 *             base = c2py(<rcp_const_basic>(deref(it).first))
 *             exp = c2py(<rcp_const_basic>(deref(it).second))
 *             if base.is_Rational and base.p < base.q and base.p > 0:             # <<<<<<<<<<<<<<
 *                 d[1/base] -= exp
 *             else:
*/
      goto __pyx_L6;
    }

    /* "symengine/lib/symengine_wrapper.pyx":2345
 *                 d[1/base] -= exp
 *             else:
 *                 d[base] += exp             # <<<<<<<<<<<<<<
 *             inc(it)
 * 
*/
    /*else*/ {
      __Pyx_INCREF(__pyx_v_base);
      __pyx_t_5 = __pyx_v_base;
      __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_d, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2345, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_t_1, __pyx_v_exp); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2345, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely((PyObject_SetItem(__pyx_v_d, __pyx_t_5, __pyx_t_3) < 0))) __PYX_ERR(0, 2345, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __pyx_L6:;

    /* "symengine/lib/symengine_wrapper.pyx":2346
 *             else:
 *                 d[base] += exp
 *             inc(it)             # <<<<<<<<<<<<<<
 * 
 *         return d
*/
    (void)((++__pyx_v_it));
  }

  /* "symengine/lib/symengine_wrapper.pyx":2348
 *             inc(it)
 * 
 *         return d             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_d);
  __pyx_r = __pyx_v_d;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2328
 *         return d
 * 
 *     def as_powers_dict(Basic self):             # <<<<<<<<<<<<<<
 *         cdef RCP[const symengine.Mul] X = symengine.rcp_static_cast_Mul(self.thisptr)
 *         cdef map_basic_basic m = deref(X).get_dict()
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Mul.as_powers_dict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_coef);
  __Pyx_XDECREF(__pyx_v_d);
  __Pyx_XDECREF(__pyx_v_base);
  __Pyx_XDECREF(__pyx_v_exp);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2353
 * class Pow(Expr):
 * 
 *     def __new__(cls, a, b):             # <<<<<<<<<<<<<<
 *         return _sympify(a) ** b
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3Pow_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_3Pow_1__new__ = {"__new__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_3Pow_1__new__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3Pow_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_a = 0;
  PyObject *__pyx_v_b = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,&__pyx_mstate_global->__pyx_n_u_a,&__pyx_mstate_global->__pyx_n_u_b,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2353, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2353, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2353, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2353, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__new__", 0) < (0)) __PYX_ERR(0, 2353, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__new__", 1, 3, 3, i); __PYX_ERR(0, 2353, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2353, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2353, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2353, __pyx_L3_error)
    }
    __pyx_v_cls = values[0];
    __pyx_v_a = values[1];
    __pyx_v_b = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 2353, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Pow.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_3Pow___new__(__pyx_self, __pyx_v_cls, __pyx_v_a, __pyx_v_b);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3Pow___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_a, PyObject *__pyx_v_b) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__new__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2354
 * 
 *     def __new__(cls, a, b):
 *         return _sympify(a) ** b             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2354, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_a};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2354, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_t_3 = PyNumber_Power(__pyx_t_1, __pyx_v_b, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2354, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2353
 * class Pow(Expr):
 * 
 *     def __new__(cls, a, b):             # <<<<<<<<<<<<<<
 *         return _sympify(a) ** b
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Pow.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2356
 *         return _sympify(a) ** b
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def base(Basic self):
 *         cdef RCP[const symengine.Pow] X = symengine.rcp_static_cast_Pow(self.thisptr)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3Pow_3base(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_3Pow_3base = {"base", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_3Pow_3base, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3Pow_3base(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("base (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2356, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2356, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "base", 0) < (0)) __PYX_ERR(0, 2356, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("base", 1, 1, 1, i); __PYX_ERR(0, 2356, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2356, __pyx_L3_error)
    }
    __pyx_v_self = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("base", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2356, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Pow.base", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic, 1, "self", 0))) __PYX_ERR(0, 2357, __pyx_L1_error)
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_3Pow_2base(__pyx_self, __pyx_v_self);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3Pow_2base(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self) {
  SymEngine::RCP<SymEngine::Pow const >  __pyx_v_X;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("base", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2358
 *     @property
 *     def base(Basic self):
 *         cdef RCP[const symengine.Pow] X = symengine.rcp_static_cast_Pow(self.thisptr)             # <<<<<<<<<<<<<<
 *         return c2py(deref(X).get_base())
 * 
*/
  __pyx_v_X = SymEngine::rcp_static_cast<const SymEngine::Pow>(__pyx_v_self->thisptr);

  /* "symengine/lib/symengine_wrapper.pyx":2359
 *     def base(Basic self):
 *         cdef RCP[const symengine.Pow] X = symengine.rcp_static_cast_Pow(self.thisptr)
 *         return c2py(deref(X).get_base())             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py((*__pyx_v_X).get_base()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2359, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2356
 *         return _sympify(a) ** b
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def base(Basic self):
 *         cdef RCP[const symengine.Pow] X = symengine.rcp_static_cast_Pow(self.thisptr)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Pow.base", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2361
 *         return c2py(deref(X).get_base())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def exp(Basic self):
 *         cdef RCP[const symengine.Pow] X = symengine.rcp_static_cast_Pow(self.thisptr)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3Pow_5exp(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_3Pow_5exp = {"exp", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_3Pow_5exp, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3Pow_5exp(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("exp (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2361, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2361, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "exp", 0) < (0)) __PYX_ERR(0, 2361, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("exp", 1, 1, 1, i); __PYX_ERR(0, 2361, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2361, __pyx_L3_error)
    }
    __pyx_v_self = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("exp", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2361, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Pow.exp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic, 1, "self", 0))) __PYX_ERR(0, 2362, __pyx_L1_error)
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_3Pow_4exp(__pyx_self, __pyx_v_self);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3Pow_4exp(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self) {
  SymEngine::RCP<SymEngine::Pow const >  __pyx_v_X;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("exp", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2363
 *     @property
 *     def exp(Basic self):
 *         cdef RCP[const symengine.Pow] X = symengine.rcp_static_cast_Pow(self.thisptr)             # <<<<<<<<<<<<<<
 *         return c2py(deref(X).get_exp())
 * 
*/
  __pyx_v_X = SymEngine::rcp_static_cast<const SymEngine::Pow>(__pyx_v_self->thisptr);

  /* "symengine/lib/symengine_wrapper.pyx":2364
 *     def exp(Basic self):
 *         cdef RCP[const symengine.Pow] X = symengine.rcp_static_cast_Pow(self.thisptr)
 *         return c2py(deref(X).get_exp())             # <<<<<<<<<<<<<<
 * 
 *     def as_base_exp(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py((*__pyx_v_X).get_exp()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2364, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2361
 *         return c2py(deref(X).get_base())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def exp(Basic self):
 *         cdef RCP[const symengine.Pow] X = symengine.rcp_static_cast_Pow(self.thisptr)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Pow.exp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2366
 *         return c2py(deref(X).get_exp())
 * 
 *     def as_base_exp(self):             # <<<<<<<<<<<<<<
 *         return self.base, self.exp
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3Pow_7as_base_exp(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_3Pow_7as_base_exp = {"as_base_exp", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_3Pow_7as_base_exp, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3Pow_7as_base_exp(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("as_base_exp (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2366, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2366, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "as_base_exp", 0) < (0)) __PYX_ERR(0, 2366, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("as_base_exp", 1, 1, 1, i); __PYX_ERR(0, 2366, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2366, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("as_base_exp", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2366, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Pow.as_base_exp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_3Pow_6as_base_exp(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3Pow_6as_base_exp(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("as_base_exp", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2367
 * 
 *     def as_base_exp(self):
 *         return self.base, self.exp             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_base); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2367, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_exp); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2367, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2367, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 2367, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2) != (0)) __PYX_ERR(0, 2367, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2366
 *         return c2py(deref(X).get_exp())
 * 
 *     def as_base_exp(self):             # <<<<<<<<<<<<<<
 *         return self.base, self.exp
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Pow.as_base_exp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2369
 *         return self.base, self.exp
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_Pow(self):
 *         return True
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3Pow_9is_Pow(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_3Pow_9is_Pow = {"is_Pow", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_3Pow_9is_Pow, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3Pow_9is_Pow(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_Pow (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2369, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2369, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "is_Pow", 0) < (0)) __PYX_ERR(0, 2369, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("is_Pow", 1, 1, 1, i); __PYX_ERR(0, 2369, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2369, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_Pow", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2369, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Pow.is_Pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_3Pow_8is_Pow(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3Pow_8is_Pow(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_Pow", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2371
 *     @property
 *     def is_Pow(self):
 *         return True             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_True);
  __pyx_r = Py_True;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2369
 *         return self.base, self.exp
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_Pow(self):
 *         return True
*/

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

/* "symengine/lib/symengine_wrapper.pyx":2373
 *         return True
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_commutative(self):
 *         return (self.base.is_commutative and self.exp.is_commutative)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3Pow_11is_commutative(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_3Pow_11is_commutative = {"is_commutative", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_3Pow_11is_commutative, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3Pow_11is_commutative(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_commutative (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2373, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2373, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "is_commutative", 0) < (0)) __PYX_ERR(0, 2373, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("is_commutative", 1, 1, 1, i); __PYX_ERR(0, 2373, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2373, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_commutative", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2373, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Pow.is_commutative", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_3Pow_10is_commutative(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3Pow_10is_commutative(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_commutative", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2375
 *     @property
 *     def is_commutative(self):
 *         return (self.base.is_commutative and self.exp.is_commutative)             # <<<<<<<<<<<<<<
 * 
 *     def _sympy_(Basic self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_base); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2375, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_is_commutative); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2375, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 2375, __pyx_L1_error)
  if (__pyx_t_4) {
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_exp); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2375, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_is_commutative); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2375, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_1 = __pyx_t_2;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_L3_bool_binop_done:;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2373
 *         return True
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_commutative(self):
 *         return (self.base.is_commutative and self.exp.is_commutative)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Pow.is_commutative", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2377
 *         return (self.base.is_commutative and self.exp.is_commutative)
 * 
 *     def _sympy_(Basic self):             # <<<<<<<<<<<<<<
 *         cdef RCP[const symengine.Pow] X = symengine.rcp_static_cast_Pow(self.thisptr)
 *         base = c2py(deref(X).get_base())
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3Pow_13_sympy_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_3Pow_13_sympy_ = {"_sympy_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_3Pow_13_sympy_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3Pow_13_sympy_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sympy_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2377, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2377, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_sympy_", 0) < (0)) __PYX_ERR(0, 2377, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 1, 1, i); __PYX_ERR(0, 2377, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2377, __pyx_L3_error)
    }
    __pyx_v_self = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2377, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Pow._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic, 1, "self", 0))) __PYX_ERR(0, 2377, __pyx_L1_error)
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_3Pow_12_sympy_(__pyx_self, __pyx_v_self);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3Pow_12_sympy_(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self) {
  SymEngine::RCP<SymEngine::Pow const >  __pyx_v_X;
  PyObject *__pyx_v_base = NULL;
  PyObject *__pyx_v_exp = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sympy_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2378
 * 
 *     def _sympy_(Basic self):
 *         cdef RCP[const symengine.Pow] X = symengine.rcp_static_cast_Pow(self.thisptr)             # <<<<<<<<<<<<<<
 *         base = c2py(deref(X).get_base())
 *         exp = c2py(deref(X).get_exp())
*/
  __pyx_v_X = SymEngine::rcp_static_cast<const SymEngine::Pow>(__pyx_v_self->thisptr);

  /* "symengine/lib/symengine_wrapper.pyx":2379
 *     def _sympy_(Basic self):
 *         cdef RCP[const symengine.Pow] X = symengine.rcp_static_cast_Pow(self.thisptr)
 *         base = c2py(deref(X).get_base())             # <<<<<<<<<<<<<<
 *         exp = c2py(deref(X).get_exp())
 *         return base._sympy_() ** exp._sympy_()
*/
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py((*__pyx_v_X).get_base()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2379, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_base = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2380
 *         cdef RCP[const symengine.Pow] X = symengine.rcp_static_cast_Pow(self.thisptr)
 *         base = c2py(deref(X).get_base())
 *         exp = c2py(deref(X).get_exp())             # <<<<<<<<<<<<<<
 *         return base._sympy_() ** exp._sympy_()
 * 
*/
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py((*__pyx_v_X).get_exp()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2380, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_exp = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2381
 *         base = c2py(deref(X).get_base())
 *         exp = c2py(deref(X).get_exp())
 *         return base._sympy_() ** exp._sympy_()             # <<<<<<<<<<<<<<
 * 
 *     def _sage_(Basic self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_v_base;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_sympy_2, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2381, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_t_4 = __pyx_v_exp;
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_3 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_sympy_2, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2381, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  __pyx_t_4 = PyNumber_Power(__pyx_t_1, __pyx_t_2, Py_None); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2381, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2377
 *         return (self.base.is_commutative and self.exp.is_commutative)
 * 
 *     def _sympy_(Basic self):             # <<<<<<<<<<<<<<
 *         cdef RCP[const symengine.Pow] X = symengine.rcp_static_cast_Pow(self.thisptr)
 *         base = c2py(deref(X).get_base())
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Pow._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_base);
  __Pyx_XDECREF(__pyx_v_exp);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2383
 *         return base._sympy_() ** exp._sympy_()
 * 
 *     def _sage_(Basic self):             # <<<<<<<<<<<<<<
 *         cdef RCP[const symengine.Pow] X = symengine.rcp_static_cast_Pow(self.thisptr)
 *         base = c2py(deref(X).get_base())
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3Pow_15_sage_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_3Pow_15_sage_ = {"_sage_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_3Pow_15_sage_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3Pow_15_sage_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sage_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2383, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2383, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_sage_", 0) < (0)) __PYX_ERR(0, 2383, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_sage_", 1, 1, 1, i); __PYX_ERR(0, 2383, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2383, __pyx_L3_error)
    }
    __pyx_v_self = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_sage_", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2383, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Pow._sage_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic, 1, "self", 0))) __PYX_ERR(0, 2383, __pyx_L1_error)
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_3Pow_14_sage_(__pyx_self, __pyx_v_self);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3Pow_14_sage_(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self) {
  SymEngine::RCP<SymEngine::Pow const >  __pyx_v_X;
  PyObject *__pyx_v_base = NULL;
  PyObject *__pyx_v_exp = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sage_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2384
 * 
 *     def _sage_(Basic self):
 *         cdef RCP[const symengine.Pow] X = symengine.rcp_static_cast_Pow(self.thisptr)             # <<<<<<<<<<<<<<
 *         base = c2py(deref(X).get_base())
 *         exp = c2py(deref(X).get_exp())
*/
  __pyx_v_X = SymEngine::rcp_static_cast<const SymEngine::Pow>(__pyx_v_self->thisptr);

  /* "symengine/lib/symengine_wrapper.pyx":2385
 *     def _sage_(Basic self):
 *         cdef RCP[const symengine.Pow] X = symengine.rcp_static_cast_Pow(self.thisptr)
 *         base = c2py(deref(X).get_base())             # <<<<<<<<<<<<<<
 *         exp = c2py(deref(X).get_exp())
 *         return base._sage_() ** exp._sage_()
*/
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py((*__pyx_v_X).get_base()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2385, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_base = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2386
 *         cdef RCP[const symengine.Pow] X = symengine.rcp_static_cast_Pow(self.thisptr)
 *         base = c2py(deref(X).get_base())
 *         exp = c2py(deref(X).get_exp())             # <<<<<<<<<<<<<<
 *         return base._sage_() ** exp._sage_()
 * 
*/
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py((*__pyx_v_X).get_exp()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2386, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_exp = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2387
 *         base = c2py(deref(X).get_base())
 *         exp = c2py(deref(X).get_exp())
 *         return base._sage_() ** exp._sage_()             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_v_base;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_sage, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2387, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_t_4 = __pyx_v_exp;
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_3 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_sage, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2387, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  __pyx_t_4 = PyNumber_Power(__pyx_t_1, __pyx_t_2, Py_None); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2387, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2383
 *         return base._sympy_() ** exp._sympy_()
 * 
 *     def _sage_(Basic self):             # <<<<<<<<<<<<<<
 *         cdef RCP[const symengine.Pow] X = symengine.rcp_static_cast_Pow(self.thisptr)
 *         base = c2py(deref(X).get_base())
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Pow._sage_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_base);
  __Pyx_XDECREF(__pyx_v_exp);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2389
 *         return base._sage_() ** exp._sage_()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def func(self):
 *         return self.__class__
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3Pow_17func(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_3Pow_17func = {"func", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_3Pow_17func, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3Pow_17func(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("func (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2389, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2389, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "func", 0) < (0)) __PYX_ERR(0, 2389, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("func", 1, 1, 1, i); __PYX_ERR(0, 2389, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2389, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("func", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2389, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Pow.func", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_3Pow_16func(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3Pow_16func(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("func", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2391
 *     @property
 *     def func(self):
 *         return self.__class__             # <<<<<<<<<<<<<<
 * 
 *     def as_powers_dict(Basic self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2391, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2389
 *         return base._sage_() ** exp._sage_()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def func(self):
 *         return self.__class__
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Pow.func", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2393
 *         return self.__class__
 * 
 *     def as_powers_dict(Basic self):             # <<<<<<<<<<<<<<
 *         d = collections.defaultdict(int)
 *         base, exp = self.as_base_exp()
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3Pow_19as_powers_dict(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_3Pow_19as_powers_dict = {"as_powers_dict", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_3Pow_19as_powers_dict, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3Pow_19as_powers_dict(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("as_powers_dict (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2393, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2393, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "as_powers_dict", 0) < (0)) __PYX_ERR(0, 2393, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("as_powers_dict", 1, 1, 1, i); __PYX_ERR(0, 2393, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2393, __pyx_L3_error)
    }
    __pyx_v_self = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("as_powers_dict", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2393, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Pow.as_powers_dict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic, 1, "self", 0))) __PYX_ERR(0, 2393, __pyx_L1_error)
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_3Pow_18as_powers_dict(__pyx_self, __pyx_v_self);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3Pow_18as_powers_dict(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self) {
  PyObject *__pyx_v_d = NULL;
  PyObject *__pyx_v_base = NULL;
  PyObject *__pyx_v_exp = 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;
  size_t __pyx_t_5;
  PyObject *(*__pyx_t_6)(PyObject *);
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("as_powers_dict", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2394
 * 
 *     def as_powers_dict(Basic self):
 *         d = collections.defaultdict(int)             # <<<<<<<<<<<<<<
 *         base, exp = self.as_base_exp()
 *         if base.is_Rational and base.p < base.q and base.p > 0:
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_collections); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2394, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_defaultdict); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2394, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, ((PyObject *)(&PyLong_Type))};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2394, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_d = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2395
 *     def as_powers_dict(Basic self):
 *         d = collections.defaultdict(int)
 *         base, exp = self.as_base_exp()             # <<<<<<<<<<<<<<
 *         if base.is_Rational and base.p < base.q and base.p > 0:
 *             d[1/base] = -exp
*/
  __pyx_t_4 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_as_base_exp, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2395, __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;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 2395, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0);
      __Pyx_INCREF(__pyx_t_4);
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1);
      __Pyx_INCREF(__pyx_t_2);
    } else {
      __pyx_t_4 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference);
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2395, __pyx_L1_error)
      __Pyx_XGOTREF(__pyx_t_4);
      __pyx_t_2 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference);
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2395, __pyx_L1_error)
      __Pyx_XGOTREF(__pyx_t_2);
    }
    #else
    __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2395, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2395, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    #endif
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2395, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_6 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3);
    index = 0; __pyx_t_4 = __pyx_t_6(__pyx_t_3); if (unlikely(!__pyx_t_4)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_4);
    index = 1; __pyx_t_2 = __pyx_t_6(__pyx_t_3); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_3), 2) < (0)) __PYX_ERR(0, 2395, __pyx_L1_error)
    __pyx_t_6 = NULL;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_6 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 2395, __pyx_L1_error)
    __pyx_L4_unpacking_done:;
  }
  __pyx_v_base = __pyx_t_4;
  __pyx_t_4 = 0;
  __pyx_v_exp = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2396
 *         d = collections.defaultdict(int)
 *         base, exp = self.as_base_exp()
 *         if base.is_Rational and base.p < base.q and base.p > 0:             # <<<<<<<<<<<<<<
 *             d[1/base] = -exp
 *         else:
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_base, __pyx_mstate_global->__pyx_n_u_is_Rational); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2396, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 2396, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_8) {
  } else {
    __pyx_t_7 = __pyx_t_8;
    goto __pyx_L6_bool_binop_done;
  }
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_base, __pyx_mstate_global->__pyx_n_u_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2396, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_base, __pyx_mstate_global->__pyx_n_u_q); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2396, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2396, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 2396, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_8) {
  } else {
    __pyx_t_7 = __pyx_t_8;
    goto __pyx_L6_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_base, __pyx_mstate_global->__pyx_n_u_p); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2396, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = PyObject_RichCompare(__pyx_t_4, __pyx_mstate_global->__pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2396, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 2396, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_7 = __pyx_t_8;
  __pyx_L6_bool_binop_done:;
  if (__pyx_t_7) {

    /* "symengine/lib/symengine_wrapper.pyx":2397
 *         base, exp = self.as_base_exp()
 *         if base.is_Rational and base.p < base.q and base.p > 0:
 *             d[1/base] = -exp             # <<<<<<<<<<<<<<
 *         else:
 *             d[base] = exp
*/
    __pyx_t_2 = PyNumber_Negative(__pyx_v_exp); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2397, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyNumber_Divide(__pyx_mstate_global->__pyx_int_1, __pyx_v_base); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2397, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (unlikely((PyObject_SetItem(__pyx_v_d, __pyx_t_4, __pyx_t_2) < 0))) __PYX_ERR(0, 2397, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":2396
 *         d = collections.defaultdict(int)
 *         base, exp = self.as_base_exp()
 *         if base.is_Rational and base.p < base.q and base.p > 0:             # <<<<<<<<<<<<<<
 *             d[1/base] = -exp
 *         else:
*/
    goto __pyx_L5;
  }

  /* "symengine/lib/symengine_wrapper.pyx":2399
 *             d[1/base] = -exp
 *         else:
 *             d[base] = exp             # <<<<<<<<<<<<<<
 *         return d
 * 
*/
  /*else*/ {
    if (unlikely((PyObject_SetItem(__pyx_v_d, __pyx_v_base, __pyx_v_exp) < 0))) __PYX_ERR(0, 2399, __pyx_L1_error)
  }
  __pyx_L5:;

  /* "symengine/lib/symengine_wrapper.pyx":2400
 *         else:
 *             d[base] = exp
 *         return d             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_d);
  __pyx_r = __pyx_v_d;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2393
 *         return self.__class__
 * 
 *     def as_powers_dict(Basic self):             # <<<<<<<<<<<<<<
 *         d = collections.defaultdict(int)
 *         base, exp = self.as_base_exp()
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Pow.as_powers_dict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_d);
  __Pyx_XDECREF(__pyx_v_base);
  __Pyx_XDECREF(__pyx_v_exp);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2405
 * class Function(Expr):
 * 
 *     def __new__(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         if cls == Function:
 *             nargs = len(args)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8Function_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_8Function_1__new__ = {"__new__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_8Function_1__new__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8Function_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_args = 0;
  CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  __pyx_v_args = __Pyx_ArgsSlice_FASTCALL(__pyx_args, 1, __pyx_nargs);
  if (unlikely(!__pyx_v_args)) {
    __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_v_args);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2405, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        default:
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2405, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      const Py_ssize_t used_pos_args = (kwd_pos_args < 1) ? kwd_pos_args : 1;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, __pyx_kwds_len, "__new__", 1) < (0)) __PYX_ERR(0, 2405, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__new__", 0, 1, 1, i); __PYX_ERR(0, 2405, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs < 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2405, __pyx_L3_error)
    }
    __pyx_v_cls = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 0, 1, 1, __pyx_nargs); __PYX_ERR(0, 2405, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_XDECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Function.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_8Function___new__(__pyx_self, __pyx_v_cls, __pyx_v_args, __pyx_v_kwargs);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8Function___new__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
  Py_ssize_t __pyx_v_nargs;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  size_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8[3];
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__new__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2406
 * 
 *     def __new__(cls, *args, **kwargs):
 *         if cls == Function:             # <<<<<<<<<<<<<<
 *             nargs = len(args)
 *             if nargs == 0:
*/
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_Function); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2406, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_RichCompare(__pyx_v_cls, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2406, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 2406, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_3) {

    /* "symengine/lib/symengine_wrapper.pyx":2407
 *     def __new__(cls, *args, **kwargs):
 *         if cls == Function:
 *             nargs = len(args)             # <<<<<<<<<<<<<<
 *             if nargs == 0:
 *                 raise TypeError("Required at least one argument to Function")
*/
    __pyx_t_4 = __Pyx_PyTuple_GET_SIZE(__pyx_v_args); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2407, __pyx_L1_error)
    __pyx_v_nargs = __pyx_t_4;

    /* "symengine/lib/symengine_wrapper.pyx":2408
 *         if cls == Function:
 *             nargs = len(args)
 *             if nargs == 0:             # <<<<<<<<<<<<<<
 *                 raise TypeError("Required at least one argument to Function")
 *             elif nargs == 1:
*/
    __pyx_t_3 = (__pyx_v_nargs == 0);
    if (unlikely(__pyx_t_3)) {

      /* "symengine/lib/symengine_wrapper.pyx":2409
 *             nargs = len(args)
 *             if nargs == 0:
 *                 raise TypeError("Required at least one argument to Function")             # <<<<<<<<<<<<<<
 *             elif nargs == 1:
 *                 return UndefFunction(args[0])
*/
      __pyx_t_1 = NULL;
      __pyx_t_5 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_mstate_global->__pyx_kp_u_Required_at_least_one_argument_t};
        __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2409, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_Raise(__pyx_t_2, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __PYX_ERR(0, 2409, __pyx_L1_error)

      /* "symengine/lib/symengine_wrapper.pyx":2408
 *         if cls == Function:
 *             nargs = len(args)
 *             if nargs == 0:             # <<<<<<<<<<<<<<
 *                 raise TypeError("Required at least one argument to Function")
 *             elif nargs == 1:
*/
    }

    /* "symengine/lib/symengine_wrapper.pyx":2410
 *             if nargs == 0:
 *                 raise TypeError("Required at least one argument to Function")
 *             elif nargs == 1:             # <<<<<<<<<<<<<<
 *                 return UndefFunction(args[0])
 *             elif nargs > 1:
*/
    __pyx_t_3 = (__pyx_v_nargs == 1);
    if (__pyx_t_3) {

      /* "symengine/lib/symengine_wrapper.pyx":2411
 *                 raise TypeError("Required at least one argument to Function")
 *             elif nargs == 1:
 *                 return UndefFunction(args[0])             # <<<<<<<<<<<<<<
 *             elif nargs > 1:
 *                 raise TypeError(f"Unexpected extra arguments {args[1:]}.")
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_UndefFunction); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2411, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v_args, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2411, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_5 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
        assert(__pyx_t_1);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
        __pyx_t_5 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_7};
        __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2411, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      }
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

      /* "symengine/lib/symengine_wrapper.pyx":2410
 *             if nargs == 0:
 *                 raise TypeError("Required at least one argument to Function")
 *             elif nargs == 1:             # <<<<<<<<<<<<<<
 *                 return UndefFunction(args[0])
 *             elif nargs > 1:
*/
    }

    /* "symengine/lib/symengine_wrapper.pyx":2412
 *             elif nargs == 1:
 *                 return UndefFunction(args[0])
 *             elif nargs > 1:             # <<<<<<<<<<<<<<
 *                 raise TypeError(f"Unexpected extra arguments {args[1:]}.")
 * 
*/
    __pyx_t_3 = (__pyx_v_nargs > 1);
    if (unlikely(__pyx_t_3)) {

      /* "symengine/lib/symengine_wrapper.pyx":2413
 *                 return UndefFunction(args[0])
 *             elif nargs > 1:
 *                 raise TypeError(f"Unexpected extra arguments {args[1:]}.")             # <<<<<<<<<<<<<<
 * 
 *         return super(Function, cls).__new__(cls)
*/
      __pyx_t_6 = NULL;
      __pyx_t_7 = __Pyx_PyTuple_GetSlice(__pyx_v_args, 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2413, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_t_7, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2413, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_8[0] = __pyx_mstate_global->__pyx_kp_u_Unexpected_extra_arguments;
      __pyx_t_8[1] = __pyx_t_1;
      __pyx_t_8[2] = __pyx_mstate_global->__pyx_kp_u__2;
      __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_8, 3, 27 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1));
      if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2413, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_5 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_7};
        __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2413, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_Raise(__pyx_t_2, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __PYX_ERR(0, 2413, __pyx_L1_error)

      /* "symengine/lib/symengine_wrapper.pyx":2412
 *             elif nargs == 1:
 *                 return UndefFunction(args[0])
 *             elif nargs > 1:             # <<<<<<<<<<<<<<
 *                 raise TypeError(f"Unexpected extra arguments {args[1:]}.")
 * 
*/
    }

    /* "symengine/lib/symengine_wrapper.pyx":2406
 * 
 *     def __new__(cls, *args, **kwargs):
 *         if cls == Function:             # <<<<<<<<<<<<<<
 *             nargs = len(args)
 *             if nargs == 0:
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":2415
 *                 raise TypeError(f"Unexpected extra arguments {args[1:]}.")
 * 
 *         return super(Function, cls).__new__(cls)             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_Function); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2415, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_5 = 1;
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_1, __pyx_t_9, __pyx_v_cls};
    __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_super, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2415, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
  }
  __pyx_t_7 = __pyx_t_6;
  __Pyx_INCREF(__pyx_t_7);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_cls};
    __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2415, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2405
 * class Function(Expr):
 * 
 *     def __new__(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         if cls == Function:
 *             nargs = len(args)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Function.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2417
 *         return super(Function, cls).__new__(cls)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_Function(self):
 *         return True
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8Function_3is_Function(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_8Function_3is_Function = {"is_Function", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_8Function_3is_Function, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8Function_3is_Function(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_Function (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2417, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2417, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "is_Function", 0) < (0)) __PYX_ERR(0, 2417, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("is_Function", 1, 1, 1, i); __PYX_ERR(0, 2417, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2417, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_Function", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2417, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Function.is_Function", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_8Function_2is_Function(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8Function_2is_Function(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_Function", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2419
 *     @property
 *     def is_Function(self):
 *         return True             # <<<<<<<<<<<<<<
 * 
 *     def func(self, *values):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_True);
  __pyx_r = Py_True;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2417
 *         return super(Function, cls).__new__(cls)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_Function(self):
 *         return True
*/

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

/* "symengine/lib/symengine_wrapper.pyx":2421
 *         return True
 * 
 *     def func(self, *values):             # <<<<<<<<<<<<<<
 *         import sys
 *         return getattr(sys.modules[__name__], self.__class__.__name__.lower())(*values)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8Function_5func(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_8Function_5func = {"func", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_8Function_5func, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8Function_5func(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_values = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("func (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  __pyx_v_values = __Pyx_ArgsSlice_FASTCALL(__pyx_args, 1, __pyx_nargs);
  if (unlikely(!__pyx_v_values)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_v_values);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2421, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        default:
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2421, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      const Py_ssize_t used_pos_args = (kwd_pos_args < 1) ? kwd_pos_args : 1;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, used_pos_args, __pyx_kwds_len, "func", 0) < (0)) __PYX_ERR(0, 2421, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("func", 0, 1, 1, i); __PYX_ERR(0, 2421, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs < 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2421, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("func", 0, 1, 1, __pyx_nargs); __PYX_ERR(0, 2421, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_values); __pyx_v_values = 0;
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Function.func", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_8Function_4func(__pyx_self, __pyx_v_self, __pyx_v_values);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_values);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8Function_4func(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_values) {
  PyObject *__pyx_v_sys = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  size_t __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("func", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2422
 * 
 *     def func(self, *values):
 *         import sys             # <<<<<<<<<<<<<<
 *         return getattr(sys.modules[__name__], self.__class__.__name__.lower())(*values)
 * 
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sys, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2422, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sys = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2423
 *     def func(self, *values):
 *         import sys
 *         return getattr(sys.modules[__name__], self.__class__.__name__.lower())(*values)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sys, __pyx_mstate_global->__pyx_n_u_modules); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2423, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_name_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2423, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2423, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2423, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_name_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2423, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_1 = __pyx_t_6;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_7 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_lower, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2423, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __pyx_t_6 = __Pyx_GetAttr(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2423, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_v_values, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2423, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2421
 *         return True
 * 
 *     def func(self, *values):             # <<<<<<<<<<<<<<
 *         import sys
 *         return getattr(sys.modules[__name__], self.__class__.__name__.lower())(*values)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Function.func", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sys);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2428
 * class OneArgFunction(Function):
 * 
 *     def get_arg(Basic self):             # <<<<<<<<<<<<<<
 *         cdef RCP[const symengine.OneArgFunction] X = symengine.rcp_static_cast_OneArgFunction(self.thisptr)
 *         return c2py(deref(X).get_arg())
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_14OneArgFunction_1get_arg(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_14OneArgFunction_1get_arg = {"get_arg", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_14OneArgFunction_1get_arg, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_14OneArgFunction_1get_arg(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_arg (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2428, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2428, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "get_arg", 0) < (0)) __PYX_ERR(0, 2428, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("get_arg", 1, 1, 1, i); __PYX_ERR(0, 2428, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2428, __pyx_L3_error)
    }
    __pyx_v_self = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("get_arg", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2428, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.OneArgFunction.get_arg", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic, 1, "self", 0))) __PYX_ERR(0, 2428, __pyx_L1_error)
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_14OneArgFunction_get_arg(__pyx_self, __pyx_v_self);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_14OneArgFunction_get_arg(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self) {
  SymEngine::RCP<SymEngine::OneArgFunction const >  __pyx_v_X;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_arg", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2429
 * 
 *     def get_arg(Basic self):
 *         cdef RCP[const symengine.OneArgFunction] X = symengine.rcp_static_cast_OneArgFunction(self.thisptr)             # <<<<<<<<<<<<<<
 *         return c2py(deref(X).get_arg())
 * 
*/
  __pyx_v_X = SymEngine::rcp_static_cast<const SymEngine::OneArgFunction>(__pyx_v_self->thisptr);

  /* "symengine/lib/symengine_wrapper.pyx":2430
 *     def get_arg(Basic self):
 *         cdef RCP[const symengine.OneArgFunction] X = symengine.rcp_static_cast_OneArgFunction(self.thisptr)
 *         return c2py(deref(X).get_arg())             # <<<<<<<<<<<<<<
 * 
 *     def _sympy_(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py((*__pyx_v_X).get_arg()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2430, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2428
 * class OneArgFunction(Function):
 * 
 *     def get_arg(Basic self):             # <<<<<<<<<<<<<<
 *         cdef RCP[const symengine.OneArgFunction] X = symengine.rcp_static_cast_OneArgFunction(self.thisptr)
 *         return c2py(deref(X).get_arg())
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.OneArgFunction.get_arg", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2432
 *         return c2py(deref(X).get_arg())
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return getattr(sympy, self.__class__.__name__)(self.get_arg()._sympy_())
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_14OneArgFunction_3_sympy_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_14OneArgFunction_3_sympy_ = {"_sympy_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_14OneArgFunction_3_sympy_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_14OneArgFunction_3_sympy_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sympy_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2432, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2432, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_sympy_", 0) < (0)) __PYX_ERR(0, 2432, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 1, 1, i); __PYX_ERR(0, 2432, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2432, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2432, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.OneArgFunction._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_14OneArgFunction_2_sympy_(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_14OneArgFunction_2_sympy_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_sympy = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  size_t __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sympy_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2433
 * 
 *     def _sympy_(self):
 *         import sympy             # <<<<<<<<<<<<<<
 *         return getattr(sympy, self.__class__.__name__)(self.get_arg()._sympy_())
 * 
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sympy, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2433, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sympy = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2434
 *     def _sympy_(self):
 *         import sympy
 *         return getattr(sympy, self.__class__.__name__)(self.get_arg()._sympy_())             # <<<<<<<<<<<<<<
 * 
 *     def _sage_(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = NULL;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2434, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_name_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2434, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_GetAttr(__pyx_v_sympy, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2434, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_8 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_8);
  __pyx_t_9 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL};
    __pyx_t_7 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_arg, __pyx_callargs+__pyx_t_9, (1-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2434, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
  }
  __pyx_t_6 = __pyx_t_7;
  __Pyx_INCREF(__pyx_t_6);
  __pyx_t_9 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
    __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_sympy_2, __pyx_callargs+__pyx_t_9, (1-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2434, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
  }
  __pyx_t_9 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_9 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2434, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2432
 *         return c2py(deref(X).get_arg())
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return getattr(sympy, self.__class__.__name__)(self.get_arg()._sympy_())
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.OneArgFunction._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sympy);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2436
 *         return getattr(sympy, self.__class__.__name__)(self.get_arg()._sympy_())
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         import sage.all as sage
 *         return getattr(sage, self.__class__.__name__.lower())(self.get_arg()._sage_())
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_14OneArgFunction_5_sage_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_14OneArgFunction_5_sage_ = {"_sage_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_14OneArgFunction_5_sage_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_14OneArgFunction_5_sage_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sage_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2436, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2436, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_sage_", 0) < (0)) __PYX_ERR(0, 2436, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_sage_", 1, 1, 1, i); __PYX_ERR(0, 2436, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2436, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_sage_", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2436, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.OneArgFunction._sage_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_14OneArgFunction_4_sage_(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_14OneArgFunction_4_sage_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_sage = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  size_t __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sage_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2437
 * 
 *     def _sage_(self):
 *         import sage.all as sage             # <<<<<<<<<<<<<<
 *         return getattr(sage, self.__class__.__name__.lower())(self.get_arg()._sage_())
 * 
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sage_all, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2437, __pyx_L1_error)
  __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_all);
  Py_DECREF(__pyx_t_2);
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2437, __pyx_L1_error)
  __pyx_t_2 = __pyx_t_3;
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sage = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2438
 *     def _sage_(self):
 *         import sage.all as sage
 *         return getattr(sage, self.__class__.__name__.lower())(self.get_arg()._sage_())             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = NULL;
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2438, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_name_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2438, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_6 = __pyx_t_8;
  __Pyx_INCREF(__pyx_t_6);
  __pyx_t_9 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
    __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_lower, __pyx_callargs+__pyx_t_9, (1-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2438, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
  }
  __pyx_t_8 = __Pyx_GetAttr(__pyx_v_sage, __pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2438, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_10 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_10);
  __pyx_t_9 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_10, NULL};
    __pyx_t_7 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_arg, __pyx_callargs+__pyx_t_9, (1-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2438, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
  }
  __pyx_t_6 = __pyx_t_7;
  __Pyx_INCREF(__pyx_t_6);
  __pyx_t_9 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
    __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_sage, __pyx_callargs+__pyx_t_9, (1-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2438, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
  }
  __pyx_t_9 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_8);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_8, __pyx__function);
    __pyx_t_9 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_5};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2438, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2436
 *         return getattr(sympy, self.__class__.__name__)(self.get_arg()._sympy_())
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         import sage.all as sage
 *         return getattr(sage, self.__class__.__name__.lower())(self.get_arg()._sage_())
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.OneArgFunction._sage_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sage);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2448
 * 
 * class gamma(OneArgFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.gamma(X.thisptr))
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5gamma_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_5gamma_1__new__ = {"__new__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_5gamma_1__new__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5gamma_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_x = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,&__pyx_mstate_global->__pyx_n_u_x,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2448, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2448, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2448, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__new__", 0) < (0)) __PYX_ERR(0, 2448, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__new__", 1, 2, 2, i); __PYX_ERR(0, 2448, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2448, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2448, __pyx_L3_error)
    }
    __pyx_v_cls = values[0];
    __pyx_v_x = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 2448, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.gamma.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5gamma___new__(__pyx_self, __pyx_v_cls, __pyx_v_x);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5gamma___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_x) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_X = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  SymEngine::RCP<const SymEngine::Basic> __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__new__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2449
 * class gamma(OneArgFunction):
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)             # <<<<<<<<<<<<<<
 *         return c2py(symengine.gamma(X.thisptr))
 * 
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2449, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_x};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2449, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 2449, __pyx_L1_error)
  __pyx_v_X = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2450
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.gamma(X.thisptr))             # <<<<<<<<<<<<<<
 * 
 * class LambertW(OneArgFunction):
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_5 = SymEngine::gamma(__pyx_v_X->thisptr);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 2450, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2450, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2448
 * 
 * class gamma(OneArgFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.gamma(X.thisptr))
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.gamma.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_X);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2453
 * 
 * class LambertW(OneArgFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.lambertw(X.thisptr))
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8LambertW_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_8LambertW_1__new__ = {"__new__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_8LambertW_1__new__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8LambertW_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_x = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,&__pyx_mstate_global->__pyx_n_u_x,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2453, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2453, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2453, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__new__", 0) < (0)) __PYX_ERR(0, 2453, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__new__", 1, 2, 2, i); __PYX_ERR(0, 2453, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2453, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2453, __pyx_L3_error)
    }
    __pyx_v_cls = values[0];
    __pyx_v_x = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 2453, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.LambertW.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_8LambertW___new__(__pyx_self, __pyx_v_cls, __pyx_v_x);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8LambertW___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_x) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_X = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  SymEngine::RCP<const SymEngine::Basic> __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__new__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2454
 * class LambertW(OneArgFunction):
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)             # <<<<<<<<<<<<<<
 *         return c2py(symengine.lambertw(X.thisptr))
 * 
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2454, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_x};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2454, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 2454, __pyx_L1_error)
  __pyx_v_X = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2455
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.lambertw(X.thisptr))             # <<<<<<<<<<<<<<
 * 
 *     def _sage_(self):
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_5 = SymEngine::lambertw(__pyx_v_X->thisptr);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 2455, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2455, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2453
 * 
 * class LambertW(OneArgFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.lambertw(X.thisptr))
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.LambertW.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_X);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2457
 *         return c2py(symengine.lambertw(X.thisptr))
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         import sage.all as sage
 *         return sage.lambert_w(self.get_arg()._sage_())
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8LambertW_3_sage_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_8LambertW_3_sage_ = {"_sage_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_8LambertW_3_sage_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8LambertW_3_sage_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sage_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2457, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2457, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_sage_", 0) < (0)) __PYX_ERR(0, 2457, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_sage_", 1, 1, 1, i); __PYX_ERR(0, 2457, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2457, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_sage_", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2457, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.LambertW._sage_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_8LambertW_2_sage_(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8LambertW_2_sage_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_sage = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  size_t __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sage_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2458
 * 
 *     def _sage_(self):
 *         import sage.all as sage             # <<<<<<<<<<<<<<
 *         return sage.lambert_w(self.get_arg()._sage_())
 * 
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sage_all, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2458, __pyx_L1_error)
  __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_all);
  Py_DECREF(__pyx_t_2);
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2458, __pyx_L1_error)
  __pyx_t_2 = __pyx_t_3;
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sage = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2459
 *     def _sage_(self):
 *         import sage.all as sage
 *         return sage.lambert_w(self.get_arg()._sage_())             # <<<<<<<<<<<<<<
 * 
 * class zeta(Function):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = __pyx_v_sage;
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_8 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_8);
  __pyx_t_9 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL};
    __pyx_t_7 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_arg, __pyx_callargs+__pyx_t_9, (1-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2459, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
  }
  __pyx_t_6 = __pyx_t_7;
  __Pyx_INCREF(__pyx_t_6);
  __pyx_t_9 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
    __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_sage, __pyx_callargs+__pyx_t_9, (1-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2459, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
  }
  __pyx_t_9 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_5};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_lambert_w, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2459, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2457
 *         return c2py(symengine.lambertw(X.thisptr))
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         import sage.all as sage
 *         return sage.lambert_w(self.get_arg()._sage_())
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.LambertW._sage_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sage);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2462
 * 
 * class zeta(Function):
 *     def __new__(cls, s, a = None):             # <<<<<<<<<<<<<<
 *         cdef Basic S = sympify(s)
 *         if a == None:
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_4zeta_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_4zeta_1__new__ = {"__new__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_4zeta_1__new__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_4zeta_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_s = 0;
  PyObject *__pyx_v_a = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,&__pyx_mstate_global->__pyx_n_u_s,&__pyx_mstate_global->__pyx_n_u_a,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2462, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2462, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2462, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2462, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__new__", 0) < (0)) __PYX_ERR(0, 2462, __pyx_L3_error)
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__new__", 0, 2, 3, i); __PYX_ERR(0, 2462, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2462, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2462, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2462, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_cls = values[0];
    __pyx_v_s = values[1];
    __pyx_v_a = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 2462, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.zeta.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_4zeta___new__(__pyx_self, __pyx_v_cls, __pyx_v_s, __pyx_v_a);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_4zeta___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_s, PyObject *__pyx_v_a) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_S = 0;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_A = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_t_5;
  SymEngine::RCP<const SymEngine::Basic> __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__new__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2463
 * class zeta(Function):
 *     def __new__(cls, s, a = None):
 *         cdef Basic S = sympify(s)             # <<<<<<<<<<<<<<
 *         if a == None:
 *             return c2py(symengine.zeta(S.thisptr))
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2463, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_s};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2463, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 2463, __pyx_L1_error)
  __pyx_v_S = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2464
 *     def __new__(cls, s, a = None):
 *         cdef Basic S = sympify(s)
 *         if a == None:             # <<<<<<<<<<<<<<
 *             return c2py(symengine.zeta(S.thisptr))
 *         cdef Basic A = sympify(a)
*/
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_a, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2464, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 2464, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":2465
 *         cdef Basic S = sympify(s)
 *         if a == None:
 *             return c2py(symengine.zeta(S.thisptr))             # <<<<<<<<<<<<<<
 *         cdef Basic A = sympify(a)
 *         return c2py(symengine.zeta(S.thisptr, A.thisptr))
*/
    __Pyx_XDECREF(__pyx_r);
    try {
      __pyx_t_6 = SymEngine::zeta(__pyx_v_S->thisptr);
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(0, 2465, __pyx_L1_error)
    }
    __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_6)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2465, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":2464
 *     def __new__(cls, s, a = None):
 *         cdef Basic S = sympify(s)
 *         if a == None:             # <<<<<<<<<<<<<<
 *             return c2py(symengine.zeta(S.thisptr))
 *         cdef Basic A = sympify(a)
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":2466
 *         if a == None:
 *             return c2py(symengine.zeta(S.thisptr))
 *         cdef Basic A = sympify(a)             # <<<<<<<<<<<<<<
 *         return c2py(symengine.zeta(S.thisptr, A.thisptr))
 * 
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2466, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_a};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2466, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 2466, __pyx_L1_error)
  __pyx_v_A = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2467
 *             return c2py(symengine.zeta(S.thisptr))
 *         cdef Basic A = sympify(a)
 *         return c2py(symengine.zeta(S.thisptr, A.thisptr))             # <<<<<<<<<<<<<<
 * 
 *     def _sympy_(self):
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_6 = SymEngine::zeta(__pyx_v_S->thisptr, __pyx_v_A->thisptr);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 2467, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_6)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2467, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2462
 * 
 * class zeta(Function):
 *     def __new__(cls, s, a = None):             # <<<<<<<<<<<<<<
 *         cdef Basic S = sympify(s)
 *         if a == None:
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.zeta.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_S);
  __Pyx_XDECREF((PyObject *)__pyx_v_A);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2469
 *         return c2py(symengine.zeta(S.thisptr, A.thisptr))
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.zeta(*self.args_as_sympy())
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_4zeta_3_sympy_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_4zeta_3_sympy_ = {"_sympy_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_4zeta_3_sympy_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_4zeta_3_sympy_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sympy_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2469, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2469, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_sympy_", 0) < (0)) __PYX_ERR(0, 2469, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 1, 1, i); __PYX_ERR(0, 2469, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2469, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2469, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.zeta._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_4zeta_2_sympy_(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_4zeta_2_sympy_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_sympy = 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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sympy_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2470
 * 
 *     def _sympy_(self):
 *         import sympy             # <<<<<<<<<<<<<<
 *         return sympy.zeta(*self.args_as_sympy())
 * 
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sympy, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2470, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sympy = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2471
 *     def _sympy_(self):
 *         import sympy
 *         return sympy.zeta(*self.args_as_sympy())             # <<<<<<<<<<<<<<
 * 
 * class dirichlet_eta(OneArgFunction):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_zeta); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2471, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_args_as_sympy, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2471, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2471, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2471, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2469
 *         return c2py(symengine.zeta(S.thisptr, A.thisptr))
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.zeta(*self.args_as_sympy())
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.zeta._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sympy);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2474
 * 
 * class dirichlet_eta(OneArgFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.dirichlet_eta(X.thisptr))
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_13dirichlet_eta_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_13dirichlet_eta_1__new__ = {"__new__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_13dirichlet_eta_1__new__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_13dirichlet_eta_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_x = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,&__pyx_mstate_global->__pyx_n_u_x,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2474, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2474, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2474, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__new__", 0) < (0)) __PYX_ERR(0, 2474, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__new__", 1, 2, 2, i); __PYX_ERR(0, 2474, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2474, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2474, __pyx_L3_error)
    }
    __pyx_v_cls = values[0];
    __pyx_v_x = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 2474, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.dirichlet_eta.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_13dirichlet_eta___new__(__pyx_self, __pyx_v_cls, __pyx_v_x);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_13dirichlet_eta___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_x) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_X = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  SymEngine::RCP<const SymEngine::Basic> __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__new__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2475
 * class dirichlet_eta(OneArgFunction):
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)             # <<<<<<<<<<<<<<
 *         return c2py(symengine.dirichlet_eta(X.thisptr))
 * 
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2475, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_x};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2475, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 2475, __pyx_L1_error)
  __pyx_v_X = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2476
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.dirichlet_eta(X.thisptr))             # <<<<<<<<<<<<<<
 * 
 * class KroneckerDelta(Function):
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_5 = SymEngine::dirichlet_eta(__pyx_v_X->thisptr);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 2476, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2476, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2474
 * 
 * class dirichlet_eta(OneArgFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.dirichlet_eta(X.thisptr))
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.dirichlet_eta.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_X);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2479
 * 
 * class KroneckerDelta(Function):
 *     def __new__(cls, x, y):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         cdef Basic Y = sympify(y)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_14KroneckerDelta_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_14KroneckerDelta_1__new__ = {"__new__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_14KroneckerDelta_1__new__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_14KroneckerDelta_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_x = 0;
  PyObject *__pyx_v_y = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,&__pyx_mstate_global->__pyx_n_u_x,&__pyx_mstate_global->__pyx_n_u_y,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2479, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2479, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2479, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2479, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__new__", 0) < (0)) __PYX_ERR(0, 2479, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__new__", 1, 3, 3, i); __PYX_ERR(0, 2479, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2479, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2479, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2479, __pyx_L3_error)
    }
    __pyx_v_cls = values[0];
    __pyx_v_x = values[1];
    __pyx_v_y = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 2479, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.KroneckerDelta.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_14KroneckerDelta___new__(__pyx_self, __pyx_v_cls, __pyx_v_x, __pyx_v_y);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_14KroneckerDelta___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_x, PyObject *__pyx_v_y) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_X = 0;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_Y = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  SymEngine::RCP<const SymEngine::Basic> __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__new__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2480
 * class KroneckerDelta(Function):
 *     def __new__(cls, x, y):
 *         cdef Basic X = sympify(x)             # <<<<<<<<<<<<<<
 *         cdef Basic Y = sympify(y)
 *         return c2py(symengine.kronecker_delta(X.thisptr, Y.thisptr))
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2480, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_x};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2480, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 2480, __pyx_L1_error)
  __pyx_v_X = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2481
 *     def __new__(cls, x, y):
 *         cdef Basic X = sympify(x)
 *         cdef Basic Y = sympify(y)             # <<<<<<<<<<<<<<
 *         return c2py(symengine.kronecker_delta(X.thisptr, Y.thisptr))
 * 
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2481, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_y};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2481, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 2481, __pyx_L1_error)
  __pyx_v_Y = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2482
 *         cdef Basic X = sympify(x)
 *         cdef Basic Y = sympify(y)
 *         return c2py(symengine.kronecker_delta(X.thisptr, Y.thisptr))             # <<<<<<<<<<<<<<
 * 
 *     def _sympy_(self):
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_5 = SymEngine::kronecker_delta(__pyx_v_X->thisptr, __pyx_v_Y->thisptr);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 2482, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2482, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2479
 * 
 * class KroneckerDelta(Function):
 *     def __new__(cls, x, y):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         cdef Basic Y = sympify(y)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.KroneckerDelta.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_X);
  __Pyx_XDECREF((PyObject *)__pyx_v_Y);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2484
 *         return c2py(symengine.kronecker_delta(X.thisptr, Y.thisptr))
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.KroneckerDelta(*self.args_as_sympy())
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_14KroneckerDelta_3_sympy_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_14KroneckerDelta_3_sympy_ = {"_sympy_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_14KroneckerDelta_3_sympy_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_14KroneckerDelta_3_sympy_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sympy_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2484, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2484, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_sympy_", 0) < (0)) __PYX_ERR(0, 2484, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 1, 1, i); __PYX_ERR(0, 2484, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2484, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2484, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.KroneckerDelta._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_14KroneckerDelta_2_sympy_(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_14KroneckerDelta_2_sympy_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_sympy = 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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sympy_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2485
 * 
 *     def _sympy_(self):
 *         import sympy             # <<<<<<<<<<<<<<
 *         return sympy.KroneckerDelta(*self.args_as_sympy())
 * 
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sympy, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2485, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sympy = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2486
 *     def _sympy_(self):
 *         import sympy
 *         return sympy.KroneckerDelta(*self.args_as_sympy())             # <<<<<<<<<<<<<<
 * 
 *     def _sage_(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_KroneckerDelta); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2486, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_args_as_sympy, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2486, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2486, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2486, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2484
 *         return c2py(symengine.kronecker_delta(X.thisptr, Y.thisptr))
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.KroneckerDelta(*self.args_as_sympy())
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.KroneckerDelta._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sympy);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2488
 *         return sympy.KroneckerDelta(*self.args_as_sympy())
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         import sage.all as sage
 *         return sage.kronecker_delta(*self.args_as_sage())
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_14KroneckerDelta_5_sage_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_14KroneckerDelta_5_sage_ = {"_sage_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_14KroneckerDelta_5_sage_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_14KroneckerDelta_5_sage_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sage_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2488, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2488, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_sage_", 0) < (0)) __PYX_ERR(0, 2488, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_sage_", 1, 1, 1, i); __PYX_ERR(0, 2488, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2488, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_sage_", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2488, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.KroneckerDelta._sage_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_14KroneckerDelta_4_sage_(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_14KroneckerDelta_4_sage_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_sage = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sage_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2489
 * 
 *     def _sage_(self):
 *         import sage.all as sage             # <<<<<<<<<<<<<<
 *         return sage.kronecker_delta(*self.args_as_sage())
 * 
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sage_all, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2489, __pyx_L1_error)
  __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_all);
  Py_DECREF(__pyx_t_2);
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2489, __pyx_L1_error)
  __pyx_t_2 = __pyx_t_3;
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sage = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2490
 *     def _sage_(self):
 *         import sage.all as sage
 *         return sage.kronecker_delta(*self.args_as_sage())             # <<<<<<<<<<<<<<
 * 
 * class LeviCivita(Function):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sage, __pyx_mstate_global->__pyx_n_u_kronecker_delta); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2490, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_5);
  __pyx_t_6 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
    __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_args_as_sage, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2490, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  __pyx_t_5 = __Pyx_PySequence_Tuple(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2490, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2490, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2488
 *         return sympy.KroneckerDelta(*self.args_as_sympy())
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         import sage.all as sage
 *         return sage.kronecker_delta(*self.args_as_sage())
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.KroneckerDelta._sage_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sage);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2493
 * 
 * class LeviCivita(Function):
 *     def __new__(cls, *args):             # <<<<<<<<<<<<<<
 *         cdef symengine.vec_basic v = iter_to_vec_basic(args)
 *         return c2py(symengine.levi_civita(v))
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10LeviCivita_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_10LeviCivita_1__new__ = {"__new__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_10LeviCivita_1__new__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10LeviCivita_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_args = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  __pyx_v_args = __Pyx_ArgsSlice_FASTCALL(__pyx_args, 1, __pyx_nargs);
  if (unlikely(!__pyx_v_args)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_v_args);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2493, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        default:
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2493, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      const Py_ssize_t used_pos_args = (kwd_pos_args < 1) ? kwd_pos_args : 1;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, used_pos_args, __pyx_kwds_len, "__new__", 0) < (0)) __PYX_ERR(0, 2493, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__new__", 0, 1, 1, i); __PYX_ERR(0, 2493, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs < 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2493, __pyx_L3_error)
    }
    __pyx_v_cls = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 0, 1, 1, __pyx_nargs); __PYX_ERR(0, 2493, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.LeviCivita.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_10LeviCivita___new__(__pyx_self, __pyx_v_cls, __pyx_v_args);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_args);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10LeviCivita___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_args) {
  SymEngine::vec_basic __pyx_v_v;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  SymEngine::vec_basic __pyx_t_1;
  SymEngine::RCP<const SymEngine::Basic> __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__new__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2494
 * class LeviCivita(Function):
 *     def __new__(cls, *args):
 *         cdef symengine.vec_basic v = iter_to_vec_basic(args)             # <<<<<<<<<<<<<<
 *         return c2py(symengine.levi_civita(v))
 * 
*/
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_iter_to_vec_basic(__pyx_v_args); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2494, __pyx_L1_error)
  __pyx_v_v = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_1);

  /* "symengine/lib/symengine_wrapper.pyx":2495
 *     def __new__(cls, *args):
 *         cdef symengine.vec_basic v = iter_to_vec_basic(args)
 *         return c2py(symengine.levi_civita(v))             # <<<<<<<<<<<<<<
 * 
 *     def _sympy_(self):
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_2 = SymEngine::levi_civita(__pyx_v_v);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 2495, __pyx_L1_error)
  }
  __pyx_t_3 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2495, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2493
 * 
 * class LeviCivita(Function):
 *     def __new__(cls, *args):             # <<<<<<<<<<<<<<
 *         cdef symengine.vec_basic v = iter_to_vec_basic(args)
 *         return c2py(symengine.levi_civita(v))
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.LeviCivita.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2497
 *         return c2py(symengine.levi_civita(v))
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.LeviCivita(*self.args_as_sympy())
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10LeviCivita_3_sympy_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_10LeviCivita_3_sympy_ = {"_sympy_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_10LeviCivita_3_sympy_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10LeviCivita_3_sympy_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sympy_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2497, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2497, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_sympy_", 0) < (0)) __PYX_ERR(0, 2497, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 1, 1, i); __PYX_ERR(0, 2497, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2497, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2497, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.LeviCivita._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_10LeviCivita_2_sympy_(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10LeviCivita_2_sympy_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_sympy = 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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sympy_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2498
 * 
 *     def _sympy_(self):
 *         import sympy             # <<<<<<<<<<<<<<
 *         return sympy.LeviCivita(*self.args_as_sympy())
 * 
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sympy, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2498, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sympy = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2499
 *     def _sympy_(self):
 *         import sympy
 *         return sympy.LeviCivita(*self.args_as_sympy())             # <<<<<<<<<<<<<<
 * 
 * class erf(OneArgFunction):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_LeviCivita); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2499, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_args_as_sympy, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2499, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2499, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2499, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2497
 *         return c2py(symengine.levi_civita(v))
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.LeviCivita(*self.args_as_sympy())
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.LeviCivita._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sympy);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2502
 * 
 * class erf(OneArgFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.erf(X.thisptr))
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3erf_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_3erf_1__new__ = {"__new__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_3erf_1__new__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3erf_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_x = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,&__pyx_mstate_global->__pyx_n_u_x,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2502, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2502, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2502, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__new__", 0) < (0)) __PYX_ERR(0, 2502, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__new__", 1, 2, 2, i); __PYX_ERR(0, 2502, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2502, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2502, __pyx_L3_error)
    }
    __pyx_v_cls = values[0];
    __pyx_v_x = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 2502, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.erf.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_3erf___new__(__pyx_self, __pyx_v_cls, __pyx_v_x);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3erf___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_x) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_X = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  SymEngine::RCP<const SymEngine::Basic> __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__new__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2503
 * class erf(OneArgFunction):
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)             # <<<<<<<<<<<<<<
 *         return c2py(symengine.erf(X.thisptr))
 * 
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2503, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_x};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2503, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 2503, __pyx_L1_error)
  __pyx_v_X = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2504
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.erf(X.thisptr))             # <<<<<<<<<<<<<<
 * 
 * class erfc(OneArgFunction):
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_5 = SymEngine::erf(__pyx_v_X->thisptr);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 2504, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2504, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2502
 * 
 * class erf(OneArgFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.erf(X.thisptr))
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.erf.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_X);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2507
 * 
 * class erfc(OneArgFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.erfc(X.thisptr))
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_4erfc_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_4erfc_1__new__ = {"__new__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_4erfc_1__new__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_4erfc_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_x = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,&__pyx_mstate_global->__pyx_n_u_x,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2507, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2507, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2507, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__new__", 0) < (0)) __PYX_ERR(0, 2507, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__new__", 1, 2, 2, i); __PYX_ERR(0, 2507, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2507, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2507, __pyx_L3_error)
    }
    __pyx_v_cls = values[0];
    __pyx_v_x = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 2507, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.erfc.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_4erfc___new__(__pyx_self, __pyx_v_cls, __pyx_v_x);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_4erfc___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_x) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_X = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  SymEngine::RCP<const SymEngine::Basic> __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__new__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2508
 * class erfc(OneArgFunction):
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)             # <<<<<<<<<<<<<<
 *         return c2py(symengine.erfc(X.thisptr))
 * 
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2508, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_x};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2508, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 2508, __pyx_L1_error)
  __pyx_v_X = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2509
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.erfc(X.thisptr))             # <<<<<<<<<<<<<<
 * 
 * class lowergamma(Function):
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_5 = SymEngine::erfc(__pyx_v_X->thisptr);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 2509, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2509, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2507
 * 
 * class erfc(OneArgFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.erfc(X.thisptr))
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.erfc.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_X);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2512
 * 
 * class lowergamma(Function):
 *     def __new__(cls, x, y):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         cdef Basic Y = sympify(y)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10lowergamma_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_10lowergamma_1__new__ = {"__new__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_10lowergamma_1__new__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10lowergamma_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_x = 0;
  PyObject *__pyx_v_y = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,&__pyx_mstate_global->__pyx_n_u_x,&__pyx_mstate_global->__pyx_n_u_y,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2512, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2512, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2512, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2512, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__new__", 0) < (0)) __PYX_ERR(0, 2512, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__new__", 1, 3, 3, i); __PYX_ERR(0, 2512, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2512, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2512, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2512, __pyx_L3_error)
    }
    __pyx_v_cls = values[0];
    __pyx_v_x = values[1];
    __pyx_v_y = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 2512, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.lowergamma.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_10lowergamma___new__(__pyx_self, __pyx_v_cls, __pyx_v_x, __pyx_v_y);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10lowergamma___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_x, PyObject *__pyx_v_y) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_X = 0;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_Y = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  SymEngine::RCP<const SymEngine::Basic> __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__new__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2513
 * class lowergamma(Function):
 *     def __new__(cls, x, y):
 *         cdef Basic X = sympify(x)             # <<<<<<<<<<<<<<
 *         cdef Basic Y = sympify(y)
 *         return c2py(symengine.lowergamma(X.thisptr, Y.thisptr))
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2513, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_x};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2513, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 2513, __pyx_L1_error)
  __pyx_v_X = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2514
 *     def __new__(cls, x, y):
 *         cdef Basic X = sympify(x)
 *         cdef Basic Y = sympify(y)             # <<<<<<<<<<<<<<
 *         return c2py(symengine.lowergamma(X.thisptr, Y.thisptr))
 * 
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2514, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_y};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2514, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 2514, __pyx_L1_error)
  __pyx_v_Y = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2515
 *         cdef Basic X = sympify(x)
 *         cdef Basic Y = sympify(y)
 *         return c2py(symengine.lowergamma(X.thisptr, Y.thisptr))             # <<<<<<<<<<<<<<
 * 
 *     def _sympy_(self):
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_5 = SymEngine::lowergamma(__pyx_v_X->thisptr, __pyx_v_Y->thisptr);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 2515, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2515, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2512
 * 
 * class lowergamma(Function):
 *     def __new__(cls, x, y):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         cdef Basic Y = sympify(y)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.lowergamma.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_X);
  __Pyx_XDECREF((PyObject *)__pyx_v_Y);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2517
 *         return c2py(symengine.lowergamma(X.thisptr, Y.thisptr))
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.lowergamma(*self.args_as_sympy())
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10lowergamma_3_sympy_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_10lowergamma_3_sympy_ = {"_sympy_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_10lowergamma_3_sympy_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10lowergamma_3_sympy_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sympy_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2517, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2517, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_sympy_", 0) < (0)) __PYX_ERR(0, 2517, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 1, 1, i); __PYX_ERR(0, 2517, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2517, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2517, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.lowergamma._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_10lowergamma_2_sympy_(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10lowergamma_2_sympy_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_sympy = 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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sympy_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2518
 * 
 *     def _sympy_(self):
 *         import sympy             # <<<<<<<<<<<<<<
 *         return sympy.lowergamma(*self.args_as_sympy())
 * 
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sympy, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2518, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sympy = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2519
 *     def _sympy_(self):
 *         import sympy
 *         return sympy.lowergamma(*self.args_as_sympy())             # <<<<<<<<<<<<<<
 * 
 *     def _sage_(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_lowergamma); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2519, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_args_as_sympy, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2519, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2519, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2519, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2517
 *         return c2py(symengine.lowergamma(X.thisptr, Y.thisptr))
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.lowergamma(*self.args_as_sympy())
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.lowergamma._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sympy);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2521
 *         return sympy.lowergamma(*self.args_as_sympy())
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         import sage.all as sage
 *         return sage.gamma_inc_lower(*self.args_as_sage())
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10lowergamma_5_sage_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_10lowergamma_5_sage_ = {"_sage_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_10lowergamma_5_sage_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10lowergamma_5_sage_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sage_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2521, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2521, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_sage_", 0) < (0)) __PYX_ERR(0, 2521, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_sage_", 1, 1, 1, i); __PYX_ERR(0, 2521, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2521, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_sage_", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2521, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.lowergamma._sage_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_10lowergamma_4_sage_(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10lowergamma_4_sage_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_sage = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sage_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2522
 * 
 *     def _sage_(self):
 *         import sage.all as sage             # <<<<<<<<<<<<<<
 *         return sage.gamma_inc_lower(*self.args_as_sage())
 * 
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sage_all, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2522, __pyx_L1_error)
  __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_all);
  Py_DECREF(__pyx_t_2);
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2522, __pyx_L1_error)
  __pyx_t_2 = __pyx_t_3;
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sage = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2523
 *     def _sage_(self):
 *         import sage.all as sage
 *         return sage.gamma_inc_lower(*self.args_as_sage())             # <<<<<<<<<<<<<<
 * 
 * class uppergamma(Function):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sage, __pyx_mstate_global->__pyx_n_u_gamma_inc_lower); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2523, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_5);
  __pyx_t_6 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
    __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_args_as_sage, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2523, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  __pyx_t_5 = __Pyx_PySequence_Tuple(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2523, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2523, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2521
 *         return sympy.lowergamma(*self.args_as_sympy())
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         import sage.all as sage
 *         return sage.gamma_inc_lower(*self.args_as_sage())
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.lowergamma._sage_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sage);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2526
 * 
 * class uppergamma(Function):
 *     def __new__(cls, x, y):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         cdef Basic Y = sympify(y)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10uppergamma_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_10uppergamma_1__new__ = {"__new__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_10uppergamma_1__new__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10uppergamma_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_x = 0;
  PyObject *__pyx_v_y = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,&__pyx_mstate_global->__pyx_n_u_x,&__pyx_mstate_global->__pyx_n_u_y,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2526, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2526, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2526, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2526, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__new__", 0) < (0)) __PYX_ERR(0, 2526, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__new__", 1, 3, 3, i); __PYX_ERR(0, 2526, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2526, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2526, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2526, __pyx_L3_error)
    }
    __pyx_v_cls = values[0];
    __pyx_v_x = values[1];
    __pyx_v_y = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 2526, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.uppergamma.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_10uppergamma___new__(__pyx_self, __pyx_v_cls, __pyx_v_x, __pyx_v_y);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10uppergamma___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_x, PyObject *__pyx_v_y) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_X = 0;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_Y = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  SymEngine::RCP<const SymEngine::Basic> __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__new__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2527
 * class uppergamma(Function):
 *     def __new__(cls, x, y):
 *         cdef Basic X = sympify(x)             # <<<<<<<<<<<<<<
 *         cdef Basic Y = sympify(y)
 *         return c2py(symengine.uppergamma(X.thisptr, Y.thisptr))
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2527, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_x};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2527, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 2527, __pyx_L1_error)
  __pyx_v_X = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2528
 *     def __new__(cls, x, y):
 *         cdef Basic X = sympify(x)
 *         cdef Basic Y = sympify(y)             # <<<<<<<<<<<<<<
 *         return c2py(symengine.uppergamma(X.thisptr, Y.thisptr))
 * 
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2528, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_y};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2528, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 2528, __pyx_L1_error)
  __pyx_v_Y = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2529
 *         cdef Basic X = sympify(x)
 *         cdef Basic Y = sympify(y)
 *         return c2py(symengine.uppergamma(X.thisptr, Y.thisptr))             # <<<<<<<<<<<<<<
 * 
 *     def _sympy_(self):
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_5 = SymEngine::uppergamma(__pyx_v_X->thisptr, __pyx_v_Y->thisptr);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 2529, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2529, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2526
 * 
 * class uppergamma(Function):
 *     def __new__(cls, x, y):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         cdef Basic Y = sympify(y)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.uppergamma.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_X);
  __Pyx_XDECREF((PyObject *)__pyx_v_Y);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2531
 *         return c2py(symengine.uppergamma(X.thisptr, Y.thisptr))
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.uppergamma(*self.args_as_sympy())
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10uppergamma_3_sympy_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_10uppergamma_3_sympy_ = {"_sympy_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_10uppergamma_3_sympy_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10uppergamma_3_sympy_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sympy_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2531, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2531, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_sympy_", 0) < (0)) __PYX_ERR(0, 2531, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 1, 1, i); __PYX_ERR(0, 2531, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2531, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2531, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.uppergamma._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_10uppergamma_2_sympy_(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10uppergamma_2_sympy_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_sympy = 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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sympy_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2532
 * 
 *     def _sympy_(self):
 *         import sympy             # <<<<<<<<<<<<<<
 *         return sympy.uppergamma(*self.args_as_sympy())
 * 
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sympy, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2532, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sympy = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2533
 *     def _sympy_(self):
 *         import sympy
 *         return sympy.uppergamma(*self.args_as_sympy())             # <<<<<<<<<<<<<<
 * 
 *     def _sage_(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_uppergamma); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2533, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_args_as_sympy, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2533, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2533, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2533, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2531
 *         return c2py(symengine.uppergamma(X.thisptr, Y.thisptr))
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.uppergamma(*self.args_as_sympy())
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.uppergamma._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sympy);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2535
 *         return sympy.uppergamma(*self.args_as_sympy())
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         import sage.all as sage
 *         return sage.gamma_inc(*self.args_as_sage())
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10uppergamma_5_sage_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_10uppergamma_5_sage_ = {"_sage_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_10uppergamma_5_sage_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10uppergamma_5_sage_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sage_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2535, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2535, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_sage_", 0) < (0)) __PYX_ERR(0, 2535, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_sage_", 1, 1, 1, i); __PYX_ERR(0, 2535, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2535, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_sage_", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2535, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.uppergamma._sage_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_10uppergamma_4_sage_(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10uppergamma_4_sage_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_sage = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sage_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2536
 * 
 *     def _sage_(self):
 *         import sage.all as sage             # <<<<<<<<<<<<<<
 *         return sage.gamma_inc(*self.args_as_sage())
 * 
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sage_all, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2536, __pyx_L1_error)
  __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_all);
  Py_DECREF(__pyx_t_2);
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2536, __pyx_L1_error)
  __pyx_t_2 = __pyx_t_3;
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sage = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2537
 *     def _sage_(self):
 *         import sage.all as sage
 *         return sage.gamma_inc(*self.args_as_sage())             # <<<<<<<<<<<<<<
 * 
 * class loggamma(OneArgFunction):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sage, __pyx_mstate_global->__pyx_n_u_gamma_inc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2537, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_5);
  __pyx_t_6 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
    __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_args_as_sage, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2537, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  __pyx_t_5 = __Pyx_PySequence_Tuple(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2537, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2537, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2535
 *         return sympy.uppergamma(*self.args_as_sympy())
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         import sage.all as sage
 *         return sage.gamma_inc(*self.args_as_sage())
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.uppergamma._sage_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sage);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2540
 * 
 * class loggamma(OneArgFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.loggamma(X.thisptr))
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8loggamma_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_8loggamma_1__new__ = {"__new__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_8loggamma_1__new__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8loggamma_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_x = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,&__pyx_mstate_global->__pyx_n_u_x,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2540, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2540, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2540, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__new__", 0) < (0)) __PYX_ERR(0, 2540, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__new__", 1, 2, 2, i); __PYX_ERR(0, 2540, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2540, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2540, __pyx_L3_error)
    }
    __pyx_v_cls = values[0];
    __pyx_v_x = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 2540, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.loggamma.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_8loggamma___new__(__pyx_self, __pyx_v_cls, __pyx_v_x);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8loggamma___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_x) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_X = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  SymEngine::RCP<const SymEngine::Basic> __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__new__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2541
 * class loggamma(OneArgFunction):
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)             # <<<<<<<<<<<<<<
 *         return c2py(symengine.loggamma(X.thisptr))
 * 
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2541, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_x};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2541, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 2541, __pyx_L1_error)
  __pyx_v_X = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2542
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.loggamma(X.thisptr))             # <<<<<<<<<<<<<<
 * 
 *     def _sage_(self):
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_5 = SymEngine::loggamma(__pyx_v_X->thisptr);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 2542, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2542, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2540
 * 
 * class loggamma(OneArgFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.loggamma(X.thisptr))
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.loggamma.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_X);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2544
 *         return c2py(symengine.loggamma(X.thisptr))
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         import sage.all as sage
 *         return sage.log_gamma(self.get_arg()._sage_())
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8loggamma_3_sage_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_8loggamma_3_sage_ = {"_sage_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_8loggamma_3_sage_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8loggamma_3_sage_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sage_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2544, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2544, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_sage_", 0) < (0)) __PYX_ERR(0, 2544, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_sage_", 1, 1, 1, i); __PYX_ERR(0, 2544, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2544, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_sage_", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2544, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.loggamma._sage_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_8loggamma_2_sage_(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8loggamma_2_sage_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_sage = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  size_t __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sage_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2545
 * 
 *     def _sage_(self):
 *         import sage.all as sage             # <<<<<<<<<<<<<<
 *         return sage.log_gamma(self.get_arg()._sage_())
 * 
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sage_all, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2545, __pyx_L1_error)
  __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_all);
  Py_DECREF(__pyx_t_2);
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2545, __pyx_L1_error)
  __pyx_t_2 = __pyx_t_3;
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sage = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2546
 *     def _sage_(self):
 *         import sage.all as sage
 *         return sage.log_gamma(self.get_arg()._sage_())             # <<<<<<<<<<<<<<
 * 
 * class beta(Function):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = __pyx_v_sage;
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_8 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_8);
  __pyx_t_9 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL};
    __pyx_t_7 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_arg, __pyx_callargs+__pyx_t_9, (1-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2546, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
  }
  __pyx_t_6 = __pyx_t_7;
  __Pyx_INCREF(__pyx_t_6);
  __pyx_t_9 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
    __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_sage, __pyx_callargs+__pyx_t_9, (1-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2546, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
  }
  __pyx_t_9 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_5};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_log_gamma, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2546, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2544
 *         return c2py(symengine.loggamma(X.thisptr))
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         import sage.all as sage
 *         return sage.log_gamma(self.get_arg()._sage_())
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.loggamma._sage_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sage);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2549
 * 
 * class beta(Function):
 *     def __new__(cls, x, y):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         cdef Basic Y = sympify(y)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_4beta_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_4beta_1__new__ = {"__new__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_4beta_1__new__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_4beta_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_x = 0;
  PyObject *__pyx_v_y = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,&__pyx_mstate_global->__pyx_n_u_x,&__pyx_mstate_global->__pyx_n_u_y,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2549, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2549, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2549, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2549, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__new__", 0) < (0)) __PYX_ERR(0, 2549, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__new__", 1, 3, 3, i); __PYX_ERR(0, 2549, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2549, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2549, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2549, __pyx_L3_error)
    }
    __pyx_v_cls = values[0];
    __pyx_v_x = values[1];
    __pyx_v_y = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 2549, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.beta.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_4beta___new__(__pyx_self, __pyx_v_cls, __pyx_v_x, __pyx_v_y);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_4beta___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_x, PyObject *__pyx_v_y) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_X = 0;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_Y = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  SymEngine::RCP<const SymEngine::Basic> __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__new__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2550
 * class beta(Function):
 *     def __new__(cls, x, y):
 *         cdef Basic X = sympify(x)             # <<<<<<<<<<<<<<
 *         cdef Basic Y = sympify(y)
 *         return c2py(symengine.beta(X.thisptr, Y.thisptr))
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2550, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_x};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2550, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 2550, __pyx_L1_error)
  __pyx_v_X = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2551
 *     def __new__(cls, x, y):
 *         cdef Basic X = sympify(x)
 *         cdef Basic Y = sympify(y)             # <<<<<<<<<<<<<<
 *         return c2py(symengine.beta(X.thisptr, Y.thisptr))
 * 
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2551, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_y};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2551, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 2551, __pyx_L1_error)
  __pyx_v_Y = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2552
 *         cdef Basic X = sympify(x)
 *         cdef Basic Y = sympify(y)
 *         return c2py(symengine.beta(X.thisptr, Y.thisptr))             # <<<<<<<<<<<<<<
 * 
 *     def _sympy_(self):
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_5 = SymEngine::beta(__pyx_v_X->thisptr, __pyx_v_Y->thisptr);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 2552, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2552, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2549
 * 
 * class beta(Function):
 *     def __new__(cls, x, y):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         cdef Basic Y = sympify(y)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.beta.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_X);
  __Pyx_XDECREF((PyObject *)__pyx_v_Y);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2554
 *         return c2py(symengine.beta(X.thisptr, Y.thisptr))
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.beta(*self.args_as_sympy())
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_4beta_3_sympy_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_4beta_3_sympy_ = {"_sympy_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_4beta_3_sympy_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_4beta_3_sympy_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sympy_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2554, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2554, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_sympy_", 0) < (0)) __PYX_ERR(0, 2554, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 1, 1, i); __PYX_ERR(0, 2554, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2554, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2554, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.beta._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_4beta_2_sympy_(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_4beta_2_sympy_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_sympy = 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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sympy_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2555
 * 
 *     def _sympy_(self):
 *         import sympy             # <<<<<<<<<<<<<<
 *         return sympy.beta(*self.args_as_sympy())
 * 
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sympy, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2555, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sympy = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2556
 *     def _sympy_(self):
 *         import sympy
 *         return sympy.beta(*self.args_as_sympy())             # <<<<<<<<<<<<<<
 * 
 *     def _sage_(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_beta); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2556, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_args_as_sympy, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2556, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2556, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2556, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2554
 *         return c2py(symengine.beta(X.thisptr, Y.thisptr))
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.beta(*self.args_as_sympy())
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.beta._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sympy);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2558
 *         return sympy.beta(*self.args_as_sympy())
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         import sage.all as sage
 *         return sage.beta(*self.args_as_sage())
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_4beta_5_sage_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_4beta_5_sage_ = {"_sage_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_4beta_5_sage_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_4beta_5_sage_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sage_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2558, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2558, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_sage_", 0) < (0)) __PYX_ERR(0, 2558, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_sage_", 1, 1, 1, i); __PYX_ERR(0, 2558, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2558, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_sage_", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2558, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.beta._sage_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_4beta_4_sage_(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_4beta_4_sage_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_sage = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sage_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2559
 * 
 *     def _sage_(self):
 *         import sage.all as sage             # <<<<<<<<<<<<<<
 *         return sage.beta(*self.args_as_sage())
 * 
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sage_all, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2559, __pyx_L1_error)
  __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_all);
  Py_DECREF(__pyx_t_2);
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2559, __pyx_L1_error)
  __pyx_t_2 = __pyx_t_3;
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sage = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2560
 *     def _sage_(self):
 *         import sage.all as sage
 *         return sage.beta(*self.args_as_sage())             # <<<<<<<<<<<<<<
 * 
 * class polygamma(Function):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sage, __pyx_mstate_global->__pyx_n_u_beta); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2560, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_5);
  __pyx_t_6 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
    __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_args_as_sage, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2560, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  __pyx_t_5 = __Pyx_PySequence_Tuple(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2560, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2560, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2558
 *         return sympy.beta(*self.args_as_sympy())
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         import sage.all as sage
 *         return sage.beta(*self.args_as_sage())
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.beta._sage_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sage);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2563
 * 
 * class polygamma(Function):
 *     def __new__(cls, x, y):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         cdef Basic Y = sympify(y)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9polygamma_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_9polygamma_1__new__ = {"__new__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_9polygamma_1__new__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9polygamma_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_x = 0;
  PyObject *__pyx_v_y = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,&__pyx_mstate_global->__pyx_n_u_x,&__pyx_mstate_global->__pyx_n_u_y,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2563, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2563, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2563, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2563, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__new__", 0) < (0)) __PYX_ERR(0, 2563, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__new__", 1, 3, 3, i); __PYX_ERR(0, 2563, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2563, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2563, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2563, __pyx_L3_error)
    }
    __pyx_v_cls = values[0];
    __pyx_v_x = values[1];
    __pyx_v_y = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 2563, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.polygamma.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_9polygamma___new__(__pyx_self, __pyx_v_cls, __pyx_v_x, __pyx_v_y);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_9polygamma___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_x, PyObject *__pyx_v_y) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_X = 0;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_Y = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  SymEngine::RCP<const SymEngine::Basic> __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__new__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2564
 * class polygamma(Function):
 *     def __new__(cls, x, y):
 *         cdef Basic X = sympify(x)             # <<<<<<<<<<<<<<
 *         cdef Basic Y = sympify(y)
 *         return c2py(symengine.polygamma(X.thisptr, Y.thisptr))
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2564, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_x};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2564, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 2564, __pyx_L1_error)
  __pyx_v_X = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2565
 *     def __new__(cls, x, y):
 *         cdef Basic X = sympify(x)
 *         cdef Basic Y = sympify(y)             # <<<<<<<<<<<<<<
 *         return c2py(symengine.polygamma(X.thisptr, Y.thisptr))
 * 
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2565, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_y};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2565, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 2565, __pyx_L1_error)
  __pyx_v_Y = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2566
 *         cdef Basic X = sympify(x)
 *         cdef Basic Y = sympify(y)
 *         return c2py(symengine.polygamma(X.thisptr, Y.thisptr))             # <<<<<<<<<<<<<<
 * 
 *     def _sympy_(self):
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_5 = SymEngine::polygamma(__pyx_v_X->thisptr, __pyx_v_Y->thisptr);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 2566, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2566, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2563
 * 
 * class polygamma(Function):
 *     def __new__(cls, x, y):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         cdef Basic Y = sympify(y)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.polygamma.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_X);
  __Pyx_XDECREF((PyObject *)__pyx_v_Y);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2568
 *         return c2py(symengine.polygamma(X.thisptr, Y.thisptr))
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.polygamma(*self.args_as_sympy())
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9polygamma_3_sympy_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_9polygamma_3_sympy_ = {"_sympy_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_9polygamma_3_sympy_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9polygamma_3_sympy_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sympy_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2568, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2568, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_sympy_", 0) < (0)) __PYX_ERR(0, 2568, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 1, 1, i); __PYX_ERR(0, 2568, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2568, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2568, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.polygamma._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_9polygamma_2_sympy_(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_9polygamma_2_sympy_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_sympy = 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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sympy_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2569
 * 
 *     def _sympy_(self):
 *         import sympy             # <<<<<<<<<<<<<<
 *         return sympy.polygamma(*self.args_as_sympy())
 * 
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sympy, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2569, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sympy = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2570
 *     def _sympy_(self):
 *         import sympy
 *         return sympy.polygamma(*self.args_as_sympy())             # <<<<<<<<<<<<<<
 * 
 * class sign(OneArgFunction):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_polygamma); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2570, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_args_as_sympy, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2570, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2570, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2570, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2568
 *         return c2py(symengine.polygamma(X.thisptr, Y.thisptr))
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.polygamma(*self.args_as_sympy())
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.polygamma._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sympy);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2574
 * class sign(OneArgFunction):
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_complex(self):
 *         return True
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_4sign_1is_complex(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_4sign_1is_complex = {"is_complex", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_4sign_1is_complex, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_4sign_1is_complex(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_complex (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2574, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2574, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "is_complex", 0) < (0)) __PYX_ERR(0, 2574, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("is_complex", 1, 1, 1, i); __PYX_ERR(0, 2574, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2574, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_complex", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2574, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.sign.is_complex", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_4sign_is_complex(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_4sign_is_complex(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_complex", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2576
 *     @property
 *     def is_complex(self):
 *         return True             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_True);
  __pyx_r = Py_True;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2574
 * class sign(OneArgFunction):
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_complex(self):
 *         return True
*/

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

/* "symengine/lib/symengine_wrapper.pyx":2578
 *         return True
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_finite(self):
 *         return True
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_4sign_3is_finite(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_4sign_3is_finite = {"is_finite", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_4sign_3is_finite, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_4sign_3is_finite(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_finite (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2578, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2578, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "is_finite", 0) < (0)) __PYX_ERR(0, 2578, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("is_finite", 1, 1, 1, i); __PYX_ERR(0, 2578, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2578, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_finite", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2578, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.sign.is_finite", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_4sign_2is_finite(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_4sign_2is_finite(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_finite", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2580
 *     @property
 *     def is_finite(self):
 *         return True             # <<<<<<<<<<<<<<
 * 
 *     def __new__(cls, x):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_True);
  __pyx_r = Py_True;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2578
 *         return True
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_finite(self):
 *         return True
*/

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

/* "symengine/lib/symengine_wrapper.pyx":2582
 *         return True
 * 
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.sign(X.thisptr))
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_4sign_5__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_4sign_5__new__ = {"__new__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_4sign_5__new__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_4sign_5__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_x = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,&__pyx_mstate_global->__pyx_n_u_x,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2582, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2582, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2582, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__new__", 0) < (0)) __PYX_ERR(0, 2582, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__new__", 1, 2, 2, i); __PYX_ERR(0, 2582, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2582, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2582, __pyx_L3_error)
    }
    __pyx_v_cls = values[0];
    __pyx_v_x = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 2582, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.sign.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_4sign_4__new__(__pyx_self, __pyx_v_cls, __pyx_v_x);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_4sign_4__new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_x) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_X = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  SymEngine::RCP<const SymEngine::Basic> __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__new__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2583
 * 
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)             # <<<<<<<<<<<<<<
 *         return c2py(symengine.sign(X.thisptr))
 * 
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2583, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_x};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2583, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 2583, __pyx_L1_error)
  __pyx_v_X = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2584
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.sign(X.thisptr))             # <<<<<<<<<<<<<<
 * 
 * class floor(OneArgFunction):
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_5 = SymEngine::sign(__pyx_v_X->thisptr);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 2584, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2584, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2582
 *         return True
 * 
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.sign(X.thisptr))
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.sign.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_X);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2587
 * 
 * class floor(OneArgFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.floor(X.thisptr))
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5floor_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_5floor_1__new__ = {"__new__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_5floor_1__new__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5floor_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_x = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,&__pyx_mstate_global->__pyx_n_u_x,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2587, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2587, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2587, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__new__", 0) < (0)) __PYX_ERR(0, 2587, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__new__", 1, 2, 2, i); __PYX_ERR(0, 2587, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2587, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2587, __pyx_L3_error)
    }
    __pyx_v_cls = values[0];
    __pyx_v_x = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 2587, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.floor.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5floor___new__(__pyx_self, __pyx_v_cls, __pyx_v_x);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5floor___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_x) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_X = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  SymEngine::RCP<const SymEngine::Basic> __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__new__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2588
 * class floor(OneArgFunction):
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)             # <<<<<<<<<<<<<<
 *         return c2py(symengine.floor(X.thisptr))
 * 
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2588, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_x};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2588, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 2588, __pyx_L1_error)
  __pyx_v_X = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2589
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.floor(X.thisptr))             # <<<<<<<<<<<<<<
 * 
 * class ceiling(OneArgFunction):
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_5 = SymEngine::floor(__pyx_v_X->thisptr);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 2589, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2589, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2587
 * 
 * class floor(OneArgFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.floor(X.thisptr))
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.floor.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_X);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2592
 * 
 * class ceiling(OneArgFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.ceiling(X.thisptr))
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_7ceiling_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_7ceiling_1__new__ = {"__new__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_7ceiling_1__new__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_7ceiling_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_x = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,&__pyx_mstate_global->__pyx_n_u_x,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2592, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2592, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2592, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__new__", 0) < (0)) __PYX_ERR(0, 2592, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__new__", 1, 2, 2, i); __PYX_ERR(0, 2592, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2592, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2592, __pyx_L3_error)
    }
    __pyx_v_cls = values[0];
    __pyx_v_x = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 2592, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.ceiling.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_7ceiling___new__(__pyx_self, __pyx_v_cls, __pyx_v_x);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_7ceiling___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_x) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_X = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  SymEngine::RCP<const SymEngine::Basic> __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__new__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2593
 * class ceiling(OneArgFunction):
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)             # <<<<<<<<<<<<<<
 *         return c2py(symengine.ceiling(X.thisptr))
 * 
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2593, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_x};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2593, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 2593, __pyx_L1_error)
  __pyx_v_X = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2594
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.ceiling(X.thisptr))             # <<<<<<<<<<<<<<
 * 
 *     def _sage_(self):
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_5 = SymEngine::ceiling(__pyx_v_X->thisptr);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 2594, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2594, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2592
 * 
 * class ceiling(OneArgFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.ceiling(X.thisptr))
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.ceiling.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_X);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2596
 *         return c2py(symengine.ceiling(X.thisptr))
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         import sage.all as sage
 *         return sage.ceil(self.get_arg()._sage_())
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_7ceiling_3_sage_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_7ceiling_3_sage_ = {"_sage_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_7ceiling_3_sage_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_7ceiling_3_sage_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sage_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2596, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2596, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_sage_", 0) < (0)) __PYX_ERR(0, 2596, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_sage_", 1, 1, 1, i); __PYX_ERR(0, 2596, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2596, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_sage_", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2596, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.ceiling._sage_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_7ceiling_2_sage_(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_7ceiling_2_sage_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_sage = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  size_t __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sage_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2597
 * 
 *     def _sage_(self):
 *         import sage.all as sage             # <<<<<<<<<<<<<<
 *         return sage.ceil(self.get_arg()._sage_())
 * 
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sage_all, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2597, __pyx_L1_error)
  __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_all);
  Py_DECREF(__pyx_t_2);
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2597, __pyx_L1_error)
  __pyx_t_2 = __pyx_t_3;
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sage = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2598
 *     def _sage_(self):
 *         import sage.all as sage
 *         return sage.ceil(self.get_arg()._sage_())             # <<<<<<<<<<<<<<
 * 
 * class conjugate(OneArgFunction):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = __pyx_v_sage;
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_8 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_8);
  __pyx_t_9 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL};
    __pyx_t_7 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_arg, __pyx_callargs+__pyx_t_9, (1-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2598, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
  }
  __pyx_t_6 = __pyx_t_7;
  __Pyx_INCREF(__pyx_t_6);
  __pyx_t_9 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
    __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_sage, __pyx_callargs+__pyx_t_9, (1-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2598, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
  }
  __pyx_t_9 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_5};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_ceil, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2598, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2596
 *         return c2py(symengine.ceiling(X.thisptr))
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         import sage.all as sage
 *         return sage.ceil(self.get_arg()._sage_())
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.ceiling._sage_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sage);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2601
 * 
 * class conjugate(OneArgFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.conjugate(X.thisptr))
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9conjugate_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_9conjugate_1__new__ = {"__new__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_9conjugate_1__new__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9conjugate_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_x = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,&__pyx_mstate_global->__pyx_n_u_x,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2601, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2601, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2601, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__new__", 0) < (0)) __PYX_ERR(0, 2601, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__new__", 1, 2, 2, i); __PYX_ERR(0, 2601, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2601, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2601, __pyx_L3_error)
    }
    __pyx_v_cls = values[0];
    __pyx_v_x = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 2601, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.conjugate.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_9conjugate___new__(__pyx_self, __pyx_v_cls, __pyx_v_x);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_9conjugate___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_x) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_X = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  SymEngine::RCP<const SymEngine::Basic> __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__new__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2602
 * class conjugate(OneArgFunction):
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)             # <<<<<<<<<<<<<<
 *         return c2py(symengine.conjugate(X.thisptr))
 * 
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2602, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_x};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2602, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 2602, __pyx_L1_error)
  __pyx_v_X = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2603
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.conjugate(X.thisptr))             # <<<<<<<<<<<<<<
 * 
 * class log(OneArgFunction):
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_5 = SymEngine::conjugate(__pyx_v_X->thisptr);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 2603, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2603, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2601
 * 
 * class conjugate(OneArgFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.conjugate(X.thisptr))
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.conjugate.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_X);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2606
 * 
 * class log(OneArgFunction):
 *     def __new__(cls, x, y=None):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         if y == None:
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3log_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_3log_1__new__ = {"__new__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_3log_1__new__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3log_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_x = 0;
  PyObject *__pyx_v_y = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,&__pyx_mstate_global->__pyx_n_u_x,&__pyx_mstate_global->__pyx_n_u_y,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2606, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2606, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2606, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2606, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__new__", 0) < (0)) __PYX_ERR(0, 2606, __pyx_L3_error)
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__new__", 0, 2, 3, i); __PYX_ERR(0, 2606, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2606, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2606, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2606, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_cls = values[0];
    __pyx_v_x = values[1];
    __pyx_v_y = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 2606, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.log.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_3log___new__(__pyx_self, __pyx_v_cls, __pyx_v_x, __pyx_v_y);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3log___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_x, PyObject *__pyx_v_y) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_X = 0;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_Y = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_t_5;
  SymEngine::RCP<const SymEngine::Basic> __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__new__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2607
 * class log(OneArgFunction):
 *     def __new__(cls, x, y=None):
 *         cdef Basic X = sympify(x)             # <<<<<<<<<<<<<<
 *         if y == None:
 *             return c2py(symengine.log(X.thisptr))
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2607, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_x};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2607, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 2607, __pyx_L1_error)
  __pyx_v_X = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2608
 *     def __new__(cls, x, y=None):
 *         cdef Basic X = sympify(x)
 *         if y == None:             # <<<<<<<<<<<<<<
 *             return c2py(symengine.log(X.thisptr))
 *         cdef Basic Y = sympify(y)
*/
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_y, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2608, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 2608, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":2609
 *         cdef Basic X = sympify(x)
 *         if y == None:
 *             return c2py(symengine.log(X.thisptr))             # <<<<<<<<<<<<<<
 *         cdef Basic Y = sympify(y)
 *         return c2py(symengine.log(X.thisptr, Y.thisptr))
*/
    __Pyx_XDECREF(__pyx_r);
    try {
      __pyx_t_6 = SymEngine::log(__pyx_v_X->thisptr);
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(0, 2609, __pyx_L1_error)
    }
    __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_6)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2609, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":2608
 *     def __new__(cls, x, y=None):
 *         cdef Basic X = sympify(x)
 *         if y == None:             # <<<<<<<<<<<<<<
 *             return c2py(symengine.log(X.thisptr))
 *         cdef Basic Y = sympify(y)
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":2610
 *         if y == None:
 *             return c2py(symengine.log(X.thisptr))
 *         cdef Basic Y = sympify(y)             # <<<<<<<<<<<<<<
 *         return c2py(symengine.log(X.thisptr, Y.thisptr))
 * 
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2610, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_y};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2610, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 2610, __pyx_L1_error)
  __pyx_v_Y = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2611
 *             return c2py(symengine.log(X.thisptr))
 *         cdef Basic Y = sympify(y)
 *         return c2py(symengine.log(X.thisptr, Y.thisptr))             # <<<<<<<<<<<<<<
 * 
 * class sin(TrigFunction):
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_6 = SymEngine::log(__pyx_v_X->thisptr, __pyx_v_Y->thisptr);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 2611, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_6)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2611, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2606
 * 
 * class log(OneArgFunction):
 *     def __new__(cls, x, y=None):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         if y == None:
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.log.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_X);
  __Pyx_XDECREF((PyObject *)__pyx_v_Y);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2614
 * 
 * class sin(TrigFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.sin(X.thisptr))
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3sin_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_3sin_1__new__ = {"__new__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_3sin_1__new__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3sin_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_x = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,&__pyx_mstate_global->__pyx_n_u_x,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2614, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2614, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2614, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__new__", 0) < (0)) __PYX_ERR(0, 2614, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__new__", 1, 2, 2, i); __PYX_ERR(0, 2614, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2614, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2614, __pyx_L3_error)
    }
    __pyx_v_cls = values[0];
    __pyx_v_x = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 2614, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.sin.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_3sin___new__(__pyx_self, __pyx_v_cls, __pyx_v_x);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3sin___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_x) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_X = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  SymEngine::RCP<const SymEngine::Basic> __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__new__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2615
 * class sin(TrigFunction):
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)             # <<<<<<<<<<<<<<
 *         return c2py(symengine.sin(X.thisptr))
 * 
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2615, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_x};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2615, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 2615, __pyx_L1_error)
  __pyx_v_X = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2616
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.sin(X.thisptr))             # <<<<<<<<<<<<<<
 * 
 * class cos(TrigFunction):
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_5 = SymEngine::sin(__pyx_v_X->thisptr);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 2616, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2616, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2614
 * 
 * class sin(TrigFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.sin(X.thisptr))
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.sin.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_X);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2619
 * 
 * class cos(TrigFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.cos(X.thisptr))
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3cos_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_3cos_1__new__ = {"__new__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_3cos_1__new__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3cos_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_x = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,&__pyx_mstate_global->__pyx_n_u_x,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2619, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2619, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2619, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__new__", 0) < (0)) __PYX_ERR(0, 2619, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__new__", 1, 2, 2, i); __PYX_ERR(0, 2619, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2619, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2619, __pyx_L3_error)
    }
    __pyx_v_cls = values[0];
    __pyx_v_x = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 2619, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.cos.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_3cos___new__(__pyx_self, __pyx_v_cls, __pyx_v_x);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3cos___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_x) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_X = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  SymEngine::RCP<const SymEngine::Basic> __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__new__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2620
 * class cos(TrigFunction):
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)             # <<<<<<<<<<<<<<
 *         return c2py(symengine.cos(X.thisptr))
 * 
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2620, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_x};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2620, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 2620, __pyx_L1_error)
  __pyx_v_X = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2621
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.cos(X.thisptr))             # <<<<<<<<<<<<<<
 * 
 * class tan(TrigFunction):
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_5 = SymEngine::cos(__pyx_v_X->thisptr);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 2621, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2621, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2619
 * 
 * class cos(TrigFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.cos(X.thisptr))
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.cos.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_X);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2624
 * 
 * class tan(TrigFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.tan(X.thisptr))
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3tan_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_3tan_1__new__ = {"__new__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_3tan_1__new__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3tan_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_x = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,&__pyx_mstate_global->__pyx_n_u_x,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2624, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2624, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2624, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__new__", 0) < (0)) __PYX_ERR(0, 2624, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__new__", 1, 2, 2, i); __PYX_ERR(0, 2624, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2624, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2624, __pyx_L3_error)
    }
    __pyx_v_cls = values[0];
    __pyx_v_x = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 2624, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.tan.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_3tan___new__(__pyx_self, __pyx_v_cls, __pyx_v_x);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3tan___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_x) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_X = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  SymEngine::RCP<const SymEngine::Basic> __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__new__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2625
 * class tan(TrigFunction):
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)             # <<<<<<<<<<<<<<
 *         return c2py(symengine.tan(X.thisptr))
 * 
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2625, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_x};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2625, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 2625, __pyx_L1_error)
  __pyx_v_X = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2626
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.tan(X.thisptr))             # <<<<<<<<<<<<<<
 * 
 * class cot(TrigFunction):
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_5 = SymEngine::tan(__pyx_v_X->thisptr);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 2626, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2626, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2624
 * 
 * class tan(TrigFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.tan(X.thisptr))
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.tan.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_X);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2629
 * 
 * class cot(TrigFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.cot(X.thisptr))
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3cot_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_3cot_1__new__ = {"__new__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_3cot_1__new__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3cot_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_x = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,&__pyx_mstate_global->__pyx_n_u_x,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2629, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2629, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2629, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__new__", 0) < (0)) __PYX_ERR(0, 2629, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__new__", 1, 2, 2, i); __PYX_ERR(0, 2629, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2629, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2629, __pyx_L3_error)
    }
    __pyx_v_cls = values[0];
    __pyx_v_x = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 2629, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.cot.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_3cot___new__(__pyx_self, __pyx_v_cls, __pyx_v_x);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3cot___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_x) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_X = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  SymEngine::RCP<const SymEngine::Basic> __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__new__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2630
 * class cot(TrigFunction):
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)             # <<<<<<<<<<<<<<
 *         return c2py(symengine.cot(X.thisptr))
 * 
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2630, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_x};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2630, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 2630, __pyx_L1_error)
  __pyx_v_X = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2631
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.cot(X.thisptr))             # <<<<<<<<<<<<<<
 * 
 * class sec(TrigFunction):
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_5 = SymEngine::cot(__pyx_v_X->thisptr);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 2631, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2631, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2629
 * 
 * class cot(TrigFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.cot(X.thisptr))
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.cot.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_X);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2634
 * 
 * class sec(TrigFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.sec(X.thisptr))
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3sec_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_3sec_1__new__ = {"__new__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_3sec_1__new__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3sec_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_x = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,&__pyx_mstate_global->__pyx_n_u_x,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2634, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2634, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2634, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__new__", 0) < (0)) __PYX_ERR(0, 2634, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__new__", 1, 2, 2, i); __PYX_ERR(0, 2634, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2634, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2634, __pyx_L3_error)
    }
    __pyx_v_cls = values[0];
    __pyx_v_x = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 2634, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.sec.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_3sec___new__(__pyx_self, __pyx_v_cls, __pyx_v_x);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3sec___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_x) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_X = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  SymEngine::RCP<const SymEngine::Basic> __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__new__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2635
 * class sec(TrigFunction):
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)             # <<<<<<<<<<<<<<
 *         return c2py(symengine.sec(X.thisptr))
 * 
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2635, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_x};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2635, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 2635, __pyx_L1_error)
  __pyx_v_X = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2636
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.sec(X.thisptr))             # <<<<<<<<<<<<<<
 * 
 * class csc(TrigFunction):
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_5 = SymEngine::sec(__pyx_v_X->thisptr);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 2636, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2636, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2634
 * 
 * class sec(TrigFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.sec(X.thisptr))
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.sec.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_X);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2639
 * 
 * class csc(TrigFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.csc(X.thisptr))
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3csc_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_3csc_1__new__ = {"__new__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_3csc_1__new__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3csc_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_x = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,&__pyx_mstate_global->__pyx_n_u_x,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2639, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2639, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2639, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__new__", 0) < (0)) __PYX_ERR(0, 2639, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__new__", 1, 2, 2, i); __PYX_ERR(0, 2639, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2639, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2639, __pyx_L3_error)
    }
    __pyx_v_cls = values[0];
    __pyx_v_x = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 2639, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.csc.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_3csc___new__(__pyx_self, __pyx_v_cls, __pyx_v_x);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3csc___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_x) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_X = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  SymEngine::RCP<const SymEngine::Basic> __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__new__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2640
 * class csc(TrigFunction):
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)             # <<<<<<<<<<<<<<
 *         return c2py(symengine.csc(X.thisptr))
 * 
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2640, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_x};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2640, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 2640, __pyx_L1_error)
  __pyx_v_X = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2641
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.csc(X.thisptr))             # <<<<<<<<<<<<<<
 * 
 * class asin(TrigFunction):
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_5 = SymEngine::csc(__pyx_v_X->thisptr);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 2641, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2641, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2639
 * 
 * class csc(TrigFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.csc(X.thisptr))
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.csc.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_X);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2644
 * 
 * class asin(TrigFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.asin(X.thisptr))
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_4asin_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_4asin_1__new__ = {"__new__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_4asin_1__new__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_4asin_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_x = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,&__pyx_mstate_global->__pyx_n_u_x,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2644, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2644, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2644, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__new__", 0) < (0)) __PYX_ERR(0, 2644, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__new__", 1, 2, 2, i); __PYX_ERR(0, 2644, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2644, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2644, __pyx_L3_error)
    }
    __pyx_v_cls = values[0];
    __pyx_v_x = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 2644, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.asin.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_4asin___new__(__pyx_self, __pyx_v_cls, __pyx_v_x);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_4asin___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_x) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_X = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  SymEngine::RCP<const SymEngine::Basic> __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__new__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2645
 * class asin(TrigFunction):
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)             # <<<<<<<<<<<<<<
 *         return c2py(symengine.asin(X.thisptr))
 * 
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2645, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_x};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2645, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 2645, __pyx_L1_error)
  __pyx_v_X = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2646
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.asin(X.thisptr))             # <<<<<<<<<<<<<<
 * 
 * class acos(TrigFunction):
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_5 = SymEngine::asin(__pyx_v_X->thisptr);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 2646, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2646, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2644
 * 
 * class asin(TrigFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.asin(X.thisptr))
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.asin.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_X);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2649
 * 
 * class acos(TrigFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.acos(X.thisptr))
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_4acos_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_4acos_1__new__ = {"__new__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_4acos_1__new__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_4acos_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_x = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,&__pyx_mstate_global->__pyx_n_u_x,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2649, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2649, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2649, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__new__", 0) < (0)) __PYX_ERR(0, 2649, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__new__", 1, 2, 2, i); __PYX_ERR(0, 2649, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2649, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2649, __pyx_L3_error)
    }
    __pyx_v_cls = values[0];
    __pyx_v_x = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 2649, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.acos.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_4acos___new__(__pyx_self, __pyx_v_cls, __pyx_v_x);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_4acos___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_x) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_X = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  SymEngine::RCP<const SymEngine::Basic> __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__new__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2650
 * class acos(TrigFunction):
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)             # <<<<<<<<<<<<<<
 *         return c2py(symengine.acos(X.thisptr))
 * 
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2650, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_x};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2650, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 2650, __pyx_L1_error)
  __pyx_v_X = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2651
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.acos(X.thisptr))             # <<<<<<<<<<<<<<
 * 
 * class atan(TrigFunction):
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_5 = SymEngine::acos(__pyx_v_X->thisptr);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 2651, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2651, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2649
 * 
 * class acos(TrigFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.acos(X.thisptr))
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.acos.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_X);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2654
 * 
 * class atan(TrigFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.atan(X.thisptr))
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_4atan_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_4atan_1__new__ = {"__new__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_4atan_1__new__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_4atan_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_x = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,&__pyx_mstate_global->__pyx_n_u_x,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2654, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2654, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2654, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__new__", 0) < (0)) __PYX_ERR(0, 2654, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__new__", 1, 2, 2, i); __PYX_ERR(0, 2654, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2654, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2654, __pyx_L3_error)
    }
    __pyx_v_cls = values[0];
    __pyx_v_x = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 2654, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.atan.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_4atan___new__(__pyx_self, __pyx_v_cls, __pyx_v_x);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_4atan___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_x) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_X = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  SymEngine::RCP<const SymEngine::Basic> __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__new__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2655
 * class atan(TrigFunction):
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)             # <<<<<<<<<<<<<<
 *         return c2py(symengine.atan(X.thisptr))
 * 
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2655, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_x};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2655, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 2655, __pyx_L1_error)
  __pyx_v_X = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2656
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.atan(X.thisptr))             # <<<<<<<<<<<<<<
 * 
 * class acot(TrigFunction):
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_5 = SymEngine::atan(__pyx_v_X->thisptr);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 2656, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2656, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2654
 * 
 * class atan(TrigFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.atan(X.thisptr))
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.atan.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_X);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2659
 * 
 * class acot(TrigFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.acot(X.thisptr))
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_4acot_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_4acot_1__new__ = {"__new__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_4acot_1__new__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_4acot_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_x = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,&__pyx_mstate_global->__pyx_n_u_x,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2659, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2659, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2659, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__new__", 0) < (0)) __PYX_ERR(0, 2659, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__new__", 1, 2, 2, i); __PYX_ERR(0, 2659, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2659, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2659, __pyx_L3_error)
    }
    __pyx_v_cls = values[0];
    __pyx_v_x = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 2659, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.acot.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_4acot___new__(__pyx_self, __pyx_v_cls, __pyx_v_x);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_4acot___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_x) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_X = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  SymEngine::RCP<const SymEngine::Basic> __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__new__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2660
 * class acot(TrigFunction):
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)             # <<<<<<<<<<<<<<
 *         return c2py(symengine.acot(X.thisptr))
 * 
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2660, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_x};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2660, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 2660, __pyx_L1_error)
  __pyx_v_X = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2661
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.acot(X.thisptr))             # <<<<<<<<<<<<<<
 * 
 * class asec(TrigFunction):
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_5 = SymEngine::acot(__pyx_v_X->thisptr);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 2661, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2661, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2659
 * 
 * class acot(TrigFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.acot(X.thisptr))
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.acot.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_X);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2664
 * 
 * class asec(TrigFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.asec(X.thisptr))
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_4asec_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_4asec_1__new__ = {"__new__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_4asec_1__new__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_4asec_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_x = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,&__pyx_mstate_global->__pyx_n_u_x,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2664, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2664, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2664, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__new__", 0) < (0)) __PYX_ERR(0, 2664, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__new__", 1, 2, 2, i); __PYX_ERR(0, 2664, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2664, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2664, __pyx_L3_error)
    }
    __pyx_v_cls = values[0];
    __pyx_v_x = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 2664, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.asec.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_4asec___new__(__pyx_self, __pyx_v_cls, __pyx_v_x);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_4asec___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_x) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_X = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  SymEngine::RCP<const SymEngine::Basic> __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__new__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2665
 * class asec(TrigFunction):
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)             # <<<<<<<<<<<<<<
 *         return c2py(symengine.asec(X.thisptr))
 * 
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2665, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_x};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2665, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 2665, __pyx_L1_error)
  __pyx_v_X = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2666
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.asec(X.thisptr))             # <<<<<<<<<<<<<<
 * 
 * class acsc(TrigFunction):
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_5 = SymEngine::asec(__pyx_v_X->thisptr);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 2666, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2666, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2664
 * 
 * class asec(TrigFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.asec(X.thisptr))
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.asec.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_X);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2669
 * 
 * class acsc(TrigFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.acsc(X.thisptr))
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_4acsc_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_4acsc_1__new__ = {"__new__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_4acsc_1__new__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_4acsc_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_x = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,&__pyx_mstate_global->__pyx_n_u_x,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2669, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2669, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2669, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__new__", 0) < (0)) __PYX_ERR(0, 2669, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__new__", 1, 2, 2, i); __PYX_ERR(0, 2669, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2669, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2669, __pyx_L3_error)
    }
    __pyx_v_cls = values[0];
    __pyx_v_x = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 2669, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.acsc.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_4acsc___new__(__pyx_self, __pyx_v_cls, __pyx_v_x);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_4acsc___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_x) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_X = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  SymEngine::RCP<const SymEngine::Basic> __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__new__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2670
 * class acsc(TrigFunction):
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)             # <<<<<<<<<<<<<<
 *         return c2py(symengine.acsc(X.thisptr))
 * 
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2670, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_x};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2670, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 2670, __pyx_L1_error)
  __pyx_v_X = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2671
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.acsc(X.thisptr))             # <<<<<<<<<<<<<<
 * 
 * class sinh(HyperbolicFunction):
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_5 = SymEngine::acsc(__pyx_v_X->thisptr);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 2671, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2671, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2669
 * 
 * class acsc(TrigFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.acsc(X.thisptr))
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.acsc.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_X);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2674
 * 
 * class sinh(HyperbolicFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.sinh(X.thisptr))
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_4sinh_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_4sinh_1__new__ = {"__new__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_4sinh_1__new__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_4sinh_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_x = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,&__pyx_mstate_global->__pyx_n_u_x,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2674, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2674, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2674, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__new__", 0) < (0)) __PYX_ERR(0, 2674, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__new__", 1, 2, 2, i); __PYX_ERR(0, 2674, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2674, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2674, __pyx_L3_error)
    }
    __pyx_v_cls = values[0];
    __pyx_v_x = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 2674, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.sinh.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_4sinh___new__(__pyx_self, __pyx_v_cls, __pyx_v_x);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_4sinh___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_x) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_X = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  SymEngine::RCP<const SymEngine::Basic> __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__new__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2675
 * class sinh(HyperbolicFunction):
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)             # <<<<<<<<<<<<<<
 *         return c2py(symengine.sinh(X.thisptr))
 * 
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2675, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_x};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2675, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 2675, __pyx_L1_error)
  __pyx_v_X = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2676
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.sinh(X.thisptr))             # <<<<<<<<<<<<<<
 * 
 * class cosh(HyperbolicFunction):
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_5 = SymEngine::sinh(__pyx_v_X->thisptr);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 2676, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2676, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2674
 * 
 * class sinh(HyperbolicFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.sinh(X.thisptr))
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.sinh.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_X);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2679
 * 
 * class cosh(HyperbolicFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.cosh(X.thisptr))
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_4cosh_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_4cosh_1__new__ = {"__new__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_4cosh_1__new__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_4cosh_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_x = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,&__pyx_mstate_global->__pyx_n_u_x,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2679, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2679, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2679, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__new__", 0) < (0)) __PYX_ERR(0, 2679, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__new__", 1, 2, 2, i); __PYX_ERR(0, 2679, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2679, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2679, __pyx_L3_error)
    }
    __pyx_v_cls = values[0];
    __pyx_v_x = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 2679, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.cosh.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_4cosh___new__(__pyx_self, __pyx_v_cls, __pyx_v_x);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_4cosh___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_x) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_X = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  SymEngine::RCP<const SymEngine::Basic> __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__new__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2680
 * class cosh(HyperbolicFunction):
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)             # <<<<<<<<<<<<<<
 *         return c2py(symengine.cosh(X.thisptr))
 * 
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2680, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_x};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2680, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 2680, __pyx_L1_error)
  __pyx_v_X = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2681
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.cosh(X.thisptr))             # <<<<<<<<<<<<<<
 * 
 * class tanh(HyperbolicFunction):
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_5 = SymEngine::cosh(__pyx_v_X->thisptr);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 2681, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2681, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2679
 * 
 * class cosh(HyperbolicFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.cosh(X.thisptr))
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.cosh.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_X);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2684
 * 
 * class tanh(HyperbolicFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.tanh(X.thisptr))
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_4tanh_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_4tanh_1__new__ = {"__new__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_4tanh_1__new__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_4tanh_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_x = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,&__pyx_mstate_global->__pyx_n_u_x,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2684, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2684, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2684, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__new__", 0) < (0)) __PYX_ERR(0, 2684, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__new__", 1, 2, 2, i); __PYX_ERR(0, 2684, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2684, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2684, __pyx_L3_error)
    }
    __pyx_v_cls = values[0];
    __pyx_v_x = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 2684, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.tanh.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_4tanh___new__(__pyx_self, __pyx_v_cls, __pyx_v_x);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_4tanh___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_x) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_X = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  SymEngine::RCP<const SymEngine::Basic> __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__new__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2685
 * class tanh(HyperbolicFunction):
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)             # <<<<<<<<<<<<<<
 *         return c2py(symengine.tanh(X.thisptr))
 * 
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2685, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_x};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2685, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 2685, __pyx_L1_error)
  __pyx_v_X = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2686
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.tanh(X.thisptr))             # <<<<<<<<<<<<<<
 * 
 * class coth(HyperbolicFunction):
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_5 = SymEngine::tanh(__pyx_v_X->thisptr);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 2686, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2686, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2684
 * 
 * class tanh(HyperbolicFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.tanh(X.thisptr))
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.tanh.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_X);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2689
 * 
 * class coth(HyperbolicFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.coth(X.thisptr))
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_4coth_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_4coth_1__new__ = {"__new__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_4coth_1__new__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_4coth_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_x = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,&__pyx_mstate_global->__pyx_n_u_x,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2689, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2689, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2689, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__new__", 0) < (0)) __PYX_ERR(0, 2689, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__new__", 1, 2, 2, i); __PYX_ERR(0, 2689, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2689, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2689, __pyx_L3_error)
    }
    __pyx_v_cls = values[0];
    __pyx_v_x = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 2689, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.coth.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_4coth___new__(__pyx_self, __pyx_v_cls, __pyx_v_x);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_4coth___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_x) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_X = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  SymEngine::RCP<const SymEngine::Basic> __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__new__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2690
 * class coth(HyperbolicFunction):
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)             # <<<<<<<<<<<<<<
 *         return c2py(symengine.coth(X.thisptr))
 * 
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2690, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_x};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2690, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 2690, __pyx_L1_error)
  __pyx_v_X = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2691
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.coth(X.thisptr))             # <<<<<<<<<<<<<<
 * 
 * class sech(HyperbolicFunction):
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_5 = SymEngine::coth(__pyx_v_X->thisptr);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 2691, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2691, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2689
 * 
 * class coth(HyperbolicFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.coth(X.thisptr))
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.coth.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_X);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2694
 * 
 * class sech(HyperbolicFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.sech(X.thisptr))
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_4sech_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_4sech_1__new__ = {"__new__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_4sech_1__new__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_4sech_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_x = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,&__pyx_mstate_global->__pyx_n_u_x,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2694, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2694, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2694, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__new__", 0) < (0)) __PYX_ERR(0, 2694, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__new__", 1, 2, 2, i); __PYX_ERR(0, 2694, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2694, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2694, __pyx_L3_error)
    }
    __pyx_v_cls = values[0];
    __pyx_v_x = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 2694, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.sech.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_4sech___new__(__pyx_self, __pyx_v_cls, __pyx_v_x);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_4sech___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_x) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_X = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  SymEngine::RCP<const SymEngine::Basic> __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__new__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2695
 * class sech(HyperbolicFunction):
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)             # <<<<<<<<<<<<<<
 *         return c2py(symengine.sech(X.thisptr))
 * 
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2695, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_x};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2695, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 2695, __pyx_L1_error)
  __pyx_v_X = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2696
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.sech(X.thisptr))             # <<<<<<<<<<<<<<
 * 
 * class csch(HyperbolicFunction):
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_5 = SymEngine::sech(__pyx_v_X->thisptr);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 2696, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2696, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2694
 * 
 * class sech(HyperbolicFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.sech(X.thisptr))
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.sech.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_X);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2699
 * 
 * class csch(HyperbolicFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.csch(X.thisptr))
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_4csch_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_4csch_1__new__ = {"__new__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_4csch_1__new__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_4csch_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_x = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,&__pyx_mstate_global->__pyx_n_u_x,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2699, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2699, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2699, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__new__", 0) < (0)) __PYX_ERR(0, 2699, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__new__", 1, 2, 2, i); __PYX_ERR(0, 2699, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2699, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2699, __pyx_L3_error)
    }
    __pyx_v_cls = values[0];
    __pyx_v_x = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 2699, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.csch.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_4csch___new__(__pyx_self, __pyx_v_cls, __pyx_v_x);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_4csch___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_x) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_X = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  SymEngine::RCP<const SymEngine::Basic> __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__new__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2700
 * class csch(HyperbolicFunction):
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)             # <<<<<<<<<<<<<<
 *         return c2py(symengine.csch(X.thisptr))
 * 
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2700, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_x};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2700, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 2700, __pyx_L1_error)
  __pyx_v_X = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2701
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.csch(X.thisptr))             # <<<<<<<<<<<<<<
 * 
 * class asinh(HyperbolicFunction):
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_5 = SymEngine::csch(__pyx_v_X->thisptr);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 2701, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2701, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2699
 * 
 * class csch(HyperbolicFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.csch(X.thisptr))
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.csch.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_X);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2704
 * 
 * class asinh(HyperbolicFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.asinh(X.thisptr))
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5asinh_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_5asinh_1__new__ = {"__new__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_5asinh_1__new__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5asinh_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_x = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,&__pyx_mstate_global->__pyx_n_u_x,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2704, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2704, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2704, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__new__", 0) < (0)) __PYX_ERR(0, 2704, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__new__", 1, 2, 2, i); __PYX_ERR(0, 2704, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2704, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2704, __pyx_L3_error)
    }
    __pyx_v_cls = values[0];
    __pyx_v_x = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 2704, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.asinh.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5asinh___new__(__pyx_self, __pyx_v_cls, __pyx_v_x);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5asinh___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_x) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_X = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  SymEngine::RCP<const SymEngine::Basic> __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__new__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2705
 * class asinh(HyperbolicFunction):
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)             # <<<<<<<<<<<<<<
 *         return c2py(symengine.asinh(X.thisptr))
 * 
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2705, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_x};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2705, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 2705, __pyx_L1_error)
  __pyx_v_X = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2706
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.asinh(X.thisptr))             # <<<<<<<<<<<<<<
 * 
 * class acosh(HyperbolicFunction):
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_5 = SymEngine::asinh(__pyx_v_X->thisptr);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 2706, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2706, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2704
 * 
 * class asinh(HyperbolicFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.asinh(X.thisptr))
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.asinh.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_X);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2709
 * 
 * class acosh(HyperbolicFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.acosh(X.thisptr))
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5acosh_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_5acosh_1__new__ = {"__new__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_5acosh_1__new__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5acosh_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_x = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,&__pyx_mstate_global->__pyx_n_u_x,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2709, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2709, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2709, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__new__", 0) < (0)) __PYX_ERR(0, 2709, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__new__", 1, 2, 2, i); __PYX_ERR(0, 2709, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2709, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2709, __pyx_L3_error)
    }
    __pyx_v_cls = values[0];
    __pyx_v_x = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 2709, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.acosh.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5acosh___new__(__pyx_self, __pyx_v_cls, __pyx_v_x);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5acosh___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_x) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_X = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  SymEngine::RCP<const SymEngine::Basic> __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__new__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2710
 * class acosh(HyperbolicFunction):
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)             # <<<<<<<<<<<<<<
 *         return c2py(symengine.acosh(X.thisptr))
 * 
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2710, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_x};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2710, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 2710, __pyx_L1_error)
  __pyx_v_X = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2711
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.acosh(X.thisptr))             # <<<<<<<<<<<<<<
 * 
 * class atanh(HyperbolicFunction):
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_5 = SymEngine::acosh(__pyx_v_X->thisptr);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 2711, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2711, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2709
 * 
 * class acosh(HyperbolicFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.acosh(X.thisptr))
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.acosh.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_X);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2714
 * 
 * class atanh(HyperbolicFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.atanh(X.thisptr))
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5atanh_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_5atanh_1__new__ = {"__new__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_5atanh_1__new__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5atanh_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_x = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,&__pyx_mstate_global->__pyx_n_u_x,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2714, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2714, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2714, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__new__", 0) < (0)) __PYX_ERR(0, 2714, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__new__", 1, 2, 2, i); __PYX_ERR(0, 2714, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2714, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2714, __pyx_L3_error)
    }
    __pyx_v_cls = values[0];
    __pyx_v_x = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 2714, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.atanh.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5atanh___new__(__pyx_self, __pyx_v_cls, __pyx_v_x);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5atanh___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_x) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_X = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  SymEngine::RCP<const SymEngine::Basic> __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__new__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2715
 * class atanh(HyperbolicFunction):
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)             # <<<<<<<<<<<<<<
 *         return c2py(symengine.atanh(X.thisptr))
 * 
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2715, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_x};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2715, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 2715, __pyx_L1_error)
  __pyx_v_X = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2716
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.atanh(X.thisptr))             # <<<<<<<<<<<<<<
 * 
 * class acoth(HyperbolicFunction):
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_5 = SymEngine::atanh(__pyx_v_X->thisptr);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 2716, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2716, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2714
 * 
 * class atanh(HyperbolicFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.atanh(X.thisptr))
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.atanh.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_X);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2719
 * 
 * class acoth(HyperbolicFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.acoth(X.thisptr))
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5acoth_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_5acoth_1__new__ = {"__new__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_5acoth_1__new__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5acoth_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_x = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,&__pyx_mstate_global->__pyx_n_u_x,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2719, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2719, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2719, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__new__", 0) < (0)) __PYX_ERR(0, 2719, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__new__", 1, 2, 2, i); __PYX_ERR(0, 2719, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2719, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2719, __pyx_L3_error)
    }
    __pyx_v_cls = values[0];
    __pyx_v_x = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 2719, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.acoth.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5acoth___new__(__pyx_self, __pyx_v_cls, __pyx_v_x);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5acoth___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_x) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_X = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  SymEngine::RCP<const SymEngine::Basic> __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__new__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2720
 * class acoth(HyperbolicFunction):
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)             # <<<<<<<<<<<<<<
 *         return c2py(symengine.acoth(X.thisptr))
 * 
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2720, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_x};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2720, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 2720, __pyx_L1_error)
  __pyx_v_X = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2721
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.acoth(X.thisptr))             # <<<<<<<<<<<<<<
 * 
 * class asech(HyperbolicFunction):
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_5 = SymEngine::acoth(__pyx_v_X->thisptr);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 2721, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2721, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2719
 * 
 * class acoth(HyperbolicFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.acoth(X.thisptr))
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.acoth.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_X);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2724
 * 
 * class asech(HyperbolicFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.asech(X.thisptr))
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5asech_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_5asech_1__new__ = {"__new__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_5asech_1__new__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5asech_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_x = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,&__pyx_mstate_global->__pyx_n_u_x,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2724, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2724, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2724, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__new__", 0) < (0)) __PYX_ERR(0, 2724, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__new__", 1, 2, 2, i); __PYX_ERR(0, 2724, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2724, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2724, __pyx_L3_error)
    }
    __pyx_v_cls = values[0];
    __pyx_v_x = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 2724, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.asech.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5asech___new__(__pyx_self, __pyx_v_cls, __pyx_v_x);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5asech___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_x) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_X = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  SymEngine::RCP<const SymEngine::Basic> __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__new__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2725
 * class asech(HyperbolicFunction):
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)             # <<<<<<<<<<<<<<
 *         return c2py(symengine.asech(X.thisptr))
 * 
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2725, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_x};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2725, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 2725, __pyx_L1_error)
  __pyx_v_X = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2726
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.asech(X.thisptr))             # <<<<<<<<<<<<<<
 * 
 * class acsch(HyperbolicFunction):
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_5 = SymEngine::asech(__pyx_v_X->thisptr);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 2726, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2726, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2724
 * 
 * class asech(HyperbolicFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.asech(X.thisptr))
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.asech.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_X);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2729
 * 
 * class acsch(HyperbolicFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.acsch(X.thisptr))
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5acsch_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_5acsch_1__new__ = {"__new__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_5acsch_1__new__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5acsch_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_x = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,&__pyx_mstate_global->__pyx_n_u_x,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2729, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2729, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2729, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__new__", 0) < (0)) __PYX_ERR(0, 2729, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__new__", 1, 2, 2, i); __PYX_ERR(0, 2729, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2729, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2729, __pyx_L3_error)
    }
    __pyx_v_cls = values[0];
    __pyx_v_x = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 2729, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.acsch.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5acsch___new__(__pyx_self, __pyx_v_cls, __pyx_v_x);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5acsch___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_x) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_X = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  SymEngine::RCP<const SymEngine::Basic> __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__new__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2730
 * class acsch(HyperbolicFunction):
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)             # <<<<<<<<<<<<<<
 *         return c2py(symengine.acsch(X.thisptr))
 * 
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2730, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_x};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2730, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 2730, __pyx_L1_error)
  __pyx_v_X = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2731
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.acsch(X.thisptr))             # <<<<<<<<<<<<<<
 * 
 * class atan2(Function):
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_5 = SymEngine::acsch(__pyx_v_X->thisptr);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 2731, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2731, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2729
 * 
 * class acsch(HyperbolicFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.acsch(X.thisptr))
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.acsch.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_X);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2734
 * 
 * class atan2(Function):
 *     def __new__(cls, x, y):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         cdef Basic Y = sympify(y)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5atan2_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_5atan2_1__new__ = {"__new__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_5atan2_1__new__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5atan2_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_x = 0;
  PyObject *__pyx_v_y = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,&__pyx_mstate_global->__pyx_n_u_x,&__pyx_mstate_global->__pyx_n_u_y,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2734, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2734, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2734, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2734, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__new__", 0) < (0)) __PYX_ERR(0, 2734, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__new__", 1, 3, 3, i); __PYX_ERR(0, 2734, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2734, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2734, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2734, __pyx_L3_error)
    }
    __pyx_v_cls = values[0];
    __pyx_v_x = values[1];
    __pyx_v_y = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 2734, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.atan2.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5atan2___new__(__pyx_self, __pyx_v_cls, __pyx_v_x, __pyx_v_y);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5atan2___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_x, PyObject *__pyx_v_y) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_X = 0;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_Y = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  SymEngine::RCP<const SymEngine::Basic> __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__new__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2735
 * class atan2(Function):
 *     def __new__(cls, x, y):
 *         cdef Basic X = sympify(x)             # <<<<<<<<<<<<<<
 *         cdef Basic Y = sympify(y)
 *         return c2py(symengine.atan2(X.thisptr, Y.thisptr))
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2735, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_x};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2735, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 2735, __pyx_L1_error)
  __pyx_v_X = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2736
 *     def __new__(cls, x, y):
 *         cdef Basic X = sympify(x)
 *         cdef Basic Y = sympify(y)             # <<<<<<<<<<<<<<
 *         return c2py(symengine.atan2(X.thisptr, Y.thisptr))
 * 
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2736, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_y};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2736, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 2736, __pyx_L1_error)
  __pyx_v_Y = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2737
 *         cdef Basic X = sympify(x)
 *         cdef Basic Y = sympify(y)
 *         return c2py(symengine.atan2(X.thisptr, Y.thisptr))             # <<<<<<<<<<<<<<
 * 
 *     def _sympy_(self):
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_5 = SymEngine::atan2(__pyx_v_X->thisptr, __pyx_v_Y->thisptr);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 2737, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2737, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2734
 * 
 * class atan2(Function):
 *     def __new__(cls, x, y):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         cdef Basic Y = sympify(y)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.atan2.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_X);
  __Pyx_XDECREF((PyObject *)__pyx_v_Y);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2739
 *         return c2py(symengine.atan2(X.thisptr, Y.thisptr))
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.atan2(*self.args_as_sympy())
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5atan2_3_sympy_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_5atan2_3_sympy_ = {"_sympy_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_5atan2_3_sympy_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5atan2_3_sympy_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sympy_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2739, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2739, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_sympy_", 0) < (0)) __PYX_ERR(0, 2739, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 1, 1, i); __PYX_ERR(0, 2739, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2739, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2739, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.atan2._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5atan2_2_sympy_(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5atan2_2_sympy_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_sympy = 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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sympy_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2740
 * 
 *     def _sympy_(self):
 *         import sympy             # <<<<<<<<<<<<<<
 *         return sympy.atan2(*self.args_as_sympy())
 * 
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sympy, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2740, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sympy = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2741
 *     def _sympy_(self):
 *         import sympy
 *         return sympy.atan2(*self.args_as_sympy())             # <<<<<<<<<<<<<<
 * 
 *     def _sage_(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_atan2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2741, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_args_as_sympy, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2741, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2741, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2741, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2739
 *         return c2py(symengine.atan2(X.thisptr, Y.thisptr))
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.atan2(*self.args_as_sympy())
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.atan2._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sympy);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2743
 *         return sympy.atan2(*self.args_as_sympy())
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         import sage.all as sage
 *         return sage.atan2(*self.args_as_sage())
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5atan2_5_sage_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_5atan2_5_sage_ = {"_sage_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_5atan2_5_sage_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5atan2_5_sage_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sage_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2743, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2743, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_sage_", 0) < (0)) __PYX_ERR(0, 2743, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_sage_", 1, 1, 1, i); __PYX_ERR(0, 2743, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2743, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_sage_", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2743, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.atan2._sage_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5atan2_4_sage_(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5atan2_4_sage_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_sage = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sage_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2744
 * 
 *     def _sage_(self):
 *         import sage.all as sage             # <<<<<<<<<<<<<<
 *         return sage.atan2(*self.args_as_sage())
 * 
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sage_all, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2744, __pyx_L1_error)
  __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_all);
  Py_DECREF(__pyx_t_2);
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2744, __pyx_L1_error)
  __pyx_t_2 = __pyx_t_3;
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sage = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2745
 *     def _sage_(self):
 *         import sage.all as sage
 *         return sage.atan2(*self.args_as_sage())             # <<<<<<<<<<<<<<
 * 
 * # For backwards compatibility
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sage, __pyx_mstate_global->__pyx_n_u_atan2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2745, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_5);
  __pyx_t_6 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
    __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_args_as_sage, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2745, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  __pyx_t_5 = __Pyx_PySequence_Tuple(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2745, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2745, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2743
 *         return sympy.atan2(*self.args_as_sympy())
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         import sage.all as sage
 *         return sage.atan2(*self.args_as_sage())
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.atan2._sage_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sage);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2782
 * 
 * class UnevaluatedExpr(OneArgFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.unevaluated_expr(X.thisptr))
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15UnevaluatedExpr_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_15UnevaluatedExpr_1__new__ = {"__new__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15UnevaluatedExpr_1__new__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15UnevaluatedExpr_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_x = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,&__pyx_mstate_global->__pyx_n_u_x,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2782, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2782, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2782, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__new__", 0) < (0)) __PYX_ERR(0, 2782, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__new__", 1, 2, 2, i); __PYX_ERR(0, 2782, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2782, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2782, __pyx_L3_error)
    }
    __pyx_v_cls = values[0];
    __pyx_v_x = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 2782, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.UnevaluatedExpr.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15UnevaluatedExpr___new__(__pyx_self, __pyx_v_cls, __pyx_v_x);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15UnevaluatedExpr___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_x) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_X = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  SymEngine::RCP<const SymEngine::Basic> __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__new__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2783
 * class UnevaluatedExpr(OneArgFunction):
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)             # <<<<<<<<<<<<<<
 *         return c2py(symengine.unevaluated_expr(X.thisptr))
 * 
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2783, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_x};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2783, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 2783, __pyx_L1_error)
  __pyx_v_X = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2784
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.unevaluated_expr(X.thisptr))             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_5 = SymEngine::unevaluated_expr(__pyx_v_X->thisptr);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 2784, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2784, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2782
 * 
 * class UnevaluatedExpr(OneArgFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.unevaluated_expr(X.thisptr))
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.UnevaluatedExpr.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_X);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2786
 *         return c2py(symengine.unevaluated_expr(X.thisptr))
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_number(self):
 *         return self.args[0].is_number
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15UnevaluatedExpr_3is_number(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_15UnevaluatedExpr_3is_number = {"is_number", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15UnevaluatedExpr_3is_number, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15UnevaluatedExpr_3is_number(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_number (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2786, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2786, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "is_number", 0) < (0)) __PYX_ERR(0, 2786, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("is_number", 1, 1, 1, i); __PYX_ERR(0, 2786, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2786, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_number", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2786, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.UnevaluatedExpr.is_number", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15UnevaluatedExpr_2is_number(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15UnevaluatedExpr_2is_number(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_number", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2788
 *     @property
 *     def is_number(self):
 *         return self.args[0].is_number             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2788, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2788, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_is_number); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2788, __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;

  /* "symengine/lib/symengine_wrapper.pyx":2786
 *         return c2py(symengine.unevaluated_expr(X.thisptr))
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_number(self):
 *         return self.args[0].is_number
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.UnevaluatedExpr.is_number", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2790
 *         return self.args[0].is_number
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_integer(self):
 *         return self.args[0].is_integer
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15UnevaluatedExpr_5is_integer(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_15UnevaluatedExpr_5is_integer = {"is_integer", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15UnevaluatedExpr_5is_integer, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15UnevaluatedExpr_5is_integer(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_integer (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2790, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2790, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "is_integer", 0) < (0)) __PYX_ERR(0, 2790, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("is_integer", 1, 1, 1, i); __PYX_ERR(0, 2790, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2790, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_integer", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2790, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.UnevaluatedExpr.is_integer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15UnevaluatedExpr_4is_integer(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15UnevaluatedExpr_4is_integer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_integer", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2792
 *     @property
 *     def is_integer(self):
 *         return self.args[0].is_integer             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2792, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2792, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_is_integer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2792, __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;

  /* "symengine/lib/symengine_wrapper.pyx":2790
 *         return self.args[0].is_number
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_integer(self):
 *         return self.args[0].is_integer
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.UnevaluatedExpr.is_integer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2794
 *         return self.args[0].is_integer
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_finite(self):
 *         return self.args[0].is_finite
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15UnevaluatedExpr_7is_finite(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_15UnevaluatedExpr_7is_finite = {"is_finite", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15UnevaluatedExpr_7is_finite, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15UnevaluatedExpr_7is_finite(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_finite (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2794, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2794, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "is_finite", 0) < (0)) __PYX_ERR(0, 2794, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("is_finite", 1, 1, 1, i); __PYX_ERR(0, 2794, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2794, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_finite", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2794, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.UnevaluatedExpr.is_finite", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15UnevaluatedExpr_6is_finite(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15UnevaluatedExpr_6is_finite(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_finite", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2796
 *     @property
 *     def is_finite(self):
 *         return self.args[0].is_finite             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2796, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2796, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_is_finite); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2796, __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;

  /* "symengine/lib/symengine_wrapper.pyx":2794
 *         return self.args[0].is_integer
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_finite(self):
 *         return self.args[0].is_finite
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.UnevaluatedExpr.is_finite", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2801
 * class Abs(OneArgFunction):
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_real(self):
 *         return True
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3Abs_1is_real(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_3Abs_1is_real = {"is_real", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_3Abs_1is_real, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3Abs_1is_real(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_real (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2801, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2801, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "is_real", 0) < (0)) __PYX_ERR(0, 2801, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("is_real", 1, 1, 1, i); __PYX_ERR(0, 2801, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2801, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_real", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2801, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Abs.is_real", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_3Abs_is_real(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3Abs_is_real(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_real", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2803
 *     @property
 *     def is_real(self):
 *         return True             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_True);
  __pyx_r = Py_True;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2801
 * class Abs(OneArgFunction):
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_real(self):
 *         return True
*/

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

/* "symengine/lib/symengine_wrapper.pyx":2805
 *         return True
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_negative(self):
 *         return False
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3Abs_3is_negative(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_3Abs_3is_negative = {"is_negative", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_3Abs_3is_negative, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3Abs_3is_negative(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_negative (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2805, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2805, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "is_negative", 0) < (0)) __PYX_ERR(0, 2805, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("is_negative", 1, 1, 1, i); __PYX_ERR(0, 2805, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2805, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_negative", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2805, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Abs.is_negative", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_3Abs_2is_negative(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3Abs_2is_negative(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_negative", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2807
 *     @property
 *     def is_negative(self):
 *         return False             # <<<<<<<<<<<<<<
 * 
 *     def __new__(cls, x):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_False);
  __pyx_r = Py_False;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2805
 *         return True
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_negative(self):
 *         return False
*/

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

/* "symengine/lib/symengine_wrapper.pyx":2809
 *         return False
 * 
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.abs(X.thisptr))
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3Abs_5__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_3Abs_5__new__ = {"__new__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_3Abs_5__new__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3Abs_5__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_x = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,&__pyx_mstate_global->__pyx_n_u_x,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2809, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2809, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2809, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__new__", 0) < (0)) __PYX_ERR(0, 2809, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__new__", 1, 2, 2, i); __PYX_ERR(0, 2809, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2809, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2809, __pyx_L3_error)
    }
    __pyx_v_cls = values[0];
    __pyx_v_x = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 2809, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Abs.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_3Abs_4__new__(__pyx_self, __pyx_v_cls, __pyx_v_x);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3Abs_4__new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_x) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_X = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  SymEngine::RCP<const SymEngine::Basic> __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__new__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2810
 * 
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)             # <<<<<<<<<<<<<<
 *         return c2py(symengine.abs(X.thisptr))
 * 
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2810, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_x};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2810, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 2810, __pyx_L1_error)
  __pyx_v_X = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2811
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.abs(X.thisptr))             # <<<<<<<<<<<<<<
 * 
 *     def _sympy_(Basic self):
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_5 = SymEngine::abs(__pyx_v_X->thisptr);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 2811, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2811, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2809
 *         return False
 * 
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.abs(X.thisptr))
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Abs.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_X);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2813
 *         return c2py(symengine.abs(X.thisptr))
 * 
 *     def _sympy_(Basic self):             # <<<<<<<<<<<<<<
 *         cdef RCP[const symengine.Abs] X = symengine.rcp_static_cast_Abs(self.thisptr)
 *         arg = c2py(deref(X).get_arg())._sympy_()
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3Abs_7_sympy_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_3Abs_7_sympy_ = {"_sympy_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_3Abs_7_sympy_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3Abs_7_sympy_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sympy_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2813, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2813, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_sympy_", 0) < (0)) __PYX_ERR(0, 2813, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 1, 1, i); __PYX_ERR(0, 2813, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2813, __pyx_L3_error)
    }
    __pyx_v_self = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2813, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Abs._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic, 1, "self", 0))) __PYX_ERR(0, 2813, __pyx_L1_error)
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_3Abs_6_sympy_(__pyx_self, __pyx_v_self);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3Abs_6_sympy_(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self) {
  SymEngine::RCP<SymEngine::Abs const >  __pyx_v_X;
  PyObject *__pyx_v_arg = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sympy_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2814
 * 
 *     def _sympy_(Basic self):
 *         cdef RCP[const symengine.Abs] X = symengine.rcp_static_cast_Abs(self.thisptr)             # <<<<<<<<<<<<<<
 *         arg = c2py(deref(X).get_arg())._sympy_()
 *         return abs(arg)
*/
  __pyx_v_X = SymEngine::rcp_static_cast<const SymEngine::Abs>(__pyx_v_self->thisptr);

  /* "symengine/lib/symengine_wrapper.pyx":2815
 *     def _sympy_(Basic self):
 *         cdef RCP[const symengine.Abs] X = symengine.rcp_static_cast_Abs(self.thisptr)
 *         arg = c2py(deref(X).get_arg())._sympy_()             # <<<<<<<<<<<<<<
 *         return abs(arg)
 * 
*/
  __pyx_t_3 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py((*__pyx_v_X).get_arg()); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2815, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __pyx_t_3;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_sympy_2, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2815, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_arg = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2816
 *         cdef RCP[const symengine.Abs] X = symengine.rcp_static_cast_Abs(self.thisptr)
 *         arg = c2py(deref(X).get_arg())._sympy_()
 *         return abs(arg)             # <<<<<<<<<<<<<<
 * 
 *     def _sage_(Basic self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyNumber_Absolute(__pyx_v_arg); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2816, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2813
 *         return c2py(symengine.abs(X.thisptr))
 * 
 *     def _sympy_(Basic self):             # <<<<<<<<<<<<<<
 *         cdef RCP[const symengine.Abs] X = symengine.rcp_static_cast_Abs(self.thisptr)
 *         arg = c2py(deref(X).get_arg())._sympy_()
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Abs._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_arg);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2818
 *         return abs(arg)
 * 
 *     def _sage_(Basic self):             # <<<<<<<<<<<<<<
 *         cdef RCP[const symengine.Abs] X = symengine.rcp_static_cast_Abs(self.thisptr)
 *         arg = c2py(deref(X).get_arg())._sage_()
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3Abs_9_sage_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_3Abs_9_sage_ = {"_sage_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_3Abs_9_sage_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3Abs_9_sage_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sage_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2818, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2818, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_sage_", 0) < (0)) __PYX_ERR(0, 2818, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_sage_", 1, 1, 1, i); __PYX_ERR(0, 2818, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2818, __pyx_L3_error)
    }
    __pyx_v_self = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_sage_", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2818, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Abs._sage_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic, 1, "self", 0))) __PYX_ERR(0, 2818, __pyx_L1_error)
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_3Abs_8_sage_(__pyx_self, __pyx_v_self);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3Abs_8_sage_(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self) {
  SymEngine::RCP<SymEngine::Abs const >  __pyx_v_X;
  PyObject *__pyx_v_arg = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sage_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2819
 * 
 *     def _sage_(Basic self):
 *         cdef RCP[const symengine.Abs] X = symengine.rcp_static_cast_Abs(self.thisptr)             # <<<<<<<<<<<<<<
 *         arg = c2py(deref(X).get_arg())._sage_()
 *         return abs(arg)
*/
  __pyx_v_X = SymEngine::rcp_static_cast<const SymEngine::Abs>(__pyx_v_self->thisptr);

  /* "symengine/lib/symengine_wrapper.pyx":2820
 *     def _sage_(Basic self):
 *         cdef RCP[const symengine.Abs] X = symengine.rcp_static_cast_Abs(self.thisptr)
 *         arg = c2py(deref(X).get_arg())._sage_()             # <<<<<<<<<<<<<<
 *         return abs(arg)
 * 
*/
  __pyx_t_3 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py((*__pyx_v_X).get_arg()); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2820, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __pyx_t_3;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_sage, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2820, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_arg = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2821
 *         cdef RCP[const symengine.Abs] X = symengine.rcp_static_cast_Abs(self.thisptr)
 *         arg = c2py(deref(X).get_arg())._sage_()
 *         return abs(arg)             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyNumber_Absolute(__pyx_v_arg); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2821, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2818
 *         return abs(arg)
 * 
 *     def _sage_(Basic self):             # <<<<<<<<<<<<<<
 *         cdef RCP[const symengine.Abs] X = symengine.rcp_static_cast_Abs(self.thisptr)
 *         arg = c2py(deref(X).get_arg())._sage_()
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Abs._sage_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_arg);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2823
 *         return abs(arg)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def func(self):
 *         return self.__class__
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3Abs_11func(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_3Abs_11func = {"func", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_3Abs_11func, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3Abs_11func(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("func (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2823, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2823, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "func", 0) < (0)) __PYX_ERR(0, 2823, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("func", 1, 1, 1, i); __PYX_ERR(0, 2823, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2823, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("func", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2823, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Abs.func", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_3Abs_10func(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3Abs_10func(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("func", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2825
 *     @property
 *     def func(self):
 *         return self.__class__             # <<<<<<<<<<<<<<
 * 
 * class FunctionSymbol(Function):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2825, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2823
 *         return abs(arg)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def func(self):
 *         return self.__class__
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Abs.func", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2829
 * class FunctionSymbol(Function):
 * 
 *     def get_name(Basic self):             # <<<<<<<<<<<<<<
 *         cdef RCP[const symengine.FunctionSymbol] X = \
 *             symengine.rcp_static_cast_FunctionSymbol(self.thisptr)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_14FunctionSymbol_1get_name(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_14FunctionSymbol_1get_name = {"get_name", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_14FunctionSymbol_1get_name, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_14FunctionSymbol_1get_name(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_name (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2829, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2829, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "get_name", 0) < (0)) __PYX_ERR(0, 2829, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("get_name", 1, 1, 1, i); __PYX_ERR(0, 2829, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2829, __pyx_L3_error)
    }
    __pyx_v_self = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("get_name", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2829, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.FunctionSymbol.get_name", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic, 1, "self", 0))) __PYX_ERR(0, 2829, __pyx_L1_error)
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_14FunctionSymbol_get_name(__pyx_self, __pyx_v_self);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_14FunctionSymbol_get_name(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self) {
  SymEngine::RCP<SymEngine::FunctionSymbol const >  __pyx_v_X;
  PyObject *__pyx_v_name = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_name", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2831
 *     def get_name(Basic self):
 *         cdef RCP[const symengine.FunctionSymbol] X = \
 *             symengine.rcp_static_cast_FunctionSymbol(self.thisptr)             # <<<<<<<<<<<<<<
 *         name = deref(X).get_name().decode("utf-8")
 *         return str(name)
*/
  __pyx_v_X = SymEngine::rcp_static_cast<const SymEngine::FunctionSymbol>(__pyx_v_self->thisptr);

  /* "symengine/lib/symengine_wrapper.pyx":2832
 *         cdef RCP[const symengine.FunctionSymbol] X = \
 *             symengine.rcp_static_cast_FunctionSymbol(self.thisptr)
 *         name = deref(X).get_name().decode("utf-8")             # <<<<<<<<<<<<<<
 *         return str(name)
 * 
*/
  __pyx_t_1 = __Pyx_decode_cpp_string((*__pyx_v_X).get_name(), 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2832, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2833
 *             symengine.rcp_static_cast_FunctionSymbol(self.thisptr)
 *         name = deref(X).get_name().decode("utf-8")
 *         return str(name)             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_Unicode(__pyx_v_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2833, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2829
 * class FunctionSymbol(Function):
 * 
 *     def get_name(Basic self):             # <<<<<<<<<<<<<<
 *         cdef RCP[const symengine.FunctionSymbol] X = \
 *             symengine.rcp_static_cast_FunctionSymbol(self.thisptr)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.FunctionSymbol.get_name", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2835
 *         return str(name)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def name(Basic self):
 *         return self.get_name()
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_14FunctionSymbol_3name(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_14FunctionSymbol_3name = {"name", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_14FunctionSymbol_3name, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_14FunctionSymbol_3name(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("name (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2835, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2835, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "name", 0) < (0)) __PYX_ERR(0, 2835, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("name", 1, 1, 1, i); __PYX_ERR(0, 2835, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2835, __pyx_L3_error)
    }
    __pyx_v_self = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("name", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2835, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.FunctionSymbol.name", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic, 1, "self", 0))) __PYX_ERR(0, 2836, __pyx_L1_error)
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_14FunctionSymbol_2name(__pyx_self, __pyx_v_self);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_14FunctionSymbol_2name(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("name", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2837
 *     @property
 *     def name(Basic self):
 *         return self.get_name()             # <<<<<<<<<<<<<<
 * 
 *     def _sympy_(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_name, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2837, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2835
 *         return str(name)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def name(Basic self):
 *         return self.get_name()
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.FunctionSymbol.name", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2839
 *         return self.get_name()
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         name = self.get_name()
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_14FunctionSymbol_5_sympy_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_14FunctionSymbol_5_sympy_ = {"_sympy_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_14FunctionSymbol_5_sympy_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_14FunctionSymbol_5_sympy_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sympy_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2839, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2839, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_sympy_", 0) < (0)) __PYX_ERR(0, 2839, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 1, 1, i); __PYX_ERR(0, 2839, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2839, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2839, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.FunctionSymbol._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_14FunctionSymbol_4_sympy_(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_14FunctionSymbol_4_sympy_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_sympy = NULL;
  PyObject *__pyx_v_name = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sympy_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2840
 * 
 *     def _sympy_(self):
 *         import sympy             # <<<<<<<<<<<<<<
 *         name = self.get_name()
 *         return sympy.Function(name)(*self.args_as_sympy())
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sympy, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2840, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sympy = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2841
 *     def _sympy_(self):
 *         import sympy
 *         name = self.get_name()             # <<<<<<<<<<<<<<
 *         return sympy.Function(name)(*self.args_as_sympy())
 * 
*/
  __pyx_t_3 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_name, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2841, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2842
 *         import sympy
 *         name = self.get_name()
 *         return sympy.Function(name)(*self.args_as_sympy())             # <<<<<<<<<<<<<<
 * 
 *     def _sage_(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __pyx_v_sympy;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_name};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_Function, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2842, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_t_5 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_5);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_args_as_sympy, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2842, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __pyx_t_5 = __Pyx_PySequence_Tuple(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2842, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2842, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2839
 *         return self.get_name()
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         name = self.get_name()
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.FunctionSymbol._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sympy);
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2844
 *         return sympy.Function(name)(*self.args_as_sympy())
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         import sage.all as sage
 *         name = self.get_name()
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_14FunctionSymbol_7_sage_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_14FunctionSymbol_7_sage_ = {"_sage_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_14FunctionSymbol_7_sage_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_14FunctionSymbol_7_sage_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sage_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2844, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2844, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_sage_", 0) < (0)) __PYX_ERR(0, 2844, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_sage_", 1, 1, 1, i); __PYX_ERR(0, 2844, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2844, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_sage_", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2844, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.FunctionSymbol._sage_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_14FunctionSymbol_6_sage_(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_14FunctionSymbol_6_sage_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_sage = NULL;
  PyObject *__pyx_v_name = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sage_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2845
 * 
 *     def _sage_(self):
 *         import sage.all as sage             # <<<<<<<<<<<<<<
 *         name = self.get_name()
 *         return sage.function(name)(*self.args_as_sage())
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sage_all, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2845, __pyx_L1_error)
  __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_all);
  Py_DECREF(__pyx_t_2);
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2845, __pyx_L1_error)
  __pyx_t_2 = __pyx_t_3;
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sage = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2846
 *     def _sage_(self):
 *         import sage.all as sage
 *         name = self.get_name()             # <<<<<<<<<<<<<<
 *         return sage.function(name)(*self.args_as_sage())
 * 
*/
  __pyx_t_4 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_name, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2846, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2847
 *         import sage.all as sage
 *         name = self.get_name()
 *         return sage.function(name)(*self.args_as_sage())             # <<<<<<<<<<<<<<
 * 
 *     def func(self, *values):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = __pyx_v_sage;
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_name};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_function, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2847, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_t_6 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_6);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
    __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_args_as_sage, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2847, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  __pyx_t_6 = __Pyx_PySequence_Tuple(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2847, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2847, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2844
 *         return sympy.Function(name)(*self.args_as_sympy())
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         import sage.all as sage
 *         name = self.get_name()
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.FunctionSymbol._sage_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sage);
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2849
 *         return sage.function(name)(*self.args_as_sage())
 * 
 *     def func(self, *values):             # <<<<<<<<<<<<<<
 *         name = self.get_name()
 *         return function_symbol(name, *values)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_14FunctionSymbol_9func(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_14FunctionSymbol_9func = {"func", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_14FunctionSymbol_9func, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_14FunctionSymbol_9func(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_values = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("func (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  __pyx_v_values = __Pyx_ArgsSlice_FASTCALL(__pyx_args, 1, __pyx_nargs);
  if (unlikely(!__pyx_v_values)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_v_values);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2849, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        default:
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2849, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      const Py_ssize_t used_pos_args = (kwd_pos_args < 1) ? kwd_pos_args : 1;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, used_pos_args, __pyx_kwds_len, "func", 0) < (0)) __PYX_ERR(0, 2849, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("func", 0, 1, 1, i); __PYX_ERR(0, 2849, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs < 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2849, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("func", 0, 1, 1, __pyx_nargs); __PYX_ERR(0, 2849, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_values); __pyx_v_values = 0;
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.FunctionSymbol.func", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_14FunctionSymbol_8func(__pyx_self, __pyx_v_self, __pyx_v_values);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_values);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_14FunctionSymbol_8func(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_values) {
  PyObject *__pyx_v_name = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("func", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2850
 * 
 *     def func(self, *values):
 *         name = self.get_name()             # <<<<<<<<<<<<<<
 *         return function_symbol(name, *values)
 * 
*/
  __pyx_t_2 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_name, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2850, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2851
 *     def func(self, *values):
 *         name = self.get_name()
 *         return function_symbol(name, *values)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_function_symbol); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2851, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2851, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_name);
  __Pyx_GIVEREF(__pyx_v_name);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_name) != (0)) __PYX_ERR(0, 2851, __pyx_L1_error);
  __pyx_t_4 = PyNumber_Add(__pyx_t_2, __pyx_v_values); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2851, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2851, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2849
 *         return sage.function(name)(*self.args_as_sage())
 * 
 *     def func(self, *values):             # <<<<<<<<<<<<<<
 *         name = self.get_name()
 *         return function_symbol(name, *values)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.FunctionSymbol.func", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2855
 * 
 * class UndefFunction(object):
 *     def __init__(self, name):             # <<<<<<<<<<<<<<
 *         self.name = name
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_13UndefFunction_1__init__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_13UndefFunction_1__init__ = {"__init__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_13UndefFunction_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_13UndefFunction_1__init__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_name = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_name,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2855, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2855, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2855, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 2855, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, i); __PYX_ERR(0, 2855, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2855, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2855, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
    __pyx_v_name = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 2855, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.UndefFunction.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_13UndefFunction___init__(__pyx_self, __pyx_v_self, __pyx_v_name);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_13UndefFunction___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_name) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2856
 * class UndefFunction(object):
 *     def __init__(self, name):
 *         self.name = name             # <<<<<<<<<<<<<<
 * 
 *     def __call__(self, *values):
*/
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_name, __pyx_v_name) < (0)) __PYX_ERR(0, 2856, __pyx_L1_error)

  /* "symengine/lib/symengine_wrapper.pyx":2855
 * 
 * class UndefFunction(object):
 *     def __init__(self, name):             # <<<<<<<<<<<<<<
 *         self.name = name
 * 
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.UndefFunction.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2858
 *         self.name = name
 * 
 *     def __call__(self, *values):             # <<<<<<<<<<<<<<
 *         return function_symbol(self.name, *values)
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_13UndefFunction_3__call__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_13UndefFunction_3__call__ = {"__call__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_13UndefFunction_3__call__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_13UndefFunction_3__call__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_values = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__call__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  __pyx_v_values = __Pyx_ArgsSlice_FASTCALL(__pyx_args, 1, __pyx_nargs);
  if (unlikely(!__pyx_v_values)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_v_values);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2858, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        default:
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2858, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      const Py_ssize_t used_pos_args = (kwd_pos_args < 1) ? kwd_pos_args : 1;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, used_pos_args, __pyx_kwds_len, "__call__", 0) < (0)) __PYX_ERR(0, 2858, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__call__", 0, 1, 1, i); __PYX_ERR(0, 2858, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs < 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2858, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__call__", 0, 1, 1, __pyx_nargs); __PYX_ERR(0, 2858, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_values); __pyx_v_values = 0;
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.UndefFunction.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_13UndefFunction_2__call__(__pyx_self, __pyx_v_self, __pyx_v_values);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_values);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_13UndefFunction_2__call__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_values) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__call__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2859
 * 
 *     def __call__(self, *values):
 *         return function_symbol(self.name, *values)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_function_symbol); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2859, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2859, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2859, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2) != (0)) __PYX_ERR(0, 2859, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyNumber_Add(__pyx_t_3, __pyx_v_values); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2859, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2859, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2858
 *         self.name = name
 * 
 *     def __call__(self, *values):             # <<<<<<<<<<<<<<
 *         return function_symbol(self.name, *values)
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.UndefFunction.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2862
 * 
 * 
 * cdef rcp_const_basic pynumber_to_symengine(PyObject* o1):             # <<<<<<<<<<<<<<
 *     cdef Basic X = sympify(<object>o1)
 *     return X.thisptr
*/

static SymEngine::RCP<const SymEngine::Basic> __pyx_f_9symengine_3lib_17symengine_wrapper_pynumber_to_symengine(PyObject *__pyx_v_o1) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_X = 0;
  SymEngine::RCP<const SymEngine::Basic> __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("pynumber_to_symengine", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2863
 * 
 * cdef rcp_const_basic pynumber_to_symengine(PyObject* o1):
 *     cdef Basic X = sympify(<object>o1)             # <<<<<<<<<<<<<<
 *     return X.thisptr
 * 
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2863, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, ((PyObject *)__pyx_v_o1)};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2863, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 2863, __pyx_L1_error)
  __pyx_v_X = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2864
 * cdef rcp_const_basic pynumber_to_symengine(PyObject* o1):
 *     cdef Basic X = sympify(<object>o1)
 *     return X.thisptr             # <<<<<<<<<<<<<<
 * 
 * cdef PyObject* symengine_to_sage(rcp_const_basic o1):
*/
  __pyx_r = __pyx_v_X->thisptr;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2862
 * 
 * 
 * cdef rcp_const_basic pynumber_to_symengine(PyObject* o1):             # <<<<<<<<<<<<<<
 *     cdef Basic X = sympify(<object>o1)
 *     return X.thisptr
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.pynumber_to_symengine", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_pretend_to_initialize(&__pyx_r);
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_X);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2866
 *     return X.thisptr
 * 
 * cdef PyObject* symengine_to_sage(rcp_const_basic o1):             # <<<<<<<<<<<<<<
 *     import sage.all as sage
 *     t = c2py(o1)._sage_()
*/

static PyObject *__pyx_f_9symengine_3lib_17symengine_wrapper_symengine_to_sage(SymEngine::RCP<const SymEngine::Basic> __pyx_v_o1) {
  CYTHON_UNUSED PyObject *__pyx_v_sage = NULL;
  PyObject *__pyx_v_t = NULL;
  PyObject *__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;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("symengine_to_sage", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2867
 * 
 * cdef PyObject* symengine_to_sage(rcp_const_basic o1):
 *     import sage.all as sage             # <<<<<<<<<<<<<<
 *     t = c2py(o1)._sage_()
 *     Py_XINCREF(<PyObject*>t)
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sage_all, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2867, __pyx_L1_error)
  __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_all);
  Py_DECREF(__pyx_t_2);
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2867, __pyx_L1_error)
  __pyx_t_2 = __pyx_t_3;
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sage = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2868
 * cdef PyObject* symengine_to_sage(rcp_const_basic o1):
 *     import sage.all as sage
 *     t = c2py(o1)._sage_()             # <<<<<<<<<<<<<<
 *     Py_XINCREF(<PyObject*>t)
 *     return <PyObject*>(t)
*/
  __pyx_t_5 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(__pyx_v_o1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2868, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __pyx_t_5;
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_6 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_sage, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2868, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_t = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2869
 *     import sage.all as sage
 *     t = c2py(o1)._sage_()
 *     Py_XINCREF(<PyObject*>t)             # <<<<<<<<<<<<<<
 *     return <PyObject*>(t)
 * 
*/
  Py_XINCREF(((PyObject *)__pyx_v_t));

  /* "symengine/lib/symengine_wrapper.pyx":2870
 *     t = c2py(o1)._sage_()
 *     Py_XINCREF(<PyObject*>t)
 *     return <PyObject*>(t)             # <<<<<<<<<<<<<<
 * 
 * cdef PyObject* symengine_to_sympy(rcp_const_basic o1):
*/
  __pyx_r = ((PyObject *)__pyx_v_t);
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2866
 *     return X.thisptr
 * 
 * cdef PyObject* symengine_to_sage(rcp_const_basic o1):             # <<<<<<<<<<<<<<
 *     import sage.all as sage
 *     t = c2py(o1)._sage_()
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.symengine_to_sage", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sage);
  __Pyx_XDECREF(__pyx_v_t);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2872
 *     return <PyObject*>(t)
 * 
 * cdef PyObject* symengine_to_sympy(rcp_const_basic o1):             # <<<<<<<<<<<<<<
 *     t = c2py(o1)._sympy_()
 *     Py_XINCREF(<PyObject*>t)
*/

static PyObject *__pyx_f_9symengine_3lib_17symengine_wrapper_symengine_to_sympy(SymEngine::RCP<const SymEngine::Basic> __pyx_v_o1) {
  PyObject *__pyx_v_t = NULL;
  PyObject *__pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("symengine_to_sympy", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2873
 * 
 * cdef PyObject* symengine_to_sympy(rcp_const_basic o1):
 *     t = c2py(o1)._sympy_()             # <<<<<<<<<<<<<<
 *     Py_XINCREF(<PyObject*>t)
 *     return <PyObject*>(t)
*/
  __pyx_t_3 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(__pyx_v_o1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2873, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __pyx_t_3;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_sympy_2, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2873, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_t = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2874
 * cdef PyObject* symengine_to_sympy(rcp_const_basic o1):
 *     t = c2py(o1)._sympy_()
 *     Py_XINCREF(<PyObject*>t)             # <<<<<<<<<<<<<<
 *     return <PyObject*>(t)
 * 
*/
  Py_XINCREF(((PyObject *)__pyx_v_t));

  /* "symengine/lib/symengine_wrapper.pyx":2875
 *     t = c2py(o1)._sympy_()
 *     Py_XINCREF(<PyObject*>t)
 *     return <PyObject*>(t)             # <<<<<<<<<<<<<<
 * 
 * cdef RCP[const symengine.Number] sympy_eval(PyObject* o1, long bits):
*/
  __pyx_r = ((PyObject *)__pyx_v_t);
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2872
 *     return <PyObject*>(t)
 * 
 * cdef PyObject* symengine_to_sympy(rcp_const_basic o1):             # <<<<<<<<<<<<<<
 *     t = c2py(o1)._sympy_()
 *     Py_XINCREF(<PyObject*>t)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.symengine_to_sympy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_t);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2877
 *     return <PyObject*>(t)
 * 
 * cdef RCP[const symengine.Number] sympy_eval(PyObject* o1, long bits):             # <<<<<<<<<<<<<<
 *     prec = max(1, int(round(bits/3.3219280948873626)-1))
 *     cdef Number X = sympify((<object>o1).n(prec))
*/

static SymEngine::RCP<SymEngine::Number const >  __pyx_f_9symengine_3lib_17symengine_wrapper_sympy_eval(PyObject *__pyx_v_o1, long __pyx_v_bits) {
  PyObject *__pyx_v_prec = NULL;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Number *__pyx_v_X = 0;
  SymEngine::RCP<SymEngine::Number const >  __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  long __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("sympy_eval", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2878
 * 
 * cdef RCP[const symengine.Number] sympy_eval(PyObject* o1, long bits):
 *     prec = max(1, int(round(bits/3.3219280948873626)-1))             # <<<<<<<<<<<<<<
 *     cdef Number X = sympify((<object>o1).n(prec))
 *     return symengine.rcp_static_cast_Number(X.thisptr)
*/
  __pyx_t_2 = NULL;
  __pyx_t_3 = PyFloat_FromDouble((((double)__pyx_v_bits) / 3.3219280948873626)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2878, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_round, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2878, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_t_3 = __Pyx_PyLong_SubtractObjC(__pyx_t_1, __pyx_mstate_global->__pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2878, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2878, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = 1;
  __pyx_t_2 = __Pyx_PyLong_From_long(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2878, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_GT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2878, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 2878, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__pyx_t_7) {
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_3 = __pyx_t_1;
  } else {
    __pyx_t_6 = __Pyx_PyLong_From_long(__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2878, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__Pyx_PyInt_FromNumber(&__pyx_t_6, NULL, 0) < (0)) __PYX_ERR(0, 2878, __pyx_L1_error)
    __pyx_t_3 = __pyx_t_6;
    __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __pyx_t_3;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_prec = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2879
 * cdef RCP[const symengine.Number] sympy_eval(PyObject* o1, long bits):
 *     prec = max(1, int(round(bits/3.3219280948873626)-1))
 *     cdef Number X = sympify((<object>o1).n(prec))             # <<<<<<<<<<<<<<
 *     return symengine.rcp_static_cast_Number(X.thisptr)
 * 
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2879, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = ((PyObject *)__pyx_v_o1);
  __Pyx_INCREF(__pyx_t_8);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_v_prec};
    __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_n, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2879, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2879, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Number))))) __PYX_ERR(0, 2879, __pyx_L1_error)
  __pyx_v_X = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Number *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2880
 *     prec = max(1, int(round(bits/3.3219280948873626)-1))
 *     cdef Number X = sympify((<object>o1).n(prec))
 *     return symengine.rcp_static_cast_Number(X.thisptr)             # <<<<<<<<<<<<<<
 * 
 * cdef RCP[const symengine.Number] sage_eval(PyObject* o1, long bits):
*/
  __pyx_r = SymEngine::rcp_static_cast<const SymEngine::Number>(__pyx_v_X->__pyx_base.__pyx_base.thisptr);
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2877
 *     return <PyObject*>(t)
 * 
 * cdef RCP[const symengine.Number] sympy_eval(PyObject* o1, long bits):             # <<<<<<<<<<<<<<
 *     prec = max(1, int(round(bits/3.3219280948873626)-1))
 *     cdef Number X = sympify((<object>o1).n(prec))
*/

  /* 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_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.sympy_eval", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_pretend_to_initialize(&__pyx_r);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_prec);
  __Pyx_XDECREF((PyObject *)__pyx_v_X);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2882
 *     return symengine.rcp_static_cast_Number(X.thisptr)
 * 
 * cdef RCP[const symengine.Number] sage_eval(PyObject* o1, long bits):             # <<<<<<<<<<<<<<
 *     cdef Number X = sympify((<object>o1).n(bits))
 *     return symengine.rcp_static_cast_Number(X.thisptr)
*/

static SymEngine::RCP<SymEngine::Number const >  __pyx_f_9symengine_3lib_17symengine_wrapper_sage_eval(PyObject *__pyx_v_o1, long __pyx_v_bits) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Number *__pyx_v_X = 0;
  SymEngine::RCP<SymEngine::Number const >  __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;
  size_t __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("sage_eval", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2883
 * 
 * cdef RCP[const symengine.Number] sage_eval(PyObject* o1, long bits):
 *     cdef Number X = sympify((<object>o1).n(bits))             # <<<<<<<<<<<<<<
 *     return symengine.rcp_static_cast_Number(X.thisptr)
 * 
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2883, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = ((PyObject *)__pyx_v_o1);
  __Pyx_INCREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyLong_From_long(__pyx_v_bits); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2883, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_6};
    __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_n, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2883, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  __pyx_t_7 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_7 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2883, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Number))))) __PYX_ERR(0, 2883, __pyx_L1_error)
  __pyx_v_X = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Number *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2884
 * cdef RCP[const symengine.Number] sage_eval(PyObject* o1, long bits):
 *     cdef Number X = sympify((<object>o1).n(bits))
 *     return symengine.rcp_static_cast_Number(X.thisptr)             # <<<<<<<<<<<<<<
 * 
 * cdef rcp_const_basic sage_diff(PyObject* o1, rcp_const_basic symbol):
*/
  __pyx_r = SymEngine::rcp_static_cast<const SymEngine::Number>(__pyx_v_X->__pyx_base.__pyx_base.thisptr);
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2882
 *     return symengine.rcp_static_cast_Number(X.thisptr)
 * 
 * cdef RCP[const symengine.Number] sage_eval(PyObject* o1, long bits):             # <<<<<<<<<<<<<<
 *     cdef Number X = sympify((<object>o1).n(bits))
 *     return symengine.rcp_static_cast_Number(X.thisptr)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.sage_eval", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_pretend_to_initialize(&__pyx_r);
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_X);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2886
 *     return symengine.rcp_static_cast_Number(X.thisptr)
 * 
 * cdef rcp_const_basic sage_diff(PyObject* o1, rcp_const_basic symbol):             # <<<<<<<<<<<<<<
 *     cdef Basic X = sympify((<object>o1).diff(c2py(symbol)._sage_()))
 *     return X.thisptr
*/

static SymEngine::RCP<const SymEngine::Basic> __pyx_f_9symengine_3lib_17symengine_wrapper_sage_diff(PyObject *__pyx_v_o1, SymEngine::RCP<const SymEngine::Basic> __pyx_v_symbol) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_X = 0;
  SymEngine::RCP<const SymEngine::Basic> __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 = NULL;
  PyObject *__pyx_t_8 = NULL;
  size_t __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("sage_diff", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2887
 * 
 * cdef rcp_const_basic sage_diff(PyObject* o1, rcp_const_basic symbol):
 *     cdef Basic X = sympify((<object>o1).diff(c2py(symbol)._sage_()))             # <<<<<<<<<<<<<<
 *     return X.thisptr
 * 
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2887, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = ((PyObject *)__pyx_v_o1);
  __Pyx_INCREF(__pyx_t_5);
  __pyx_t_8 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(__pyx_v_symbol); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2887, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_7 = __pyx_t_8;
  __Pyx_INCREF(__pyx_t_7);
  __pyx_t_9 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL};
    __pyx_t_6 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_sage, __pyx_callargs+__pyx_t_9, (1-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2887, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
  }
  __pyx_t_9 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_6};
    __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_diff_2, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2887, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  __pyx_t_9 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_9 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2887, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 2887, __pyx_L1_error)
  __pyx_v_X = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2888
 * cdef rcp_const_basic sage_diff(PyObject* o1, rcp_const_basic symbol):
 *     cdef Basic X = sympify((<object>o1).diff(c2py(symbol)._sage_()))
 *     return X.thisptr             # <<<<<<<<<<<<<<
 * 
 * cdef rcp_const_basic sympy_diff(PyObject* o1, rcp_const_basic symbol):
*/
  __pyx_r = __pyx_v_X->thisptr;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2886
 *     return symengine.rcp_static_cast_Number(X.thisptr)
 * 
 * cdef rcp_const_basic sage_diff(PyObject* o1, rcp_const_basic symbol):             # <<<<<<<<<<<<<<
 *     cdef Basic X = sympify((<object>o1).diff(c2py(symbol)._sage_()))
 *     return X.thisptr
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.sage_diff", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_pretend_to_initialize(&__pyx_r);
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_X);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2890
 *     return X.thisptr
 * 
 * cdef rcp_const_basic sympy_diff(PyObject* o1, rcp_const_basic symbol):             # <<<<<<<<<<<<<<
 *     cdef Basic X = sympify((<object>o1).diff(c2py(symbol)._sympy_()))
 *     return X.thisptr
*/

static SymEngine::RCP<const SymEngine::Basic> __pyx_f_9symengine_3lib_17symengine_wrapper_sympy_diff(PyObject *__pyx_v_o1, SymEngine::RCP<const SymEngine::Basic> __pyx_v_symbol) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_X = 0;
  SymEngine::RCP<const SymEngine::Basic> __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 = NULL;
  PyObject *__pyx_t_8 = NULL;
  size_t __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("sympy_diff", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2891
 * 
 * cdef rcp_const_basic sympy_diff(PyObject* o1, rcp_const_basic symbol):
 *     cdef Basic X = sympify((<object>o1).diff(c2py(symbol)._sympy_()))             # <<<<<<<<<<<<<<
 *     return X.thisptr
 * 
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2891, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = ((PyObject *)__pyx_v_o1);
  __Pyx_INCREF(__pyx_t_5);
  __pyx_t_8 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(__pyx_v_symbol); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2891, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_7 = __pyx_t_8;
  __Pyx_INCREF(__pyx_t_7);
  __pyx_t_9 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL};
    __pyx_t_6 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_sympy_2, __pyx_callargs+__pyx_t_9, (1-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2891, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
  }
  __pyx_t_9 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_6};
    __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_diff_2, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2891, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  __pyx_t_9 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_9 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2891, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 2891, __pyx_L1_error)
  __pyx_v_X = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2892
 * cdef rcp_const_basic sympy_diff(PyObject* o1, rcp_const_basic symbol):
 *     cdef Basic X = sympify((<object>o1).diff(c2py(symbol)._sympy_()))
 *     return X.thisptr             # <<<<<<<<<<<<<<
 * 
 * def create_sympy_module():
*/
  __pyx_r = __pyx_v_X->thisptr;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2890
 *     return X.thisptr
 * 
 * cdef rcp_const_basic sympy_diff(PyObject* o1, rcp_const_basic symbol):             # <<<<<<<<<<<<<<
 *     cdef Basic X = sympify((<object>o1).diff(c2py(symbol)._sympy_()))
 *     return X.thisptr
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.sympy_diff", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_pretend_to_initialize(&__pyx_r);
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_X);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2894
 *     return X.thisptr
 * 
 * def create_sympy_module():             # <<<<<<<<<<<<<<
 *     cdef PyModule s = PyModule.__new__(PyModule)
 *     s.thisptr = symengine.make_rcp_PyModule(&symengine_to_sympy, &pynumber_to_symengine, &sympy_eval,
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_23create_sympy_module(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_23create_sympy_module = {"create_sympy_module", (PyCFunction)__pyx_pw_9symengine_3lib_17symengine_wrapper_23create_sympy_module, METH_NOARGS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_23create_sympy_module(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("create_sympy_module (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_22create_sympy_module(__pyx_self);

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_22create_sympy_module(CYTHON_UNUSED PyObject *__pyx_self) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_PyModule *__pyx_v_s = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  SymEngine::RCP<SymEngine::PyModule const >  __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_sympy_module", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2895
 * 
 * def create_sympy_module():
 *     cdef PyModule s = PyModule.__new__(PyModule)             # <<<<<<<<<<<<<<
 *     s.thisptr = symengine.make_rcp_PyModule(&symengine_to_sympy, &pynumber_to_symengine, &sympy_eval,
 *                                     &sympy_diff)
*/
  __pyx_t_1 = ((PyObject *)__pyx_tp_new_9symengine_3lib_17symengine_wrapper_PyModule(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_PyModule), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2895, __pyx_L1_error)
  __Pyx_GOTREF((PyObject *)__pyx_t_1);
  __pyx_v_s = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_PyModule *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2896
 * def create_sympy_module():
 *     cdef PyModule s = PyModule.__new__(PyModule)
 *     s.thisptr = symengine.make_rcp_PyModule(&symengine_to_sympy, &pynumber_to_symengine, &sympy_eval,             # <<<<<<<<<<<<<<
 *                                     &sympy_diff)
 *     return s
*/
  try {
    __pyx_t_2 = SymEngine::make_rcp<const SymEngine::PyModule>((&__pyx_f_9symengine_3lib_17symengine_wrapper_symengine_to_sympy), (&__pyx_f_9symengine_3lib_17symengine_wrapper_pynumber_to_symengine), (&__pyx_f_9symengine_3lib_17symengine_wrapper_sympy_eval), (&__pyx_f_9symengine_3lib_17symengine_wrapper_sympy_diff));
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 2896, __pyx_L1_error)
  }
  __pyx_v_s->thisptr = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_2);

  /* "symengine/lib/symengine_wrapper.pyx":2898
 *     s.thisptr = symengine.make_rcp_PyModule(&symengine_to_sympy, &pynumber_to_symengine, &sympy_eval,
 *                                     &sympy_diff)
 *     return s             # <<<<<<<<<<<<<<
 * 
 * def create_sage_module():
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_s);
  __pyx_r = ((PyObject *)__pyx_v_s);
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2894
 *     return X.thisptr
 * 
 * def create_sympy_module():             # <<<<<<<<<<<<<<
 *     cdef PyModule s = PyModule.__new__(PyModule)
 *     s.thisptr = symengine.make_rcp_PyModule(&symengine_to_sympy, &pynumber_to_symengine, &sympy_eval,
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.create_sympy_module", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_s);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2900
 *     return s
 * 
 * def create_sage_module():             # <<<<<<<<<<<<<<
 *     cdef PyModule s = PyModule.__new__(PyModule)
 *     s.thisptr = symengine.make_rcp_PyModule(&symengine_to_sage, &pynumber_to_symengine, &sage_eval,
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_25create_sage_module(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_25create_sage_module = {"create_sage_module", (PyCFunction)__pyx_pw_9symengine_3lib_17symengine_wrapper_25create_sage_module, METH_NOARGS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_25create_sage_module(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("create_sage_module (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_24create_sage_module(__pyx_self);

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_24create_sage_module(CYTHON_UNUSED PyObject *__pyx_self) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_PyModule *__pyx_v_s = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  SymEngine::RCP<SymEngine::PyModule const >  __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_sage_module", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2901
 * 
 * def create_sage_module():
 *     cdef PyModule s = PyModule.__new__(PyModule)             # <<<<<<<<<<<<<<
 *     s.thisptr = symengine.make_rcp_PyModule(&symengine_to_sage, &pynumber_to_symengine, &sage_eval,
 *                                     &sage_diff)
*/
  __pyx_t_1 = ((PyObject *)__pyx_tp_new_9symengine_3lib_17symengine_wrapper_PyModule(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_PyModule), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2901, __pyx_L1_error)
  __Pyx_GOTREF((PyObject *)__pyx_t_1);
  __pyx_v_s = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_PyModule *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2902
 * def create_sage_module():
 *     cdef PyModule s = PyModule.__new__(PyModule)
 *     s.thisptr = symengine.make_rcp_PyModule(&symengine_to_sage, &pynumber_to_symengine, &sage_eval,             # <<<<<<<<<<<<<<
 *                                     &sage_diff)
 *     return s
*/
  try {
    __pyx_t_2 = SymEngine::make_rcp<const SymEngine::PyModule>((&__pyx_f_9symengine_3lib_17symengine_wrapper_symengine_to_sage), (&__pyx_f_9symengine_3lib_17symengine_wrapper_pynumber_to_symengine), (&__pyx_f_9symengine_3lib_17symengine_wrapper_sage_eval), (&__pyx_f_9symengine_3lib_17symengine_wrapper_sage_diff));
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 2902, __pyx_L1_error)
  }
  __pyx_v_s->thisptr = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_2);

  /* "symengine/lib/symengine_wrapper.pyx":2904
 *     s.thisptr = symengine.make_rcp_PyModule(&symengine_to_sage, &pynumber_to_symengine, &sage_eval,
 *                                     &sage_diff)
 *     return s             # <<<<<<<<<<<<<<
 * 
 * sympy_module = create_sympy_module()
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_s);
  __pyx_r = ((PyObject *)__pyx_v_s);
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2900
 *     return s
 * 
 * def create_sage_module():             # <<<<<<<<<<<<<<
 *     cdef PyModule s = PyModule.__new__(PyModule)
 *     s.thisptr = symengine.make_rcp_PyModule(&symengine_to_sage, &pynumber_to_symengine, &sage_eval,
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.create_sage_module", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_s);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2910
 * 
 * cdef class PyNumber(Number):
 *     def __cinit__(self, obj = None, PyModule module = None):             # <<<<<<<<<<<<<<
 *         if obj is None:
 *             return
*/

/* Python wrapper */
static int __pyx_pw_9symengine_3lib_17symengine_wrapper_8PyNumber_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_9symengine_3lib_17symengine_wrapper_8PyNumber_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_obj = 0;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_PyModule *__pyx_v_module = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_obj,&__pyx_mstate_global->__pyx_n_u_module,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2910, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2910, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2910, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__cinit__", 0) < (0)) __PYX_ERR(0, 2910, __pyx_L3_error)
      if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
      if (!values[1]) values[1] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_PyModule *)Py_None));
    } else {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2910, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2910, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
      if (!values[1]) values[1] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_PyModule *)Py_None));
    }
    __pyx_v_obj = values[0];
    __pyx_v_module = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_PyModule *)values[1]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 2, __pyx_nargs); __PYX_ERR(0, 2910, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.PyNumber.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_module), __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_PyModule, 1, "module", 0))) __PYX_ERR(0, 2910, __pyx_L1_error)
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_8PyNumber___cinit__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_PyNumber *)__pyx_v_self), __pyx_v_obj, __pyx_v_module);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_9symengine_3lib_17symengine_wrapper_8PyNumber___cinit__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_PyNumber *__pyx_v_self, PyObject *__pyx_v_obj, struct __pyx_obj_9symengine_3lib_17symengine_wrapper_PyModule *__pyx_v_module) {
  int __pyx_r;
  int __pyx_t_1;

  /* "symengine/lib/symengine_wrapper.pyx":2911
 * cdef class PyNumber(Number):
 *     def __cinit__(self, obj = None, PyModule module = None):
 *         if obj is None:             # <<<<<<<<<<<<<<
 *             return
 *         Py_XINCREF(<PyObject*>(obj))
*/
  __pyx_t_1 = (__pyx_v_obj == Py_None);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":2912
 *     def __cinit__(self, obj = None, PyModule module = None):
 *         if obj is None:
 *             return             # <<<<<<<<<<<<<<
 *         Py_XINCREF(<PyObject*>(obj))
 *         self.thisptr = symengine.make_rcp_PyNumber(<PyObject*>(obj), module.thisptr)
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":2911
 * cdef class PyNumber(Number):
 *     def __cinit__(self, obj = None, PyModule module = None):
 *         if obj is None:             # <<<<<<<<<<<<<<
 *             return
 *         Py_XINCREF(<PyObject*>(obj))
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":2913
 *         if obj is None:
 *             return
 *         Py_XINCREF(<PyObject*>(obj))             # <<<<<<<<<<<<<<
 *         self.thisptr = symengine.make_rcp_PyNumber(<PyObject*>(obj), module.thisptr)
 * 
*/
  Py_XINCREF(((PyObject *)__pyx_v_obj));

  /* "symengine/lib/symengine_wrapper.pyx":2914
 *             return
 *         Py_XINCREF(<PyObject*>(obj))
 *         self.thisptr = symengine.make_rcp_PyNumber(<PyObject*>(obj), module.thisptr)             # <<<<<<<<<<<<<<
 * 
 *     def _sympy_(self):
*/
  __pyx_v_self->__pyx_base.__pyx_base.__pyx_base.thisptr = SymEngine::make_rcp<const SymEngine::PyNumber>(((PyObject *)__pyx_v_obj), __pyx_v_module->thisptr);

  /* "symengine/lib/symengine_wrapper.pyx":2910
 * 
 * cdef class PyNumber(Number):
 *     def __cinit__(self, obj = None, PyModule module = None):             # <<<<<<<<<<<<<<
 *         if obj is None:
 *             return
*/

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

/* "symengine/lib/symengine_wrapper.pyx":2916
 *         self.thisptr = symengine.make_rcp_PyNumber(<PyObject*>(obj), module.thisptr)
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.sympify(self.pyobject())
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8PyNumber_3_sympy_(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_8PyNumber_3_sympy_ = {"_sympy_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_8PyNumber_3_sympy_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8PyNumber_3_sympy_(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sympy_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("_sympy_", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_8PyNumber_2_sympy_(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_PyNumber *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8PyNumber_2_sympy_(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_PyNumber *__pyx_v_self) {
  PyObject *__pyx_v_sympy = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sympy_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2917
 * 
 *     def _sympy_(self):
 *         import sympy             # <<<<<<<<<<<<<<
 *         return sympy.sympify(self.pyobject())
 * 
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sympy, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2917, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sympy = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2918
 *     def _sympy_(self):
 *         import sympy
 *         return sympy.sympify(self.pyobject())             # <<<<<<<<<<<<<<
 * 
 *     def _sage_(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __pyx_v_sympy;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_5 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_5);
  __pyx_t_6 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
    __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_pyobject, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2918, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  __pyx_t_6 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_sympify, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2918, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2916
 *         self.thisptr = symengine.make_rcp_PyNumber(<PyObject*>(obj), module.thisptr)
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.sympify(self.pyobject())
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.PyNumber._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sympy);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2920
 *         return sympy.sympify(self.pyobject())
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         import sage.all as sage
 *         res = self.pyobject()
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8PyNumber_5_sage_(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_8PyNumber_5_sage_ = {"_sage_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_8PyNumber_5_sage_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8PyNumber_5_sage_(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sage_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("_sage_", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("_sage_", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_8PyNumber_4_sage_(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_PyNumber *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8PyNumber_4_sage_(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_PyNumber *__pyx_v_self) {
  CYTHON_UNUSED PyObject *__pyx_v_sage = NULL;
  PyObject *__pyx_v_res = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sage_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2921
 * 
 *     def _sage_(self):
 *         import sage.all as sage             # <<<<<<<<<<<<<<
 *         res = self.pyobject()
 *         if hasattr(res, '_sage_'):
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sage_all, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2921, __pyx_L1_error)
  __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_all);
  Py_DECREF(__pyx_t_2);
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2921, __pyx_L1_error)
  __pyx_t_2 = __pyx_t_3;
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sage = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2922
 *     def _sage_(self):
 *         import sage.all as sage
 *         res = self.pyobject()             # <<<<<<<<<<<<<<
 *         if hasattr(res, '_sage_'):
 *             return res._sage_()
*/
  __pyx_t_4 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_pyobject, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2922, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_res = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2923
 *         import sage.all as sage
 *         res = self.pyobject()
 *         if hasattr(res, '_sage_'):             # <<<<<<<<<<<<<<
 *             return res._sage_()
 *         return res
*/
  __pyx_t_6 = __Pyx_HasAttr(__pyx_v_res, __pyx_mstate_global->__pyx_n_u_sage); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 2923, __pyx_L1_error)
  if (__pyx_t_6) {

    /* "symengine/lib/symengine_wrapper.pyx":2924
 *         res = self.pyobject()
 *         if hasattr(res, '_sage_'):
 *             return res._sage_()             # <<<<<<<<<<<<<<
 *         return res
 * 
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __pyx_v_res;
    __Pyx_INCREF(__pyx_t_4);
    __pyx_t_5 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
      __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_sage, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2924, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":2923
 *         import sage.all as sage
 *         res = self.pyobject()
 *         if hasattr(res, '_sage_'):             # <<<<<<<<<<<<<<
 *             return res._sage_()
 *         return res
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":2925
 *         if hasattr(res, '_sage_'):
 *             return res._sage_()
 *         return res             # <<<<<<<<<<<<<<
 * 
 *     def pyobject(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_res);
  __pyx_r = __pyx_v_res;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2920
 *         return sympy.sympify(self.pyobject())
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         import sage.all as sage
 *         res = self.pyobject()
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.PyNumber._sage_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sage);
  __Pyx_XDECREF(__pyx_v_res);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2927
 *         return res
 * 
 *     def pyobject(self):             # <<<<<<<<<<<<<<
 *         return <object>deref(symengine.rcp_static_cast_PyNumber(self.thisptr)).get_py_object()
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8PyNumber_7pyobject(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_8PyNumber_7pyobject = {"pyobject", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_8PyNumber_7pyobject, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8PyNumber_7pyobject(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("pyobject (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("pyobject", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("pyobject", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_8PyNumber_6pyobject(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_PyNumber *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8PyNumber_6pyobject(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_PyNumber *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1;
  __Pyx_RefNannySetupContext("pyobject", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2928
 * 
 *     def pyobject(self):
 *         return <object>deref(symengine.rcp_static_cast_PyNumber(self.thisptr)).get_py_object()             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = (*SymEngine::rcp_static_cast<const SymEngine::PyNumber>(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.thisptr)).get_py_object();
  __Pyx_INCREF(((PyObject *)__pyx_t_1));
  __pyx_r = ((PyObject *)__pyx_t_1);
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2927
 *         return res
 * 
 *     def pyobject(self):             # <<<<<<<<<<<<<<
 *         return <object>deref(symengine.rcp_static_cast_PyNumber(self.thisptr)).get_py_object()
 * 
*/

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

/* "symengine/lib/symengine_wrapper.pyx":2933
 * class PyFunction(FunctionSymbol):
 * 
 *     def __init__(Basic self, pyfunction = None, args = None, pyfunction_class=None, module=None):             # <<<<<<<<<<<<<<
 *         if pyfunction is None:
 *             return
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10PyFunction_1__init__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_10PyFunction_1__init__ = {"__init__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_10PyFunction_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10PyFunction_1__init__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self = 0;
  PyObject *__pyx_v_pyfunction = 0;
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_v_pyfunction_class = 0;
  PyObject *__pyx_v_module = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[5] = {0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_pyfunction,&__pyx_mstate_global->__pyx_n_u_args,&__pyx_mstate_global->__pyx_n_u_pyfunction_class,&__pyx_mstate_global->__pyx_n_u_module,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2933, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 2933, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 2933, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2933, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2933, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2933, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 2933, __pyx_L3_error)
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));
      if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)Py_None));
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 5, i); __PYX_ERR(0, 2933, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 2933, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 2933, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2933, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2933, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2933, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));
      if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_self = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)values[0]);
    __pyx_v_pyfunction = values[1];
    __pyx_v_args = values[2];
    __pyx_v_pyfunction_class = values[3];
    __pyx_v_module = values[4];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 5, __pyx_nargs); __PYX_ERR(0, 2933, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.PyFunction.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic, 1, "self", 0))) __PYX_ERR(0, 2933, __pyx_L1_error)
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_10PyFunction___init__(__pyx_self, __pyx_v_self, __pyx_v_pyfunction, __pyx_v_args, __pyx_v_pyfunction_class, __pyx_v_module);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10PyFunction___init__(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self, PyObject *__pyx_v_pyfunction, PyObject *__pyx_v_args, PyObject *__pyx_v_pyfunction_class, PyObject *__pyx_v_module) {
  SymEngine::vec_basic __pyx_v_v;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_PyFunctionClass *__pyx_v__pyfunction_class = 0;
  PyObject *__pyx_v__pyfunction;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  SymEngine::vec_basic __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2934
 * 
 *     def __init__(Basic self, pyfunction = None, args = None, pyfunction_class=None, module=None):
 *         if pyfunction is None:             # <<<<<<<<<<<<<<
 *             return
 *         cdef symengine.vec_basic v = iter_to_vec_basic(args)
*/
  __pyx_t_1 = (__pyx_v_pyfunction == Py_None);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":2935
 *     def __init__(Basic self, pyfunction = None, args = None, pyfunction_class=None, module=None):
 *         if pyfunction is None:
 *             return             # <<<<<<<<<<<<<<
 *         cdef symengine.vec_basic v = iter_to_vec_basic(args)
 *         cdef PyFunctionClass _pyfunction_class = get_function_class(pyfunction_class, module)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":2934
 * 
 *     def __init__(Basic self, pyfunction = None, args = None, pyfunction_class=None, module=None):
 *         if pyfunction is None:             # <<<<<<<<<<<<<<
 *             return
 *         cdef symengine.vec_basic v = iter_to_vec_basic(args)
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":2936
 *         if pyfunction is None:
 *             return
 *         cdef symengine.vec_basic v = iter_to_vec_basic(args)             # <<<<<<<<<<<<<<
 *         cdef PyFunctionClass _pyfunction_class = get_function_class(pyfunction_class, module)
 *         cdef PyObject* _pyfunction = <PyObject*>pyfunction
*/
  __pyx_t_2 = __pyx_f_9symengine_3lib_17symengine_wrapper_iter_to_vec_basic(__pyx_v_args); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2936, __pyx_L1_error)
  __pyx_v_v = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_2);

  /* "symengine/lib/symengine_wrapper.pyx":2937
 *             return
 *         cdef symengine.vec_basic v = iter_to_vec_basic(args)
 *         cdef PyFunctionClass _pyfunction_class = get_function_class(pyfunction_class, module)             # <<<<<<<<<<<<<<
 *         cdef PyObject* _pyfunction = <PyObject*>pyfunction
 *         Py_XINCREF(_pyfunction)
*/
  __pyx_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_get_function_class); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2937, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_v_pyfunction_class, __pyx_v_module};
    __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2937, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_PyFunctionClass))))) __PYX_ERR(0, 2937, __pyx_L1_error)
  __pyx_v__pyfunction_class = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_PyFunctionClass *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2938
 *         cdef symengine.vec_basic v = iter_to_vec_basic(args)
 *         cdef PyFunctionClass _pyfunction_class = get_function_class(pyfunction_class, module)
 *         cdef PyObject* _pyfunction = <PyObject*>pyfunction             # <<<<<<<<<<<<<<
 *         Py_XINCREF(_pyfunction)
 *         self.thisptr = symengine.make_rcp_PyFunction(v, _pyfunction_class.thisptr, _pyfunction)
*/
  __pyx_v__pyfunction = ((PyObject *)__pyx_v_pyfunction);

  /* "symengine/lib/symengine_wrapper.pyx":2939
 *         cdef PyFunctionClass _pyfunction_class = get_function_class(pyfunction_class, module)
 *         cdef PyObject* _pyfunction = <PyObject*>pyfunction
 *         Py_XINCREF(_pyfunction)             # <<<<<<<<<<<<<<
 *         self.thisptr = symengine.make_rcp_PyFunction(v, _pyfunction_class.thisptr, _pyfunction)
 * 
*/
  Py_XINCREF(__pyx_v__pyfunction);

  /* "symengine/lib/symengine_wrapper.pyx":2940
 *         cdef PyObject* _pyfunction = <PyObject*>pyfunction
 *         Py_XINCREF(_pyfunction)
 *         self.thisptr = symengine.make_rcp_PyFunction(v, _pyfunction_class.thisptr, _pyfunction)             # <<<<<<<<<<<<<<
 * 
 *     def _sympy_(self):
*/
  __pyx_v_self->thisptr = SymEngine::make_rcp<const SymEngine::PyFunction>(__pyx_v_v, __pyx_v__pyfunction_class->thisptr, __pyx_v__pyfunction);

  /* "symengine/lib/symengine_wrapper.pyx":2933
 * class PyFunction(FunctionSymbol):
 * 
 *     def __init__(Basic self, pyfunction = None, args = None, pyfunction_class=None, module=None):             # <<<<<<<<<<<<<<
 *         if pyfunction is None:
 *             return
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.PyFunction.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v__pyfunction_class);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2942
 *         self.thisptr = symengine.make_rcp_PyFunction(v, _pyfunction_class.thisptr, _pyfunction)
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.sympify(self.pyobject())
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10PyFunction_3_sympy_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_10PyFunction_3_sympy_ = {"_sympy_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_10PyFunction_3_sympy_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10PyFunction_3_sympy_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sympy_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2942, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2942, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_sympy_", 0) < (0)) __PYX_ERR(0, 2942, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 1, 1, i); __PYX_ERR(0, 2942, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2942, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2942, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.PyFunction._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_10PyFunction_2_sympy_(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10PyFunction_2_sympy_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_sympy = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sympy_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2943
 * 
 *     def _sympy_(self):
 *         import sympy             # <<<<<<<<<<<<<<
 *         return sympy.sympify(self.pyobject())
 * 
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sympy, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2943, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sympy = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2944
 *     def _sympy_(self):
 *         import sympy
 *         return sympy.sympify(self.pyobject())             # <<<<<<<<<<<<<<
 * 
 *     def _sage_(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __pyx_v_sympy;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_5 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_5);
  __pyx_t_6 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
    __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_pyobject, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2944, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  __pyx_t_6 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_sympify, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2944, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2942
 *         self.thisptr = symengine.make_rcp_PyFunction(v, _pyfunction_class.thisptr, _pyfunction)
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.sympify(self.pyobject())
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.PyFunction._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sympy);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2946
 *         return sympy.sympify(self.pyobject())
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         import sage.all as sage
 *         return sage.SR(self.pyobject())
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10PyFunction_5_sage_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_10PyFunction_5_sage_ = {"_sage_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_10PyFunction_5_sage_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10PyFunction_5_sage_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sage_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2946, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2946, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_sage_", 0) < (0)) __PYX_ERR(0, 2946, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_sage_", 1, 1, 1, i); __PYX_ERR(0, 2946, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2946, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_sage_", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2946, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.PyFunction._sage_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_10PyFunction_4_sage_(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10PyFunction_4_sage_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_sage = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  size_t __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sage_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2947
 * 
 *     def _sage_(self):
 *         import sage.all as sage             # <<<<<<<<<<<<<<
 *         return sage.SR(self.pyobject())
 * 
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sage_all, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2947, __pyx_L1_error)
  __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_all);
  Py_DECREF(__pyx_t_2);
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2947, __pyx_L1_error)
  __pyx_t_2 = __pyx_t_3;
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sage = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2948
 *     def _sage_(self):
 *         import sage.all as sage
 *         return sage.SR(self.pyobject())             # <<<<<<<<<<<<<<
 * 
 *     def pyobject(Basic self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = __pyx_v_sage;
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_6 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_6);
  __pyx_t_7 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
    __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_pyobject, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2948, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
  }
  __pyx_t_7 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_5};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_SR, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2948, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2946
 *         return sympy.sympify(self.pyobject())
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         import sage.all as sage
 *         return sage.SR(self.pyobject())
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.PyFunction._sage_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sage);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2950
 *         return sage.SR(self.pyobject())
 * 
 *     def pyobject(Basic self):             # <<<<<<<<<<<<<<
 *         return <object>deref(symengine.rcp_static_cast_PyFunction(self.thisptr)).get_py_object()
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10PyFunction_7pyobject(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_10PyFunction_7pyobject = {"pyobject", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_10PyFunction_7pyobject, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10PyFunction_7pyobject(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("pyobject (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2950, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2950, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "pyobject", 0) < (0)) __PYX_ERR(0, 2950, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("pyobject", 1, 1, 1, i); __PYX_ERR(0, 2950, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2950, __pyx_L3_error)
    }
    __pyx_v_self = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("pyobject", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2950, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.PyFunction.pyobject", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic, 1, "self", 0))) __PYX_ERR(0, 2950, __pyx_L1_error)
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_10PyFunction_6pyobject(__pyx_self, __pyx_v_self);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10PyFunction_6pyobject(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1;
  __Pyx_RefNannySetupContext("pyobject", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2951
 * 
 *     def pyobject(Basic self):
 *         return <object>deref(symengine.rcp_static_cast_PyFunction(self.thisptr)).get_py_object()             # <<<<<<<<<<<<<<
 * 
 * cdef class PyFunctionClass(object):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = (*SymEngine::rcp_static_cast<const SymEngine::PyFunction>(__pyx_v_self->thisptr)).get_py_object();
  __Pyx_INCREF(((PyObject *)__pyx_t_1));
  __pyx_r = ((PyObject *)__pyx_t_1);
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2950
 *         return sage.SR(self.pyobject())
 * 
 *     def pyobject(Basic self):             # <<<<<<<<<<<<<<
 *         return <object>deref(symengine.rcp_static_cast_PyFunction(self.thisptr)).get_py_object()
 * 
*/

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

/* "symengine/lib/symengine_wrapper.pyx":2955
 * cdef class PyFunctionClass(object):
 * 
 *     def __cinit__(self, function, PyModule module not None):             # <<<<<<<<<<<<<<
 *         self.thisptr = symengine.make_rcp_PyFunctionClass(<PyObject*>(function), str(function).encode("utf-8"),
 *                                 module.thisptr)
*/

/* Python wrapper */
static int __pyx_pw_9symengine_3lib_17symengine_wrapper_15PyFunctionClass_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_9symengine_3lib_17symengine_wrapper_15PyFunctionClass_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_function = 0;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_PyModule *__pyx_v_module = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_function,&__pyx_mstate_global->__pyx_n_u_module,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2955, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2955, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2955, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__cinit__", 0) < (0)) __PYX_ERR(0, 2955, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, i); __PYX_ERR(0, 2955, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2955, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2955, __pyx_L3_error)
    }
    __pyx_v_function = values[0];
    __pyx_v_module = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_PyModule *)values[1]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 2955, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.PyFunctionClass.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_module), __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_PyModule, 0, "module", 0))) __PYX_ERR(0, 2955, __pyx_L1_error)
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15PyFunctionClass___cinit__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_PyFunctionClass *)__pyx_v_self), __pyx_v_function, __pyx_v_module);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_9symengine_3lib_17symengine_wrapper_15PyFunctionClass___cinit__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_PyFunctionClass *__pyx_v_self, PyObject *__pyx_v_function, struct __pyx_obj_9symengine_3lib_17symengine_wrapper_PyModule *__pyx_v_module) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  std::string __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2956
 * 
 *     def __cinit__(self, function, PyModule module not None):
 *         self.thisptr = symengine.make_rcp_PyFunctionClass(<PyObject*>(function), str(function).encode("utf-8"),             # <<<<<<<<<<<<<<
 *                                 module.thisptr)
 * 
*/
  __pyx_t_1 = __Pyx_PyObject_Unicode(__pyx_v_function); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2956, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyUnicode_AsUTF8String(((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2956, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __pyx_convert_string_from_py_6libcpp_6string_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2956, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2957
 *     def __cinit__(self, function, PyModule module not None):
 *         self.thisptr = symengine.make_rcp_PyFunctionClass(<PyObject*>(function), str(function).encode("utf-8"),
 *                                 module.thisptr)             # <<<<<<<<<<<<<<
 * 
 * # TODO: remove this once SymEngine conversions are available in Sage.
*/
  __pyx_v_self->thisptr = SymEngine::make_rcp<const SymEngine::PyFunctionClass>(((PyObject *)__pyx_v_function), __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_3), __pyx_v_module->thisptr);

  /* "symengine/lib/symengine_wrapper.pyx":2955
 * cdef class PyFunctionClass(object):
 * 
 *     def __cinit__(self, function, PyModule module not None):             # <<<<<<<<<<<<<<
 *         self.thisptr = symengine.make_rcp_PyFunctionClass(<PyObject*>(function), str(function).encode("utf-8"),
 *                                 module.thisptr)
*/

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.PyFunctionClass.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15PyFunctionClass_3__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_15PyFunctionClass_3__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15PyFunctionClass_3__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15PyFunctionClass_3__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15PyFunctionClass_2__reduce_cython__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_PyFunctionClass *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15PyFunctionClass_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_PyFunctionClass *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.PyFunctionClass.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15PyFunctionClass_5__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_15PyFunctionClass_5__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15PyFunctionClass_5__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15PyFunctionClass_5__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(1, 3, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 3, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 3, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3, __pyx_L3_error)
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.PyFunctionClass.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15PyFunctionClass_4__setstate_cython__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_PyFunctionClass *)__pyx_v_self), __pyx_v___pyx_state);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15PyFunctionClass_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_PyFunctionClass *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.PyFunctionClass.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2960
 * 
 * # TODO: remove this once SymEngine conversions are available in Sage.
 * def wrap_sage_function(func):             # <<<<<<<<<<<<<<
 *     return PyFunction(func, func.operands(), func.operator(), sage_module)
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_27wrap_sage_function(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_27wrap_sage_function = {"wrap_sage_function", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_27wrap_sage_function, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_27wrap_sage_function(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_func = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("wrap_sage_function (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_func,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2960, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2960, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "wrap_sage_function", 0) < (0)) __PYX_ERR(0, 2960, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("wrap_sage_function", 1, 1, 1, i); __PYX_ERR(0, 2960, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2960, __pyx_L3_error)
    }
    __pyx_v_func = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("wrap_sage_function", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2960, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.wrap_sage_function", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_26wrap_sage_function(__pyx_self, __pyx_v_func);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_26wrap_sage_function(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_func) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("wrap_sage_function", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2961
 * # TODO: remove this once SymEngine conversions are available in Sage.
 * def wrap_sage_function(func):
 *     return PyFunction(func, func.operands(), func.operator(), sage_module)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_PyFunction); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2961, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __pyx_v_func;
  __Pyx_INCREF(__pyx_t_5);
  __pyx_t_6 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
    __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_operands, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2961, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  __pyx_t_7 = __pyx_v_func;
  __Pyx_INCREF(__pyx_t_7);
  __pyx_t_6 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL};
    __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_operator, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2961, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
  }
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_sage_module); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2961, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_2, __pyx_v_func, __pyx_t_4, __pyx_t_5, __pyx_t_7};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_6, (5-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2961, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2960
 * 
 * # TODO: remove this once SymEngine conversions are available in Sage.
 * def wrap_sage_function(func):             # <<<<<<<<<<<<<<
 *     return PyFunction(func, func.operands(), func.operator(), sage_module)
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.wrap_sage_function", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2966
 * class Max(Function):
 * 
 *     def __new__(cls, *args):             # <<<<<<<<<<<<<<
 *         return _max(*args)
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3Max_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_3Max_1__new__ = {"__new__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_3Max_1__new__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3Max_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_args = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  __pyx_v_args = __Pyx_ArgsSlice_FASTCALL(__pyx_args, 1, __pyx_nargs);
  if (unlikely(!__pyx_v_args)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_v_args);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2966, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        default:
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2966, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      const Py_ssize_t used_pos_args = (kwd_pos_args < 1) ? kwd_pos_args : 1;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, used_pos_args, __pyx_kwds_len, "__new__", 0) < (0)) __PYX_ERR(0, 2966, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__new__", 0, 1, 1, i); __PYX_ERR(0, 2966, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs < 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2966, __pyx_L3_error)
    }
    __pyx_v_cls = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 0, 1, 1, __pyx_nargs); __PYX_ERR(0, 2966, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Max.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_3Max___new__(__pyx_self, __pyx_v_cls, __pyx_v_args);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_args);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3Max___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_args) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__new__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2967
 * 
 *     def __new__(cls, *args):
 *         return _max(*args)             # <<<<<<<<<<<<<<
 * 
 *     def _sympy_(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_max); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2967, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2967, __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;

  /* "symengine/lib/symengine_wrapper.pyx":2966
 * class Max(Function):
 * 
 *     def __new__(cls, *args):             # <<<<<<<<<<<<<<
 *         return _max(*args)
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Max.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2969
 *         return _max(*args)
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         s = self.args_as_sympy()
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3Max_3_sympy_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_3Max_3_sympy_ = {"_sympy_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_3Max_3_sympy_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3Max_3_sympy_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sympy_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2969, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2969, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_sympy_", 0) < (0)) __PYX_ERR(0, 2969, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 1, 1, i); __PYX_ERR(0, 2969, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2969, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2969, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Max._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_3Max_2_sympy_(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3Max_2_sympy_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_sympy = 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;
  size_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sympy_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2970
 * 
 *     def _sympy_(self):
 *         import sympy             # <<<<<<<<<<<<<<
 *         s = self.args_as_sympy()
 *         return sympy.Max(*s)
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sympy, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2970, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sympy = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2971
 *     def _sympy_(self):
 *         import sympy
 *         s = self.args_as_sympy()             # <<<<<<<<<<<<<<
 *         return sympy.Max(*s)
 * 
*/
  __pyx_t_3 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_args_as_sympy, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2971, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_s = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2972
 *         import sympy
 *         s = self.args_as_sympy()
 *         return sympy.Max(*s)             # <<<<<<<<<<<<<<
 * 
 *     def _sage_(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_Max); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2972, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PySequence_Tuple(__pyx_v_s); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2972, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2972, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2969
 *         return _max(*args)
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         s = self.args_as_sympy()
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Max._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sympy);
  __Pyx_XDECREF(__pyx_v_s);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2974
 *         return sympy.Max(*s)
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         import sage.all as sage
 *         s = self.args_as_sage()
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3Max_5_sage_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_3Max_5_sage_ = {"_sage_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_3Max_5_sage_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3Max_5_sage_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sage_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2974, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2974, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_sage_", 0) < (0)) __PYX_ERR(0, 2974, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_sage_", 1, 1, 1, i); __PYX_ERR(0, 2974, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2974, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_sage_", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2974, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Max._sage_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_3Max_4_sage_(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3Max_4_sage_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_sage = 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;
  size_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sage_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2975
 * 
 *     def _sage_(self):
 *         import sage.all as sage             # <<<<<<<<<<<<<<
 *         s = self.args_as_sage()
 *         return sage.max(*s)
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sage_all, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2975, __pyx_L1_error)
  __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_all);
  Py_DECREF(__pyx_t_2);
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2975, __pyx_L1_error)
  __pyx_t_2 = __pyx_t_3;
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sage = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2976
 *     def _sage_(self):
 *         import sage.all as sage
 *         s = self.args_as_sage()             # <<<<<<<<<<<<<<
 *         return sage.max(*s)
 * 
*/
  __pyx_t_4 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_args_as_sage, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2976, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_s = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2977
 *         import sage.all as sage
 *         s = self.args_as_sage()
 *         return sage.max(*s)             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sage, __pyx_mstate_global->__pyx_n_u_max_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2977, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_v_s); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2977, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2977, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_6;
  __pyx_t_6 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2974
 *         return sympy.Max(*s)
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         import sage.all as sage
 *         s = self.args_as_sage()
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Max._sage_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sage);
  __Pyx_XDECREF(__pyx_v_s);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2979
 *         return sage.max(*s)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def func(self):
 *         return self.__class__
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3Max_7func(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_3Max_7func = {"func", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_3Max_7func, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3Max_7func(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("func (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2979, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2979, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "func", 0) < (0)) __PYX_ERR(0, 2979, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("func", 1, 1, 1, i); __PYX_ERR(0, 2979, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2979, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("func", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2979, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Max.func", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_3Max_6func(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3Max_6func(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("func", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2981
 *     @property
 *     def func(self):
 *         return self.__class__             # <<<<<<<<<<<<<<
 * 
 * class Min(Function):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2981, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2979
 *         return sage.max(*s)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def func(self):
 *         return self.__class__
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Max.func", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2985
 * class Min(Function):
 * 
 *     def __new__(cls, *args):             # <<<<<<<<<<<<<<
 *         return _min(*args)
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3Min_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_3Min_1__new__ = {"__new__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_3Min_1__new__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3Min_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_args = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  __pyx_v_args = __Pyx_ArgsSlice_FASTCALL(__pyx_args, 1, __pyx_nargs);
  if (unlikely(!__pyx_v_args)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_v_args);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2985, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        default:
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2985, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      const Py_ssize_t used_pos_args = (kwd_pos_args < 1) ? kwd_pos_args : 1;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, used_pos_args, __pyx_kwds_len, "__new__", 0) < (0)) __PYX_ERR(0, 2985, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__new__", 0, 1, 1, i); __PYX_ERR(0, 2985, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs < 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2985, __pyx_L3_error)
    }
    __pyx_v_cls = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 0, 1, 1, __pyx_nargs); __PYX_ERR(0, 2985, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Min.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_3Min___new__(__pyx_self, __pyx_v_cls, __pyx_v_args);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_args);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3Min___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_args) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__new__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2986
 * 
 *     def __new__(cls, *args):
 *         return _min(*args)             # <<<<<<<<<<<<<<
 * 
 *     def _sympy_(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_min); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2986, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2986, __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;

  /* "symengine/lib/symengine_wrapper.pyx":2985
 * class Min(Function):
 * 
 *     def __new__(cls, *args):             # <<<<<<<<<<<<<<
 *         return _min(*args)
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Min.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2988
 *         return _min(*args)
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         s = self.args_as_sympy()
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3Min_3_sympy_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_3Min_3_sympy_ = {"_sympy_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_3Min_3_sympy_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3Min_3_sympy_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sympy_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2988, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2988, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_sympy_", 0) < (0)) __PYX_ERR(0, 2988, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 1, 1, i); __PYX_ERR(0, 2988, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2988, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2988, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Min._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_3Min_2_sympy_(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3Min_2_sympy_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_sympy = 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;
  size_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sympy_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2989
 * 
 *     def _sympy_(self):
 *         import sympy             # <<<<<<<<<<<<<<
 *         s = self.args_as_sympy()
 *         return sympy.Min(*s)
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sympy, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2989, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sympy = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2990
 *     def _sympy_(self):
 *         import sympy
 *         s = self.args_as_sympy()             # <<<<<<<<<<<<<<
 *         return sympy.Min(*s)
 * 
*/
  __pyx_t_3 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_args_as_sympy, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2990, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_s = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2991
 *         import sympy
 *         s = self.args_as_sympy()
 *         return sympy.Min(*s)             # <<<<<<<<<<<<<<
 * 
 *     def _sage_(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_Min); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2991, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PySequence_Tuple(__pyx_v_s); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2991, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2991, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2988
 *         return _min(*args)
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         s = self.args_as_sympy()
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Min._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sympy);
  __Pyx_XDECREF(__pyx_v_s);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2993
 *         return sympy.Min(*s)
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         import sage.all as sage
 *         s = self.args_as_sage()
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3Min_5_sage_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_3Min_5_sage_ = {"_sage_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_3Min_5_sage_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3Min_5_sage_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sage_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2993, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2993, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_sage_", 0) < (0)) __PYX_ERR(0, 2993, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_sage_", 1, 1, 1, i); __PYX_ERR(0, 2993, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2993, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_sage_", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2993, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Min._sage_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_3Min_4_sage_(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3Min_4_sage_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_sage = 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;
  size_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sage_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":2994
 * 
 *     def _sage_(self):
 *         import sage.all as sage             # <<<<<<<<<<<<<<
 *         s = self.args_as_sage()
 *         return sage.min(*s)
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sage_all, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2994, __pyx_L1_error)
  __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_all);
  Py_DECREF(__pyx_t_2);
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2994, __pyx_L1_error)
  __pyx_t_2 = __pyx_t_3;
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sage = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2995
 *     def _sage_(self):
 *         import sage.all as sage
 *         s = self.args_as_sage()             # <<<<<<<<<<<<<<
 *         return sage.min(*s)
 * 
*/
  __pyx_t_4 = __pyx_v_self;
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_args_as_sage, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2995, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_s = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2996
 *         import sage.all as sage
 *         s = self.args_as_sage()
 *         return sage.min(*s)             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sage, __pyx_mstate_global->__pyx_n_u_min_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2996, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_v_s); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2996, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2996, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_6;
  __pyx_t_6 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2993
 *         return sympy.Min(*s)
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         import sage.all as sage
 *         s = self.args_as_sage()
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Min._sage_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sage);
  __Pyx_XDECREF(__pyx_v_s);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":2998
 *         return sage.min(*s)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def func(self):
 *         return self.__class__
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3Min_7func(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_3Min_7func = {"func", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_3Min_7func, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3Min_7func(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("func (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 2998, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2998, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "func", 0) < (0)) __PYX_ERR(0, 2998, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("func", 1, 1, 1, i); __PYX_ERR(0, 2998, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2998, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("func", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2998, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Min.func", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_3Min_6func(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3Min_6func(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("func", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3000
 *     @property
 *     def func(self):
 *         return self.__class__             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3000, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":2998
 *         return sage.min(*s)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def func(self):
 *         return self.__class__
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Min.func", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3005
 * class Derivative(Expr):
 * 
 *     def __new__(self, expr, *variables):             # <<<<<<<<<<<<<<
 *         if len(variables) == 1 and is_sequence(variables[0]):
 *             return diff(expr, *variables[0])
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10Derivative_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_10Derivative_1__new__ = {"__new__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_10Derivative_1__new__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10Derivative_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_expr = 0;
  PyObject *__pyx_v_variables = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  __pyx_v_variables = __Pyx_ArgsSlice_FASTCALL(__pyx_args, 2, __pyx_nargs);
  if (unlikely(!__pyx_v_variables)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_v_variables);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_expr,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 3005, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        default:
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3005, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3005, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      const Py_ssize_t used_pos_args = (kwd_pos_args < 2) ? kwd_pos_args : 2;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, used_pos_args, __pyx_kwds_len, "__new__", 0) < (0)) __PYX_ERR(0, 3005, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__new__", 0, 2, 2, i); __PYX_ERR(0, 3005, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs < 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3005, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3005, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
    __pyx_v_expr = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 0, 2, 2, __pyx_nargs); __PYX_ERR(0, 3005, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_variables); __pyx_v_variables = 0;
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Derivative.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_10Derivative___new__(__pyx_self, __pyx_v_self, __pyx_v_expr, __pyx_v_variables);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_variables);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10Derivative___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_expr, PyObject *__pyx_v_variables) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__new__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3006
 * 
 *     def __new__(self, expr, *variables):
 *         if len(variables) == 1 and is_sequence(variables[0]):             # <<<<<<<<<<<<<<
 *             return diff(expr, *variables[0])
 *         return diff(expr, *variables)
*/
  __pyx_t_2 = __Pyx_PyTuple_GET_SIZE(__pyx_v_variables); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3006, __pyx_L1_error)
  __pyx_t_3 = (__pyx_t_2 == 1);
  if (__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_is_sequence); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3006, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v_variables, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3006, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_7};
    __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3006, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 3006, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_1 = __pyx_t_3;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":3007
 *     def __new__(self, expr, *variables):
 *         if len(variables) == 1 and is_sequence(variables[0]):
 *             return diff(expr, *variables[0])             # <<<<<<<<<<<<<<
 *         return diff(expr, *variables)
 * 
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_diff_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3007, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3007, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_v_expr);
    __Pyx_GIVEREF(__pyx_v_expr);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_expr) != (0)) __PYX_ERR(0, 3007, __pyx_L1_error);
    __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v_variables, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3007, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_5 = __Pyx_PySequence_Tuple(__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3007, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = PyNumber_Add(__pyx_t_6, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3007, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3007, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":3006
 * 
 *     def __new__(self, expr, *variables):
 *         if len(variables) == 1 and is_sequence(variables[0]):             # <<<<<<<<<<<<<<
 *             return diff(expr, *variables[0])
 *         return diff(expr, *variables)
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":3008
 *         if len(variables) == 1 and is_sequence(variables[0]):
 *             return diff(expr, *variables[0])
 *         return diff(expr, *variables)             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_diff_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3008, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3008, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_INCREF(__pyx_v_expr);
  __Pyx_GIVEREF(__pyx_v_expr);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_expr) != (0)) __PYX_ERR(0, 3008, __pyx_L1_error);
  __pyx_t_4 = PyNumber_Add(__pyx_t_7, __pyx_v_variables); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3008, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3008, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_7;
  __pyx_t_7 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3005
 * class Derivative(Expr):
 * 
 *     def __new__(self, expr, *variables):             # <<<<<<<<<<<<<<
 *         if len(variables) == 1 and is_sequence(variables[0]):
 *             return diff(expr, *variables[0])
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Derivative.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3010
 *         return diff(expr, *variables)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_Derivative(self):
 *         return True
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10Derivative_3is_Derivative(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_10Derivative_3is_Derivative = {"is_Derivative", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_10Derivative_3is_Derivative, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10Derivative_3is_Derivative(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_Derivative (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 3010, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3010, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "is_Derivative", 0) < (0)) __PYX_ERR(0, 3010, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("is_Derivative", 1, 1, 1, i); __PYX_ERR(0, 3010, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3010, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_Derivative", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3010, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Derivative.is_Derivative", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_10Derivative_2is_Derivative(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10Derivative_2is_Derivative(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_Derivative", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3012
 *     @property
 *     def is_Derivative(self):
 *         return True             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_True);
  __pyx_r = Py_True;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3010
 *         return diff(expr, *variables)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_Derivative(self):
 *         return True
*/

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

/* "symengine/lib/symengine_wrapper.pyx":3014
 *         return True
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def expr(Basic self):
 *         cdef RCP[const symengine.Derivative] X = symengine.rcp_static_cast_Derivative(self.thisptr)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10Derivative_5expr(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_10Derivative_5expr = {"expr", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_10Derivative_5expr, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10Derivative_5expr(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("expr (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 3014, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3014, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "expr", 0) < (0)) __PYX_ERR(0, 3014, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("expr", 1, 1, 1, i); __PYX_ERR(0, 3014, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3014, __pyx_L3_error)
    }
    __pyx_v_self = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("expr", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3014, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Derivative.expr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic, 1, "self", 0))) __PYX_ERR(0, 3015, __pyx_L1_error)
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_10Derivative_4expr(__pyx_self, __pyx_v_self);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10Derivative_4expr(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self) {
  SymEngine::RCP<SymEngine::Derivative const >  __pyx_v_X;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("expr", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3016
 *     @property
 *     def expr(Basic self):
 *         cdef RCP[const symengine.Derivative] X = symengine.rcp_static_cast_Derivative(self.thisptr)             # <<<<<<<<<<<<<<
 *         return c2py(deref(X).get_arg())
 * 
*/
  __pyx_v_X = SymEngine::rcp_static_cast<const SymEngine::Derivative>(__pyx_v_self->thisptr);

  /* "symengine/lib/symengine_wrapper.pyx":3017
 *     def expr(Basic self):
 *         cdef RCP[const symengine.Derivative] X = symengine.rcp_static_cast_Derivative(self.thisptr)
 *         return c2py(deref(X).get_arg())             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py((*__pyx_v_X).get_arg()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3017, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3014
 *         return True
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def expr(Basic self):
 *         cdef RCP[const symengine.Derivative] X = symengine.rcp_static_cast_Derivative(self.thisptr)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Derivative.expr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3019
 *         return c2py(deref(X).get_arg())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def variables(self):
 *         return self.args[1:]
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10Derivative_7variables(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_10Derivative_7variables = {"variables", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_10Derivative_7variables, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10Derivative_7variables(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("variables (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 3019, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3019, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "variables", 0) < (0)) __PYX_ERR(0, 3019, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("variables", 1, 1, 1, i); __PYX_ERR(0, 3019, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3019, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("variables", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3019, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Derivative.variables", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_10Derivative_6variables(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10Derivative_6variables(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("variables", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3021
 *     @property
 *     def variables(self):
 *         return self.args[1:]             # <<<<<<<<<<<<<<
 * 
 *     def _sympy_(Basic self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3021, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_t_1, 1, 0, NULL, NULL, &__pyx_mstate_global->__pyx_slice[1], 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3021, __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;

  /* "symengine/lib/symengine_wrapper.pyx":3019
 *         return c2py(deref(X).get_arg())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def variables(self):
 *         return self.args[1:]
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Derivative.variables", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3023
 *         return self.args[1:]
 * 
 *     def _sympy_(Basic self):             # <<<<<<<<<<<<<<
 *         cdef RCP[const symengine.Derivative] X = \
 *             symengine.rcp_static_cast_Derivative(self.thisptr)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10Derivative_9_sympy_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_10Derivative_9_sympy_ = {"_sympy_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_10Derivative_9_sympy_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10Derivative_9_sympy_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sympy_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 3023, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3023, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_sympy_", 0) < (0)) __PYX_ERR(0, 3023, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 1, 1, i); __PYX_ERR(0, 3023, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3023, __pyx_L3_error)
    }
    __pyx_v_self = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3023, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Derivative._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic, 1, "self", 0))) __PYX_ERR(0, 3023, __pyx_L1_error)
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_10Derivative_8_sympy_(__pyx_self, __pyx_v_self);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10Derivative_8_sympy_(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self) {
  SymEngine::RCP<SymEngine::Derivative const >  __pyx_v_X;
  PyObject *__pyx_v_arg = NULL;
  SymEngine::multiset_basic __pyx_v_Y;
  PyObject *__pyx_v_s = NULL;
  SymEngine::RCP<const SymEngine::Basic> __pyx_v_i;
  PyObject *__pyx_v_sympy = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  std::multiset<SymEngine::RCP<const SymEngine::Basic>> ::iterator __pyx_t_5;
  SymEngine::RCP<const SymEngine::Basic> __pyx_t_6;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sympy_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3025
 *     def _sympy_(Basic self):
 *         cdef RCP[const symengine.Derivative] X = \
 *             symengine.rcp_static_cast_Derivative(self.thisptr)             # <<<<<<<<<<<<<<
 *         arg = c2py(deref(X).get_arg())._sympy_()
 *         cdef symengine.multiset_basic Y = deref(X).get_symbols()
*/
  __pyx_v_X = SymEngine::rcp_static_cast<const SymEngine::Derivative>(__pyx_v_self->thisptr);

  /* "symengine/lib/symengine_wrapper.pyx":3026
 *         cdef RCP[const symengine.Derivative] X = \
 *             symengine.rcp_static_cast_Derivative(self.thisptr)
 *         arg = c2py(deref(X).get_arg())._sympy_()             # <<<<<<<<<<<<<<
 *         cdef symengine.multiset_basic Y = deref(X).get_symbols()
 *         s = []
*/
  __pyx_t_3 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py((*__pyx_v_X).get_arg()); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3026, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __pyx_t_3;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_sympy_2, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3026, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_arg = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3027
 *             symengine.rcp_static_cast_Derivative(self.thisptr)
 *         arg = c2py(deref(X).get_arg())._sympy_()
 *         cdef symengine.multiset_basic Y = deref(X).get_symbols()             # <<<<<<<<<<<<<<
 *         s = []
 *         for i in Y:
*/
  __pyx_v_Y = (*__pyx_v_X).get_symbols();

  /* "symengine/lib/symengine_wrapper.pyx":3028
 *         arg = c2py(deref(X).get_arg())._sympy_()
 *         cdef symengine.multiset_basic Y = deref(X).get_symbols()
 *         s = []             # <<<<<<<<<<<<<<
 *         for i in Y:
 *             s.append(c2py(<rcp_const_basic>(i))._sympy_())
*/
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3028, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_s = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3029
 *         cdef symengine.multiset_basic Y = deref(X).get_symbols()
 *         s = []
 *         for i in Y:             # <<<<<<<<<<<<<<
 *             s.append(c2py(<rcp_const_basic>(i))._sympy_())
 *         import sympy
*/
  __pyx_t_5 = __pyx_v_Y.begin();
  for (; __pyx_t_5 != __pyx_v_Y.end(); ++__pyx_t_5) {
    __pyx_t_6 = *__pyx_t_5;
    __pyx_v_i = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_6);

    /* "symengine/lib/symengine_wrapper.pyx":3030
 *         s = []
 *         for i in Y:
 *             s.append(c2py(<rcp_const_basic>(i))._sympy_())             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.Derivative(arg, *s)
*/
    __pyx_t_2 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)__pyx_v_i)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3030, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __pyx_t_2;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_4 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
      __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_sympy_2, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3030, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_s, __pyx_t_1); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 3030, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":3029
 *         cdef symengine.multiset_basic Y = deref(X).get_symbols()
 *         s = []
 *         for i in Y:             # <<<<<<<<<<<<<<
 *             s.append(c2py(<rcp_const_basic>(i))._sympy_())
 *         import sympy
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":3031
 *         for i in Y:
 *             s.append(c2py(<rcp_const_basic>(i))._sympy_())
 *         import sympy             # <<<<<<<<<<<<<<
 *         return sympy.Derivative(arg, *s)
 * 
*/
  __pyx_t_8 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sympy, 0, 0, NULL, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3031, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_8;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sympy = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3032
 *             s.append(c2py(<rcp_const_basic>(i))._sympy_())
 *         import sympy
 *         return sympy.Derivative(arg, *s)             # <<<<<<<<<<<<<<
 * 
 *     def _sage_(Basic self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_Derivative); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3032, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3032, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_arg);
  __Pyx_GIVEREF(__pyx_v_arg);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_arg) != (0)) __PYX_ERR(0, 3032, __pyx_L1_error);
  __pyx_t_3 = PySequence_Tuple(__pyx_v_s); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3032, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_9 = PyNumber_Add(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3032, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_9, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3032, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3023
 *         return self.args[1:]
 * 
 *     def _sympy_(Basic self):             # <<<<<<<<<<<<<<
 *         cdef RCP[const symengine.Derivative] X = \
 *             symengine.rcp_static_cast_Derivative(self.thisptr)
*/

  /* 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_9);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Derivative._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_arg);
  __Pyx_XDECREF(__pyx_v_s);
  __Pyx_XDECREF(__pyx_v_sympy);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3034
 *         return sympy.Derivative(arg, *s)
 * 
 *     def _sage_(Basic self):             # <<<<<<<<<<<<<<
 *         cdef RCP[const symengine.Derivative] X = \
 *             symengine.rcp_static_cast_Derivative(self.thisptr)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10Derivative_11_sage_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_10Derivative_11_sage_ = {"_sage_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_10Derivative_11_sage_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10Derivative_11_sage_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sage_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 3034, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3034, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_sage_", 0) < (0)) __PYX_ERR(0, 3034, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_sage_", 1, 1, 1, i); __PYX_ERR(0, 3034, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3034, __pyx_L3_error)
    }
    __pyx_v_self = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_sage_", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3034, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Derivative._sage_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic, 1, "self", 0))) __PYX_ERR(0, 3034, __pyx_L1_error)
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_10Derivative_10_sage_(__pyx_self, __pyx_v_self);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10Derivative_10_sage_(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self) {
  SymEngine::RCP<SymEngine::Derivative const >  __pyx_v_X;
  PyObject *__pyx_v_arg = NULL;
  SymEngine::multiset_basic __pyx_v_Y;
  PyObject *__pyx_v_s = NULL;
  SymEngine::RCP<const SymEngine::Basic> __pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  std::multiset<SymEngine::RCP<const SymEngine::Basic>> ::iterator __pyx_t_5;
  SymEngine::RCP<const SymEngine::Basic> __pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sage_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3036
 *     def _sage_(Basic self):
 *         cdef RCP[const symengine.Derivative] X = \
 *             symengine.rcp_static_cast_Derivative(self.thisptr)             # <<<<<<<<<<<<<<
 *         arg = c2py(deref(X).get_arg())._sage_()
 *         cdef symengine.multiset_basic Y = deref(X).get_symbols()
*/
  __pyx_v_X = SymEngine::rcp_static_cast<const SymEngine::Derivative>(__pyx_v_self->thisptr);

  /* "symengine/lib/symengine_wrapper.pyx":3037
 *         cdef RCP[const symengine.Derivative] X = \
 *             symengine.rcp_static_cast_Derivative(self.thisptr)
 *         arg = c2py(deref(X).get_arg())._sage_()             # <<<<<<<<<<<<<<
 *         cdef symengine.multiset_basic Y = deref(X).get_symbols()
 *         s = []
*/
  __pyx_t_3 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py((*__pyx_v_X).get_arg()); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3037, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __pyx_t_3;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_sage, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3037, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_arg = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3038
 *             symengine.rcp_static_cast_Derivative(self.thisptr)
 *         arg = c2py(deref(X).get_arg())._sage_()
 *         cdef symengine.multiset_basic Y = deref(X).get_symbols()             # <<<<<<<<<<<<<<
 *         s = []
 *         for i in Y:
*/
  __pyx_v_Y = (*__pyx_v_X).get_symbols();

  /* "symengine/lib/symengine_wrapper.pyx":3039
 *         arg = c2py(deref(X).get_arg())._sage_()
 *         cdef symengine.multiset_basic Y = deref(X).get_symbols()
 *         s = []             # <<<<<<<<<<<<<<
 *         for i in Y:
 *             s.append(c2py(<rcp_const_basic>(i))._sage_())
*/
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3039, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_s = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3040
 *         cdef symengine.multiset_basic Y = deref(X).get_symbols()
 *         s = []
 *         for i in Y:             # <<<<<<<<<<<<<<
 *             s.append(c2py(<rcp_const_basic>(i))._sage_())
 *         return arg.diff(*s)
*/
  __pyx_t_5 = __pyx_v_Y.begin();
  for (; __pyx_t_5 != __pyx_v_Y.end(); ++__pyx_t_5) {
    __pyx_t_6 = *__pyx_t_5;
    __pyx_v_i = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_6);

    /* "symengine/lib/symengine_wrapper.pyx":3041
 *         s = []
 *         for i in Y:
 *             s.append(c2py(<rcp_const_basic>(i))._sage_())             # <<<<<<<<<<<<<<
 *         return arg.diff(*s)
 * 
*/
    __pyx_t_2 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)__pyx_v_i)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3041, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __pyx_t_2;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_4 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
      __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_sage, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3041, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_s, __pyx_t_1); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 3041, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":3040
 *         cdef symengine.multiset_basic Y = deref(X).get_symbols()
 *         s = []
 *         for i in Y:             # <<<<<<<<<<<<<<
 *             s.append(c2py(<rcp_const_basic>(i))._sage_())
 *         return arg.diff(*s)
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":3042
 *         for i in Y:
 *             s.append(c2py(<rcp_const_basic>(i))._sage_())
 *         return arg.diff(*s)             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_mstate_global->__pyx_n_u_diff_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3042, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PySequence_Tuple(__pyx_v_s); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3042, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3042, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3034
 *         return sympy.Derivative(arg, *s)
 * 
 *     def _sage_(Basic self):             # <<<<<<<<<<<<<<
 *         cdef RCP[const symengine.Derivative] X = \
 *             symengine.rcp_static_cast_Derivative(self.thisptr)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Derivative._sage_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_arg);
  __Pyx_XDECREF(__pyx_v_s);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3044
 *         return arg.diff(*s)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def func(self):
 *         return self.__class__
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10Derivative_13func(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_10Derivative_13func = {"func", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_10Derivative_13func, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10Derivative_13func(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("func (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 3044, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3044, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "func", 0) < (0)) __PYX_ERR(0, 3044, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("func", 1, 1, 1, i); __PYX_ERR(0, 3044, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3044, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("func", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3044, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Derivative.func", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_10Derivative_12func(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10Derivative_12func(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("func", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3046
 *     @property
 *     def func(self):
 *         return self.__class__             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3046, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3044
 *         return arg.diff(*s)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def func(self):
 *         return self.__class__
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Derivative.func", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3051
 * class Subs(Expr):
 * 
 *     def __new__(self, expr, variables, point):             # <<<<<<<<<<<<<<
 *         return sympify(expr).subs(variables, point)
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_4Subs_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_4Subs_1__new__ = {"__new__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_4Subs_1__new__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_4Subs_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_expr = 0;
  PyObject *__pyx_v_variables = 0;
  PyObject *__pyx_v_point = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_expr,&__pyx_mstate_global->__pyx_n_u_variables,&__pyx_mstate_global->__pyx_n_u_point,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 3051, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 3051, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 3051, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3051, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3051, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__new__", 0) < (0)) __PYX_ERR(0, 3051, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 4; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__new__", 1, 4, 4, i); __PYX_ERR(0, 3051, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 4)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3051, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3051, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 3051, __pyx_L3_error)
      values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 3051, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
    __pyx_v_expr = values[1];
    __pyx_v_variables = values[2];
    __pyx_v_point = values[3];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 1, 4, 4, __pyx_nargs); __PYX_ERR(0, 3051, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Subs.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_4Subs___new__(__pyx_self, __pyx_v_self, __pyx_v_expr, __pyx_v_variables, __pyx_v_point);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_4Subs___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_expr, PyObject *__pyx_v_variables, PyObject *__pyx_v_point) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__new__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3052
 * 
 *     def __new__(self, expr, variables, point):
 *         return sympify(expr).subs(variables, point)             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3052, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_expr};
    __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3052, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __pyx_t_2 = __pyx_t_3;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_6 = 0;
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_variables, __pyx_v_point};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_subs, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3052, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3051
 * class Subs(Expr):
 * 
 *     def __new__(self, expr, variables, point):             # <<<<<<<<<<<<<<
 *         return sympify(expr).subs(variables, point)
 * 
*/

  /* 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("symengine.lib.symengine_wrapper.Subs.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3054
 *         return sympify(expr).subs(variables, point)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def expr(Basic self):
 *         cdef RCP[const symengine.Subs] me = symengine.rcp_static_cast_Subs(self.thisptr)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_4Subs_3expr(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_4Subs_3expr = {"expr", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_4Subs_3expr, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_4Subs_3expr(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("expr (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 3054, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3054, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "expr", 0) < (0)) __PYX_ERR(0, 3054, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("expr", 1, 1, 1, i); __PYX_ERR(0, 3054, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3054, __pyx_L3_error)
    }
    __pyx_v_self = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("expr", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3054, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Subs.expr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic, 1, "self", 0))) __PYX_ERR(0, 3055, __pyx_L1_error)
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_4Subs_2expr(__pyx_self, __pyx_v_self);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_4Subs_2expr(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self) {
  SymEngine::RCP<SymEngine::Subs const >  __pyx_v_me;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("expr", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3056
 *     @property
 *     def expr(Basic self):
 *         cdef RCP[const symengine.Subs] me = symengine.rcp_static_cast_Subs(self.thisptr)             # <<<<<<<<<<<<<<
 *         return c2py(deref(me).get_arg())
 * 
*/
  __pyx_v_me = SymEngine::rcp_static_cast<const SymEngine::Subs>(__pyx_v_self->thisptr);

  /* "symengine/lib/symengine_wrapper.pyx":3057
 *     def expr(Basic self):
 *         cdef RCP[const symengine.Subs] me = symengine.rcp_static_cast_Subs(self.thisptr)
 *         return c2py(deref(me).get_arg())             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py((*__pyx_v_me).get_arg()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3057, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3054
 *         return sympify(expr).subs(variables, point)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def expr(Basic self):
 *         cdef RCP[const symengine.Subs] me = symengine.rcp_static_cast_Subs(self.thisptr)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Subs.expr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3059
 *         return c2py(deref(me).get_arg())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def variables(Basic self):
 *         cdef RCP[const symengine.Subs] me = symengine.rcp_static_cast_Subs(self.thisptr)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_4Subs_5variables(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_4Subs_5variables = {"variables", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_4Subs_5variables, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_4Subs_5variables(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("variables (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 3059, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3059, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "variables", 0) < (0)) __PYX_ERR(0, 3059, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("variables", 1, 1, 1, i); __PYX_ERR(0, 3059, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3059, __pyx_L3_error)
    }
    __pyx_v_self = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("variables", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3059, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Subs.variables", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic, 1, "self", 0))) __PYX_ERR(0, 3060, __pyx_L1_error)
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_4Subs_4variables(__pyx_self, __pyx_v_self);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_4Subs_4variables(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self) {
  SymEngine::RCP<SymEngine::Subs const >  __pyx_v_me;
  SymEngine::vec_basic __pyx_v_variables;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("variables", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3061
 *     @property
 *     def variables(Basic self):
 *         cdef RCP[const symengine.Subs] me = symengine.rcp_static_cast_Subs(self.thisptr)             # <<<<<<<<<<<<<<
 *         cdef symengine.vec_basic variables = deref(me).get_variables()
 *         return vec_basic_to_tuple(variables)
*/
  __pyx_v_me = SymEngine::rcp_static_cast<const SymEngine::Subs>(__pyx_v_self->thisptr);

  /* "symengine/lib/symengine_wrapper.pyx":3062
 *     def variables(Basic self):
 *         cdef RCP[const symengine.Subs] me = symengine.rcp_static_cast_Subs(self.thisptr)
 *         cdef symengine.vec_basic variables = deref(me).get_variables()             # <<<<<<<<<<<<<<
 *         return vec_basic_to_tuple(variables)
 * 
*/
  __pyx_v_variables = (*__pyx_v_me).get_variables();

  /* "symengine/lib/symengine_wrapper.pyx":3063
 *         cdef RCP[const symengine.Subs] me = symengine.rcp_static_cast_Subs(self.thisptr)
 *         cdef symengine.vec_basic variables = deref(me).get_variables()
 *         return vec_basic_to_tuple(variables)             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_vec_basic_to_tuple(__pyx_v_variables); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3063, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3059
 *         return c2py(deref(me).get_arg())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def variables(Basic self):
 *         cdef RCP[const symengine.Subs] me = symengine.rcp_static_cast_Subs(self.thisptr)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Subs.variables", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3065
 *         return vec_basic_to_tuple(variables)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def point(Basic self):
 *         cdef RCP[const symengine.Subs] me = symengine.rcp_static_cast_Subs(self.thisptr)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_4Subs_7point(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_4Subs_7point = {"point", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_4Subs_7point, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_4Subs_7point(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("point (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 3065, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3065, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "point", 0) < (0)) __PYX_ERR(0, 3065, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("point", 1, 1, 1, i); __PYX_ERR(0, 3065, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3065, __pyx_L3_error)
    }
    __pyx_v_self = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("point", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3065, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Subs.point", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic, 1, "self", 0))) __PYX_ERR(0, 3066, __pyx_L1_error)
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_4Subs_6point(__pyx_self, __pyx_v_self);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_4Subs_6point(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self) {
  SymEngine::RCP<SymEngine::Subs const >  __pyx_v_me;
  SymEngine::vec_basic __pyx_v_point;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("point", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3067
 *     @property
 *     def point(Basic self):
 *         cdef RCP[const symengine.Subs] me = symengine.rcp_static_cast_Subs(self.thisptr)             # <<<<<<<<<<<<<<
 *         cdef symengine.vec_basic point = deref(me).get_point()
 *         return vec_basic_to_tuple(point)
*/
  __pyx_v_me = SymEngine::rcp_static_cast<const SymEngine::Subs>(__pyx_v_self->thisptr);

  /* "symengine/lib/symengine_wrapper.pyx":3068
 *     def point(Basic self):
 *         cdef RCP[const symengine.Subs] me = symengine.rcp_static_cast_Subs(self.thisptr)
 *         cdef symengine.vec_basic point = deref(me).get_point()             # <<<<<<<<<<<<<<
 *         return vec_basic_to_tuple(point)
 * 
*/
  __pyx_v_point = (*__pyx_v_me).get_point();

  /* "symengine/lib/symengine_wrapper.pyx":3069
 *         cdef RCP[const symengine.Subs] me = symengine.rcp_static_cast_Subs(self.thisptr)
 *         cdef symengine.vec_basic point = deref(me).get_point()
 *         return vec_basic_to_tuple(point)             # <<<<<<<<<<<<<<
 * 
 *     def _sympy_(Basic self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_vec_basic_to_tuple(__pyx_v_point); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3069, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3065
 *         return vec_basic_to_tuple(variables)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def point(Basic self):
 *         cdef RCP[const symengine.Subs] me = symengine.rcp_static_cast_Subs(self.thisptr)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Subs.point", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3071
 *         return vec_basic_to_tuple(point)
 * 
 *     def _sympy_(Basic self):             # <<<<<<<<<<<<<<
 *         cdef RCP[const symengine.Subs] X = symengine.rcp_static_cast_Subs(self.thisptr)
 *         arg = c2py(deref(X).get_arg())._sympy_()
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_4Subs_9_sympy_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_4Subs_9_sympy_ = {"_sympy_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_4Subs_9_sympy_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_4Subs_9_sympy_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sympy_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 3071, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3071, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_sympy_", 0) < (0)) __PYX_ERR(0, 3071, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 1, 1, i); __PYX_ERR(0, 3071, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3071, __pyx_L3_error)
    }
    __pyx_v_self = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3071, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Subs._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic, 1, "self", 0))) __PYX_ERR(0, 3071, __pyx_L1_error)
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_4Subs_8_sympy_(__pyx_self, __pyx_v_self);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_4Subs_8_sympy_(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self) {
  SymEngine::RCP<SymEngine::Subs const >  __pyx_v_X;
  PyObject *__pyx_v_arg = NULL;
  SymEngine::vec_basic __pyx_v_V;
  SymEngine::vec_basic __pyx_v_P;
  PyObject *__pyx_v_v = NULL;
  PyObject *__pyx_v_p = NULL;
  std::vector<SymEngine::RCP<const SymEngine::Basic>> ::size_type __pyx_v_i;
  PyObject *__pyx_v_sympy = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  std::vector<SymEngine::RCP<const SymEngine::Basic>> ::size_type __pyx_t_5;
  std::vector<SymEngine::RCP<const SymEngine::Basic>> ::size_type __pyx_t_6;
  std::vector<SymEngine::RCP<const SymEngine::Basic>> ::size_type __pyx_t_7;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sympy_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3072
 * 
 *     def _sympy_(Basic self):
 *         cdef RCP[const symengine.Subs] X = symengine.rcp_static_cast_Subs(self.thisptr)             # <<<<<<<<<<<<<<
 *         arg = c2py(deref(X).get_arg())._sympy_()
 *         cdef symengine.vec_basic V = deref(X).get_variables()
*/
  __pyx_v_X = SymEngine::rcp_static_cast<const SymEngine::Subs>(__pyx_v_self->thisptr);

  /* "symengine/lib/symengine_wrapper.pyx":3073
 *     def _sympy_(Basic self):
 *         cdef RCP[const symengine.Subs] X = symengine.rcp_static_cast_Subs(self.thisptr)
 *         arg = c2py(deref(X).get_arg())._sympy_()             # <<<<<<<<<<<<<<
 *         cdef symengine.vec_basic V = deref(X).get_variables()
 *         cdef symengine.vec_basic P = deref(X).get_point()
*/
  __pyx_t_3 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py((*__pyx_v_X).get_arg()); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3073, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __pyx_t_3;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_sympy_2, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3073, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_arg = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3074
 *         cdef RCP[const symengine.Subs] X = symengine.rcp_static_cast_Subs(self.thisptr)
 *         arg = c2py(deref(X).get_arg())._sympy_()
 *         cdef symengine.vec_basic V = deref(X).get_variables()             # <<<<<<<<<<<<<<
 *         cdef symengine.vec_basic P = deref(X).get_point()
 *         v = []
*/
  __pyx_v_V = (*__pyx_v_X).get_variables();

  /* "symengine/lib/symengine_wrapper.pyx":3075
 *         arg = c2py(deref(X).get_arg())._sympy_()
 *         cdef symengine.vec_basic V = deref(X).get_variables()
 *         cdef symengine.vec_basic P = deref(X).get_point()             # <<<<<<<<<<<<<<
 *         v = []
 *         p = []
*/
  __pyx_v_P = (*__pyx_v_X).get_point();

  /* "symengine/lib/symengine_wrapper.pyx":3076
 *         cdef symengine.vec_basic V = deref(X).get_variables()
 *         cdef symengine.vec_basic P = deref(X).get_point()
 *         v = []             # <<<<<<<<<<<<<<
 *         p = []
 *         for i in range(V.size()):
*/
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3076, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3077
 *         cdef symengine.vec_basic P = deref(X).get_point()
 *         v = []
 *         p = []             # <<<<<<<<<<<<<<
 *         for i in range(V.size()):
 *             v.append(c2py(<rcp_const_basic>(V[i]))._sympy_())
*/
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3077, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_p = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3078
 *         v = []
 *         p = []
 *         for i in range(V.size()):             # <<<<<<<<<<<<<<
 *             v.append(c2py(<rcp_const_basic>(V[i]))._sympy_())
 *             p.append(c2py(<rcp_const_basic>(P[i]))._sympy_())
*/
  __pyx_t_5 = __pyx_v_V.size();
  __pyx_t_6 = __pyx_t_5;
  for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
    __pyx_v_i = __pyx_t_7;

    /* "symengine/lib/symengine_wrapper.pyx":3079
 *         p = []
 *         for i in range(V.size()):
 *             v.append(c2py(<rcp_const_basic>(V[i]))._sympy_())             # <<<<<<<<<<<<<<
 *             p.append(c2py(<rcp_const_basic>(P[i]))._sympy_())
 *         import sympy
*/
    __pyx_t_2 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)(__pyx_v_V[__pyx_v_i]))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3079, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __pyx_t_2;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_4 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
      __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_sympy_2, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3079, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_v, __pyx_t_1); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 3079, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":3080
 *         for i in range(V.size()):
 *             v.append(c2py(<rcp_const_basic>(V[i]))._sympy_())
 *             p.append(c2py(<rcp_const_basic>(P[i]))._sympy_())             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.Subs(arg, v, p)
*/
    __pyx_t_3 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)(__pyx_v_P[__pyx_v_i]))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3080, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __pyx_t_3;
    __Pyx_INCREF(__pyx_t_2);
    __pyx_t_4 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
      __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_sympy_2, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3080, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_p, __pyx_t_1); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 3080, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "symengine/lib/symengine_wrapper.pyx":3081
 *             v.append(c2py(<rcp_const_basic>(V[i]))._sympy_())
 *             p.append(c2py(<rcp_const_basic>(P[i]))._sympy_())
 *         import sympy             # <<<<<<<<<<<<<<
 *         return sympy.Subs(arg, v, p)
 * 
*/
  __pyx_t_9 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sympy, 0, 0, NULL, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3081, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_9;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sympy = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3082
 *             p.append(c2py(<rcp_const_basic>(P[i]))._sympy_())
 *         import sympy
 *         return sympy.Subs(arg, v, p)             # <<<<<<<<<<<<<<
 * 
 *     def _sage_(Basic self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __pyx_v_sympy;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_arg, __pyx_v_v, __pyx_v_p};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_Subs, __pyx_callargs+__pyx_t_4, (4-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3082, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3071
 *         return vec_basic_to_tuple(point)
 * 
 *     def _sympy_(Basic self):             # <<<<<<<<<<<<<<
 *         cdef RCP[const symengine.Subs] X = symengine.rcp_static_cast_Subs(self.thisptr)
 *         arg = c2py(deref(X).get_arg())._sympy_()
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Subs._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_arg);
  __Pyx_XDECREF(__pyx_v_v);
  __Pyx_XDECREF(__pyx_v_p);
  __Pyx_XDECREF(__pyx_v_sympy);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3084
 *         return sympy.Subs(arg, v, p)
 * 
 *     def _sage_(Basic self):             # <<<<<<<<<<<<<<
 *         cdef RCP[const symengine.Subs] X = symengine.rcp_static_cast_Subs(self.thisptr)
 *         arg = c2py(deref(X).get_arg())._sage_()
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_4Subs_11_sage_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_4Subs_11_sage_ = {"_sage_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_4Subs_11_sage_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_4Subs_11_sage_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sage_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 3084, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3084, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_sage_", 0) < (0)) __PYX_ERR(0, 3084, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_sage_", 1, 1, 1, i); __PYX_ERR(0, 3084, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3084, __pyx_L3_error)
    }
    __pyx_v_self = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_sage_", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3084, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Subs._sage_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic, 1, "self", 0))) __PYX_ERR(0, 3084, __pyx_L1_error)
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_4Subs_10_sage_(__pyx_self, __pyx_v_self);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_4Subs_10_sage_(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_self) {
  SymEngine::RCP<SymEngine::Subs const >  __pyx_v_X;
  PyObject *__pyx_v_arg = NULL;
  SymEngine::vec_basic __pyx_v_V;
  SymEngine::vec_basic __pyx_v_P;
  PyObject *__pyx_v_v = NULL;
  std::vector<SymEngine::RCP<const SymEngine::Basic>> ::size_type __pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  std::vector<SymEngine::RCP<const SymEngine::Basic>> ::size_type __pyx_t_5;
  std::vector<SymEngine::RCP<const SymEngine::Basic>> ::size_type __pyx_t_6;
  std::vector<SymEngine::RCP<const SymEngine::Basic>> ::size_type __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sage_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3085
 * 
 *     def _sage_(Basic self):
 *         cdef RCP[const symengine.Subs] X = symengine.rcp_static_cast_Subs(self.thisptr)             # <<<<<<<<<<<<<<
 *         arg = c2py(deref(X).get_arg())._sage_()
 *         cdef symengine.vec_basic V = deref(X).get_variables()
*/
  __pyx_v_X = SymEngine::rcp_static_cast<const SymEngine::Subs>(__pyx_v_self->thisptr);

  /* "symengine/lib/symengine_wrapper.pyx":3086
 *     def _sage_(Basic self):
 *         cdef RCP[const symengine.Subs] X = symengine.rcp_static_cast_Subs(self.thisptr)
 *         arg = c2py(deref(X).get_arg())._sage_()             # <<<<<<<<<<<<<<
 *         cdef symengine.vec_basic V = deref(X).get_variables()
 *         cdef symengine.vec_basic P = deref(X).get_point()
*/
  __pyx_t_3 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py((*__pyx_v_X).get_arg()); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3086, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __pyx_t_3;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_sage, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3086, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_arg = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3087
 *         cdef RCP[const symengine.Subs] X = symengine.rcp_static_cast_Subs(self.thisptr)
 *         arg = c2py(deref(X).get_arg())._sage_()
 *         cdef symengine.vec_basic V = deref(X).get_variables()             # <<<<<<<<<<<<<<
 *         cdef symengine.vec_basic P = deref(X).get_point()
 *         v = {}
*/
  __pyx_v_V = (*__pyx_v_X).get_variables();

  /* "symengine/lib/symengine_wrapper.pyx":3088
 *         arg = c2py(deref(X).get_arg())._sage_()
 *         cdef symengine.vec_basic V = deref(X).get_variables()
 *         cdef symengine.vec_basic P = deref(X).get_point()             # <<<<<<<<<<<<<<
 *         v = {}
 *         for i in range(V.size()):
*/
  __pyx_v_P = (*__pyx_v_X).get_point();

  /* "symengine/lib/symengine_wrapper.pyx":3089
 *         cdef symengine.vec_basic V = deref(X).get_variables()
 *         cdef symengine.vec_basic P = deref(X).get_point()
 *         v = {}             # <<<<<<<<<<<<<<
 *         for i in range(V.size()):
 *             v[c2py(<rcp_const_basic>(V[i]))._sage_()] = \
*/
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3089, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3090
 *         cdef symengine.vec_basic P = deref(X).get_point()
 *         v = {}
 *         for i in range(V.size()):             # <<<<<<<<<<<<<<
 *             v[c2py(<rcp_const_basic>(V[i]))._sage_()] = \
 *                 c2py(<rcp_const_basic>(P[i]))._sage_()
*/
  __pyx_t_5 = __pyx_v_V.size();
  __pyx_t_6 = __pyx_t_5;
  for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
    __pyx_v_i = __pyx_t_7;

    /* "symengine/lib/symengine_wrapper.pyx":3092
 *         for i in range(V.size()):
 *             v[c2py(<rcp_const_basic>(V[i]))._sage_()] = \
 *                 c2py(<rcp_const_basic>(P[i]))._sage_()             # <<<<<<<<<<<<<<
 *         return arg.subs(v)
 * 
*/
    __pyx_t_2 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)(__pyx_v_P[__pyx_v_i]))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3092, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __pyx_t_2;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_4 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
      __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_sage, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3092, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }

    /* "symengine/lib/symengine_wrapper.pyx":3091
 *         v = {}
 *         for i in range(V.size()):
 *             v[c2py(<rcp_const_basic>(V[i]))._sage_()] = \             # <<<<<<<<<<<<<<
 *                 c2py(<rcp_const_basic>(P[i]))._sage_()
 *         return arg.subs(v)
*/
    __pyx_t_8 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)(__pyx_v_V[__pyx_v_i]))); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3091, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_3 = __pyx_t_8;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_4 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
      __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_sage, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3091, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    if (unlikely((PyDict_SetItem(__pyx_v_v, __pyx_t_2, __pyx_t_1) < 0))) __PYX_ERR(0, 3091, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "symengine/lib/symengine_wrapper.pyx":3093
 *             v[c2py(<rcp_const_basic>(V[i]))._sage_()] = \
 *                 c2py(<rcp_const_basic>(P[i]))._sage_()
 *         return arg.subs(v)             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_v_arg;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_v};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_subs, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3093, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3084
 *         return sympy.Subs(arg, v, p)
 * 
 *     def _sage_(Basic self):             # <<<<<<<<<<<<<<
 *         cdef RCP[const symengine.Subs] X = symengine.rcp_static_cast_Subs(self.thisptr)
 *         arg = c2py(deref(X).get_arg())._sage_()
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Subs._sage_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_arg);
  __Pyx_XDECREF(__pyx_v_v);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3095
 *         return arg.subs(v)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def func(self):
 *         return self.__class__
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_4Subs_13func(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_4Subs_13func = {"func", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_4Subs_13func, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_4Subs_13func(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("func (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 3095, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3095, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "func", 0) < (0)) __PYX_ERR(0, 3095, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("func", 1, 1, 1, i); __PYX_ERR(0, 3095, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3095, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("func", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3095, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Subs.func", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_4Subs_12func(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_4Subs_12func(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("func", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3097
 *     @property
 *     def func(self):
 *         return self.__class__             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3097, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3095
 *         return arg.subs(v)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def func(self):
 *         return self.__class__
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Subs.func", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3102
 * class Piecewise(Function):
 * 
 *     def __new__(self, *args):             # <<<<<<<<<<<<<<
 *         return piecewise(*args)
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9Piecewise_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_9Piecewise_1__new__ = {"__new__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_9Piecewise_1__new__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9Piecewise_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_args = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  __pyx_v_args = __Pyx_ArgsSlice_FASTCALL(__pyx_args, 1, __pyx_nargs);
  if (unlikely(!__pyx_v_args)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_v_args);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 3102, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        default:
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3102, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      const Py_ssize_t used_pos_args = (kwd_pos_args < 1) ? kwd_pos_args : 1;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, used_pos_args, __pyx_kwds_len, "__new__", 0) < (0)) __PYX_ERR(0, 3102, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__new__", 0, 1, 1, i); __PYX_ERR(0, 3102, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs < 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3102, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 0, 1, 1, __pyx_nargs); __PYX_ERR(0, 3102, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Piecewise.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_9Piecewise___new__(__pyx_self, __pyx_v_self, __pyx_v_args);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_args);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_9Piecewise___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_args) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__new__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3103
 * 
 *     def __new__(self, *args):
 *         return piecewise(*args)             # <<<<<<<<<<<<<<
 * 
 *     def _sympy_(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_piecewise); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3103, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3103, __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;

  /* "symengine/lib/symengine_wrapper.pyx":3102
 * class Piecewise(Function):
 * 
 *     def __new__(self, *args):             # <<<<<<<<<<<<<<
 *         return piecewise(*args)
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Piecewise.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3105
 *         return piecewise(*args)
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         a = self.args
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9Piecewise_3_sympy_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_9Piecewise_3_sympy_ = {"_sympy_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_9Piecewise_3_sympy_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9Piecewise_3_sympy_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sympy_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 3105, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3105, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_sympy_", 0) < (0)) __PYX_ERR(0, 3105, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 1, 1, i); __PYX_ERR(0, 3105, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3105, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3105, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Piecewise._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_9Piecewise_2_sympy_(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_9Piecewise_2_sympy_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_sympy = NULL;
  PyObject *__pyx_v_a = NULL;
  PyObject *__pyx_v_l = NULL;
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  PyObject *(*__pyx_t_7)(PyObject *);
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sympy_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3106
 * 
 *     def _sympy_(self):
 *         import sympy             # <<<<<<<<<<<<<<
 *         a = self.args
 *         l = []
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sympy, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3106, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sympy = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3107
 *     def _sympy_(self):
 *         import sympy
 *         a = self.args             # <<<<<<<<<<<<<<
 *         l = []
 *         for i in range(0, len(a), 2):
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3107, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_a = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3108
 *         import sympy
 *         a = self.args
 *         l = []             # <<<<<<<<<<<<<<
 *         for i in range(0, len(a), 2):
 *             l.append((a[i]._sympy_(), a[i + 1]._sympy_()))
*/
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3108, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_l = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3109
 *         a = self.args
 *         l = []
 *         for i in range(0, len(a), 2):             # <<<<<<<<<<<<<<
 *             l.append((a[i]._sympy_(), a[i + 1]._sympy_()))
 *         return sympy.Piecewise(*l)
*/
  __pyx_t_3 = NULL;
  __pyx_t_4 = PyObject_Length(__pyx_v_a); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3109, __pyx_L1_error)
  __pyx_t_5 = PyLong_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3109, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_mstate_global->__pyx_int_0, __pyx_t_5, __pyx_mstate_global->__pyx_int_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(&PyRange_Type), __pyx_callargs+__pyx_t_6, (4-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3109, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3109, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3109, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    {
      __pyx_t_1 = __pyx_t_7(__pyx_t_5);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 3109, __pyx_L1_error)
          PyErr_Clear();
        }
        break;
      }
    }
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":3110
 *         l = []
 *         for i in range(0, len(a), 2):
 *             l.append((a[i]._sympy_(), a[i + 1]._sympy_()))             # <<<<<<<<<<<<<<
 *         return sympy.Piecewise(*l)
 * 
*/
    __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_v_a, __pyx_v_i); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3110, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_3 = __pyx_t_8;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_6 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
      __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_sympy_2, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3110, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __pyx_t_9 = __Pyx_PyLong_AddObjC(__pyx_v_i, __pyx_mstate_global->__pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3110, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_10 = __Pyx_PyObject_GetItem(__pyx_v_a, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3110, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_3 = __pyx_t_10;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_6 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
      __pyx_t_8 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_sympy_2, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3110, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
    }
    __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3110, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_GIVEREF(__pyx_t_1);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 3110, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_8);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_8) != (0)) __PYX_ERR(0, 3110, __pyx_L1_error);
    __pyx_t_1 = 0;
    __pyx_t_8 = 0;
    __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_l, __pyx_t_10); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 3110, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":3109
 *         a = self.args
 *         l = []
 *         for i in range(0, len(a), 2):             # <<<<<<<<<<<<<<
 *             l.append((a[i]._sympy_(), a[i + 1]._sympy_()))
 *         return sympy.Piecewise(*l)
*/
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3111
 *         for i in range(0, len(a), 2):
 *             l.append((a[i]._sympy_(), a[i + 1]._sympy_()))
 *         return sympy.Piecewise(*l)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_Piecewise); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_10 = PySequence_Tuple(__pyx_v_l); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_10, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __pyx_r = __pyx_t_8;
  __pyx_t_8 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3105
 *         return piecewise(*args)
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         a = self.args
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Piecewise._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sympy);
  __Pyx_XDECREF(__pyx_v_a);
  __Pyx_XDECREF(__pyx_v_l);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3116
 * cdef class Set(Expr):
 * 
 *     def intersection(self, a):             # <<<<<<<<<<<<<<
 *         cdef Set other = sympify(a)
 *         cdef RCP[const symengine.Set] other_ = symengine.rcp_static_cast_Set(other.thisptr)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3Set_1intersection(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_3Set_1intersection = {"intersection", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_3Set_1intersection, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3Set_1intersection(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_a = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("intersection (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_a,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 3116, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3116, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "intersection", 0) < (0)) __PYX_ERR(0, 3116, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("intersection", 1, 1, 1, i); __PYX_ERR(0, 3116, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3116, __pyx_L3_error)
    }
    __pyx_v_a = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("intersection", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3116, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Set.intersection", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_3Set_intersection(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Set *)__pyx_v_self), __pyx_v_a);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3Set_intersection(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Set *__pyx_v_self, PyObject *__pyx_v_a) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Set *__pyx_v_other = 0;
  SymEngine::RCP<SymEngine::Set const >  __pyx_v_other_;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  SymEngine::RCP<SymEngine::Set const >  __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("intersection", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3117
 * 
 *     def intersection(self, a):
 *         cdef Set other = sympify(a)             # <<<<<<<<<<<<<<
 *         cdef RCP[const symengine.Set] other_ = symengine.rcp_static_cast_Set(other.thisptr)
 *         return c2py(<rcp_const_basic>(deref(symengine.rcp_static_cast_Set(self.thisptr))
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3117, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_a};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3117, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Set))))) __PYX_ERR(0, 3117, __pyx_L1_error)
  __pyx_v_other = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Set *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3118
 *     def intersection(self, a):
 *         cdef Set other = sympify(a)
 *         cdef RCP[const symengine.Set] other_ = symengine.rcp_static_cast_Set(other.thisptr)             # <<<<<<<<<<<<<<
 *         return c2py(<rcp_const_basic>(deref(symengine.rcp_static_cast_Set(self.thisptr))
 *                     .set_intersection(other_)))
*/
  __pyx_v_other_ = SymEngine::rcp_static_cast<const SymEngine::Set>(__pyx_v_other->__pyx_base.__pyx_base.thisptr);

  /* "symengine/lib/symengine_wrapper.pyx":3119
 *         cdef Set other = sympify(a)
 *         cdef RCP[const symengine.Set] other_ = symengine.rcp_static_cast_Set(other.thisptr)
 *         return c2py(<rcp_const_basic>(deref(symengine.rcp_static_cast_Set(self.thisptr))             # <<<<<<<<<<<<<<
 *                     .set_intersection(other_)))
 * 
*/
  __Pyx_XDECREF(__pyx_r);

  /* "symengine/lib/symengine_wrapper.pyx":3120
 *         cdef RCP[const symengine.Set] other_ = symengine.rcp_static_cast_Set(other.thisptr)
 *         return c2py(<rcp_const_basic>(deref(symengine.rcp_static_cast_Set(self.thisptr))
 *                     .set_intersection(other_)))             # <<<<<<<<<<<<<<
 * 
 *     def union(self, a):
*/
  try {
    __pyx_t_5 = (*SymEngine::rcp_static_cast<const SymEngine::Set>(__pyx_v_self->__pyx_base.__pyx_base.thisptr)).set_intersection(__pyx_v_other_);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 3120, __pyx_L1_error)
  }

  /* "symengine/lib/symengine_wrapper.pyx":3119
 *         cdef Set other = sympify(a)
 *         cdef RCP[const symengine.Set] other_ = symengine.rcp_static_cast_Set(other.thisptr)
 *         return c2py(<rcp_const_basic>(deref(symengine.rcp_static_cast_Set(self.thisptr))             # <<<<<<<<<<<<<<
 *                     .set_intersection(other_)))
 * 
*/
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)__pyx_t_5)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3119, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3116
 * cdef class Set(Expr):
 * 
 *     def intersection(self, a):             # <<<<<<<<<<<<<<
 *         cdef Set other = sympify(a)
 *         cdef RCP[const symengine.Set] other_ = symengine.rcp_static_cast_Set(other.thisptr)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Set.intersection", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_other);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3122
 *                     .set_intersection(other_)))
 * 
 *     def union(self, a):             # <<<<<<<<<<<<<<
 *         cdef Set other = sympify(a)
 *         cdef RCP[const symengine.Set] other_ = symengine.rcp_static_cast_Set(other.thisptr)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3Set_3union(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_3Set_3union = {"union", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_3Set_3union, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3Set_3union(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_a = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("union (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_a,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 3122, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3122, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "union", 0) < (0)) __PYX_ERR(0, 3122, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("union", 1, 1, 1, i); __PYX_ERR(0, 3122, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3122, __pyx_L3_error)
    }
    __pyx_v_a = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("union", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3122, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Set.union", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_3Set_2union(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Set *)__pyx_v_self), __pyx_v_a);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3Set_2union(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Set *__pyx_v_self, PyObject *__pyx_v_a) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Set *__pyx_v_other = 0;
  SymEngine::RCP<SymEngine::Set const >  __pyx_v_other_;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  SymEngine::RCP<SymEngine::Set const >  __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("union", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3123
 * 
 *     def union(self, a):
 *         cdef Set other = sympify(a)             # <<<<<<<<<<<<<<
 *         cdef RCP[const symengine.Set] other_ = symengine.rcp_static_cast_Set(other.thisptr)
 *         return c2py(<rcp_const_basic>(deref(symengine.rcp_static_cast_Set(self.thisptr))
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3123, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_a};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3123, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Set))))) __PYX_ERR(0, 3123, __pyx_L1_error)
  __pyx_v_other = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Set *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3124
 *     def union(self, a):
 *         cdef Set other = sympify(a)
 *         cdef RCP[const symengine.Set] other_ = symengine.rcp_static_cast_Set(other.thisptr)             # <<<<<<<<<<<<<<
 *         return c2py(<rcp_const_basic>(deref(symengine.rcp_static_cast_Set(self.thisptr))
 *                     .set_union(other_)))
*/
  __pyx_v_other_ = SymEngine::rcp_static_cast<const SymEngine::Set>(__pyx_v_other->__pyx_base.__pyx_base.thisptr);

  /* "symengine/lib/symengine_wrapper.pyx":3125
 *         cdef Set other = sympify(a)
 *         cdef RCP[const symengine.Set] other_ = symengine.rcp_static_cast_Set(other.thisptr)
 *         return c2py(<rcp_const_basic>(deref(symengine.rcp_static_cast_Set(self.thisptr))             # <<<<<<<<<<<<<<
 *                     .set_union(other_)))
 * 
*/
  __Pyx_XDECREF(__pyx_r);

  /* "symengine/lib/symengine_wrapper.pyx":3126
 *         cdef RCP[const symengine.Set] other_ = symengine.rcp_static_cast_Set(other.thisptr)
 *         return c2py(<rcp_const_basic>(deref(symengine.rcp_static_cast_Set(self.thisptr))
 *                     .set_union(other_)))             # <<<<<<<<<<<<<<
 * 
 *     def complement(self, a):
*/
  try {
    __pyx_t_5 = (*SymEngine::rcp_static_cast<const SymEngine::Set>(__pyx_v_self->__pyx_base.__pyx_base.thisptr)).set_union(__pyx_v_other_);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 3126, __pyx_L1_error)
  }

  /* "symengine/lib/symengine_wrapper.pyx":3125
 *         cdef Set other = sympify(a)
 *         cdef RCP[const symengine.Set] other_ = symengine.rcp_static_cast_Set(other.thisptr)
 *         return c2py(<rcp_const_basic>(deref(symengine.rcp_static_cast_Set(self.thisptr))             # <<<<<<<<<<<<<<
 *                     .set_union(other_)))
 * 
*/
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)__pyx_t_5)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3125, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3122
 *                     .set_intersection(other_)))
 * 
 *     def union(self, a):             # <<<<<<<<<<<<<<
 *         cdef Set other = sympify(a)
 *         cdef RCP[const symengine.Set] other_ = symengine.rcp_static_cast_Set(other.thisptr)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Set.union", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_other);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3128
 *                     .set_union(other_)))
 * 
 *     def complement(self, a):             # <<<<<<<<<<<<<<
 *         cdef Set other = sympify(a)
 *         cdef RCP[const symengine.Set] other_ = symengine.rcp_static_cast_Set(other.thisptr)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3Set_5complement(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_3Set_5complement = {"complement", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_3Set_5complement, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3Set_5complement(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_a = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("complement (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_a,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 3128, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3128, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "complement", 0) < (0)) __PYX_ERR(0, 3128, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("complement", 1, 1, 1, i); __PYX_ERR(0, 3128, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3128, __pyx_L3_error)
    }
    __pyx_v_a = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("complement", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3128, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Set.complement", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_3Set_4complement(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Set *)__pyx_v_self), __pyx_v_a);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3Set_4complement(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Set *__pyx_v_self, PyObject *__pyx_v_a) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Set *__pyx_v_other = 0;
  SymEngine::RCP<SymEngine::Set const >  __pyx_v_other_;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  SymEngine::RCP<SymEngine::Set const >  __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("complement", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3129
 * 
 *     def complement(self, a):
 *         cdef Set other = sympify(a)             # <<<<<<<<<<<<<<
 *         cdef RCP[const symengine.Set] other_ = symengine.rcp_static_cast_Set(other.thisptr)
 *         return c2py(<rcp_const_basic>(deref(symengine.rcp_static_cast_Set(self.thisptr))
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3129, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_a};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3129, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Set))))) __PYX_ERR(0, 3129, __pyx_L1_error)
  __pyx_v_other = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Set *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3130
 *     def complement(self, a):
 *         cdef Set other = sympify(a)
 *         cdef RCP[const symengine.Set] other_ = symengine.rcp_static_cast_Set(other.thisptr)             # <<<<<<<<<<<<<<
 *         return c2py(<rcp_const_basic>(deref(symengine.rcp_static_cast_Set(self.thisptr))
 *                     .set_complement(other_)))
*/
  __pyx_v_other_ = SymEngine::rcp_static_cast<const SymEngine::Set>(__pyx_v_other->__pyx_base.__pyx_base.thisptr);

  /* "symengine/lib/symengine_wrapper.pyx":3131
 *         cdef Set other = sympify(a)
 *         cdef RCP[const symengine.Set] other_ = symengine.rcp_static_cast_Set(other.thisptr)
 *         return c2py(<rcp_const_basic>(deref(symengine.rcp_static_cast_Set(self.thisptr))             # <<<<<<<<<<<<<<
 *                     .set_complement(other_)))
 * 
*/
  __Pyx_XDECREF(__pyx_r);

  /* "symengine/lib/symengine_wrapper.pyx":3132
 *         cdef RCP[const symengine.Set] other_ = symengine.rcp_static_cast_Set(other.thisptr)
 *         return c2py(<rcp_const_basic>(deref(symengine.rcp_static_cast_Set(self.thisptr))
 *                     .set_complement(other_)))             # <<<<<<<<<<<<<<
 * 
 *     def contains(self, a):
*/
  try {
    __pyx_t_5 = (*SymEngine::rcp_static_cast<const SymEngine::Set>(__pyx_v_self->__pyx_base.__pyx_base.thisptr)).set_complement(__pyx_v_other_);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 3132, __pyx_L1_error)
  }

  /* "symengine/lib/symengine_wrapper.pyx":3131
 *         cdef Set other = sympify(a)
 *         cdef RCP[const symengine.Set] other_ = symengine.rcp_static_cast_Set(other.thisptr)
 *         return c2py(<rcp_const_basic>(deref(symengine.rcp_static_cast_Set(self.thisptr))             # <<<<<<<<<<<<<<
 *                     .set_complement(other_)))
 * 
*/
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)__pyx_t_5)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3131, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3128
 *                     .set_union(other_)))
 * 
 *     def complement(self, a):             # <<<<<<<<<<<<<<
 *         cdef Set other = sympify(a)
 *         cdef RCP[const symengine.Set] other_ = symengine.rcp_static_cast_Set(other.thisptr)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Set.complement", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_other);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3134
 *                     .set_complement(other_)))
 * 
 *     def contains(self, a):             # <<<<<<<<<<<<<<
 *         cdef Basic a_ = sympify(a)
 *         return c2py(<rcp_const_basic>(deref(symengine.rcp_static_cast_Set(self.thisptr))
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3Set_7contains(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_3Set_7contains = {"contains", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_3Set_7contains, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_3Set_7contains(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_a = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("contains (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_a,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 3134, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3134, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "contains", 0) < (0)) __PYX_ERR(0, 3134, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("contains", 1, 1, 1, i); __PYX_ERR(0, 3134, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3134, __pyx_L3_error)
    }
    __pyx_v_a = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("contains", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3134, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Set.contains", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_3Set_6contains(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Set *)__pyx_v_self), __pyx_v_a);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_3Set_6contains(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Set *__pyx_v_self, PyObject *__pyx_v_a) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_a_ = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  SymEngine::RCP<SymEngine::Boolean const >  __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("contains", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3135
 * 
 *     def contains(self, a):
 *         cdef Basic a_ = sympify(a)             # <<<<<<<<<<<<<<
 *         return c2py(<rcp_const_basic>(deref(symengine.rcp_static_cast_Set(self.thisptr))
 *                     .contains(a_.thisptr)))
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3135, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_a};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3135, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 3135, __pyx_L1_error)
  __pyx_v_a_ = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3136
 *     def contains(self, a):
 *         cdef Basic a_ = sympify(a)
 *         return c2py(<rcp_const_basic>(deref(symengine.rcp_static_cast_Set(self.thisptr))             # <<<<<<<<<<<<<<
 *                     .contains(a_.thisptr)))
 * 
*/
  __Pyx_XDECREF(__pyx_r);

  /* "symengine/lib/symengine_wrapper.pyx":3137
 *         cdef Basic a_ = sympify(a)
 *         return c2py(<rcp_const_basic>(deref(symengine.rcp_static_cast_Set(self.thisptr))
 *                     .contains(a_.thisptr)))             # <<<<<<<<<<<<<<
 * 
 * 
*/
  try {
    __pyx_t_5 = (*SymEngine::rcp_static_cast<const SymEngine::Set>(__pyx_v_self->__pyx_base.__pyx_base.thisptr)).contains(__pyx_v_a_->thisptr);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 3137, __pyx_L1_error)
  }

  /* "symengine/lib/symengine_wrapper.pyx":3136
 *     def contains(self, a):
 *         cdef Basic a_ = sympify(a)
 *         return c2py(<rcp_const_basic>(deref(symengine.rcp_static_cast_Set(self.thisptr))             # <<<<<<<<<<<<<<
 *                     .contains(a_.thisptr)))
 * 
*/
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)__pyx_t_5)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3136, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3134
 *                     .set_complement(other_)))
 * 
 *     def contains(self, a):             # <<<<<<<<<<<<<<
 *         cdef Basic a_ = sympify(a)
 *         return c2py(<rcp_const_basic>(deref(symengine.rcp_static_cast_Set(self.thisptr))
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Set.contains", __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;
}

/* "symengine/lib/symengine_wrapper.pyx":3142
 * class Interval(Set):
 * 
 *     def __new__(self, *args, left_open=None, right_open=None):             # <<<<<<<<<<<<<<
 *         list_args = list(args)
 *         if ((left_open is not None) and (right_open is None)) or ((left_open is None) and (right_open is not None)):
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8Interval_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_8Interval_1__new__ = {"__new__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_8Interval_1__new__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8Interval_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_left_open = 0;
  PyObject *__pyx_v_right_open = 0;
  PyObject *__pyx_v_args = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  __pyx_v_args = __Pyx_ArgsSlice_FASTCALL(__pyx_args, 1, __pyx_nargs);
  if (unlikely(!__pyx_v_args)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_v_args);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_left_open,&__pyx_mstate_global->__pyx_n_u_right_open,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 3142, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        default:
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3142, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      const Py_ssize_t used_pos_args = (kwd_pos_args < 1) ? kwd_pos_args : 1;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, used_pos_args, __pyx_kwds_len, "__new__", 0) < (0)) __PYX_ERR(0, 3142, __pyx_L3_error)
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__new__", 0, 1, 1, i); __PYX_ERR(0, 3142, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs < 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3142, __pyx_L3_error)
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_self = values[0];
    __pyx_v_left_open = values[1];
    __pyx_v_right_open = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 0, 1, 1, __pyx_nargs); __PYX_ERR(0, 3142, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Interval.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_8Interval___new__(__pyx_self, __pyx_v_self, __pyx_v_left_open, __pyx_v_right_open, __pyx_v_args);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_args);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8Interval___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_left_open, PyObject *__pyx_v_right_open, PyObject *__pyx_v_args) {
  PyObject *__pyx_v_list_args = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__new__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3143
 * 
 *     def __new__(self, *args, left_open=None, right_open=None):
 *         list_args = list(args)             # <<<<<<<<<<<<<<
 *         if ((left_open is not None) and (right_open is None)) or ((left_open is None) and (right_open is not None)):
 *             raise ValueError("Both (or neither) keyword arguments for Interval should be specified")
*/
  __pyx_t_1 = PySequence_List(__pyx_v_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3143, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_list_args = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3144
 *     def __new__(self, *args, left_open=None, right_open=None):
 *         list_args = list(args)
 *         if ((left_open is not None) and (right_open is None)) or ((left_open is None) and (right_open is not None)):             # <<<<<<<<<<<<<<
 *             raise ValueError("Both (or neither) keyword arguments for Interval should be specified")
 *         if left_open is not None:
*/
  __pyx_t_3 = (__pyx_v_left_open != Py_None);
  if (!__pyx_t_3) {
    goto __pyx_L5_next_or;
  } else {
  }
  __pyx_t_3 = (__pyx_v_right_open == Py_None);
  if (!__pyx_t_3) {
  } else {
    __pyx_t_2 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_L5_next_or:;
  __pyx_t_3 = (__pyx_v_left_open == Py_None);
  if (__pyx_t_3) {
  } else {
    __pyx_t_2 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = (__pyx_v_right_open != Py_None);
  __pyx_t_2 = __pyx_t_3;
  __pyx_L4_bool_binop_done:;
  if (unlikely(__pyx_t_2)) {

    /* "symengine/lib/symengine_wrapper.pyx":3145
 *         list_args = list(args)
 *         if ((left_open is not None) and (right_open is None)) or ((left_open is None) and (right_open is not None)):
 *             raise ValueError("Both (or neither) keyword arguments for Interval should be specified")             # <<<<<<<<<<<<<<
 *         if left_open is not None:
 *             list_args.append(left_open)
*/
    __pyx_t_4 = NULL;
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Both_or_neither_keyword_argument};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3145, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 3145, __pyx_L1_error)

    /* "symengine/lib/symengine_wrapper.pyx":3144
 *     def __new__(self, *args, left_open=None, right_open=None):
 *         list_args = list(args)
 *         if ((left_open is not None) and (right_open is None)) or ((left_open is None) and (right_open is not None)):             # <<<<<<<<<<<<<<
 *             raise ValueError("Both (or neither) keyword arguments for Interval should be specified")
 *         if left_open is not None:
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":3146
 *         if ((left_open is not None) and (right_open is None)) or ((left_open is None) and (right_open is not None)):
 *             raise ValueError("Both (or neither) keyword arguments for Interval should be specified")
 *         if left_open is not None:             # <<<<<<<<<<<<<<
 *             list_args.append(left_open)
 *         if right_open is not None:
*/
  __pyx_t_2 = (__pyx_v_left_open != Py_None);
  if (__pyx_t_2) {

    /* "symengine/lib/symengine_wrapper.pyx":3147
 *             raise ValueError("Both (or neither) keyword arguments for Interval should be specified")
 *         if left_open is not None:
 *             list_args.append(left_open)             # <<<<<<<<<<<<<<
 *         if right_open is not None:
 *             list_args.append(right_open)
*/
    __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_list_args, __pyx_v_left_open); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 3147, __pyx_L1_error)

    /* "symengine/lib/symengine_wrapper.pyx":3146
 *         if ((left_open is not None) and (right_open is None)) or ((left_open is None) and (right_open is not None)):
 *             raise ValueError("Both (or neither) keyword arguments for Interval should be specified")
 *         if left_open is not None:             # <<<<<<<<<<<<<<
 *             list_args.append(left_open)
 *         if right_open is not None:
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":3148
 *         if left_open is not None:
 *             list_args.append(left_open)
 *         if right_open is not None:             # <<<<<<<<<<<<<<
 *             list_args.append(right_open)
 *         return interval(*list_args)
*/
  __pyx_t_2 = (__pyx_v_right_open != Py_None);
  if (__pyx_t_2) {

    /* "symengine/lib/symengine_wrapper.pyx":3149
 *             list_args.append(left_open)
 *         if right_open is not None:
 *             list_args.append(right_open)             # <<<<<<<<<<<<<<
 *         return interval(*list_args)
 * 
*/
    __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_list_args, __pyx_v_right_open); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 3149, __pyx_L1_error)

    /* "symengine/lib/symengine_wrapper.pyx":3148
 *         if left_open is not None:
 *             list_args.append(left_open)
 *         if right_open is not None:             # <<<<<<<<<<<<<<
 *             list_args.append(right_open)
 *         return interval(*list_args)
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":3150
 *         if right_open is not None:
 *             list_args.append(right_open)
 *         return interval(*list_args)             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_interval); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3150, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PySequence_Tuple(__pyx_v_list_args); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3150, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3150, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_7;
  __pyx_t_7 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3142
 * class Interval(Set):
 * 
 *     def __new__(self, *args, left_open=None, right_open=None):             # <<<<<<<<<<<<<<
 *         list_args = list(args)
 *         if ((left_open is not None) and (right_open is None)) or ((left_open is None) and (right_open is not None)):
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Interval.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_list_args);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3152
 *         return interval(*list_args)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def start(self):
 *         return self.args[0]
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8Interval_3start(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_8Interval_3start = {"start", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_8Interval_3start, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8Interval_3start(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("start (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 3152, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3152, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "start", 0) < (0)) __PYX_ERR(0, 3152, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("start", 1, 1, 1, i); __PYX_ERR(0, 3152, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3152, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("start", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3152, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Interval.start", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_8Interval_2start(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8Interval_2start(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("start", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3154
 *     @property
 *     def start(self):
 *         return self.args[0]             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3154, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3154, __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;

  /* "symengine/lib/symengine_wrapper.pyx":3152
 *         return interval(*list_args)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def start(self):
 *         return self.args[0]
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Interval.start", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3156
 *         return self.args[0]
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def end(self):
 *         return self.args[1]
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8Interval_5end(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_8Interval_5end = {"end", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_8Interval_5end, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8Interval_5end(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("end (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 3156, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3156, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "end", 0) < (0)) __PYX_ERR(0, 3156, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("end", 1, 1, 1, i); __PYX_ERR(0, 3156, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3156, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("end", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3156, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Interval.end", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_8Interval_4end(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8Interval_4end(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("end", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3158
 *     @property
 *     def end(self):
 *         return self.args[1]             # <<<<<<<<<<<<<<
 * 
 *     def _sympy_(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3158, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3158, __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;

  /* "symengine/lib/symengine_wrapper.pyx":3156
 *         return self.args[0]
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def end(self):
 *         return self.args[1]
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Interval.end", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3160
 *         return self.args[1]
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.Interval(*[arg._sympy_() for arg in self.args])
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8Interval_7_sympy_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_8Interval_7_sympy_ = {"_sympy_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_8Interval_7_sympy_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8Interval_7_sympy_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sympy_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 3160, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3160, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_sympy_", 0) < (0)) __PYX_ERR(0, 3160, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 1, 1, i); __PYX_ERR(0, 3160, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3160, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3160, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Interval._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_8Interval_6_sympy_(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8Interval_6_sympy_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_sympy = NULL;
  PyObject *__pyx_8genexpr5__pyx_v_arg = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  PyObject *(*__pyx_t_7)(PyObject *);
  PyObject *__pyx_t_8 = NULL;
  size_t __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sympy_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3161
 * 
 *     def _sympy_(self):
 *         import sympy             # <<<<<<<<<<<<<<
 *         return sympy.Interval(*[arg._sympy_() for arg in self.args])
 * 
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sympy, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3161, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sympy = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3162
 *     def _sympy_(self):
 *         import sympy
 *         return sympy.Interval(*[arg._sympy_() for arg in self.args])             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_Interval); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  { /* enter inner scope */
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3162, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3162, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
      __pyx_t_5 = __pyx_t_4; __Pyx_INCREF(__pyx_t_5);
      __pyx_t_6 = 0;
      __pyx_t_7 = NULL;
    } else {
      __pyx_t_6 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3162, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3162, __pyx_L5_error)
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    for (;;) {
      if (likely(!__pyx_t_7)) {
        if (likely(PyList_CheckExact(__pyx_t_5))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_5);
            #if !CYTHON_ASSUME_SAFE_SIZE
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3162, __pyx_L5_error)
            #endif
            if (__pyx_t_6 >= __pyx_temp) break;
          }
          __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_5, __pyx_t_6, __Pyx_ReferenceSharing_OwnStrongReference);
          ++__pyx_t_6;
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_5);
            #if !CYTHON_ASSUME_SAFE_SIZE
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3162, __pyx_L5_error)
            #endif
            if (__pyx_t_6 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_6));
          #else
          __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_5, __pyx_t_6);
          #endif
          ++__pyx_t_6;
        }
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3162, __pyx_L5_error)
      } else {
        __pyx_t_4 = __pyx_t_7(__pyx_t_5);
        if (unlikely(!__pyx_t_4)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 3162, __pyx_L5_error)
            PyErr_Clear();
          }
          break;
        }
      }
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_XDECREF_SET(__pyx_8genexpr5__pyx_v_arg, __pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_8 = __pyx_8genexpr5__pyx_v_arg;
      __Pyx_INCREF(__pyx_t_8);
      __pyx_t_9 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL};
        __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_sympy_2, __pyx_callargs+__pyx_t_9, (1-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3162, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_4);
      }
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 3162, __pyx_L5_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_8genexpr5__pyx_v_arg); __pyx_8genexpr5__pyx_v_arg = 0;
    goto __pyx_L9_exit_scope;
    __pyx_L5_error:;
    __Pyx_XDECREF(__pyx_8genexpr5__pyx_v_arg); __pyx_8genexpr5__pyx_v_arg = 0;
    goto __pyx_L1_error;
    __pyx_L9_exit_scope:;
  } /* exit inner scope */
  __pyx_t_5 = PySequence_Tuple(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3160
 *         return self.args[1]
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.Interval(*[arg._sympy_() for arg in self.args])
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Interval._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sympy);
  __Pyx_XDECREF(__pyx_8genexpr5__pyx_v_arg);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3167
 * class EmptySet(Set):
 * 
 *     def __new__(self):             # <<<<<<<<<<<<<<
 *         return emptyset()
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8EmptySet_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_8EmptySet_1__new__ = {"__new__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_8EmptySet_1__new__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8EmptySet_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 3167, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3167, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__new__", 0) < (0)) __PYX_ERR(0, 3167, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__new__", 1, 1, 1, i); __PYX_ERR(0, 3167, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3167, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3167, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.EmptySet.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_8EmptySet___new__(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8EmptySet___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__new__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3168
 * 
 *     def __new__(self):
 *         return emptyset()             # <<<<<<<<<<<<<<
 * 
 *     def _sympy_(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_emptyset); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3168, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3168, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3167
 * class EmptySet(Set):
 * 
 *     def __new__(self):             # <<<<<<<<<<<<<<
 *         return emptyset()
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.EmptySet.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3170
 *         return emptyset()
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.S.EmptySet
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8EmptySet_3_sympy_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_8EmptySet_3_sympy_ = {"_sympy_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_8EmptySet_3_sympy_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8EmptySet_3_sympy_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sympy_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 3170, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3170, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_sympy_", 0) < (0)) __PYX_ERR(0, 3170, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 1, 1, i); __PYX_ERR(0, 3170, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3170, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3170, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.EmptySet._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_8EmptySet_2_sympy_(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8EmptySet_2_sympy_(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  PyObject *__pyx_v_sympy = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sympy_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3171
 * 
 *     def _sympy_(self):
 *         import sympy             # <<<<<<<<<<<<<<
 *         return sympy.S.EmptySet
 * 
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sympy, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3171, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sympy = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3172
 *     def _sympy_(self):
 *         import sympy
 *         return sympy.S.EmptySet             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_S); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3172, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_EmptySet); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3172, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3170
 *         return emptyset()
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.S.EmptySet
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.EmptySet._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sympy);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3174
 *         return sympy.S.EmptySet
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def func(self):
 *         return self.__class__
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8EmptySet_5func(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_8EmptySet_5func = {"func", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_8EmptySet_5func, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8EmptySet_5func(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("func (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 3174, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3174, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "func", 0) < (0)) __PYX_ERR(0, 3174, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("func", 1, 1, 1, i); __PYX_ERR(0, 3174, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3174, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("func", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3174, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.EmptySet.func", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_8EmptySet_4func(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8EmptySet_4func(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("func", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3176
 *     @property
 *     def func(self):
 *         return self.__class__             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3176, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3174
 *         return sympy.S.EmptySet
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def func(self):
 *         return self.__class__
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.EmptySet.func", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3181
 * class Reals(Set):
 * 
 *     def __new__(self):             # <<<<<<<<<<<<<<
 *         return reals()
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Reals_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_5Reals_1__new__ = {"__new__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_5Reals_1__new__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Reals_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 3181, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3181, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__new__", 0) < (0)) __PYX_ERR(0, 3181, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__new__", 1, 1, 1, i); __PYX_ERR(0, 3181, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3181, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3181, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Reals.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Reals___new__(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Reals___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__new__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3182
 * 
 *     def __new__(self):
 *         return reals()             # <<<<<<<<<<<<<<
 * 
 *     def _sympy_(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_reals); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3182, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3181
 * class Reals(Set):
 * 
 *     def __new__(self):             # <<<<<<<<<<<<<<
 *         return reals()
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Reals.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3184
 *         return reals()
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.S.Reals
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Reals_3_sympy_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_5Reals_3_sympy_ = {"_sympy_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_5Reals_3_sympy_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Reals_3_sympy_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sympy_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 3184, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3184, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_sympy_", 0) < (0)) __PYX_ERR(0, 3184, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 1, 1, i); __PYX_ERR(0, 3184, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3184, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3184, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Reals._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Reals_2_sympy_(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Reals_2_sympy_(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  PyObject *__pyx_v_sympy = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sympy_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3185
 * 
 *     def _sympy_(self):
 *         import sympy             # <<<<<<<<<<<<<<
 *         return sympy.S.Reals
 * 
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sympy, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3185, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sympy = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3186
 *     def _sympy_(self):
 *         import sympy
 *         return sympy.S.Reals             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_S); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3186, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_Reals); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3186, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3184
 *         return reals()
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.S.Reals
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Reals._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sympy);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3188
 *         return sympy.S.Reals
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def func(self):
 *         return self.__class__
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Reals_5func(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_5Reals_5func = {"func", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_5Reals_5func, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Reals_5func(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("func (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 3188, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3188, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "func", 0) < (0)) __PYX_ERR(0, 3188, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("func", 1, 1, 1, i); __PYX_ERR(0, 3188, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3188, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("func", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3188, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Reals.func", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Reals_4func(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Reals_4func(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("func", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3190
 *     @property
 *     def func(self):
 *         return self.__class__             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3190, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3188
 *         return sympy.S.Reals
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def func(self):
 *         return self.__class__
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Reals.func", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3195
 * class Rationals(Set):
 * 
 *     def __new__(self):             # <<<<<<<<<<<<<<
 *         return rationals()
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9Rationals_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_9Rationals_1__new__ = {"__new__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_9Rationals_1__new__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9Rationals_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 3195, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3195, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__new__", 0) < (0)) __PYX_ERR(0, 3195, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__new__", 1, 1, 1, i); __PYX_ERR(0, 3195, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3195, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3195, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Rationals.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_9Rationals___new__(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_9Rationals___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__new__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3196
 * 
 *     def __new__(self):
 *         return rationals()             # <<<<<<<<<<<<<<
 * 
 *     def _sympy_(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_rationals); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3196, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3196, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3195
 * class Rationals(Set):
 * 
 *     def __new__(self):             # <<<<<<<<<<<<<<
 *         return rationals()
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Rationals.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3198
 *         return rationals()
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.S.Rationals
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9Rationals_3_sympy_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_9Rationals_3_sympy_ = {"_sympy_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_9Rationals_3_sympy_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9Rationals_3_sympy_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sympy_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 3198, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3198, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_sympy_", 0) < (0)) __PYX_ERR(0, 3198, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 1, 1, i); __PYX_ERR(0, 3198, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3198, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3198, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Rationals._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_9Rationals_2_sympy_(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_9Rationals_2_sympy_(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  PyObject *__pyx_v_sympy = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sympy_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3199
 * 
 *     def _sympy_(self):
 *         import sympy             # <<<<<<<<<<<<<<
 *         return sympy.S.Rationals
 * 
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sympy, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3199, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sympy = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3200
 *     def _sympy_(self):
 *         import sympy
 *         return sympy.S.Rationals             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_S); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_Rationals); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3198
 *         return rationals()
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.S.Rationals
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Rationals._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sympy);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3202
 *         return sympy.S.Rationals
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def func(self):
 *         return self.__class__
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9Rationals_5func(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_9Rationals_5func = {"func", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_9Rationals_5func, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9Rationals_5func(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("func (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 3202, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3202, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "func", 0) < (0)) __PYX_ERR(0, 3202, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("func", 1, 1, 1, i); __PYX_ERR(0, 3202, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3202, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("func", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3202, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Rationals.func", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_9Rationals_4func(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_9Rationals_4func(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("func", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3204
 *     @property
 *     def func(self):
 *         return self.__class__             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3202
 *         return sympy.S.Rationals
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def func(self):
 *         return self.__class__
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Rationals.func", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3209
 * class Integers(Set):
 * 
 *     def __new__(self):             # <<<<<<<<<<<<<<
 *         return integers()
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8Integers_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_8Integers_1__new__ = {"__new__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_8Integers_1__new__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8Integers_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 3209, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3209, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__new__", 0) < (0)) __PYX_ERR(0, 3209, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__new__", 1, 1, 1, i); __PYX_ERR(0, 3209, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3209, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3209, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Integers.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_8Integers___new__(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8Integers___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__new__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3210
 * 
 *     def __new__(self):
 *         return integers()             # <<<<<<<<<<<<<<
 * 
 *     def _sympy_(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_integers); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3210, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3210, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3209
 * class Integers(Set):
 * 
 *     def __new__(self):             # <<<<<<<<<<<<<<
 *         return integers()
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Integers.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3212
 *         return integers()
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.S.Integers
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8Integers_3_sympy_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_8Integers_3_sympy_ = {"_sympy_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_8Integers_3_sympy_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8Integers_3_sympy_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sympy_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 3212, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3212, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_sympy_", 0) < (0)) __PYX_ERR(0, 3212, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 1, 1, i); __PYX_ERR(0, 3212, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3212, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3212, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Integers._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_8Integers_2_sympy_(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8Integers_2_sympy_(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  PyObject *__pyx_v_sympy = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sympy_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3213
 * 
 *     def _sympy_(self):
 *         import sympy             # <<<<<<<<<<<<<<
 *         return sympy.S.Integers
 * 
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sympy, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3213, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sympy = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3214
 *     def _sympy_(self):
 *         import sympy
 *         return sympy.S.Integers             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_S); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3214, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_Integers); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3214, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3212
 *         return integers()
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.S.Integers
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Integers._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sympy);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3216
 *         return sympy.S.Integers
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def func(self):
 *         return self.__class__
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8Integers_5func(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_8Integers_5func = {"func", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_8Integers_5func, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8Integers_5func(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("func (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 3216, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3216, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "func", 0) < (0)) __PYX_ERR(0, 3216, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("func", 1, 1, 1, i); __PYX_ERR(0, 3216, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3216, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("func", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3216, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Integers.func", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_8Integers_4func(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8Integers_4func(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("func", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3218
 *     @property
 *     def func(self):
 *         return self.__class__             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3218, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3216
 *         return sympy.S.Integers
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def func(self):
 *         return self.__class__
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Integers.func", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3223
 * class UniversalSet(Set):
 * 
 *     def __new__(self):             # <<<<<<<<<<<<<<
 *         return universalset()
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_12UniversalSet_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_12UniversalSet_1__new__ = {"__new__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_12UniversalSet_1__new__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_12UniversalSet_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 3223, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3223, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__new__", 0) < (0)) __PYX_ERR(0, 3223, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__new__", 1, 1, 1, i); __PYX_ERR(0, 3223, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3223, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3223, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.UniversalSet.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_12UniversalSet___new__(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_12UniversalSet___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__new__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3224
 * 
 *     def __new__(self):
 *         return universalset()             # <<<<<<<<<<<<<<
 * 
 *     def _sympy_(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_universalset); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3224, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3224, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3223
 * class UniversalSet(Set):
 * 
 *     def __new__(self):             # <<<<<<<<<<<<<<
 *         return universalset()
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.UniversalSet.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3226
 *         return universalset()
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.S.UniversalSet
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_12UniversalSet_3_sympy_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_12UniversalSet_3_sympy_ = {"_sympy_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_12UniversalSet_3_sympy_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_12UniversalSet_3_sympy_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sympy_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 3226, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3226, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_sympy_", 0) < (0)) __PYX_ERR(0, 3226, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 1, 1, i); __PYX_ERR(0, 3226, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3226, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3226, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.UniversalSet._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_12UniversalSet_2_sympy_(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_12UniversalSet_2_sympy_(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  PyObject *__pyx_v_sympy = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sympy_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3227
 * 
 *     def _sympy_(self):
 *         import sympy             # <<<<<<<<<<<<<<
 *         return sympy.S.UniversalSet
 * 
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sympy, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3227, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sympy = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3228
 *     def _sympy_(self):
 *         import sympy
 *         return sympy.S.UniversalSet             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_S); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3228, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_UniversalSet); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3228, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3226
 *         return universalset()
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.S.UniversalSet
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.UniversalSet._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sympy);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3230
 *         return sympy.S.UniversalSet
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def func(self):
 *         return self.__class__
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_12UniversalSet_5func(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_12UniversalSet_5func = {"func", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_12UniversalSet_5func, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_12UniversalSet_5func(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("func (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 3230, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3230, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "func", 0) < (0)) __PYX_ERR(0, 3230, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("func", 1, 1, 1, i); __PYX_ERR(0, 3230, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3230, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("func", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3230, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.UniversalSet.func", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_12UniversalSet_4func(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_12UniversalSet_4func(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("func", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3232
 *     @property
 *     def func(self):
 *         return self.__class__             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3232, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3230
 *         return sympy.S.UniversalSet
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def func(self):
 *         return self.__class__
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.UniversalSet.func", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3237
 * class FiniteSet(Set):
 * 
 *     def __new__(self, *args):             # <<<<<<<<<<<<<<
 *         return finiteset(*args)
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9FiniteSet_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_9FiniteSet_1__new__ = {"__new__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_9FiniteSet_1__new__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9FiniteSet_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_args = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  __pyx_v_args = __Pyx_ArgsSlice_FASTCALL(__pyx_args, 1, __pyx_nargs);
  if (unlikely(!__pyx_v_args)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_v_args);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 3237, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        default:
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3237, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      const Py_ssize_t used_pos_args = (kwd_pos_args < 1) ? kwd_pos_args : 1;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, used_pos_args, __pyx_kwds_len, "__new__", 0) < (0)) __PYX_ERR(0, 3237, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__new__", 0, 1, 1, i); __PYX_ERR(0, 3237, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs < 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3237, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 0, 1, 1, __pyx_nargs); __PYX_ERR(0, 3237, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.FiniteSet.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_9FiniteSet___new__(__pyx_self, __pyx_v_self, __pyx_v_args);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_args);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_9FiniteSet___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_args) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__new__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3238
 * 
 *     def __new__(self, *args):
 *         return finiteset(*args)             # <<<<<<<<<<<<<<
 * 
 *     def _sympy_(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_finiteset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3238, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3238, __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;

  /* "symengine/lib/symengine_wrapper.pyx":3237
 * class FiniteSet(Set):
 * 
 *     def __new__(self, *args):             # <<<<<<<<<<<<<<
 *         return finiteset(*args)
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.FiniteSet.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3240
 *         return finiteset(*args)
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.FiniteSet(*[arg._sympy_() for arg in self.args])
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9FiniteSet_3_sympy_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_9FiniteSet_3_sympy_ = {"_sympy_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_9FiniteSet_3_sympy_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9FiniteSet_3_sympy_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sympy_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 3240, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3240, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_sympy_", 0) < (0)) __PYX_ERR(0, 3240, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 1, 1, i); __PYX_ERR(0, 3240, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3240, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3240, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.FiniteSet._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_9FiniteSet_2_sympy_(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_9FiniteSet_2_sympy_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_sympy = NULL;
  PyObject *__pyx_8genexpr6__pyx_v_arg = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  PyObject *(*__pyx_t_7)(PyObject *);
  PyObject *__pyx_t_8 = NULL;
  size_t __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sympy_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3241
 * 
 *     def _sympy_(self):
 *         import sympy             # <<<<<<<<<<<<<<
 *         return sympy.FiniteSet(*[arg._sympy_() for arg in self.args])
 * 
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sympy, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3241, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sympy = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3242
 *     def _sympy_(self):
 *         import sympy
 *         return sympy.FiniteSet(*[arg._sympy_() for arg in self.args])             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_FiniteSet); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3242, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  { /* enter inner scope */
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3242, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3242, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
      __pyx_t_5 = __pyx_t_4; __Pyx_INCREF(__pyx_t_5);
      __pyx_t_6 = 0;
      __pyx_t_7 = NULL;
    } else {
      __pyx_t_6 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3242, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3242, __pyx_L5_error)
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    for (;;) {
      if (likely(!__pyx_t_7)) {
        if (likely(PyList_CheckExact(__pyx_t_5))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_5);
            #if !CYTHON_ASSUME_SAFE_SIZE
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3242, __pyx_L5_error)
            #endif
            if (__pyx_t_6 >= __pyx_temp) break;
          }
          __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_5, __pyx_t_6, __Pyx_ReferenceSharing_OwnStrongReference);
          ++__pyx_t_6;
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_5);
            #if !CYTHON_ASSUME_SAFE_SIZE
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3242, __pyx_L5_error)
            #endif
            if (__pyx_t_6 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_6));
          #else
          __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_5, __pyx_t_6);
          #endif
          ++__pyx_t_6;
        }
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3242, __pyx_L5_error)
      } else {
        __pyx_t_4 = __pyx_t_7(__pyx_t_5);
        if (unlikely(!__pyx_t_4)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 3242, __pyx_L5_error)
            PyErr_Clear();
          }
          break;
        }
      }
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_XDECREF_SET(__pyx_8genexpr6__pyx_v_arg, __pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_8 = __pyx_8genexpr6__pyx_v_arg;
      __Pyx_INCREF(__pyx_t_8);
      __pyx_t_9 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL};
        __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_sympy_2, __pyx_callargs+__pyx_t_9, (1-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3242, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_4);
      }
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 3242, __pyx_L5_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_8genexpr6__pyx_v_arg); __pyx_8genexpr6__pyx_v_arg = 0;
    goto __pyx_L9_exit_scope;
    __pyx_L5_error:;
    __Pyx_XDECREF(__pyx_8genexpr6__pyx_v_arg); __pyx_8genexpr6__pyx_v_arg = 0;
    goto __pyx_L1_error;
    __pyx_L9_exit_scope:;
  } /* exit inner scope */
  __pyx_t_5 = PySequence_Tuple(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3242, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3242, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3240
 *         return finiteset(*args)
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.FiniteSet(*[arg._sympy_() for arg in self.args])
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.FiniteSet._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sympy);
  __Pyx_XDECREF(__pyx_8genexpr6__pyx_v_arg);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3247
 * class Contains(Boolean):
 * 
 *     def __new__(self, expr, sset):             # <<<<<<<<<<<<<<
 *         return contains(expr, sset)
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8Contains_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_8Contains_1__new__ = {"__new__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_8Contains_1__new__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8Contains_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_expr = 0;
  PyObject *__pyx_v_sset = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_expr,&__pyx_mstate_global->__pyx_n_u_sset,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 3247, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 3247, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3247, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3247, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__new__", 0) < (0)) __PYX_ERR(0, 3247, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__new__", 1, 3, 3, i); __PYX_ERR(0, 3247, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3247, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3247, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 3247, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
    __pyx_v_expr = values[1];
    __pyx_v_sset = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 3247, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Contains.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_8Contains___new__(__pyx_self, __pyx_v_self, __pyx_v_expr, __pyx_v_sset);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8Contains___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_expr, PyObject *__pyx_v_sset) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__new__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3248
 * 
 *     def __new__(self, expr, sset):
 *         return contains(expr, sset)             # <<<<<<<<<<<<<<
 * 
 *     def _sympy_(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_contains); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3248, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_expr, __pyx_v_sset};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3248, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3247
 * class Contains(Boolean):
 * 
 *     def __new__(self, expr, sset):             # <<<<<<<<<<<<<<
 *         return contains(expr, sset)
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Contains.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3250
 *         return contains(expr, sset)
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.Contains(*[arg._sympy_() for arg in self.args])
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8Contains_3_sympy_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_8Contains_3_sympy_ = {"_sympy_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_8Contains_3_sympy_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8Contains_3_sympy_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sympy_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 3250, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3250, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_sympy_", 0) < (0)) __PYX_ERR(0, 3250, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 1, 1, i); __PYX_ERR(0, 3250, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3250, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3250, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Contains._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_8Contains_2_sympy_(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8Contains_2_sympy_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_sympy = NULL;
  PyObject *__pyx_8genexpr7__pyx_v_arg = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  PyObject *(*__pyx_t_7)(PyObject *);
  PyObject *__pyx_t_8 = NULL;
  size_t __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sympy_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3251
 * 
 *     def _sympy_(self):
 *         import sympy             # <<<<<<<<<<<<<<
 *         return sympy.Contains(*[arg._sympy_() for arg in self.args])
 * 
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sympy, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3251, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sympy = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3252
 *     def _sympy_(self):
 *         import sympy
 *         return sympy.Contains(*[arg._sympy_() for arg in self.args])             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_Contains); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3252, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  { /* enter inner scope */
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3252, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3252, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
      __pyx_t_5 = __pyx_t_4; __Pyx_INCREF(__pyx_t_5);
      __pyx_t_6 = 0;
      __pyx_t_7 = NULL;
    } else {
      __pyx_t_6 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3252, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3252, __pyx_L5_error)
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    for (;;) {
      if (likely(!__pyx_t_7)) {
        if (likely(PyList_CheckExact(__pyx_t_5))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_5);
            #if !CYTHON_ASSUME_SAFE_SIZE
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3252, __pyx_L5_error)
            #endif
            if (__pyx_t_6 >= __pyx_temp) break;
          }
          __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_5, __pyx_t_6, __Pyx_ReferenceSharing_OwnStrongReference);
          ++__pyx_t_6;
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_5);
            #if !CYTHON_ASSUME_SAFE_SIZE
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3252, __pyx_L5_error)
            #endif
            if (__pyx_t_6 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_6));
          #else
          __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_5, __pyx_t_6);
          #endif
          ++__pyx_t_6;
        }
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3252, __pyx_L5_error)
      } else {
        __pyx_t_4 = __pyx_t_7(__pyx_t_5);
        if (unlikely(!__pyx_t_4)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 3252, __pyx_L5_error)
            PyErr_Clear();
          }
          break;
        }
      }
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_XDECREF_SET(__pyx_8genexpr7__pyx_v_arg, __pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_8 = __pyx_8genexpr7__pyx_v_arg;
      __Pyx_INCREF(__pyx_t_8);
      __pyx_t_9 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL};
        __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_sympy_2, __pyx_callargs+__pyx_t_9, (1-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3252, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_4);
      }
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 3252, __pyx_L5_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_8genexpr7__pyx_v_arg); __pyx_8genexpr7__pyx_v_arg = 0;
    goto __pyx_L9_exit_scope;
    __pyx_L5_error:;
    __Pyx_XDECREF(__pyx_8genexpr7__pyx_v_arg); __pyx_8genexpr7__pyx_v_arg = 0;
    goto __pyx_L1_error;
    __pyx_L9_exit_scope:;
  } /* exit inner scope */
  __pyx_t_5 = PySequence_Tuple(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3252, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3252, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3250
 *         return contains(expr, sset)
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.Contains(*[arg._sympy_() for arg in self.args])
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Contains._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sympy);
  __Pyx_XDECREF(__pyx_8genexpr7__pyx_v_arg);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3257
 * class Union(Set):
 * 
 *     def __new__(self, *args):             # <<<<<<<<<<<<<<
 *         return set_union(*args)
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Union_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_5Union_1__new__ = {"__new__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_5Union_1__new__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Union_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_args = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  __pyx_v_args = __Pyx_ArgsSlice_FASTCALL(__pyx_args, 1, __pyx_nargs);
  if (unlikely(!__pyx_v_args)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_v_args);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 3257, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        default:
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3257, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      const Py_ssize_t used_pos_args = (kwd_pos_args < 1) ? kwd_pos_args : 1;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, used_pos_args, __pyx_kwds_len, "__new__", 0) < (0)) __PYX_ERR(0, 3257, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__new__", 0, 1, 1, i); __PYX_ERR(0, 3257, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs < 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3257, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 0, 1, 1, __pyx_nargs); __PYX_ERR(0, 3257, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Union.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Union___new__(__pyx_self, __pyx_v_self, __pyx_v_args);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_args);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Union___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_args) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__new__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3258
 * 
 *     def __new__(self, *args):
 *         return set_union(*args)             # <<<<<<<<<<<<<<
 * 
 *     def _sympy_(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_set_union); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3258, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3258, __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;

  /* "symengine/lib/symengine_wrapper.pyx":3257
 * class Union(Set):
 * 
 *     def __new__(self, *args):             # <<<<<<<<<<<<<<
 *         return set_union(*args)
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Union.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3260
 *         return set_union(*args)
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.Union(*[arg._sympy_() for arg in self.args])
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Union_3_sympy_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_5Union_3_sympy_ = {"_sympy_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_5Union_3_sympy_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Union_3_sympy_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sympy_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 3260, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3260, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_sympy_", 0) < (0)) __PYX_ERR(0, 3260, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 1, 1, i); __PYX_ERR(0, 3260, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3260, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3260, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Union._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Union_2_sympy_(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Union_2_sympy_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_sympy = NULL;
  PyObject *__pyx_8genexpr8__pyx_v_arg = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  PyObject *(*__pyx_t_7)(PyObject *);
  PyObject *__pyx_t_8 = NULL;
  size_t __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sympy_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3261
 * 
 *     def _sympy_(self):
 *         import sympy             # <<<<<<<<<<<<<<
 *         return sympy.Union(*[arg._sympy_() for arg in self.args])
 * 
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sympy, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3261, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sympy = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3262
 *     def _sympy_(self):
 *         import sympy
 *         return sympy.Union(*[arg._sympy_() for arg in self.args])             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_Union); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3262, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  { /* enter inner scope */
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3262, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3262, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
      __pyx_t_5 = __pyx_t_4; __Pyx_INCREF(__pyx_t_5);
      __pyx_t_6 = 0;
      __pyx_t_7 = NULL;
    } else {
      __pyx_t_6 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3262, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3262, __pyx_L5_error)
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    for (;;) {
      if (likely(!__pyx_t_7)) {
        if (likely(PyList_CheckExact(__pyx_t_5))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_5);
            #if !CYTHON_ASSUME_SAFE_SIZE
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3262, __pyx_L5_error)
            #endif
            if (__pyx_t_6 >= __pyx_temp) break;
          }
          __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_5, __pyx_t_6, __Pyx_ReferenceSharing_OwnStrongReference);
          ++__pyx_t_6;
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_5);
            #if !CYTHON_ASSUME_SAFE_SIZE
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3262, __pyx_L5_error)
            #endif
            if (__pyx_t_6 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_6));
          #else
          __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_5, __pyx_t_6);
          #endif
          ++__pyx_t_6;
        }
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3262, __pyx_L5_error)
      } else {
        __pyx_t_4 = __pyx_t_7(__pyx_t_5);
        if (unlikely(!__pyx_t_4)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 3262, __pyx_L5_error)
            PyErr_Clear();
          }
          break;
        }
      }
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_XDECREF_SET(__pyx_8genexpr8__pyx_v_arg, __pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_8 = __pyx_8genexpr8__pyx_v_arg;
      __Pyx_INCREF(__pyx_t_8);
      __pyx_t_9 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL};
        __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_sympy_2, __pyx_callargs+__pyx_t_9, (1-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3262, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_4);
      }
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 3262, __pyx_L5_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_8genexpr8__pyx_v_arg); __pyx_8genexpr8__pyx_v_arg = 0;
    goto __pyx_L9_exit_scope;
    __pyx_L5_error:;
    __Pyx_XDECREF(__pyx_8genexpr8__pyx_v_arg); __pyx_8genexpr8__pyx_v_arg = 0;
    goto __pyx_L1_error;
    __pyx_L9_exit_scope:;
  } /* exit inner scope */
  __pyx_t_5 = PySequence_Tuple(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3262, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3262, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3260
 *         return set_union(*args)
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.Union(*[arg._sympy_() for arg in self.args])
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Union._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sympy);
  __Pyx_XDECREF(__pyx_8genexpr8__pyx_v_arg);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3267
 * class Complement(Set):
 * 
 *     def __new__(self, universe, container):             # <<<<<<<<<<<<<<
 *         return set_complement(universe, container)
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10Complement_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_10Complement_1__new__ = {"__new__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_10Complement_1__new__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10Complement_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_universe = 0;
  PyObject *__pyx_v_container = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_universe,&__pyx_mstate_global->__pyx_n_u_container,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 3267, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 3267, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3267, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3267, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__new__", 0) < (0)) __PYX_ERR(0, 3267, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__new__", 1, 3, 3, i); __PYX_ERR(0, 3267, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3267, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3267, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 3267, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
    __pyx_v_universe = values[1];
    __pyx_v_container = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 3267, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Complement.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_10Complement___new__(__pyx_self, __pyx_v_self, __pyx_v_universe, __pyx_v_container);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10Complement___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_universe, PyObject *__pyx_v_container) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__new__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3268
 * 
 *     def __new__(self, universe, container):
 *         return set_complement(universe, container)             # <<<<<<<<<<<<<<
 * 
 *     def _sympy_(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_set_complement); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3268, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_universe, __pyx_v_container};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3268, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3267
 * class Complement(Set):
 * 
 *     def __new__(self, universe, container):             # <<<<<<<<<<<<<<
 *         return set_complement(universe, container)
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Complement.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3270
 *         return set_complement(universe, container)
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.Complement(*[arg._sympy_() for arg in self.args])
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10Complement_3_sympy_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_10Complement_3_sympy_ = {"_sympy_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_10Complement_3_sympy_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10Complement_3_sympy_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sympy_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 3270, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3270, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_sympy_", 0) < (0)) __PYX_ERR(0, 3270, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 1, 1, i); __PYX_ERR(0, 3270, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3270, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3270, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Complement._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_10Complement_2_sympy_(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10Complement_2_sympy_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_sympy = NULL;
  PyObject *__pyx_8genexpr9__pyx_v_arg = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  PyObject *(*__pyx_t_7)(PyObject *);
  PyObject *__pyx_t_8 = NULL;
  size_t __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sympy_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3271
 * 
 *     def _sympy_(self):
 *         import sympy             # <<<<<<<<<<<<<<
 *         return sympy.Complement(*[arg._sympy_() for arg in self.args])
 * 
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sympy, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3271, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sympy = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3272
 *     def _sympy_(self):
 *         import sympy
 *         return sympy.Complement(*[arg._sympy_() for arg in self.args])             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sympy, __pyx_mstate_global->__pyx_n_u_Complement); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3272, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  { /* enter inner scope */
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3272, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_args); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3272, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
      __pyx_t_5 = __pyx_t_4; __Pyx_INCREF(__pyx_t_5);
      __pyx_t_6 = 0;
      __pyx_t_7 = NULL;
    } else {
      __pyx_t_6 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3272, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3272, __pyx_L5_error)
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    for (;;) {
      if (likely(!__pyx_t_7)) {
        if (likely(PyList_CheckExact(__pyx_t_5))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_5);
            #if !CYTHON_ASSUME_SAFE_SIZE
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3272, __pyx_L5_error)
            #endif
            if (__pyx_t_6 >= __pyx_temp) break;
          }
          __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_5, __pyx_t_6, __Pyx_ReferenceSharing_OwnStrongReference);
          ++__pyx_t_6;
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_5);
            #if !CYTHON_ASSUME_SAFE_SIZE
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3272, __pyx_L5_error)
            #endif
            if (__pyx_t_6 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_6));
          #else
          __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_5, __pyx_t_6);
          #endif
          ++__pyx_t_6;
        }
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3272, __pyx_L5_error)
      } else {
        __pyx_t_4 = __pyx_t_7(__pyx_t_5);
        if (unlikely(!__pyx_t_4)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 3272, __pyx_L5_error)
            PyErr_Clear();
          }
          break;
        }
      }
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_XDECREF_SET(__pyx_8genexpr9__pyx_v_arg, __pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_8 = __pyx_8genexpr9__pyx_v_arg;
      __Pyx_INCREF(__pyx_t_8);
      __pyx_t_9 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL};
        __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_sympy_2, __pyx_callargs+__pyx_t_9, (1-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3272, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_4);
      }
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 3272, __pyx_L5_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_8genexpr9__pyx_v_arg); __pyx_8genexpr9__pyx_v_arg = 0;
    goto __pyx_L9_exit_scope;
    __pyx_L5_error:;
    __Pyx_XDECREF(__pyx_8genexpr9__pyx_v_arg); __pyx_8genexpr9__pyx_v_arg = 0;
    goto __pyx_L1_error;
    __pyx_L9_exit_scope:;
  } /* exit inner scope */
  __pyx_t_5 = PySequence_Tuple(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3272, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3272, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3270
 *         return set_complement(universe, container)
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.Complement(*[arg._sympy_() for arg in self.args])
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Complement._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_sympy);
  __Pyx_XDECREF(__pyx_8genexpr9__pyx_v_arg);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3277
 * class ConditionSet(Set):
 * 
 *     def __new__(self, sym, condition):             # <<<<<<<<<<<<<<
 *         return conditionset(sym, condition)
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_12ConditionSet_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_12ConditionSet_1__new__ = {"__new__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_12ConditionSet_1__new__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_12ConditionSet_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_sym = 0;
  PyObject *__pyx_v_condition = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_sym,&__pyx_mstate_global->__pyx_n_u_condition,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 3277, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 3277, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3277, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3277, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__new__", 0) < (0)) __PYX_ERR(0, 3277, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__new__", 1, 3, 3, i); __PYX_ERR(0, 3277, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3277, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3277, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 3277, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
    __pyx_v_sym = values[1];
    __pyx_v_condition = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 3277, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.ConditionSet.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_12ConditionSet___new__(__pyx_self, __pyx_v_self, __pyx_v_sym, __pyx_v_condition);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_12ConditionSet___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_sym, PyObject *__pyx_v_condition) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__new__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3278
 * 
 *     def __new__(self, sym, condition):
 *         return conditionset(sym, condition)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_conditionset); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3278, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_sym, __pyx_v_condition};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3278, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3277
 * class ConditionSet(Set):
 * 
 *     def __new__(self, sym, condition):             # <<<<<<<<<<<<<<
 *         return conditionset(sym, condition)
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.ConditionSet.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3283
 * class ImageSet(Set):
 * 
 *     def __new__(self, sym, expr, base):             # <<<<<<<<<<<<<<
 *         return imageset(sym, expr, base)
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8ImageSet_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_8ImageSet_1__new__ = {"__new__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_8ImageSet_1__new__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_8ImageSet_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_sym = 0;
  PyObject *__pyx_v_expr = 0;
  PyObject *__pyx_v_base = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_sym,&__pyx_mstate_global->__pyx_n_u_expr,&__pyx_mstate_global->__pyx_n_u_base,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 3283, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 3283, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 3283, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3283, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3283, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__new__", 0) < (0)) __PYX_ERR(0, 3283, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 4; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__new__", 1, 4, 4, i); __PYX_ERR(0, 3283, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 4)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3283, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3283, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 3283, __pyx_L3_error)
      values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 3283, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
    __pyx_v_sym = values[1];
    __pyx_v_expr = values[2];
    __pyx_v_base = values[3];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 1, 4, 4, __pyx_nargs); __PYX_ERR(0, 3283, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.ImageSet.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_8ImageSet___new__(__pyx_self, __pyx_v_self, __pyx_v_sym, __pyx_v_expr, __pyx_v_base);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_8ImageSet___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_sym, PyObject *__pyx_v_expr, PyObject *__pyx_v_base) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__new__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3284
 * 
 *     def __new__(self, sym, expr, base):
 *         return imageset(sym, expr, base)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_imageset); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3284, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_2, __pyx_v_sym, __pyx_v_expr, __pyx_v_base};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (4-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3284, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3283
 * class ImageSet(Set):
 * 
 *     def __new__(self, sym, expr, base):             # <<<<<<<<<<<<<<
 *         return imageset(sym, expr, base)
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.ImageSet.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3290
 * cdef class MatrixBase:
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_Matrix(self):
 *         return True
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10MatrixBase_9is_Matrix_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10MatrixBase_9is_Matrix_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_10MatrixBase_9is_Matrix___get__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_MatrixBase *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10MatrixBase_9is_Matrix___get__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_MatrixBase *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3292
 *     @property
 *     def is_Matrix(self):
 *         return True             # <<<<<<<<<<<<<<
 * 
 *     def __richcmp__(a, b, int op):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_True);
  __pyx_r = Py_True;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3290
 * cdef class MatrixBase:
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_Matrix(self):
 *         return True
*/

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

/* "symengine/lib/symengine_wrapper.pyx":3294
 *         return True
 * 
 *     def __richcmp__(a, b, int op):             # <<<<<<<<<<<<<<
 *         A = _sympify(a, False)
 *         B = _sympify(b, False)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10MatrixBase_1__richcmp__(PyObject *__pyx_v_a, PyObject *__pyx_v_b, int __pyx_v_op); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10MatrixBase_1__richcmp__(PyObject *__pyx_v_a, PyObject *__pyx_v_b, int __pyx_v_op) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_10MatrixBase___richcmp__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_MatrixBase *)__pyx_v_a), ((PyObject *)__pyx_v_b), ((int)__pyx_v_op));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10MatrixBase___richcmp__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_MatrixBase *__pyx_v_a, PyObject *__pyx_v_b, int __pyx_v_op) {
  PyObject *__pyx_v_A = NULL;
  PyObject *__pyx_v_B = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__richcmp__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3295
 * 
 *     def __richcmp__(a, b, int op):
 *         A = _sympify(a, False)             # <<<<<<<<<<<<<<
 *         B = _sympify(b, False)
 *         if not (isinstance(A, MatrixBase) and isinstance(B, MatrixBase)):
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3295, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, ((PyObject *)__pyx_v_a), Py_False};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3295, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_A = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3296
 *     def __richcmp__(a, b, int op):
 *         A = _sympify(a, False)
 *         B = _sympify(b, False)             # <<<<<<<<<<<<<<
 *         if not (isinstance(A, MatrixBase) and isinstance(B, MatrixBase)):
 *             if (op == 2):
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_sympify_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3296, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_b, Py_False};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3296, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_B = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3297
 *         A = _sympify(a, False)
 *         B = _sympify(b, False)
 *         if not (isinstance(A, MatrixBase) and isinstance(B, MatrixBase)):             # <<<<<<<<<<<<<<
 *             if (op == 2):
 *                 return False
*/
  __pyx_t_6 = __Pyx_TypeCheck(__pyx_v_A, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_MatrixBase); 
  if (__pyx_t_6) {
  } else {
    __pyx_t_5 = __pyx_t_6;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_6 = __Pyx_TypeCheck(__pyx_v_B, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_MatrixBase); 
  __pyx_t_5 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  __pyx_t_6 = (!__pyx_t_5);
  if (__pyx_t_6) {

    /* "symengine/lib/symengine_wrapper.pyx":3298
 *         B = _sympify(b, False)
 *         if not (isinstance(A, MatrixBase) and isinstance(B, MatrixBase)):
 *             if (op == 2):             # <<<<<<<<<<<<<<
 *                 return False
 *             elif (op == 3):
*/
    switch (__pyx_v_op) {
      case 2:

      /* "symengine/lib/symengine_wrapper.pyx":3299
 *         if not (isinstance(A, MatrixBase) and isinstance(B, MatrixBase)):
 *             if (op == 2):
 *                 return False             # <<<<<<<<<<<<<<
 *             elif (op == 3):
 *                 return True
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_False);
      __pyx_r = Py_False;
      goto __pyx_L0;

      /* "symengine/lib/symengine_wrapper.pyx":3298
 *         B = _sympify(b, False)
 *         if not (isinstance(A, MatrixBase) and isinstance(B, MatrixBase)):
 *             if (op == 2):             # <<<<<<<<<<<<<<
 *                 return False
 *             elif (op == 3):
*/
      break;
      case 3:

      /* "symengine/lib/symengine_wrapper.pyx":3301
 *                 return False
 *             elif (op == 3):
 *                 return True             # <<<<<<<<<<<<<<
 *             return NotImplemented
 *         return A._richcmp_(B, op)
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_True);
      __pyx_r = Py_True;
      goto __pyx_L0;

      /* "symengine/lib/symengine_wrapper.pyx":3300
 *             if (op == 2):
 *                 return False
 *             elif (op == 3):             # <<<<<<<<<<<<<<
 *                 return True
 *             return NotImplemented
*/
      break;
      default: break;
    }

    /* "symengine/lib/symengine_wrapper.pyx":3302
 *             elif (op == 3):
 *                 return True
 *             return NotImplemented             # <<<<<<<<<<<<<<
 *         return A._richcmp_(B, op)
 * 
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_builtin_NotImplemented);
    __pyx_r = __pyx_builtin_NotImplemented;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":3297
 *         A = _sympify(a, False)
 *         B = _sympify(b, False)
 *         if not (isinstance(A, MatrixBase) and isinstance(B, MatrixBase)):             # <<<<<<<<<<<<<<
 *             if (op == 2):
 *                 return False
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":3303
 *                 return True
 *             return NotImplemented
 *         return A._richcmp_(B, op)             # <<<<<<<<<<<<<<
 * 
 *     def _richcmp_(MatrixBase A, MatrixBase B, int op):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_v_A;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyLong_From_int(__pyx_v_op); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3303, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_B, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_richcmp, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3303, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3294
 *         return True
 * 
 *     def __richcmp__(a, b, int op):             # <<<<<<<<<<<<<<
 *         A = _sympify(a, False)
 *         B = _sympify(b, False)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.MatrixBase.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_A);
  __Pyx_XDECREF(__pyx_v_B);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3305
 *         return A._richcmp_(B, op)
 * 
 *     def _richcmp_(MatrixBase A, MatrixBase B, int op):             # <<<<<<<<<<<<<<
 *         if (op == 2):
 *             return deref(A.thisptr).eq(deref(B.thisptr))
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10MatrixBase_3_richcmp_(PyObject *__pyx_v_A, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_10MatrixBase_3_richcmp_ = {"_richcmp_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_10MatrixBase_3_richcmp_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10MatrixBase_3_richcmp_(PyObject *__pyx_v_A, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_MatrixBase *__pyx_v_B = 0;
  int __pyx_v_op;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_richcmp_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_B,&__pyx_mstate_global->__pyx_n_u_op,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 3305, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3305, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3305, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_richcmp_", 0) < (0)) __PYX_ERR(0, 3305, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_richcmp_", 1, 2, 2, i); __PYX_ERR(0, 3305, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3305, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3305, __pyx_L3_error)
    }
    __pyx_v_B = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_MatrixBase *)values[0]);
    __pyx_v_op = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_op == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3305, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_richcmp_", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 3305, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.MatrixBase._richcmp_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_B), __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_MatrixBase, 1, "B", 0))) __PYX_ERR(0, 3305, __pyx_L1_error)
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_10MatrixBase_2_richcmp_(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_MatrixBase *)__pyx_v_A), __pyx_v_B, __pyx_v_op);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10MatrixBase_2_richcmp_(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_MatrixBase *__pyx_v_A, struct __pyx_obj_9symengine_3lib_17symengine_wrapper_MatrixBase *__pyx_v_B, int __pyx_v_op) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_richcmp_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3306
 * 
 *     def _richcmp_(MatrixBase A, MatrixBase B, int op):
 *         if (op == 2):             # <<<<<<<<<<<<<<
 *             return deref(A.thisptr).eq(deref(B.thisptr))
 *         elif (op == 3):
*/
  switch (__pyx_v_op) {
    case 2:

    /* "symengine/lib/symengine_wrapper.pyx":3307
 *     def _richcmp_(MatrixBase A, MatrixBase B, int op):
 *         if (op == 2):
 *             return deref(A.thisptr).eq(deref(B.thisptr))             # <<<<<<<<<<<<<<
 *         elif (op == 3):
 *             return not deref(A.thisptr).eq(deref(B.thisptr))
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyBool_FromLong((*__pyx_v_A->thisptr).eq((*__pyx_v_B->thisptr))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3307, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":3306
 * 
 *     def _richcmp_(MatrixBase A, MatrixBase B, int op):
 *         if (op == 2):             # <<<<<<<<<<<<<<
 *             return deref(A.thisptr).eq(deref(B.thisptr))
 *         elif (op == 3):
*/
    break;
    case 3:

    /* "symengine/lib/symengine_wrapper.pyx":3309
 *             return deref(A.thisptr).eq(deref(B.thisptr))
 *         elif (op == 3):
 *             return not deref(A.thisptr).eq(deref(B.thisptr))             # <<<<<<<<<<<<<<
 *         else:
 *             return NotImplemented
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyBool_FromLong((!((*__pyx_v_A->thisptr).eq((*__pyx_v_B->thisptr)) != 0))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3309, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":3308
 *         if (op == 2):
 *             return deref(A.thisptr).eq(deref(B.thisptr))
 *         elif (op == 3):             # <<<<<<<<<<<<<<
 *             return not deref(A.thisptr).eq(deref(B.thisptr))
 *         else:
*/
    break;
    default:

    /* "symengine/lib/symengine_wrapper.pyx":3311
 *             return not deref(A.thisptr).eq(deref(B.thisptr))
 *         else:
 *             return NotImplemented             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_builtin_NotImplemented);
    __pyx_r = __pyx_builtin_NotImplemented;
    goto __pyx_L0;
    break;
  }

  /* "symengine/lib/symengine_wrapper.pyx":3305
 *         return A._richcmp_(B, op)
 * 
 *     def _richcmp_(MatrixBase A, MatrixBase B, int op):             # <<<<<<<<<<<<<<
 *         if (op == 2):
 *             return deref(A.thisptr).eq(deref(B.thisptr))
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.MatrixBase._richcmp_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3313
 *             return NotImplemented
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         del self.thisptr
 * 
*/

/* Python wrapper */
static void __pyx_pw_9symengine_3lib_17symengine_wrapper_10MatrixBase_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_9symengine_3lib_17symengine_wrapper_10MatrixBase_5__dealloc__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_pf_9symengine_3lib_17symengine_wrapper_10MatrixBase_4__dealloc__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_MatrixBase *)__pyx_v_self));

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

static void __pyx_pf_9symengine_3lib_17symengine_wrapper_10MatrixBase_4__dealloc__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_MatrixBase *__pyx_v_self) {

  /* "symengine/lib/symengine_wrapper.pyx":3314
 * 
 *     def __dealloc__(self):
 *         del self.thisptr             # <<<<<<<<<<<<<<
 * 
 *     def _symbolic_(self, ring):
*/
  delete __pyx_v_self->thisptr;

  /* "symengine/lib/symengine_wrapper.pyx":3313
 *             return NotImplemented
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         del self.thisptr
 * 
*/

  /* function exit code */
}

/* "symengine/lib/symengine_wrapper.pyx":3316
 *         del self.thisptr
 * 
 *     def _symbolic_(self, ring):             # <<<<<<<<<<<<<<
 *         return ring(self._sage_())
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10MatrixBase_7_symbolic_(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_10MatrixBase_7_symbolic_ = {"_symbolic_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_10MatrixBase_7_symbolic_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10MatrixBase_7_symbolic_(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_ring = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_symbolic_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_ring,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 3316, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3316, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_symbolic_", 0) < (0)) __PYX_ERR(0, 3316, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_symbolic_", 1, 1, 1, i); __PYX_ERR(0, 3316, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3316, __pyx_L3_error)
    }
    __pyx_v_ring = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_symbolic_", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3316, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.MatrixBase._symbolic_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_10MatrixBase_6_symbolic_(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_MatrixBase *)__pyx_v_self), __pyx_v_ring);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10MatrixBase_6_symbolic_(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_MatrixBase *__pyx_v_self, PyObject *__pyx_v_ring) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_symbolic_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3317
 * 
 *     def _symbolic_(self, ring):
 *         return ring(self._sage_())             # <<<<<<<<<<<<<<
 * 
 *     # TODO: fix this
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_INCREF(__pyx_v_ring);
  __pyx_t_3 = __pyx_v_ring; 
  __pyx_t_5 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_5);
  __pyx_t_6 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
    __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_sage, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3317, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3317, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3316
 *         del self.thisptr
 * 
 *     def _symbolic_(self, ring):             # <<<<<<<<<<<<<<
 *         return ring(self._sage_())
 * 
*/

  /* 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("symengine.lib.symengine_wrapper.MatrixBase._symbolic_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3320
 * 
 *     # TODO: fix this
 *     def __hash__(self):             # <<<<<<<<<<<<<<
 *         return 0
 * 
*/

/* Python wrapper */
static Py_hash_t __pyx_pw_9symengine_3lib_17symengine_wrapper_10MatrixBase_9__hash__(PyObject *__pyx_v_self); /*proto*/
static Py_hash_t __pyx_pw_9symengine_3lib_17symengine_wrapper_10MatrixBase_9__hash__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  Py_hash_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__hash__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_10MatrixBase_8__hash__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_MatrixBase *)__pyx_v_self));

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

static Py_hash_t __pyx_pf_9symengine_3lib_17symengine_wrapper_10MatrixBase_8__hash__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_MatrixBase *__pyx_v_self) {
  Py_hash_t __pyx_r;

  /* "symengine/lib/symengine_wrapper.pyx":3321
 *     # TODO: fix this
 *     def __hash__(self):
 *         return 0             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_r = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3320
 * 
 *     # TODO: fix this
 *     def __hash__(self):             # <<<<<<<<<<<<<<
 *         return 0
 * 
*/

  /* function exit code */
  __pyx_L0:;
  if (unlikely(__pyx_r == -1) && !PyErr_Occurred()) __pyx_r = -2;
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.thisptr cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10MatrixBase_11__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_10MatrixBase_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_10MatrixBase_11__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10MatrixBase_11__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_10MatrixBase_10__reduce_cython__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_MatrixBase *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10MatrixBase_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_MatrixBase *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "self.thisptr cannot be converted to a Python object for pickling"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "self.thisptr cannot be converted to a Python object for pickling"
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_self_thisptr_cannot_be_converted, 0, 0);
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.thisptr cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.MatrixBase.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.thisptr cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.thisptr cannot be converted to a Python object for pickling"
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10MatrixBase_13__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_10MatrixBase_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_10MatrixBase_13__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10MatrixBase_13__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(1, 3, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 3, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 3, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3, __pyx_L3_error)
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.MatrixBase.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_10MatrixBase_12__setstate_cython__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_MatrixBase *)__pyx_v_self), __pyx_v___pyx_state);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10MatrixBase_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_MatrixBase *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError, "self.thisptr cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "self.thisptr cannot be converted to a Python object for pickling"             # <<<<<<<<<<<<<<
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_self_thisptr_cannot_be_converted, 0, 0);
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.thisptr cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.thisptr cannot be converted to a Python object for pickling"
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.MatrixBase.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3361
 *     """
 * 
 *     def __cinit__(self, row=None, col=None, v=None):             # <<<<<<<<<<<<<<
 *         if row is None:
 *             self.thisptr = new symengine.DenseMatrix(0, 0)
*/

/* Python wrapper */
static int __pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_row = 0;
  PyObject *__pyx_v_col = 0;
  PyObject *__pyx_v_v = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_row,&__pyx_mstate_global->__pyx_n_u_col,&__pyx_mstate_global->__pyx_n_u_v,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 3361, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 3361, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3361, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3361, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__cinit__", 0) < (0)) __PYX_ERR(0, 3361, __pyx_L3_error)
      if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
    } else {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 3361, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3361, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3361, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_row = values[0];
    __pyx_v_col = values[1];
    __pyx_v_v = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 3, __pyx_nargs); __PYX_ERR(0, 3361, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase___cinit__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_self), __pyx_v_row, __pyx_v_col, __pyx_v_v);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase___cinit__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self, PyObject *__pyx_v_row, PyObject *__pyx_v_col, PyObject *__pyx_v_v) {
  SymEngine::vec_basic __pyx_v_v_;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_e_ = 0;
  PyObject *__pyx_v_e = NULL;
  PyObject *__pyx_v_f = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  unsigned int __pyx_t_3;
  unsigned int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  PyObject *(*__pyx_t_10)(PyObject *);
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  Py_ssize_t __pyx_t_15;
  PyObject *(*__pyx_t_16)(PyObject *);
  int __pyx_t_17;
  PyObject *__pyx_t_18 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_INCREF(__pyx_v_row);
  __Pyx_INCREF(__pyx_v_col);
  __Pyx_INCREF(__pyx_v_v);

  /* "symengine/lib/symengine_wrapper.pyx":3362
 * 
 *     def __cinit__(self, row=None, col=None, v=None):
 *         if row is None:             # <<<<<<<<<<<<<<
 *             self.thisptr = new symengine.DenseMatrix(0, 0)
 *             return
*/
  __pyx_t_1 = (__pyx_v_row == Py_None);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":3363
 *     def __cinit__(self, row=None, col=None, v=None):
 *         if row is None:
 *             self.thisptr = new symengine.DenseMatrix(0, 0)             # <<<<<<<<<<<<<<
 *             return
 *         if v is None and col is not None:
*/
    __pyx_v_self->__pyx_base.thisptr = new SymEngine::DenseMatrix(0, 0);

    /* "symengine/lib/symengine_wrapper.pyx":3364
 *         if row is None:
 *             self.thisptr = new symengine.DenseMatrix(0, 0)
 *             return             # <<<<<<<<<<<<<<
 *         if v is None and col is not None:
 *             self.thisptr = new symengine.DenseMatrix(row, col)
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":3362
 * 
 *     def __cinit__(self, row=None, col=None, v=None):
 *         if row is None:             # <<<<<<<<<<<<<<
 *             self.thisptr = new symengine.DenseMatrix(0, 0)
 *             return
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":3365
 *             self.thisptr = new symengine.DenseMatrix(0, 0)
 *             return
 *         if v is None and col is not None:             # <<<<<<<<<<<<<<
 *             self.thisptr = new symengine.DenseMatrix(row, col)
 *             return
*/
  __pyx_t_2 = (__pyx_v_v == Py_None);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_col != Py_None);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L5_bool_binop_done:;
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":3366
 *             return
 *         if v is None and col is not None:
 *             self.thisptr = new symengine.DenseMatrix(row, col)             # <<<<<<<<<<<<<<
 *             return
 *         if col is None:
*/
    __pyx_t_3 = __Pyx_PyLong_As_unsigned_int(__pyx_v_row); if (unlikely((__pyx_t_3 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3366, __pyx_L1_error)
    __pyx_t_4 = __Pyx_PyLong_As_unsigned_int(__pyx_v_col); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3366, __pyx_L1_error)
    __pyx_v_self->__pyx_base.thisptr = new SymEngine::DenseMatrix(__pyx_t_3, __pyx_t_4);

    /* "symengine/lib/symengine_wrapper.pyx":3367
 *         if v is None and col is not None:
 *             self.thisptr = new symengine.DenseMatrix(row, col)
 *             return             # <<<<<<<<<<<<<<
 *         if col is None:
 *             v = sympify(row)
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":3365
 *             self.thisptr = new symengine.DenseMatrix(0, 0)
 *             return
 *         if v is None and col is not None:             # <<<<<<<<<<<<<<
 *             self.thisptr = new symengine.DenseMatrix(row, col)
 *             return
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":3368
 *             self.thisptr = new symengine.DenseMatrix(row, col)
 *             return
 *         if col is None:             # <<<<<<<<<<<<<<
 *             v = sympify(row)
 *             row = 0
*/
  __pyx_t_1 = (__pyx_v_col == Py_None);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":3369
 *             return
 *         if col is None:
 *             v = sympify(row)             # <<<<<<<<<<<<<<
 *             row = 0
 *         cdef symengine.vec_basic v_
*/
    __pyx_t_6 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3369, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
      assert(__pyx_t_6);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
      __pyx_t_8 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_row};
      __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3369, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
    }
    __Pyx_DECREF_SET(__pyx_v_v, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":3370
 *         if col is None:
 *             v = sympify(row)
 *             row = 0             # <<<<<<<<<<<<<<
 *         cdef symengine.vec_basic v_
 *         cdef DenseMatrixBase A
*/
    __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0);
    __Pyx_DECREF_SET(__pyx_v_row, __pyx_mstate_global->__pyx_int_0);

    /* "symengine/lib/symengine_wrapper.pyx":3368
 *             self.thisptr = new symengine.DenseMatrix(row, col)
 *             return
 *         if col is None:             # <<<<<<<<<<<<<<
 *             v = sympify(row)
 *             row = 0
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":3375
 *         cdef Basic e_
 *         #TODO: Add a constructor to DenseMatrix in C++
 *         if (isinstance(v, DenseMatrixBase)):             # <<<<<<<<<<<<<<
 *             matrix_to_vec(v, v_)
 *             if col is None:
*/
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_v, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase); 
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":3376
 *         #TODO: Add a constructor to DenseMatrix in C++
 *         if (isinstance(v, DenseMatrixBase)):
 *             matrix_to_vec(v, v_)             # <<<<<<<<<<<<<<
 *             if col is None:
 *                 row = v.nrows()
*/
    if (!(likely(((__pyx_v_v) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_v, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase))))) __PYX_ERR(0, 3376, __pyx_L1_error)
    __pyx_t_5 = __pyx_f_9symengine_3lib_17symengine_wrapper_matrix_to_vec(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_v), __pyx_v_v_); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3376, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":3377
 *         if (isinstance(v, DenseMatrixBase)):
 *             matrix_to_vec(v, v_)
 *             if col is None:             # <<<<<<<<<<<<<<
 *                 row = v.nrows()
 *                 col = v.ncols()
*/
    __pyx_t_1 = (__pyx_v_col == Py_None);
    if (__pyx_t_1) {

      /* "symengine/lib/symengine_wrapper.pyx":3378
 *             matrix_to_vec(v, v_)
 *             if col is None:
 *                 row = v.nrows()             # <<<<<<<<<<<<<<
 *                 col = v.ncols()
 *             self.thisptr = new symengine.DenseMatrix(row, col, v_)
*/
      __pyx_t_7 = __pyx_v_v;
      __Pyx_INCREF(__pyx_t_7);
      __pyx_t_8 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL};
        __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_nrows, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3378, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
      }
      __Pyx_DECREF_SET(__pyx_v_row, __pyx_t_5);
      __pyx_t_5 = 0;

      /* "symengine/lib/symengine_wrapper.pyx":3379
 *             if col is None:
 *                 row = v.nrows()
 *                 col = v.ncols()             # <<<<<<<<<<<<<<
 *             self.thisptr = new symengine.DenseMatrix(row, col, v_)
 *             return
*/
      __pyx_t_7 = __pyx_v_v;
      __Pyx_INCREF(__pyx_t_7);
      __pyx_t_8 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL};
        __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_ncols, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3379, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
      }
      __Pyx_DECREF_SET(__pyx_v_col, __pyx_t_5);
      __pyx_t_5 = 0;

      /* "symengine/lib/symengine_wrapper.pyx":3377
 *         if (isinstance(v, DenseMatrixBase)):
 *             matrix_to_vec(v, v_)
 *             if col is None:             # <<<<<<<<<<<<<<
 *                 row = v.nrows()
 *                 col = v.ncols()
*/
    }

    /* "symengine/lib/symengine_wrapper.pyx":3380
 *                 row = v.nrows()
 *                 col = v.ncols()
 *             self.thisptr = new symengine.DenseMatrix(row, col, v_)             # <<<<<<<<<<<<<<
 *             return
 *         for e in v:
*/
    __pyx_t_4 = __Pyx_PyLong_As_unsigned_int(__pyx_v_row); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3380, __pyx_L1_error)
    __pyx_t_3 = __Pyx_PyLong_As_unsigned_int(__pyx_v_col); if (unlikely((__pyx_t_3 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3380, __pyx_L1_error)
    __pyx_v_self->__pyx_base.thisptr = new SymEngine::DenseMatrix(__pyx_t_4, __pyx_t_3, __pyx_v_v_);

    /* "symengine/lib/symengine_wrapper.pyx":3381
 *                 col = v.ncols()
 *             self.thisptr = new symengine.DenseMatrix(row, col, v_)
 *             return             # <<<<<<<<<<<<<<
 *         for e in v:
 *             f = sympify(e)
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":3375
 *         cdef Basic e_
 *         #TODO: Add a constructor to DenseMatrix in C++
 *         if (isinstance(v, DenseMatrixBase)):             # <<<<<<<<<<<<<<
 *             matrix_to_vec(v, v_)
 *             if col is None:
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":3382
 *             self.thisptr = new symengine.DenseMatrix(row, col, v_)
 *             return
 *         for e in v:             # <<<<<<<<<<<<<<
 *             f = sympify(e)
 *             if isinstance(f, DenseMatrixBase):
*/
  if (likely(PyList_CheckExact(__pyx_v_v)) || PyTuple_CheckExact(__pyx_v_v)) {
    __pyx_t_5 = __pyx_v_v; __Pyx_INCREF(__pyx_t_5);
    __pyx_t_9 = 0;
    __pyx_t_10 = NULL;
  } else {
    __pyx_t_9 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_v_v); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3382, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_10 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_5); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3382, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_10)) {
      if (likely(PyList_CheckExact(__pyx_t_5))) {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_5);
          #if !CYTHON_ASSUME_SAFE_SIZE
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3382, __pyx_L1_error)
          #endif
          if (__pyx_t_9 >= __pyx_temp) break;
        }
        __pyx_t_7 = __Pyx_PyList_GetItemRefFast(__pyx_t_5, __pyx_t_9, __Pyx_ReferenceSharing_OwnStrongReference);
        ++__pyx_t_9;
      } else {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_5);
          #if !CYTHON_ASSUME_SAFE_SIZE
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3382, __pyx_L1_error)
          #endif
          if (__pyx_t_9 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_7 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_9));
        #else
        __pyx_t_7 = __Pyx_PySequence_ITEM(__pyx_t_5, __pyx_t_9);
        #endif
        ++__pyx_t_9;
      }
      if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3382, __pyx_L1_error)
    } else {
      __pyx_t_7 = __pyx_t_10(__pyx_t_5);
      if (unlikely(!__pyx_t_7)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 3382, __pyx_L1_error)
          PyErr_Clear();
        }
        break;
      }
    }
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_XDECREF_SET(__pyx_v_e, __pyx_t_7);
    __pyx_t_7 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":3383
 *             return
 *         for e in v:
 *             f = sympify(e)             # <<<<<<<<<<<<<<
 *             if isinstance(f, DenseMatrixBase):
 *                 matrix_to_vec(f, v_)
*/
    __pyx_t_6 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3383, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_8 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_11))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_11);
      assert(__pyx_t_6);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_11);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_11, __pyx__function);
      __pyx_t_8 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_e};
      __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_11, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3383, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
    }
    __Pyx_XDECREF_SET(__pyx_v_f, __pyx_t_7);
    __pyx_t_7 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":3384
 *         for e in v:
 *             f = sympify(e)
 *             if isinstance(f, DenseMatrixBase):             # <<<<<<<<<<<<<<
 *                 matrix_to_vec(f, v_)
 *                 if col is None:
*/
    __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_f, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase); 
    if (__pyx_t_1) {

      /* "symengine/lib/symengine_wrapper.pyx":3385
 *             f = sympify(e)
 *             if isinstance(f, DenseMatrixBase):
 *                 matrix_to_vec(f, v_)             # <<<<<<<<<<<<<<
 *                 if col is None:
 *                     row = row + f.nrows()
*/
      if (!(likely(((__pyx_v_f) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_f, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase))))) __PYX_ERR(0, 3385, __pyx_L1_error)
      __pyx_t_7 = __pyx_f_9symengine_3lib_17symengine_wrapper_matrix_to_vec(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_f), __pyx_v_v_); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3385, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "symengine/lib/symengine_wrapper.pyx":3386
 *             if isinstance(f, DenseMatrixBase):
 *                 matrix_to_vec(f, v_)
 *                 if col is None:             # <<<<<<<<<<<<<<
 *                     row = row + f.nrows()
 *                 continue
*/
      __pyx_t_1 = (__pyx_v_col == Py_None);
      if (__pyx_t_1) {

        /* "symengine/lib/symengine_wrapper.pyx":3387
 *                 matrix_to_vec(f, v_)
 *                 if col is None:
 *                     row = row + f.nrows()             # <<<<<<<<<<<<<<
 *                 continue
 *             try:
*/
        __pyx_t_11 = __pyx_v_f;
        __Pyx_INCREF(__pyx_t_11);
        __pyx_t_8 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_11, NULL};
          __pyx_t_7 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_nrows, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3387, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
        }
        __pyx_t_11 = PyNumber_Add(__pyx_v_row, __pyx_t_7); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3387, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF_SET(__pyx_v_row, __pyx_t_11);
        __pyx_t_11 = 0;

        /* "symengine/lib/symengine_wrapper.pyx":3386
 *             if isinstance(f, DenseMatrixBase):
 *                 matrix_to_vec(f, v_)
 *                 if col is None:             # <<<<<<<<<<<<<<
 *                     row = row + f.nrows()
 *                 continue
*/
      }

      /* "symengine/lib/symengine_wrapper.pyx":3388
 *                 if col is None:
 *                     row = row + f.nrows()
 *                 continue             # <<<<<<<<<<<<<<
 *             try:
 *                 for e_ in f:
*/
      goto __pyx_L10_continue;

      /* "symengine/lib/symengine_wrapper.pyx":3384
 *         for e in v:
 *             f = sympify(e)
 *             if isinstance(f, DenseMatrixBase):             # <<<<<<<<<<<<<<
 *                 matrix_to_vec(f, v_)
 *                 if col is None:
*/
    }

    /* "symengine/lib/symengine_wrapper.pyx":3389
 *                     row = row + f.nrows()
 *                 continue
 *             try:             # <<<<<<<<<<<<<<
 *                 for e_ in f:
 *                     v_.push_back(e_.thisptr)
*/
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __Pyx_ExceptionSave(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
      __Pyx_XGOTREF(__pyx_t_12);
      __Pyx_XGOTREF(__pyx_t_13);
      __Pyx_XGOTREF(__pyx_t_14);
      /*try:*/ {

        /* "symengine/lib/symengine_wrapper.pyx":3390
 *                 continue
 *             try:
 *                 for e_ in f:             # <<<<<<<<<<<<<<
 *                     v_.push_back(e_.thisptr)
 *                 if col is None:
*/
        if (likely(PyList_CheckExact(__pyx_v_f)) || PyTuple_CheckExact(__pyx_v_f)) {
          __pyx_t_11 = __pyx_v_f; __Pyx_INCREF(__pyx_t_11);
          __pyx_t_15 = 0;
          __pyx_t_16 = NULL;
        } else {
          __pyx_t_15 = -1; __pyx_t_11 = PyObject_GetIter(__pyx_v_f); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3390, __pyx_L14_error)
          __Pyx_GOTREF(__pyx_t_11);
          __pyx_t_16 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_11); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3390, __pyx_L14_error)
        }
        for (;;) {
          if (likely(!__pyx_t_16)) {
            if (likely(PyList_CheckExact(__pyx_t_11))) {
              {
                Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_11);
                #if !CYTHON_ASSUME_SAFE_SIZE
                if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3390, __pyx_L14_error)
                #endif
                if (__pyx_t_15 >= __pyx_temp) break;
              }
              __pyx_t_7 = __Pyx_PyList_GetItemRefFast(__pyx_t_11, __pyx_t_15, __Pyx_ReferenceSharing_OwnStrongReference);
              ++__pyx_t_15;
            } else {
              {
                Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_11);
                #if !CYTHON_ASSUME_SAFE_SIZE
                if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3390, __pyx_L14_error)
                #endif
                if (__pyx_t_15 >= __pyx_temp) break;
              }
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_7 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_11, __pyx_t_15));
              #else
              __pyx_t_7 = __Pyx_PySequence_ITEM(__pyx_t_11, __pyx_t_15);
              #endif
              ++__pyx_t_15;
            }
            if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3390, __pyx_L14_error)
          } else {
            __pyx_t_7 = __pyx_t_16(__pyx_t_11);
            if (unlikely(!__pyx_t_7)) {
              PyObject* exc_type = PyErr_Occurred();
              if (exc_type) {
                if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 3390, __pyx_L14_error)
                PyErr_Clear();
              }
              break;
            }
          }
          __Pyx_GOTREF(__pyx_t_7);
          if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 3390, __pyx_L14_error)
          __Pyx_XDECREF_SET(__pyx_v_e_, ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_7));
          __pyx_t_7 = 0;

          /* "symengine/lib/symengine_wrapper.pyx":3391
 *             try:
 *                 for e_ in f:
 *                     v_.push_back(e_.thisptr)             # <<<<<<<<<<<<<<
 *                 if col is None:
 *                     row = row + 1
*/
          try {
            __pyx_v_v_.push_back(__pyx_v_e_->thisptr);
          } catch(...) {
            __Pyx_CppExn2PyErr();
            __PYX_ERR(0, 3391, __pyx_L14_error)
          }

          /* "symengine/lib/symengine_wrapper.pyx":3390
 *                 continue
 *             try:
 *                 for e_ in f:             # <<<<<<<<<<<<<<
 *                     v_.push_back(e_.thisptr)
 *                 if col is None:
*/
        }
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

        /* "symengine/lib/symengine_wrapper.pyx":3392
 *                 for e_ in f:
 *                     v_.push_back(e_.thisptr)
 *                 if col is None:             # <<<<<<<<<<<<<<
 *                     row = row + 1
 *             except TypeError:
*/
        __pyx_t_1 = (__pyx_v_col == Py_None);
        if (__pyx_t_1) {

          /* "symengine/lib/symengine_wrapper.pyx":3393
 *                     v_.push_back(e_.thisptr)
 *                 if col is None:
 *                     row = row + 1             # <<<<<<<<<<<<<<
 *             except TypeError:
 *                 e_ = f
*/
          __pyx_t_11 = __Pyx_PyLong_AddObjC(__pyx_v_row, __pyx_mstate_global->__pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3393, __pyx_L14_error)
          __Pyx_GOTREF(__pyx_t_11);
          __Pyx_DECREF_SET(__pyx_v_row, __pyx_t_11);
          __pyx_t_11 = 0;

          /* "symengine/lib/symengine_wrapper.pyx":3392
 *                 for e_ in f:
 *                     v_.push_back(e_.thisptr)
 *                 if col is None:             # <<<<<<<<<<<<<<
 *                     row = row + 1
 *             except TypeError:
*/
        }

        /* "symengine/lib/symengine_wrapper.pyx":3389
 *                     row = row + f.nrows()
 *                 continue
 *             try:             # <<<<<<<<<<<<<<
 *                 for e_ in f:
 *                     v_.push_back(e_.thisptr)
*/
      }
      __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
      goto __pyx_L21_try_end;
      __pyx_L14_error:;
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "symengine/lib/symengine_wrapper.pyx":3394
 *                 if col is None:
 *                     row = row + 1
 *             except TypeError:             # <<<<<<<<<<<<<<
 *                 e_ = f
 *                 v_.push_back(e_.thisptr)
*/
      __pyx_t_17 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_TypeError))));
      if (__pyx_t_17) {
        __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_11, &__pyx_t_7, &__pyx_t_6) < 0) __PYX_ERR(0, 3394, __pyx_L16_except_error)
        __Pyx_XGOTREF(__pyx_t_11);
        __Pyx_XGOTREF(__pyx_t_7);
        __Pyx_XGOTREF(__pyx_t_6);

        /* "symengine/lib/symengine_wrapper.pyx":3395
 *                     row = row + 1
 *             except TypeError:
 *                 e_ = f             # <<<<<<<<<<<<<<
 *                 v_.push_back(e_.thisptr)
 *                 if col is None:
*/
        __pyx_t_18 = __pyx_v_f;
        __Pyx_INCREF(__pyx_t_18);
        if (!(likely(((__pyx_t_18) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_18, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 3395, __pyx_L16_except_error)
        __Pyx_XDECREF_SET(__pyx_v_e_, ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_18));
        __pyx_t_18 = 0;

        /* "symengine/lib/symengine_wrapper.pyx":3396
 *             except TypeError:
 *                 e_ = f
 *                 v_.push_back(e_.thisptr)             # <<<<<<<<<<<<<<
 *                 if col is None:
 *                     row = row + 1
*/
        try {
          __pyx_v_v_.push_back(__pyx_v_e_->thisptr);
        } catch(...) {
          __Pyx_CppExn2PyErr();
          __PYX_ERR(0, 3396, __pyx_L16_except_error)
        }

        /* "symengine/lib/symengine_wrapper.pyx":3397
 *                 e_ = f
 *                 v_.push_back(e_.thisptr)
 *                 if col is None:             # <<<<<<<<<<<<<<
 *                     row = row + 1
 *         if (row == 0):
*/
        __pyx_t_1 = (__pyx_v_col == Py_None);
        if (__pyx_t_1) {

          /* "symengine/lib/symengine_wrapper.pyx":3398
 *                 v_.push_back(e_.thisptr)
 *                 if col is None:
 *                     row = row + 1             # <<<<<<<<<<<<<<
 *         if (row == 0):
 *             if (v_.size() != 0):
*/
          __pyx_t_18 = __Pyx_PyLong_AddObjC(__pyx_v_row, __pyx_mstate_global->__pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 3398, __pyx_L16_except_error)
          __Pyx_GOTREF(__pyx_t_18);
          __Pyx_DECREF_SET(__pyx_v_row, __pyx_t_18);
          __pyx_t_18 = 0;

          /* "symengine/lib/symengine_wrapper.pyx":3397
 *                 e_ = f
 *                 v_.push_back(e_.thisptr)
 *                 if col is None:             # <<<<<<<<<<<<<<
 *                     row = row + 1
 *         if (row == 0):
*/
        }
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        goto __pyx_L15_exception_handled;
      }
      goto __pyx_L16_except_error;

      /* "symengine/lib/symengine_wrapper.pyx":3389
 *                     row = row + f.nrows()
 *                 continue
 *             try:             # <<<<<<<<<<<<<<
 *                 for e_ in f:
 *                     v_.push_back(e_.thisptr)
*/
      __pyx_L16_except_error:;
      __Pyx_XGIVEREF(__pyx_t_12);
      __Pyx_XGIVEREF(__pyx_t_13);
      __Pyx_XGIVEREF(__pyx_t_14);
      __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
      goto __pyx_L1_error;
      __pyx_L15_exception_handled:;
      __Pyx_XGIVEREF(__pyx_t_12);
      __Pyx_XGIVEREF(__pyx_t_13);
      __Pyx_XGIVEREF(__pyx_t_14);
      __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
      __pyx_L21_try_end:;
    }

    /* "symengine/lib/symengine_wrapper.pyx":3382
 *             self.thisptr = new symengine.DenseMatrix(row, col, v_)
 *             return
 *         for e in v:             # <<<<<<<<<<<<<<
 *             f = sympify(e)
 *             if isinstance(f, DenseMatrixBase):
*/
    __pyx_L10_continue:;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3399
 *                 if col is None:
 *                     row = row + 1
 *         if (row == 0):             # <<<<<<<<<<<<<<
 *             if (v_.size() != 0):
 *                 self.thisptr = new symengine.DenseMatrix(0, 0, v_)
*/
  __pyx_t_1 = (__Pyx_PyLong_BoolEqObjC(__pyx_v_row, __pyx_mstate_global->__pyx_int_0, 0, 0)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 3399, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":3400
 *                     row = row + 1
 *         if (row == 0):
 *             if (v_.size() != 0):             # <<<<<<<<<<<<<<
 *                 self.thisptr = new symengine.DenseMatrix(0, 0, v_)
 *                 raise ValueError("sizes don't match.")
*/
    __pyx_t_1 = (__pyx_v_v_.size() != 0);
    if (unlikely(__pyx_t_1)) {

      /* "symengine/lib/symengine_wrapper.pyx":3401
 *         if (row == 0):
 *             if (v_.size() != 0):
 *                 self.thisptr = new symengine.DenseMatrix(0, 0, v_)             # <<<<<<<<<<<<<<
 *                 raise ValueError("sizes don't match.")
 *             else:
*/
      __pyx_v_self->__pyx_base.thisptr = new SymEngine::DenseMatrix(0, 0, __pyx_v_v_);

      /* "symengine/lib/symengine_wrapper.pyx":3402
 *             if (v_.size() != 0):
 *                 self.thisptr = new symengine.DenseMatrix(0, 0, v_)
 *                 raise ValueError("sizes don't match.")             # <<<<<<<<<<<<<<
 *             else:
 *                 self.thisptr = new symengine.DenseMatrix(0, 0, v_)
*/
      __pyx_t_6 = NULL;
      __pyx_t_8 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_mstate_global->__pyx_kp_u_sizes_don_t_match};
        __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3402, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
      }
      __Pyx_Raise(__pyx_t_5, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __PYX_ERR(0, 3402, __pyx_L1_error)

      /* "symengine/lib/symengine_wrapper.pyx":3400
 *                     row = row + 1
 *         if (row == 0):
 *             if (v_.size() != 0):             # <<<<<<<<<<<<<<
 *                 self.thisptr = new symengine.DenseMatrix(0, 0, v_)
 *                 raise ValueError("sizes don't match.")
*/
    }

    /* "symengine/lib/symengine_wrapper.pyx":3404
 *                 raise ValueError("sizes don't match.")
 *             else:
 *                 self.thisptr = new symengine.DenseMatrix(0, 0, v_)             # <<<<<<<<<<<<<<
 *         elif col is not None and (row*col != v_.size()):
 *             raise ValueError("Number of elements should equal rows*columns.")
*/
    /*else*/ {
      __pyx_v_self->__pyx_base.thisptr = new SymEngine::DenseMatrix(0, 0, __pyx_v_v_);
    }

    /* "symengine/lib/symengine_wrapper.pyx":3399
 *                 if col is None:
 *                     row = row + 1
 *         if (row == 0):             # <<<<<<<<<<<<<<
 *             if (v_.size() != 0):
 *                 self.thisptr = new symengine.DenseMatrix(0, 0, v_)
*/
    goto __pyx_L30;
  }

  /* "symengine/lib/symengine_wrapper.pyx":3405
 *             else:
 *                 self.thisptr = new symengine.DenseMatrix(0, 0, v_)
 *         elif col is not None and (row*col != v_.size()):             # <<<<<<<<<<<<<<
 *             raise ValueError("Number of elements should equal rows*columns.")
 *         else:
*/
  __pyx_t_2 = (__pyx_v_col != Py_None);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L32_bool_binop_done;
  }
  __pyx_t_5 = PyNumber_Multiply(__pyx_v_row, __pyx_v_col); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3405, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyLong_FromSize_t(__pyx_v_v_.size()); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3405, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = PyObject_RichCompare(__pyx_t_5, __pyx_t_6, Py_NE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3405, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 3405, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_1 = __pyx_t_2;
  __pyx_L32_bool_binop_done:;
  if (unlikely(__pyx_t_1)) {

    /* "symengine/lib/symengine_wrapper.pyx":3406
 *                 self.thisptr = new symengine.DenseMatrix(0, 0, v_)
 *         elif col is not None and (row*col != v_.size()):
 *             raise ValueError("Number of elements should equal rows*columns.")             # <<<<<<<<<<<<<<
 *         else:
 *             self.thisptr = new symengine.DenseMatrix(row, v_.size() / row, v_)
*/
    __pyx_t_6 = NULL;
    __pyx_t_8 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_mstate_global->__pyx_kp_u_Number_of_elements_should_equal};
      __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3406, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
    }
    __Pyx_Raise(__pyx_t_7, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __PYX_ERR(0, 3406, __pyx_L1_error)

    /* "symengine/lib/symengine_wrapper.pyx":3405
 *             else:
 *                 self.thisptr = new symengine.DenseMatrix(0, 0, v_)
 *         elif col is not None and (row*col != v_.size()):             # <<<<<<<<<<<<<<
 *             raise ValueError("Number of elements should equal rows*columns.")
 *         else:
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":3408
 *             raise ValueError("Number of elements should equal rows*columns.")
 *         else:
 *             self.thisptr = new symengine.DenseMatrix(row, v_.size() / row, v_)             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
*/
  /*else*/ {
    __pyx_t_3 = __Pyx_PyLong_As_unsigned_int(__pyx_v_row); if (unlikely((__pyx_t_3 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3408, __pyx_L1_error)
    __pyx_t_7 = __Pyx_PyLong_FromSize_t(__pyx_v_v_.size()); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3408, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_6 = __Pyx_PyNumber_Divide(__pyx_t_7, __pyx_v_row); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3408, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_4 = __Pyx_PyLong_As_unsigned_int(__pyx_t_6); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3408, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_v_self->__pyx_base.thisptr = new SymEngine::DenseMatrix(__pyx_t_3, __pyx_t_4, __pyx_v_v_);
  }
  __pyx_L30:;

  /* "symengine/lib/symengine_wrapper.pyx":3361
 *     """
 * 
 *     def __cinit__(self, row=None, col=None, v=None):             # <<<<<<<<<<<<<<
 *         if row is None:
 *             self.thisptr = new symengine.DenseMatrix(0, 0)
*/

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_18);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_e_);
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XDECREF(__pyx_v_f);
  __Pyx_XDECREF(__pyx_v_row);
  __Pyx_XDECREF(__pyx_v_col);
  __Pyx_XDECREF(__pyx_v_v);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3410
 *             self.thisptr = new symengine.DenseMatrix(row, v_.size() / row, v_)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_3__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_3__repr__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_2__repr__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_2__repr__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3411
 * 
 *     def __repr__(self):
 *         return self.__str__()             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_str, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3411, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3410
 *             self.thisptr = new symengine.DenseMatrix(row, v_.size() / row, v_)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3413
 *         return self.__str__()
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return deref(self.thisptr).__str__().decode("utf-8")
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_5__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_5__str__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_4__str__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_4__str__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  std::string __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3414
 * 
 *     def __str__(self):
 *         return deref(self.thisptr).__str__().decode("utf-8")             # <<<<<<<<<<<<<<
 * 
 *     def _repr_latex_(self):
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_1 = (*__pyx_v_self->__pyx_base.thisptr).__str__();
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 3414, __pyx_L1_error)
  }
  __pyx_t_2 = __Pyx_decode_cpp_string(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_1), 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3414, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3413
 *         return self.__str__()
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return deref(self.thisptr).__str__().decode("utf-8")
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3416
 *         return deref(self.thisptr).__str__().decode("utf-8")
 * 
 *     def _repr_latex_(self):             # <<<<<<<<<<<<<<
 *         if repr_latex[0]:
 *             return "${}$".format(latex(self))
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_7_repr_latex_(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_7_repr_latex_ = {"_repr_latex_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_7_repr_latex_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_7_repr_latex_(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_repr_latex_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("_repr_latex_", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("_repr_latex_", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_6_repr_latex_(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_6_repr_latex_(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  size_t __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_repr_latex_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3417
 * 
 *     def _repr_latex_(self):
 *         if repr_latex[0]:             # <<<<<<<<<<<<<<
 *             return "${}$".format(latex(self))
 *         else:
*/
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_repr_latex); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3417, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3417, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 3417, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_3) {

    /* "symengine/lib/symengine_wrapper.pyx":3418
 *     def _repr_latex_(self):
 *         if repr_latex[0]:
 *             return "${}$".format(latex(self))             # <<<<<<<<<<<<<<
 *         else:
 *             return None
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __pyx_mstate_global->__pyx_kp_u__9;
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_5 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_latex); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3418, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
      assert(__pyx_t_5);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
      __pyx_t_7 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, ((PyObject *)__pyx_v_self)};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3418, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    __pyx_t_7 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3418, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":3417
 * 
 *     def _repr_latex_(self):
 *         if repr_latex[0]:             # <<<<<<<<<<<<<<
 *             return "${}$".format(latex(self))
 *         else:
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":3420
 *             return "${}$".format(latex(self))
 *         else:
 *             return None             # <<<<<<<<<<<<<<
 * 
 *     def __add__(a, b):
*/
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;
  }

  /* "symengine/lib/symengine_wrapper.pyx":3416
 *         return deref(self.thisptr).__str__().decode("utf-8")
 * 
 *     def _repr_latex_(self):             # <<<<<<<<<<<<<<
 *         if repr_latex[0]:
 *             return "${}$".format(latex(self))
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase._repr_latex_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3422
 *             return None
 * 
 *     def __add__(a, b):             # <<<<<<<<<<<<<<
 *         a = _sympify(a, False)
 *         b = _sympify(b, False)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_9__add__(PyObject *__pyx_v_a, PyObject *__pyx_v_b); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_9__add__(PyObject *__pyx_v_a, PyObject *__pyx_v_b) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__add__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_8__add__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_a), ((PyObject *)__pyx_v_b));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_8__add__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_a, PyObject *__pyx_v_b) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_MatrixBase *__pyx_v_a_ = 0;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_MatrixBase *__pyx_v_b_ = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11[4];
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__add__", 0);
  __Pyx_INCREF((PyObject *)__pyx_v_a);
  __Pyx_INCREF(__pyx_v_b);

  /* "symengine/lib/symengine_wrapper.pyx":3423
 * 
 *     def __add__(a, b):
 *         a = _sympify(a, False)             # <<<<<<<<<<<<<<
 *         b = _sympify(b, False)
 *         if not isinstance(a, MatrixBase) or not isinstance(b, MatrixBase):
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3423, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, ((PyObject *)__pyx_v_a), Py_False};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3423, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase))))) __PYX_ERR(0, 3423, __pyx_L1_error)
  __Pyx_DECREF_SET(__pyx_v_a, ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_t_1));
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3424
 *     def __add__(a, b):
 *         a = _sympify(a, False)
 *         b = _sympify(b, False)             # <<<<<<<<<<<<<<
 *         if not isinstance(a, MatrixBase) or not isinstance(b, MatrixBase):
 *             return NotImplemented
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_sympify_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3424, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_b, Py_False};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3424, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF_SET(__pyx_v_b, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3425
 *         a = _sympify(a, False)
 *         b = _sympify(b, False)
 *         if not isinstance(a, MatrixBase) or not isinstance(b, MatrixBase):             # <<<<<<<<<<<<<<
 *             return NotImplemented
 *         cdef MatrixBase a_ = a
*/
  __pyx_t_6 = __Pyx_TypeCheck(((PyObject *)__pyx_v_a), __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_MatrixBase); 
  __pyx_t_7 = (!__pyx_t_6);
  if (!__pyx_t_7) {
  } else {
    __pyx_t_5 = __pyx_t_7;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_7 = __Pyx_TypeCheck(__pyx_v_b, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_MatrixBase); 
  __pyx_t_6 = (!__pyx_t_7);
  __pyx_t_5 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":3426
 *         b = _sympify(b, False)
 *         if not isinstance(a, MatrixBase) or not isinstance(b, MatrixBase):
 *             return NotImplemented             # <<<<<<<<<<<<<<
 *         cdef MatrixBase a_ = a
 *         cdef MatrixBase b_ = b
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_builtin_NotImplemented);
    __pyx_r = __pyx_builtin_NotImplemented;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":3425
 *         a = _sympify(a, False)
 *         b = _sympify(b, False)
 *         if not isinstance(a, MatrixBase) or not isinstance(b, MatrixBase):             # <<<<<<<<<<<<<<
 *             return NotImplemented
 *         cdef MatrixBase a_ = a
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":3427
 *         if not isinstance(a, MatrixBase) or not isinstance(b, MatrixBase):
 *             return NotImplemented
 *         cdef MatrixBase a_ = a             # <<<<<<<<<<<<<<
 *         cdef MatrixBase b_ = b
 *         if (a_.shape == (0, 0)):
*/
  __Pyx_INCREF((PyObject *)__pyx_v_a);
  __pyx_v_a_ = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_MatrixBase *)__pyx_v_a);

  /* "symengine/lib/symengine_wrapper.pyx":3428
 *             return NotImplemented
 *         cdef MatrixBase a_ = a
 *         cdef MatrixBase b_ = b             # <<<<<<<<<<<<<<
 *         if (a_.shape == (0, 0)):
 *             return b_
*/
  __pyx_t_1 = __pyx_v_b;
  __Pyx_INCREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_MatrixBase))))) __PYX_ERR(0, 3428, __pyx_L1_error)
  __pyx_v_b_ = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_MatrixBase *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3429
 *         cdef MatrixBase a_ = a
 *         cdef MatrixBase b_ = b
 *         if (a_.shape == (0, 0)):             # <<<<<<<<<<<<<<
 *             return b_
 *         if (b_.shape == (0, 0)):
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_a_), __pyx_mstate_global->__pyx_n_u_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3429, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_mstate_global->__pyx_tuple[1], Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3429, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 3429, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":3430
 *         cdef MatrixBase b_ = b
 *         if (a_.shape == (0, 0)):
 *             return b_             # <<<<<<<<<<<<<<
 *         if (b_.shape == (0, 0)):
 *             return a_
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF((PyObject *)__pyx_v_b_);
    __pyx_r = ((PyObject *)__pyx_v_b_);
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":3429
 *         cdef MatrixBase a_ = a
 *         cdef MatrixBase b_ = b
 *         if (a_.shape == (0, 0)):             # <<<<<<<<<<<<<<
 *             return b_
 *         if (b_.shape == (0, 0)):
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":3431
 *         if (a_.shape == (0, 0)):
 *             return b_
 *         if (b_.shape == (0, 0)):             # <<<<<<<<<<<<<<
 *             return a_
 *         if (a_.shape != b_.shape):
*/
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_b_), __pyx_mstate_global->__pyx_n_u_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3431, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[1], Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3431, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 3431, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":3432
 *             return b_
 *         if (b_.shape == (0, 0)):
 *             return a_             # <<<<<<<<<<<<<<
 *         if (a_.shape != b_.shape):
 *             raise ShapeError("Invalid shapes for matrix addition. Got %s %s" % (a_.shape, b_.shape))
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF((PyObject *)__pyx_v_a_);
    __pyx_r = ((PyObject *)__pyx_v_a_);
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":3431
 *         if (a_.shape == (0, 0)):
 *             return b_
 *         if (b_.shape == (0, 0)):             # <<<<<<<<<<<<<<
 *             return a_
 *         if (a_.shape != b_.shape):
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":3433
 *         if (b_.shape == (0, 0)):
 *             return a_
 *         if (a_.shape != b_.shape):             # <<<<<<<<<<<<<<
 *             raise ShapeError("Invalid shapes for matrix addition. Got %s %s" % (a_.shape, b_.shape))
 *         return a_.add_matrix(b_)
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_a_), __pyx_mstate_global->__pyx_n_u_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3433, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_b_), __pyx_mstate_global->__pyx_n_u_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3433, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3433, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 3433, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(__pyx_t_5)) {

    /* "symengine/lib/symengine_wrapper.pyx":3434
 *             return a_
 *         if (a_.shape != b_.shape):
 *             raise ShapeError("Invalid shapes for matrix addition. Got %s %s" % (a_.shape, b_.shape))             # <<<<<<<<<<<<<<
 *         return a_.add_matrix(b_)
 * 
*/
    __pyx_t_2 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_ShapeError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3434, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_a_), __pyx_mstate_global->__pyx_n_u_shape); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3434, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_8), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3434, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_b_), __pyx_mstate_global->__pyx_n_u_shape); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3434, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_10 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_8), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3434, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_11[0] = __pyx_mstate_global->__pyx_kp_u_Invalid_shapes_for_matrix_additi;
    __pyx_t_11[1] = __pyx_t_9;
    __pyx_t_11[2] = __pyx_mstate_global->__pyx_kp_u__12;
    __pyx_t_11[3] = __pyx_t_10;
    __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_11, 4, 40 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9) + 1 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_10), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10));
    if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3434, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_4 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
      assert(__pyx_t_2);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_1, __pyx__function);
      __pyx_t_4 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_8};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_1, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3434, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 3434, __pyx_L1_error)

    /* "symengine/lib/symengine_wrapper.pyx":3433
 *         if (b_.shape == (0, 0)):
 *             return a_
 *         if (a_.shape != b_.shape):             # <<<<<<<<<<<<<<
 *             raise ShapeError("Invalid shapes for matrix addition. Got %s %s" % (a_.shape, b_.shape))
 *         return a_.add_matrix(b_)
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":3435
 *         if (a_.shape != b_.shape):
 *             raise ShapeError("Invalid shapes for matrix addition. Got %s %s" % (a_.shape, b_.shape))
 *         return a_.add_matrix(b_)             # <<<<<<<<<<<<<<
 * 
 *     def __radd__(MatrixBase self, a):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_v_a_);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, ((PyObject *)__pyx_v_b_)};
    __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_add_matrix, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3435, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3422
 *             return None
 * 
 *     def __add__(a, b):             # <<<<<<<<<<<<<<
 *         a = _sympify(a, False)
 *         b = _sympify(b, False)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.__add__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_a_);
  __Pyx_XDECREF((PyObject *)__pyx_v_b_);
  __Pyx_XDECREF((PyObject *)__pyx_v_a);
  __Pyx_XDECREF(__pyx_v_b);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3437
 *         return a_.add_matrix(b_)
 * 
 *     def __radd__(MatrixBase self, a):             # <<<<<<<<<<<<<<
 *         a = _sympify(a, False)
 *         if not isinstance(a, MatrixBase):
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_11__radd__(PyObject *__pyx_v_self, PyObject *__pyx_v_a); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_11__radd__(PyObject *__pyx_v_self, PyObject *__pyx_v_a) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__radd__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_10__radd__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_self), ((PyObject *)__pyx_v_a));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_10__radd__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self, PyObject *__pyx_v_a) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_MatrixBase *__pyx_v_a_ = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10[4];
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__radd__", 0);
  __Pyx_INCREF(__pyx_v_a);

  /* "symengine/lib/symengine_wrapper.pyx":3438
 * 
 *     def __radd__(MatrixBase self, a):
 *         a = _sympify(a, False)             # <<<<<<<<<<<<<<
 *         if not isinstance(a, MatrixBase):
 *             return NotImplemented
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3438, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_a, Py_False};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3438, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF_SET(__pyx_v_a, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3439
 *     def __radd__(MatrixBase self, a):
 *         a = _sympify(a, False)
 *         if not isinstance(a, MatrixBase):             # <<<<<<<<<<<<<<
 *             return NotImplemented
 *         cdef MatrixBase a_ = a
*/
  __pyx_t_5 = __Pyx_TypeCheck(__pyx_v_a, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_MatrixBase); 
  __pyx_t_6 = (!__pyx_t_5);
  if (__pyx_t_6) {

    /* "symengine/lib/symengine_wrapper.pyx":3440
 *         a = _sympify(a, False)
 *         if not isinstance(a, MatrixBase):
 *             return NotImplemented             # <<<<<<<<<<<<<<
 *         cdef MatrixBase a_ = a
 *         if (a_.shape == (0, 0)):
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_builtin_NotImplemented);
    __pyx_r = __pyx_builtin_NotImplemented;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":3439
 *     def __radd__(MatrixBase self, a):
 *         a = _sympify(a, False)
 *         if not isinstance(a, MatrixBase):             # <<<<<<<<<<<<<<
 *             return NotImplemented
 *         cdef MatrixBase a_ = a
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":3441
 *         if not isinstance(a, MatrixBase):
 *             return NotImplemented
 *         cdef MatrixBase a_ = a             # <<<<<<<<<<<<<<
 *         if (a_.shape == (0, 0)):
 *             return self
*/
  __pyx_t_1 = __pyx_v_a;
  __Pyx_INCREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_MatrixBase))))) __PYX_ERR(0, 3441, __pyx_L1_error)
  __pyx_v_a_ = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_MatrixBase *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3442
 *             return NotImplemented
 *         cdef MatrixBase a_ = a
 *         if (a_.shape == (0, 0)):             # <<<<<<<<<<<<<<
 *             return self
 *         if (self.shape == (0, 0)):
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_a_), __pyx_mstate_global->__pyx_n_u_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3442, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_mstate_global->__pyx_tuple[1], Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3442, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 3442, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_6) {

    /* "symengine/lib/symengine_wrapper.pyx":3443
 *         cdef MatrixBase a_ = a
 *         if (a_.shape == (0, 0)):
 *             return self             # <<<<<<<<<<<<<<
 *         if (self.shape == (0, 0)):
 *             return a_
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF((PyObject *)__pyx_v_self);
    __pyx_r = ((PyObject *)__pyx_v_self);
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":3442
 *             return NotImplemented
 *         cdef MatrixBase a_ = a
 *         if (a_.shape == (0, 0)):             # <<<<<<<<<<<<<<
 *             return self
 *         if (self.shape == (0, 0)):
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":3444
 *         if (a_.shape == (0, 0)):
 *             return self
 *         if (self.shape == (0, 0)):             # <<<<<<<<<<<<<<
 *             return a_
 *         if (self.shape != a_.shape):
*/
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_shape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3444, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_mstate_global->__pyx_tuple[1], Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3444, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 3444, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_6) {

    /* "symengine/lib/symengine_wrapper.pyx":3445
 *             return self
 *         if (self.shape == (0, 0)):
 *             return a_             # <<<<<<<<<<<<<<
 *         if (self.shape != a_.shape):
 *             raise ShapeError("Invalid shapes for matrix addition. Got %s %s" % (a_.shape, self.shape))
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF((PyObject *)__pyx_v_a_);
    __pyx_r = ((PyObject *)__pyx_v_a_);
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":3444
 *         if (a_.shape == (0, 0)):
 *             return self
 *         if (self.shape == (0, 0)):             # <<<<<<<<<<<<<<
 *             return a_
 *         if (self.shape != a_.shape):
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":3446
 *         if (self.shape == (0, 0)):
 *             return a_
 *         if (self.shape != a_.shape):             # <<<<<<<<<<<<<<
 *             raise ShapeError("Invalid shapes for matrix addition. Got %s %s" % (a_.shape, self.shape))
 *         return a_.add_matrix(self)
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3446, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_a_), __pyx_mstate_global->__pyx_n_u_shape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3446, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3446, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 3446, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(__pyx_t_6)) {

    /* "symengine/lib/symengine_wrapper.pyx":3447
 *             return a_
 *         if (self.shape != a_.shape):
 *             raise ShapeError("Invalid shapes for matrix addition. Got %s %s" % (a_.shape, self.shape))             # <<<<<<<<<<<<<<
 *         return a_.add_matrix(self)
 * 
*/
    __pyx_t_3 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_ShapeError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3447, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_a_), __pyx_mstate_global->__pyx_n_u_shape); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3447, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_7), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3447, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_shape); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3447, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_7), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3447, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_10[0] = __pyx_mstate_global->__pyx_kp_u_Invalid_shapes_for_matrix_additi;
    __pyx_t_10[1] = __pyx_t_8;
    __pyx_t_10[2] = __pyx_mstate_global->__pyx_kp_u__12;
    __pyx_t_10[3] = __pyx_t_9;
    __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_10, 4, 40 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8) + 1 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9));
    if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3447, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_4 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
      assert(__pyx_t_3);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_1, __pyx__function);
      __pyx_t_4 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_7};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_1, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3447, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 3447, __pyx_L1_error)

    /* "symengine/lib/symengine_wrapper.pyx":3446
 *         if (self.shape == (0, 0)):
 *             return a_
 *         if (self.shape != a_.shape):             # <<<<<<<<<<<<<<
 *             raise ShapeError("Invalid shapes for matrix addition. Got %s %s" % (a_.shape, self.shape))
 *         return a_.add_matrix(self)
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":3448
 *         if (self.shape != a_.shape):
 *             raise ShapeError("Invalid shapes for matrix addition. Got %s %s" % (a_.shape, self.shape))
 *         return a_.add_matrix(self)             # <<<<<<<<<<<<<<
 * 
 *     def __mul__(a, b):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_v_a_);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, ((PyObject *)__pyx_v_self)};
    __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_add_matrix, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3448, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3437
 *         return a_.add_matrix(b_)
 * 
 *     def __radd__(MatrixBase self, a):             # <<<<<<<<<<<<<<
 *         a = _sympify(a, False)
 *         if not isinstance(a, MatrixBase):
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.__radd__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_a_);
  __Pyx_XDECREF(__pyx_v_a);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3450
 *         return a_.add_matrix(self)
 * 
 *     def __mul__(a, b):             # <<<<<<<<<<<<<<
 *         a = _sympify(a, False)
 *         b = _sympify(b, False)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_13__mul__(PyObject *__pyx_v_a, PyObject *__pyx_v_b); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_13__mul__(PyObject *__pyx_v_a, PyObject *__pyx_v_b) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__mul__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_12__mul__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_a), ((PyObject *)__pyx_v_b));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_12__mul__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_a, PyObject *__pyx_v_b) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9[4];
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__mul__", 0);
  __Pyx_INCREF((PyObject *)__pyx_v_a);
  __Pyx_INCREF(__pyx_v_b);

  /* "symengine/lib/symengine_wrapper.pyx":3451
 * 
 *     def __mul__(a, b):
 *         a = _sympify(a, False)             # <<<<<<<<<<<<<<
 *         b = _sympify(b, False)
 *         if isinstance(a, MatrixBase):
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3451, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, ((PyObject *)__pyx_v_a), Py_False};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3451, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase))))) __PYX_ERR(0, 3451, __pyx_L1_error)
  __Pyx_DECREF_SET(__pyx_v_a, ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_t_1));
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3452
 *     def __mul__(a, b):
 *         a = _sympify(a, False)
 *         b = _sympify(b, False)             # <<<<<<<<<<<<<<
 *         if isinstance(a, MatrixBase):
 *             if isinstance(b, MatrixBase):
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_sympify_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3452, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_b, Py_False};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3452, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF_SET(__pyx_v_b, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3453
 *         a = _sympify(a, False)
 *         b = _sympify(b, False)
 *         if isinstance(a, MatrixBase):             # <<<<<<<<<<<<<<
 *             if isinstance(b, MatrixBase):
 *                 if (a.ncols() != b.nrows()):
*/
  __pyx_t_5 = __Pyx_TypeCheck(((PyObject *)__pyx_v_a), __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_MatrixBase); 
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":3454
 *         b = _sympify(b, False)
 *         if isinstance(a, MatrixBase):
 *             if isinstance(b, MatrixBase):             # <<<<<<<<<<<<<<
 *                 if (a.ncols() != b.nrows()):
 *                     raise ShapeError("Invalid shapes for matrix multiplication. Got %s %s" % (a.shape, b.shape))
*/
    __pyx_t_5 = __Pyx_TypeCheck(__pyx_v_b, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_MatrixBase); 
    if (__pyx_t_5) {

      /* "symengine/lib/symengine_wrapper.pyx":3455
 *         if isinstance(a, MatrixBase):
 *             if isinstance(b, MatrixBase):
 *                 if (a.ncols() != b.nrows()):             # <<<<<<<<<<<<<<
 *                     raise ShapeError("Invalid shapes for matrix multiplication. Got %s %s" % (a.shape, b.shape))
 *                 return a.mul_matrix(b)
*/
      __pyx_t_2 = ((PyObject *)__pyx_v_a);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_4 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_ncols, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3455, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_t_3 = __pyx_v_b;
      __Pyx_INCREF(__pyx_t_3);
      __pyx_t_4 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
        __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_nrows, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3455, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      }
      __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3455, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 3455, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(__pyx_t_5)) {

        /* "symengine/lib/symengine_wrapper.pyx":3456
 *             if isinstance(b, MatrixBase):
 *                 if (a.ncols() != b.nrows()):
 *                     raise ShapeError("Invalid shapes for matrix multiplication. Got %s %s" % (a.shape, b.shape))             # <<<<<<<<<<<<<<
 *                 return a.mul_matrix(b)
 *             elif isinstance(b, Basic):
*/
        __pyx_t_2 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_ShapeError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3456, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_a), __pyx_mstate_global->__pyx_n_u_shape); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3456, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_7 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_6), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3456, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_b, __pyx_mstate_global->__pyx_n_u_shape); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3456, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_8 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_6), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3456, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_9[0] = __pyx_mstate_global->__pyx_kp_u_Invalid_shapes_for_matrix_multip;
        __pyx_t_9[1] = __pyx_t_7;
        __pyx_t_9[2] = __pyx_mstate_global->__pyx_kp_u__12;
        __pyx_t_9[3] = __pyx_t_8;
        __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_9, 4, 46 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7) + 1 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8));
        if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3456, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_4 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_1))) {
          __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
          assert(__pyx_t_2);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_1, __pyx__function);
          __pyx_t_4 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_6};
          __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_1, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3456, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        __Pyx_Raise(__pyx_t_3, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __PYX_ERR(0, 3456, __pyx_L1_error)

        /* "symengine/lib/symengine_wrapper.pyx":3455
 *         if isinstance(a, MatrixBase):
 *             if isinstance(b, MatrixBase):
 *                 if (a.ncols() != b.nrows()):             # <<<<<<<<<<<<<<
 *                     raise ShapeError("Invalid shapes for matrix multiplication. Got %s %s" % (a.shape, b.shape))
 *                 return a.mul_matrix(b)
*/
      }

      /* "symengine/lib/symengine_wrapper.pyx":3457
 *                 if (a.ncols() != b.nrows()):
 *                     raise ShapeError("Invalid shapes for matrix multiplication. Got %s %s" % (a.shape, b.shape))
 *                 return a.mul_matrix(b)             # <<<<<<<<<<<<<<
 *             elif isinstance(b, Basic):
 *                 return a.mul_scalar(b)
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = ((PyObject *)__pyx_v_a);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_4 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_b};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_mul_matrix, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3457, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "symengine/lib/symengine_wrapper.pyx":3454
 *         b = _sympify(b, False)
 *         if isinstance(a, MatrixBase):
 *             if isinstance(b, MatrixBase):             # <<<<<<<<<<<<<<
 *                 if (a.ncols() != b.nrows()):
 *                     raise ShapeError("Invalid shapes for matrix multiplication. Got %s %s" % (a.shape, b.shape))
*/
    }

    /* "symengine/lib/symengine_wrapper.pyx":3458
 *                     raise ShapeError("Invalid shapes for matrix multiplication. Got %s %s" % (a.shape, b.shape))
 *                 return a.mul_matrix(b)
 *             elif isinstance(b, Basic):             # <<<<<<<<<<<<<<
 *                 return a.mul_scalar(b)
 *             else:
*/
    __pyx_t_5 = __Pyx_TypeCheck(__pyx_v_b, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic); 
    if (__pyx_t_5) {

      /* "symengine/lib/symengine_wrapper.pyx":3459
 *                 return a.mul_matrix(b)
 *             elif isinstance(b, Basic):
 *                 return a.mul_scalar(b)             # <<<<<<<<<<<<<<
 *             else:
 *                 return NotImplemented
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = ((PyObject *)__pyx_v_a);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_4 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_b};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_mul_scalar, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3459, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "symengine/lib/symengine_wrapper.pyx":3458
 *                     raise ShapeError("Invalid shapes for matrix multiplication. Got %s %s" % (a.shape, b.shape))
 *                 return a.mul_matrix(b)
 *             elif isinstance(b, Basic):             # <<<<<<<<<<<<<<
 *                 return a.mul_scalar(b)
 *             else:
*/
    }

    /* "symengine/lib/symengine_wrapper.pyx":3461
 *                 return a.mul_scalar(b)
 *             else:
 *                 return NotImplemented             # <<<<<<<<<<<<<<
 *         elif isinstance(a, Basic):
 *             return b.mul_scalar(a)
*/
    /*else*/ {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_builtin_NotImplemented);
      __pyx_r = __pyx_builtin_NotImplemented;
      goto __pyx_L0;
    }

    /* "symengine/lib/symengine_wrapper.pyx":3453
 *         a = _sympify(a, False)
 *         b = _sympify(b, False)
 *         if isinstance(a, MatrixBase):             # <<<<<<<<<<<<<<
 *             if isinstance(b, MatrixBase):
 *                 if (a.ncols() != b.nrows()):
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":3462
 *             else:
 *                 return NotImplemented
 *         elif isinstance(a, Basic):             # <<<<<<<<<<<<<<
 *             return b.mul_scalar(a)
 *         else:
*/
  __pyx_t_5 = __Pyx_TypeCheck(((PyObject *)__pyx_v_a), __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic); 
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":3463
 *                 return NotImplemented
 *         elif isinstance(a, Basic):
 *             return b.mul_scalar(a)             # <<<<<<<<<<<<<<
 *         else:
 *             return NotImplemented
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __pyx_v_b;
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_4 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_1, ((PyObject *)__pyx_v_a)};
      __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_mul_scalar, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3463, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":3462
 *             else:
 *                 return NotImplemented
 *         elif isinstance(a, Basic):             # <<<<<<<<<<<<<<
 *             return b.mul_scalar(a)
 *         else:
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":3465
 *             return b.mul_scalar(a)
 *         else:
 *             return NotImplemented             # <<<<<<<<<<<<<<
 * 
 *     def __rmul__(Basic self, a):
*/
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_builtin_NotImplemented);
    __pyx_r = __pyx_builtin_NotImplemented;
    goto __pyx_L0;
  }

  /* "symengine/lib/symengine_wrapper.pyx":3450
 *         return a_.add_matrix(self)
 * 
 *     def __mul__(a, b):             # <<<<<<<<<<<<<<
 *         a = _sympify(a, False)
 *         b = _sympify(b, False)
*/

  /* 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_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.__mul__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_a);
  __Pyx_XDECREF(__pyx_v_b);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3467
 *             return NotImplemented
 * 
 *     def __rmul__(Basic self, a):             # <<<<<<<<<<<<<<
 *         a = _sympify(a, False)
 *         if isinstance(a, MatrixBase):
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_15__rmul__(PyObject *__pyx_v_self, PyObject *__pyx_v_a); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_15__rmul__(PyObject *__pyx_v_self, PyObject *__pyx_v_a) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__rmul__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_14__rmul__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_self), ((PyObject *)__pyx_v_a));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_14__rmul__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self, PyObject *__pyx_v_a) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9[4];
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__rmul__", 0);
  __Pyx_INCREF(__pyx_v_a);

  /* "symengine/lib/symengine_wrapper.pyx":3468
 * 
 *     def __rmul__(Basic self, a):
 *         a = _sympify(a, False)             # <<<<<<<<<<<<<<
 *         if isinstance(a, MatrixBase):
 *             if (a.ncols() != self.nrows()):
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3468, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_a, Py_False};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3468, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF_SET(__pyx_v_a, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3469
 *     def __rmul__(Basic self, a):
 *         a = _sympify(a, False)
 *         if isinstance(a, MatrixBase):             # <<<<<<<<<<<<<<
 *             if (a.ncols() != self.nrows()):
 *                 raise ShapeError("Invalid shapes for matrix multiplication. Got %s %s" % (a.shape, self.shape))
*/
  __pyx_t_5 = __Pyx_TypeCheck(__pyx_v_a, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_MatrixBase); 
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":3470
 *         a = _sympify(a, False)
 *         if isinstance(a, MatrixBase):
 *             if (a.ncols() != self.nrows()):             # <<<<<<<<<<<<<<
 *                 raise ShapeError("Invalid shapes for matrix multiplication. Got %s %s" % (a.shape, self.shape))
 *             return a.mul_matrix(self)
*/
    __pyx_t_3 = __pyx_v_a;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_4 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
      __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_ncols, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3470, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __pyx_t_2 = ((PyObject *)__pyx_v_self);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_t_4 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
      __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_nrows, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3470, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3470, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 3470, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(__pyx_t_5)) {

      /* "symengine/lib/symengine_wrapper.pyx":3471
 *         if isinstance(a, MatrixBase):
 *             if (a.ncols() != self.nrows()):
 *                 raise ShapeError("Invalid shapes for matrix multiplication. Got %s %s" % (a.shape, self.shape))             # <<<<<<<<<<<<<<
 *             return a.mul_matrix(self)
 *         elif isinstance(a, Basic):
*/
      __pyx_t_3 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_ShapeError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3471, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_mstate_global->__pyx_n_u_shape); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3471, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_6), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3471, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_shape); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3471, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_8 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_6), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3471, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_9[0] = __pyx_mstate_global->__pyx_kp_u_Invalid_shapes_for_matrix_multip;
      __pyx_t_9[1] = __pyx_t_7;
      __pyx_t_9[2] = __pyx_mstate_global->__pyx_kp_u__12;
      __pyx_t_9[3] = __pyx_t_8;
      __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_9, 4, 46 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7) + 1 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8));
      if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3471, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_4 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
        assert(__pyx_t_3);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_1, __pyx__function);
        __pyx_t_4 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_6};
        __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_1, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3471, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_Raise(__pyx_t_2, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __PYX_ERR(0, 3471, __pyx_L1_error)

      /* "symengine/lib/symengine_wrapper.pyx":3470
 *         a = _sympify(a, False)
 *         if isinstance(a, MatrixBase):
 *             if (a.ncols() != self.nrows()):             # <<<<<<<<<<<<<<
 *                 raise ShapeError("Invalid shapes for matrix multiplication. Got %s %s" % (a.shape, self.shape))
 *             return a.mul_matrix(self)
*/
    }

    /* "symengine/lib/symengine_wrapper.pyx":3472
 *             if (a.ncols() != self.nrows()):
 *                 raise ShapeError("Invalid shapes for matrix multiplication. Got %s %s" % (a.shape, self.shape))
 *             return a.mul_matrix(self)             # <<<<<<<<<<<<<<
 *         elif isinstance(a, Basic):
 *             return self.mul_scalar(a)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __pyx_v_a;
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_4 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_1, ((PyObject *)__pyx_v_self)};
      __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_mul_matrix, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3472, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":3469
 *     def __rmul__(Basic self, a):
 *         a = _sympify(a, False)
 *         if isinstance(a, MatrixBase):             # <<<<<<<<<<<<<<
 *             if (a.ncols() != self.nrows()):
 *                 raise ShapeError("Invalid shapes for matrix multiplication. Got %s %s" % (a.shape, self.shape))
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":3473
 *                 raise ShapeError("Invalid shapes for matrix multiplication. Got %s %s" % (a.shape, self.shape))
 *             return a.mul_matrix(self)
 *         elif isinstance(a, Basic):             # <<<<<<<<<<<<<<
 *             return self.mul_scalar(a)
 *         else:
*/
  __pyx_t_5 = __Pyx_TypeCheck(__pyx_v_a, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic); 
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":3474
 *             return a.mul_matrix(self)
 *         elif isinstance(a, Basic):
 *             return self.mul_scalar(a)             # <<<<<<<<<<<<<<
 *         else:
 *             return NotImplemented
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = ((PyObject *)__pyx_v_self);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_4 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_a};
      __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_mul_scalar, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3474, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":3473
 *                 raise ShapeError("Invalid shapes for matrix multiplication. Got %s %s" % (a.shape, self.shape))
 *             return a.mul_matrix(self)
 *         elif isinstance(a, Basic):             # <<<<<<<<<<<<<<
 *             return self.mul_scalar(a)
 *         else:
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":3476
 *             return self.mul_scalar(a)
 *         else:
 *             return NotImplemented             # <<<<<<<<<<<<<<
 * 
 *     def __matmul__(a, b):
*/
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_builtin_NotImplemented);
    __pyx_r = __pyx_builtin_NotImplemented;
    goto __pyx_L0;
  }

  /* "symengine/lib/symengine_wrapper.pyx":3467
 *             return NotImplemented
 * 
 *     def __rmul__(Basic self, a):             # <<<<<<<<<<<<<<
 *         a = _sympify(a, False)
 *         if isinstance(a, MatrixBase):
*/

  /* 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_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.__rmul__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_a);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3478
 *             return NotImplemented
 * 
 *     def __matmul__(a, b):             # <<<<<<<<<<<<<<
 *         a = _sympify(a, False)
 *         b = _sympify(b, False)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_17__matmul__(PyObject *__pyx_v_a, PyObject *__pyx_v_b); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_17__matmul__(PyObject *__pyx_v_a, PyObject *__pyx_v_b) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__matmul__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_16__matmul__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_a), ((PyObject *)__pyx_v_b));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_16__matmul__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_a, PyObject *__pyx_v_b) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9[4];
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__matmul__", 0);
  __Pyx_INCREF((PyObject *)__pyx_v_a);
  __Pyx_INCREF(__pyx_v_b);

  /* "symengine/lib/symengine_wrapper.pyx":3479
 * 
 *     def __matmul__(a, b):
 *         a = _sympify(a, False)             # <<<<<<<<<<<<<<
 *         b = _sympify(b, False)
 *         if (a.ncols() != b.nrows()):
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3479, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, ((PyObject *)__pyx_v_a), Py_False};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3479, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase))))) __PYX_ERR(0, 3479, __pyx_L1_error)
  __Pyx_DECREF_SET(__pyx_v_a, ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_t_1));
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3480
 *     def __matmul__(a, b):
 *         a = _sympify(a, False)
 *         b = _sympify(b, False)             # <<<<<<<<<<<<<<
 *         if (a.ncols() != b.nrows()):
 *             raise ShapeError("Invalid shapes for matrix multiplication. Got %s %s" % (a.shape, b.shape))
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_sympify_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3480, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_b, Py_False};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3480, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF_SET(__pyx_v_b, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3481
 *         a = _sympify(a, False)
 *         b = _sympify(b, False)
 *         if (a.ncols() != b.nrows()):             # <<<<<<<<<<<<<<
 *             raise ShapeError("Invalid shapes for matrix multiplication. Got %s %s" % (a.shape, b.shape))
 *         return a.mul_matrix(b)
*/
  __pyx_t_2 = ((PyObject *)__pyx_v_a);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_ncols, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3481, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_t_3 = __pyx_v_b;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_nrows, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3481, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3481, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 3481, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(__pyx_t_5)) {

    /* "symengine/lib/symengine_wrapper.pyx":3482
 *         b = _sympify(b, False)
 *         if (a.ncols() != b.nrows()):
 *             raise ShapeError("Invalid shapes for matrix multiplication. Got %s %s" % (a.shape, b.shape))             # <<<<<<<<<<<<<<
 *         return a.mul_matrix(b)
 * 
*/
    __pyx_t_2 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_ShapeError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3482, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_a), __pyx_mstate_global->__pyx_n_u_shape); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3482, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_6), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3482, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_b, __pyx_mstate_global->__pyx_n_u_shape); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3482, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_6), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3482, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_9[0] = __pyx_mstate_global->__pyx_kp_u_Invalid_shapes_for_matrix_multip;
    __pyx_t_9[1] = __pyx_t_7;
    __pyx_t_9[2] = __pyx_mstate_global->__pyx_kp_u__12;
    __pyx_t_9[3] = __pyx_t_8;
    __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_9, 4, 46 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7) + 1 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8));
    if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3482, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_4 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
      assert(__pyx_t_2);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_1, __pyx__function);
      __pyx_t_4 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_6};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_1, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3482, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 3482, __pyx_L1_error)

    /* "symengine/lib/symengine_wrapper.pyx":3481
 *         a = _sympify(a, False)
 *         b = _sympify(b, False)
 *         if (a.ncols() != b.nrows()):             # <<<<<<<<<<<<<<
 *             raise ShapeError("Invalid shapes for matrix multiplication. Got %s %s" % (a.shape, b.shape))
 *         return a.mul_matrix(b)
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":3483
 *         if (a.ncols() != b.nrows()):
 *             raise ShapeError("Invalid shapes for matrix multiplication. Got %s %s" % (a.shape, b.shape))
 *         return a.mul_matrix(b)             # <<<<<<<<<<<<<<
 * 
 *     def __rmatmul__(Basic self, a):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_v_a);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_b};
    __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_mul_matrix, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3483, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3478
 *             return NotImplemented
 * 
 *     def __matmul__(a, b):             # <<<<<<<<<<<<<<
 *         a = _sympify(a, False)
 *         b = _sympify(b, False)
*/

  /* 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_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.__matmul__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_a);
  __Pyx_XDECREF(__pyx_v_b);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3485
 *         return a.mul_matrix(b)
 * 
 *     def __rmatmul__(Basic self, a):             # <<<<<<<<<<<<<<
 *         a = _sympify(a, False)
 *         if (a.ncols() != self.nrows()):
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_19__rmatmul__(PyObject *__pyx_v_self, PyObject *__pyx_v_a); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_19__rmatmul__(PyObject *__pyx_v_self, PyObject *__pyx_v_a) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__rmatmul__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_18__rmatmul__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_self), ((PyObject *)__pyx_v_a));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_18__rmatmul__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self, PyObject *__pyx_v_a) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9[4];
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__rmatmul__", 0);
  __Pyx_INCREF(__pyx_v_a);

  /* "symengine/lib/symengine_wrapper.pyx":3486
 * 
 *     def __rmatmul__(Basic self, a):
 *         a = _sympify(a, False)             # <<<<<<<<<<<<<<
 *         if (a.ncols() != self.nrows()):
 *             raise ShapeError("Invalid shapes for matrix multiplication. Got %s %s" % (a.shape, self.shape))
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3486, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_a, Py_False};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3486, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF_SET(__pyx_v_a, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3487
 *     def __rmatmul__(Basic self, a):
 *         a = _sympify(a, False)
 *         if (a.ncols() != self.nrows()):             # <<<<<<<<<<<<<<
 *             raise ShapeError("Invalid shapes for matrix multiplication. Got %s %s" % (a.shape, self.shape))
 *         return a.mul_matrix(self)
*/
  __pyx_t_3 = __pyx_v_a;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_ncols, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3487, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_t_2 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_nrows, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3487, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3487, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 3487, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(__pyx_t_5)) {

    /* "symengine/lib/symengine_wrapper.pyx":3488
 *         a = _sympify(a, False)
 *         if (a.ncols() != self.nrows()):
 *             raise ShapeError("Invalid shapes for matrix multiplication. Got %s %s" % (a.shape, self.shape))             # <<<<<<<<<<<<<<
 *         return a.mul_matrix(self)
 * 
*/
    __pyx_t_3 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_ShapeError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3488, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_mstate_global->__pyx_n_u_shape); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3488, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_6), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3488, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_shape); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3488, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_6), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3488, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_9[0] = __pyx_mstate_global->__pyx_kp_u_Invalid_shapes_for_matrix_multip;
    __pyx_t_9[1] = __pyx_t_7;
    __pyx_t_9[2] = __pyx_mstate_global->__pyx_kp_u__12;
    __pyx_t_9[3] = __pyx_t_8;
    __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_9, 4, 46 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7) + 1 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8));
    if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3488, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_4 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
      assert(__pyx_t_3);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_1, __pyx__function);
      __pyx_t_4 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_6};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_1, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3488, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 3488, __pyx_L1_error)

    /* "symengine/lib/symengine_wrapper.pyx":3487
 *     def __rmatmul__(Basic self, a):
 *         a = _sympify(a, False)
 *         if (a.ncols() != self.nrows()):             # <<<<<<<<<<<<<<
 *             raise ShapeError("Invalid shapes for matrix multiplication. Got %s %s" % (a.shape, self.shape))
 *         return a.mul_matrix(self)
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":3489
 *         if (a.ncols() != self.nrows()):
 *             raise ShapeError("Invalid shapes for matrix multiplication. Got %s %s" % (a.shape, self.shape))
 *         return a.mul_matrix(self)             # <<<<<<<<<<<<<<
 * 
 *     def __truediv__(a, b):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_v_a;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, ((PyObject *)__pyx_v_self)};
    __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_mul_matrix, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3489, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3485
 *         return a.mul_matrix(b)
 * 
 *     def __rmatmul__(Basic self, a):             # <<<<<<<<<<<<<<
 *         a = _sympify(a, False)
 *         if (a.ncols() != self.nrows()):
*/

  /* 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_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.__rmatmul__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_a);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3491
 *         return a.mul_matrix(self)
 * 
 *     def __truediv__(a, b):             # <<<<<<<<<<<<<<
 *         a = _sympify(a, False)
 *         b = _sympify(b, False)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_21__truediv__(PyObject *__pyx_v_a, PyObject *__pyx_v_b); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_21__truediv__(PyObject *__pyx_v_a, PyObject *__pyx_v_b) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__truediv__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_20__truediv__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_a), ((PyObject *)__pyx_v_b));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_20__truediv__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_a, PyObject *__pyx_v_b) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__truediv__", 0);
  __Pyx_INCREF((PyObject *)__pyx_v_a);
  __Pyx_INCREF(__pyx_v_b);

  /* "symengine/lib/symengine_wrapper.pyx":3492
 * 
 *     def __truediv__(a, b):
 *         a = _sympify(a, False)             # <<<<<<<<<<<<<<
 *         b = _sympify(b, False)
 *         if isinstance(a, MatrixBase):
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3492, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, ((PyObject *)__pyx_v_a), Py_False};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3492, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase))))) __PYX_ERR(0, 3492, __pyx_L1_error)
  __Pyx_DECREF_SET(__pyx_v_a, ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_t_1));
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3493
 *     def __truediv__(a, b):
 *         a = _sympify(a, False)
 *         b = _sympify(b, False)             # <<<<<<<<<<<<<<
 *         if isinstance(a, MatrixBase):
 *             if isinstance(b, MatrixBase):
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_sympify_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3493, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_b, Py_False};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3493, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF_SET(__pyx_v_b, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3494
 *         a = _sympify(a, False)
 *         b = _sympify(b, False)
 *         if isinstance(a, MatrixBase):             # <<<<<<<<<<<<<<
 *             if isinstance(b, MatrixBase):
 *                 return a.mul_matrix(b.inv())
*/
  __pyx_t_5 = __Pyx_TypeCheck(((PyObject *)__pyx_v_a), __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_MatrixBase); 
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":3495
 *         b = _sympify(b, False)
 *         if isinstance(a, MatrixBase):
 *             if isinstance(b, MatrixBase):             # <<<<<<<<<<<<<<
 *                 return a.mul_matrix(b.inv())
 *             elif isinstance(b, Basic):
*/
    __pyx_t_5 = __Pyx_TypeCheck(__pyx_v_b, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_MatrixBase); 
    if (__pyx_t_5) {

      /* "symengine/lib/symengine_wrapper.pyx":3496
 *         if isinstance(a, MatrixBase):
 *             if isinstance(b, MatrixBase):
 *                 return a.mul_matrix(b.inv())             # <<<<<<<<<<<<<<
 *             elif isinstance(b, Basic):
 *                 return a.mul_scalar(1/b)
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = ((PyObject *)__pyx_v_a);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_6 = __pyx_v_b;
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_4 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_inv, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3496, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __pyx_t_4 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_mul_matrix, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3496, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "symengine/lib/symengine_wrapper.pyx":3495
 *         b = _sympify(b, False)
 *         if isinstance(a, MatrixBase):
 *             if isinstance(b, MatrixBase):             # <<<<<<<<<<<<<<
 *                 return a.mul_matrix(b.inv())
 *             elif isinstance(b, Basic):
*/
    }

    /* "symengine/lib/symengine_wrapper.pyx":3497
 *             if isinstance(b, MatrixBase):
 *                 return a.mul_matrix(b.inv())
 *             elif isinstance(b, Basic):             # <<<<<<<<<<<<<<
 *                 return a.mul_scalar(1/b)
 *             else:
*/
    __pyx_t_5 = __Pyx_TypeCheck(__pyx_v_b, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic); 
    if (__pyx_t_5) {

      /* "symengine/lib/symengine_wrapper.pyx":3498
 *                 return a.mul_matrix(b.inv())
 *             elif isinstance(b, Basic):
 *                 return a.mul_scalar(1/b)             # <<<<<<<<<<<<<<
 *             else:
 *                 return NotImplemented
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = ((PyObject *)__pyx_v_a);
      __Pyx_INCREF(__pyx_t_3);
      __pyx_t_2 = __Pyx_PyNumber_Divide(__pyx_mstate_global->__pyx_int_1, __pyx_v_b); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3498, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_2};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_mul_scalar, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3498, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "symengine/lib/symengine_wrapper.pyx":3497
 *             if isinstance(b, MatrixBase):
 *                 return a.mul_matrix(b.inv())
 *             elif isinstance(b, Basic):             # <<<<<<<<<<<<<<
 *                 return a.mul_scalar(1/b)
 *             else:
*/
    }

    /* "symengine/lib/symengine_wrapper.pyx":3500
 *                 return a.mul_scalar(1/b)
 *             else:
 *                 return NotImplemented             # <<<<<<<<<<<<<<
 *         else:
 *             return NotImplemented
*/
    /*else*/ {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_builtin_NotImplemented);
      __pyx_r = __pyx_builtin_NotImplemented;
      goto __pyx_L0;
    }

    /* "symengine/lib/symengine_wrapper.pyx":3494
 *         a = _sympify(a, False)
 *         b = _sympify(b, False)
 *         if isinstance(a, MatrixBase):             # <<<<<<<<<<<<<<
 *             if isinstance(b, MatrixBase):
 *                 return a.mul_matrix(b.inv())
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":3502
 *                 return NotImplemented
 *         else:
 *             return NotImplemented             # <<<<<<<<<<<<<<
 * 
 *     def __rtruediv__(Basic self, a):
*/
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_builtin_NotImplemented);
    __pyx_r = __pyx_builtin_NotImplemented;
    goto __pyx_L0;
  }

  /* "symengine/lib/symengine_wrapper.pyx":3491
 *         return a.mul_matrix(self)
 * 
 *     def __truediv__(a, b):             # <<<<<<<<<<<<<<
 *         a = _sympify(a, False)
 *         b = _sympify(b, False)
*/

  /* 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_6);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.__truediv__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_a);
  __Pyx_XDECREF(__pyx_v_b);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3504
 *             return NotImplemented
 * 
 *     def __rtruediv__(Basic self, a):             # <<<<<<<<<<<<<<
 *         a = _sympify(a, False)
 *         if isinstance(a, MatrixBase):
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_23__rtruediv__(PyObject *__pyx_v_self, PyObject *__pyx_v_a); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_23__rtruediv__(PyObject *__pyx_v_self, PyObject *__pyx_v_a) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__rtruediv__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_22__rtruediv__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_self), ((PyObject *)__pyx_v_a));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_22__rtruediv__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self, PyObject *__pyx_v_a) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__rtruediv__", 0);
  __Pyx_INCREF(__pyx_v_a);

  /* "symengine/lib/symengine_wrapper.pyx":3505
 * 
 *     def __rtruediv__(Basic self, a):
 *         a = _sympify(a, False)             # <<<<<<<<<<<<<<
 *         if isinstance(a, MatrixBase):
 *             return a.mul_matrix(self.inv())
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3505, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_a, Py_False};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3505, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF_SET(__pyx_v_a, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3506
 *     def __rtruediv__(Basic self, a):
 *         a = _sympify(a, False)
 *         if isinstance(a, MatrixBase):             # <<<<<<<<<<<<<<
 *             return a.mul_matrix(self.inv())
 *         else:
*/
  __pyx_t_5 = __Pyx_TypeCheck(__pyx_v_a, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_MatrixBase); 
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":3507
 *         a = _sympify(a, False)
 *         if isinstance(a, MatrixBase):
 *             return a.mul_matrix(self.inv())             # <<<<<<<<<<<<<<
 *         else:
 *             return NotImplemented
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __pyx_v_a;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_6 = ((PyObject *)__pyx_v_self);
    __Pyx_INCREF(__pyx_t_6);
    __pyx_t_4 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
      __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_inv, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3507, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __pyx_t_4 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_2};
      __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_mul_matrix, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3507, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":3506
 *     def __rtruediv__(Basic self, a):
 *         a = _sympify(a, False)
 *         if isinstance(a, MatrixBase):             # <<<<<<<<<<<<<<
 *             return a.mul_matrix(self.inv())
 *         else:
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":3509
 *             return a.mul_matrix(self.inv())
 *         else:
 *             return NotImplemented             # <<<<<<<<<<<<<<
 * 
 *     def __sub__(a, b):
*/
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_builtin_NotImplemented);
    __pyx_r = __pyx_builtin_NotImplemented;
    goto __pyx_L0;
  }

  /* "symengine/lib/symengine_wrapper.pyx":3504
 *             return NotImplemented
 * 
 *     def __rtruediv__(Basic self, a):             # <<<<<<<<<<<<<<
 *         a = _sympify(a, False)
 *         if isinstance(a, MatrixBase):
*/

  /* 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_6);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.__rtruediv__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_a);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3511
 *             return NotImplemented
 * 
 *     def __sub__(a, b):             # <<<<<<<<<<<<<<
 *         a = _sympify(a, False)
 *         b = _sympify(b, False)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_25__sub__(PyObject *__pyx_v_a, PyObject *__pyx_v_b); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_25__sub__(PyObject *__pyx_v_a, PyObject *__pyx_v_b) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__sub__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_24__sub__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_a), ((PyObject *)__pyx_v_b));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_24__sub__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_a, PyObject *__pyx_v_b) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_MatrixBase *__pyx_v_a_ = 0;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_MatrixBase *__pyx_v_b_ = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11[4];
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__sub__", 0);
  __Pyx_INCREF((PyObject *)__pyx_v_a);
  __Pyx_INCREF(__pyx_v_b);

  /* "symengine/lib/symengine_wrapper.pyx":3512
 * 
 *     def __sub__(a, b):
 *         a = _sympify(a, False)             # <<<<<<<<<<<<<<
 *         b = _sympify(b, False)
 *         if not isinstance(a, MatrixBase) or not isinstance(b, MatrixBase):
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3512, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, ((PyObject *)__pyx_v_a), Py_False};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3512, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase))))) __PYX_ERR(0, 3512, __pyx_L1_error)
  __Pyx_DECREF_SET(__pyx_v_a, ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_t_1));
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3513
 *     def __sub__(a, b):
 *         a = _sympify(a, False)
 *         b = _sympify(b, False)             # <<<<<<<<<<<<<<
 *         if not isinstance(a, MatrixBase) or not isinstance(b, MatrixBase):
 *             return NotImplemented
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_sympify_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3513, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_b, Py_False};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3513, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF_SET(__pyx_v_b, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3514
 *         a = _sympify(a, False)
 *         b = _sympify(b, False)
 *         if not isinstance(a, MatrixBase) or not isinstance(b, MatrixBase):             # <<<<<<<<<<<<<<
 *             return NotImplemented
 *         cdef MatrixBase a_ = a
*/
  __pyx_t_6 = __Pyx_TypeCheck(((PyObject *)__pyx_v_a), __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_MatrixBase); 
  __pyx_t_7 = (!__pyx_t_6);
  if (!__pyx_t_7) {
  } else {
    __pyx_t_5 = __pyx_t_7;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_7 = __Pyx_TypeCheck(__pyx_v_b, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_MatrixBase); 
  __pyx_t_6 = (!__pyx_t_7);
  __pyx_t_5 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":3515
 *         b = _sympify(b, False)
 *         if not isinstance(a, MatrixBase) or not isinstance(b, MatrixBase):
 *             return NotImplemented             # <<<<<<<<<<<<<<
 *         cdef MatrixBase a_ = a
 *         cdef MatrixBase b_ = b
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_builtin_NotImplemented);
    __pyx_r = __pyx_builtin_NotImplemented;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":3514
 *         a = _sympify(a, False)
 *         b = _sympify(b, False)
 *         if not isinstance(a, MatrixBase) or not isinstance(b, MatrixBase):             # <<<<<<<<<<<<<<
 *             return NotImplemented
 *         cdef MatrixBase a_ = a
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":3516
 *         if not isinstance(a, MatrixBase) or not isinstance(b, MatrixBase):
 *             return NotImplemented
 *         cdef MatrixBase a_ = a             # <<<<<<<<<<<<<<
 *         cdef MatrixBase b_ = b
 *         if (a_.shape != b_.shape):
*/
  __Pyx_INCREF((PyObject *)__pyx_v_a);
  __pyx_v_a_ = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_MatrixBase *)__pyx_v_a);

  /* "symengine/lib/symengine_wrapper.pyx":3517
 *             return NotImplemented
 *         cdef MatrixBase a_ = a
 *         cdef MatrixBase b_ = b             # <<<<<<<<<<<<<<
 *         if (a_.shape != b_.shape):
 *             raise ShapeError("Invalid shapes for matrix subtraction. Got %s %s" % (a.shape, b.shape))
*/
  __pyx_t_1 = __pyx_v_b;
  __Pyx_INCREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_MatrixBase))))) __PYX_ERR(0, 3517, __pyx_L1_error)
  __pyx_v_b_ = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_MatrixBase *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3518
 *         cdef MatrixBase a_ = a
 *         cdef MatrixBase b_ = b
 *         if (a_.shape != b_.shape):             # <<<<<<<<<<<<<<
 *             raise ShapeError("Invalid shapes for matrix subtraction. Got %s %s" % (a.shape, b.shape))
 *         return a_.add_matrix(-b_)
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_a_), __pyx_mstate_global->__pyx_n_u_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3518, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_b_), __pyx_mstate_global->__pyx_n_u_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3518, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3518, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 3518, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(__pyx_t_5)) {

    /* "symengine/lib/symengine_wrapper.pyx":3519
 *         cdef MatrixBase b_ = b
 *         if (a_.shape != b_.shape):
 *             raise ShapeError("Invalid shapes for matrix subtraction. Got %s %s" % (a.shape, b.shape))             # <<<<<<<<<<<<<<
 *         return a_.add_matrix(-b_)
 * 
*/
    __pyx_t_2 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_ShapeError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3519, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_a), __pyx_mstate_global->__pyx_n_u_shape); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3519, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_8), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3519, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_b, __pyx_mstate_global->__pyx_n_u_shape); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3519, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_10 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_8), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3519, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_11[0] = __pyx_mstate_global->__pyx_kp_u_Invalid_shapes_for_matrix_subtra;
    __pyx_t_11[1] = __pyx_t_9;
    __pyx_t_11[2] = __pyx_mstate_global->__pyx_kp_u__12;
    __pyx_t_11[3] = __pyx_t_10;
    __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_11, 4, 43 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9) + 1 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_10), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10));
    if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3519, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_4 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
      assert(__pyx_t_2);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_1, __pyx__function);
      __pyx_t_4 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_8};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_1, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3519, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 3519, __pyx_L1_error)

    /* "symengine/lib/symengine_wrapper.pyx":3518
 *         cdef MatrixBase a_ = a
 *         cdef MatrixBase b_ = b
 *         if (a_.shape != b_.shape):             # <<<<<<<<<<<<<<
 *             raise ShapeError("Invalid shapes for matrix subtraction. Got %s %s" % (a.shape, b.shape))
 *         return a_.add_matrix(-b_)
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":3520
 *         if (a_.shape != b_.shape):
 *             raise ShapeError("Invalid shapes for matrix subtraction. Got %s %s" % (a.shape, b.shape))
 *         return a_.add_matrix(-b_)             # <<<<<<<<<<<<<<
 * 
 *     def __rsub__(MatrixBase self, a):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_v_a_);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_8 = PyNumber_Negative(((PyObject *)__pyx_v_b_)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3520, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_8};
    __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_add_matrix, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3520, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3511
 *             return NotImplemented
 * 
 *     def __sub__(a, b):             # <<<<<<<<<<<<<<
 *         a = _sympify(a, False)
 *         b = _sympify(b, False)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.__sub__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_a_);
  __Pyx_XDECREF((PyObject *)__pyx_v_b_);
  __Pyx_XDECREF((PyObject *)__pyx_v_a);
  __Pyx_XDECREF(__pyx_v_b);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3522
 *         return a_.add_matrix(-b_)
 * 
 *     def __rsub__(MatrixBase self, a):             # <<<<<<<<<<<<<<
 *         a = _sympify(a, False)
 *         if not isinstance(a, MatrixBase):
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_27__rsub__(PyObject *__pyx_v_self, PyObject *__pyx_v_a); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_27__rsub__(PyObject *__pyx_v_self, PyObject *__pyx_v_a) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__rsub__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_26__rsub__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_self), ((PyObject *)__pyx_v_a));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_26__rsub__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self, PyObject *__pyx_v_a) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_MatrixBase *__pyx_v_a_ = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10[4];
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__rsub__", 0);
  __Pyx_INCREF(__pyx_v_a);

  /* "symengine/lib/symengine_wrapper.pyx":3523
 * 
 *     def __rsub__(MatrixBase self, a):
 *         a = _sympify(a, False)             # <<<<<<<<<<<<<<
 *         if not isinstance(a, MatrixBase):
 *             return NotImplemented
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3523, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_a, Py_False};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3523, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF_SET(__pyx_v_a, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3524
 *     def __rsub__(MatrixBase self, a):
 *         a = _sympify(a, False)
 *         if not isinstance(a, MatrixBase):             # <<<<<<<<<<<<<<
 *             return NotImplemented
 *         cdef MatrixBase a_ = a
*/
  __pyx_t_5 = __Pyx_TypeCheck(__pyx_v_a, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_MatrixBase); 
  __pyx_t_6 = (!__pyx_t_5);
  if (__pyx_t_6) {

    /* "symengine/lib/symengine_wrapper.pyx":3525
 *         a = _sympify(a, False)
 *         if not isinstance(a, MatrixBase):
 *             return NotImplemented             # <<<<<<<<<<<<<<
 *         cdef MatrixBase a_ = a
 *         if (a_.shape != self.shape):
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_builtin_NotImplemented);
    __pyx_r = __pyx_builtin_NotImplemented;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":3524
 *     def __rsub__(MatrixBase self, a):
 *         a = _sympify(a, False)
 *         if not isinstance(a, MatrixBase):             # <<<<<<<<<<<<<<
 *             return NotImplemented
 *         cdef MatrixBase a_ = a
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":3526
 *         if not isinstance(a, MatrixBase):
 *             return NotImplemented
 *         cdef MatrixBase a_ = a             # <<<<<<<<<<<<<<
 *         if (a_.shape != self.shape):
 *             raise ShapeError("Invalid shapes for matrix subtraction. Got %s %s" % (a.shape, self.shape))
*/
  __pyx_t_1 = __pyx_v_a;
  __Pyx_INCREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_MatrixBase))))) __PYX_ERR(0, 3526, __pyx_L1_error)
  __pyx_v_a_ = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_MatrixBase *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3527
 *             return NotImplemented
 *         cdef MatrixBase a_ = a
 *         if (a_.shape != self.shape):             # <<<<<<<<<<<<<<
 *             raise ShapeError("Invalid shapes for matrix subtraction. Got %s %s" % (a.shape, self.shape))
 *         return a_.add_matrix(-self)
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_a_), __pyx_mstate_global->__pyx_n_u_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3527, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_shape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3527, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3527, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 3527, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(__pyx_t_6)) {

    /* "symengine/lib/symengine_wrapper.pyx":3528
 *         cdef MatrixBase a_ = a
 *         if (a_.shape != self.shape):
 *             raise ShapeError("Invalid shapes for matrix subtraction. Got %s %s" % (a.shape, self.shape))             # <<<<<<<<<<<<<<
 *         return a_.add_matrix(-self)
 * 
*/
    __pyx_t_3 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_ShapeError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3528, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_mstate_global->__pyx_n_u_shape); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3528, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_7), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3528, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_shape); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3528, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_7), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3528, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_10[0] = __pyx_mstate_global->__pyx_kp_u_Invalid_shapes_for_matrix_subtra;
    __pyx_t_10[1] = __pyx_t_8;
    __pyx_t_10[2] = __pyx_mstate_global->__pyx_kp_u__12;
    __pyx_t_10[3] = __pyx_t_9;
    __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_10, 4, 43 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8) + 1 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9));
    if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3528, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_4 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
      assert(__pyx_t_3);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_1, __pyx__function);
      __pyx_t_4 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_7};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_1, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3528, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 3528, __pyx_L1_error)

    /* "symengine/lib/symengine_wrapper.pyx":3527
 *             return NotImplemented
 *         cdef MatrixBase a_ = a
 *         if (a_.shape != self.shape):             # <<<<<<<<<<<<<<
 *             raise ShapeError("Invalid shapes for matrix subtraction. Got %s %s" % (a.shape, self.shape))
 *         return a_.add_matrix(-self)
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":3529
 *         if (a_.shape != self.shape):
 *             raise ShapeError("Invalid shapes for matrix subtraction. Got %s %s" % (a.shape, self.shape))
 *         return a_.add_matrix(-self)             # <<<<<<<<<<<<<<
 * 
 *     def __neg__(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_v_a_);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_7 = PyNumber_Negative(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3529, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_7};
    __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_add_matrix, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3529, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3522
 *         return a_.add_matrix(-b_)
 * 
 *     def __rsub__(MatrixBase self, a):             # <<<<<<<<<<<<<<
 *         a = _sympify(a, False)
 *         if not isinstance(a, MatrixBase):
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.__rsub__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_a_);
  __Pyx_XDECREF(__pyx_v_a);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3531
 *         return a_.add_matrix(-self)
 * 
 *     def __neg__(self):             # <<<<<<<<<<<<<<
 *         return self.mul_scalar(-1)
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_29__neg__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_29__neg__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__neg__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_28__neg__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_28__neg__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__neg__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3532
 * 
 *     def __neg__(self):
 *         return self.mul_scalar(-1)             # <<<<<<<<<<<<<<
 * 
 *     def __abs__(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_int_neg_1};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_mul_scalar, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3532, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3531
 *         return a_.add_matrix(-self)
 * 
 *     def __neg__(self):             # <<<<<<<<<<<<<<
 *         return self.mul_scalar(-1)
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.__neg__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3534
 *         return self.mul_scalar(-1)
 * 
 *     def __abs__(self):             # <<<<<<<<<<<<<<
 *         return self.applyfunc(abs)
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_31__abs__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_31__abs__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__abs__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_30__abs__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_30__abs__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__abs__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3535
 * 
 *     def __abs__(self):
 *         return self.applyfunc(abs)             # <<<<<<<<<<<<<<
 * 
 *     def __getitem__(self, item):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_GetBuiltinName(__pyx_mstate_global->__pyx_n_u_abs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3535, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_applyfunc, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3535, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3534
 *         return self.mul_scalar(-1)
 * 
 *     def __abs__(self):             # <<<<<<<<<<<<<<
 *         return self.applyfunc(abs)
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.__abs__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3537
 *         return self.applyfunc(abs)
 * 
 *     def __getitem__(self, item):             # <<<<<<<<<<<<<<
 *         if isinstance(item, slice):
 *             if (self.ncols() == 0 or self.nrows() == 0):
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_33__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_33__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_32__getitem__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_self), ((PyObject *)__pyx_v_item));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_32__getitem__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self, PyObject *__pyx_v_item) {
  PyObject *__pyx_v_row_iter = NULL;
  PyObject *__pyx_v_col_iter = NULL;
  PyObject *__pyx_v_v = NULL;
  PyObject *__pyx_v_row = NULL;
  PyObject *__pyx_v_col = NULL;
  PyObject *__pyx_v_s = NULL;
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_9genexpr10__pyx_v_i = NULL;
  PyObject *__pyx_9genexpr11__pyx_v_ind = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *(*__pyx_t_9)(PyObject *);
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  Py_ssize_t __pyx_t_13;
  PyObject *(*__pyx_t_14)(PyObject *);
  int __pyx_t_15;
  PyObject *(*__pyx_t_16)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__getitem__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3538
 * 
 *     def __getitem__(self, item):
 *         if isinstance(item, slice):             # <<<<<<<<<<<<<<
 *             if (self.ncols() == 0 or self.nrows() == 0):
 *                 return []
*/
  __pyx_t_1 = PySlice_Check(__pyx_v_item); 
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":3539
 *     def __getitem__(self, item):
 *         if isinstance(item, slice):
 *             if (self.ncols() == 0 or self.nrows() == 0):             # <<<<<<<<<<<<<<
 *                 return []
 *             return [self.get(i // self.ncols(), i % self.ncols()) for i in range(*item.indices(len(self)))]
*/
    __pyx_t_3 = ((PyObject *)__pyx_v_self);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_4 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
      __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_ncols, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3539, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __pyx_t_5 = (__Pyx_PyLong_BoolEqObjC(__pyx_t_2, __pyx_mstate_global->__pyx_int_0, 0, 0)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 3539, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (!__pyx_t_5) {
    } else {
      __pyx_t_1 = __pyx_t_5;
      goto __pyx_L5_bool_binop_done;
    }
    __pyx_t_3 = ((PyObject *)__pyx_v_self);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_4 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
      __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_nrows, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3539, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __pyx_t_5 = (__Pyx_PyLong_BoolEqObjC(__pyx_t_2, __pyx_mstate_global->__pyx_int_0, 0, 0)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 3539, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_1 = __pyx_t_5;
    __pyx_L5_bool_binop_done:;
    if (__pyx_t_1) {

      /* "symengine/lib/symengine_wrapper.pyx":3540
 *         if isinstance(item, slice):
 *             if (self.ncols() == 0 or self.nrows() == 0):
 *                 return []             # <<<<<<<<<<<<<<
 *             return [self.get(i // self.ncols(), i % self.ncols()) for i in range(*item.indices(len(self)))]
 *         elif isinstance(item, int):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3540, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

      /* "symengine/lib/symengine_wrapper.pyx":3539
 *     def __getitem__(self, item):
 *         if isinstance(item, slice):
 *             if (self.ncols() == 0 or self.nrows() == 0):             # <<<<<<<<<<<<<<
 *                 return []
 *             return [self.get(i // self.ncols(), i % self.ncols()) for i in range(*item.indices(len(self)))]
*/
    }

    /* "symengine/lib/symengine_wrapper.pyx":3541
 *             if (self.ncols() == 0 or self.nrows() == 0):
 *                 return []
 *             return [self.get(i // self.ncols(), i % self.ncols()) for i in range(*item.indices(len(self)))]             # <<<<<<<<<<<<<<
 *         elif isinstance(item, int):
 *             return self.get(item // self.ncols(), item % self.ncols())
*/
    __Pyx_XDECREF(__pyx_r);
    { /* enter inner scope */
      __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3541, __pyx_L9_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_6 = __pyx_v_item;
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = PyObject_Length(((PyObject *)__pyx_v_self)); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3541, __pyx_L9_error)
      __pyx_t_8 = PyLong_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3541, __pyx_L9_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_4 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_8};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_indices, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3541, __pyx_L9_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __pyx_t_8 = __Pyx_PySequence_Tuple(__pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3541, __pyx_L9_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyRange_Type)), __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3541, __pyx_L9_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3541, __pyx_L9_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3541, __pyx_L9_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      for (;;) {
        {
          __pyx_t_3 = __pyx_t_9(__pyx_t_8);
          if (unlikely(!__pyx_t_3)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 3541, __pyx_L9_error)
              PyErr_Clear();
            }
            break;
          }
        }
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_XDECREF_SET(__pyx_9genexpr10__pyx_v_i, __pyx_t_3);
        __pyx_t_3 = 0;
        __pyx_t_6 = ((PyObject *)__pyx_v_self);
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_11 = ((PyObject *)__pyx_v_self);
        __Pyx_INCREF(__pyx_t_11);
        __pyx_t_4 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_11, NULL};
          __pyx_t_10 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_ncols, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3541, __pyx_L9_error)
          __Pyx_GOTREF(__pyx_t_10);
        }
        __pyx_t_11 = PyNumber_FloorDivide(__pyx_9genexpr10__pyx_v_i, __pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3541, __pyx_L9_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_t_12 = ((PyObject *)__pyx_v_self);
        __Pyx_INCREF(__pyx_t_12);
        __pyx_t_4 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_12, NULL};
          __pyx_t_10 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_ncols, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3541, __pyx_L9_error)
          __Pyx_GOTREF(__pyx_t_10);
        }
        __pyx_t_12 = PyNumber_Remainder(__pyx_9genexpr10__pyx_v_i, __pyx_t_10); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3541, __pyx_L9_error)
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_t_4 = 0;
        {
          PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_t_11, __pyx_t_12};
          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3541, __pyx_L9_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 3541, __pyx_L9_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_XDECREF(__pyx_9genexpr10__pyx_v_i); __pyx_9genexpr10__pyx_v_i = 0;
      goto __pyx_L13_exit_scope;
      __pyx_L9_error:;
      __Pyx_XDECREF(__pyx_9genexpr10__pyx_v_i); __pyx_9genexpr10__pyx_v_i = 0;
      goto __pyx_L1_error;
      __pyx_L13_exit_scope:;
    } /* exit inner scope */
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":3538
 * 
 *     def __getitem__(self, item):
 *         if isinstance(item, slice):             # <<<<<<<<<<<<<<
 *             if (self.ncols() == 0 or self.nrows() == 0):
 *                 return []
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":3542
 *                 return []
 *             return [self.get(i // self.ncols(), i % self.ncols()) for i in range(*item.indices(len(self)))]
 *         elif isinstance(item, int):             # <<<<<<<<<<<<<<
 *             return self.get(item // self.ncols(), item % self.ncols())
 *         elif isinstance(item, tuple) and len(item) == 2:
*/
  __pyx_t_1 = PyLong_Check(__pyx_v_item); 
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":3543
 *             return [self.get(i // self.ncols(), i % self.ncols()) for i in range(*item.indices(len(self)))]
 *         elif isinstance(item, int):
 *             return self.get(item // self.ncols(), item % self.ncols())             # <<<<<<<<<<<<<<
 *         elif isinstance(item, tuple) and len(item) == 2:
 *             if is_sequence(item[0]) or is_sequence(item[1]):
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_8 = ((PyObject *)__pyx_v_self);
    __Pyx_INCREF(__pyx_t_8);
    __pyx_t_12 = ((PyObject *)__pyx_v_self);
    __Pyx_INCREF(__pyx_t_12);
    __pyx_t_4 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_12, NULL};
      __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_ncols, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3543, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    __pyx_t_12 = PyNumber_FloorDivide(__pyx_v_item, __pyx_t_3); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3543, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_11 = ((PyObject *)__pyx_v_self);
    __Pyx_INCREF(__pyx_t_11);
    __pyx_t_4 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_11, NULL};
      __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_ncols, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3543, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    __pyx_t_11 = PyNumber_Remainder(__pyx_v_item, __pyx_t_3); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3543, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_4 = 0;
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_8, __pyx_t_12, __pyx_t_11};
      __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3543, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":3542
 *                 return []
 *             return [self.get(i // self.ncols(), i % self.ncols()) for i in range(*item.indices(len(self)))]
 *         elif isinstance(item, int):             # <<<<<<<<<<<<<<
 *             return self.get(item // self.ncols(), item % self.ncols())
 *         elif isinstance(item, tuple) and len(item) == 2:
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":3544
 *         elif isinstance(item, int):
 *             return self.get(item // self.ncols(), item % self.ncols())
 *         elif isinstance(item, tuple) and len(item) == 2:             # <<<<<<<<<<<<<<
 *             if is_sequence(item[0]) or is_sequence(item[1]):
 *                 if isinstance(item[0], slice):
*/
  __pyx_t_5 = PyTuple_Check(__pyx_v_item); 
  if (__pyx_t_5) {
  } else {
    __pyx_t_1 = __pyx_t_5;
    goto __pyx_L14_bool_binop_done;
  }
  __pyx_t_7 = PyObject_Length(__pyx_v_item); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3544, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_7 == 2);
  __pyx_t_1 = __pyx_t_5;
  __pyx_L14_bool_binop_done:;
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":3545
 *             return self.get(item // self.ncols(), item % self.ncols())
 *         elif isinstance(item, tuple) and len(item) == 2:
 *             if is_sequence(item[0]) or is_sequence(item[1]):             # <<<<<<<<<<<<<<
 *                 if isinstance(item[0], slice):
 *                     row_iter = range(*item[0].indices(self.rows))
*/
    __pyx_t_11 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_is_sequence); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3545, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_item, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3545, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_4 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_12))) {
      __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_12);
      assert(__pyx_t_11);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_12);
      __Pyx_INCREF(__pyx_t_11);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_12, __pyx__function);
      __pyx_t_4 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_t_8};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_12, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3545, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 3545, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (!__pyx_t_5) {
    } else {
      __pyx_t_1 = __pyx_t_5;
      goto __pyx_L17_bool_binop_done;
    }
    __pyx_t_12 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_is_sequence); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3545, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_11 = __Pyx_GetItemInt(__pyx_v_item, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3545, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_4 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_8);
      assert(__pyx_t_12);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_12);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_8, __pyx__function);
      __pyx_t_4 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_t_11};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3545, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 3545, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_1 = __pyx_t_5;
    __pyx_L17_bool_binop_done:;
    if (__pyx_t_1) {

      /* "symengine/lib/symengine_wrapper.pyx":3546
 *         elif isinstance(item, tuple) and len(item) == 2:
 *             if is_sequence(item[0]) or is_sequence(item[1]):
 *                 if isinstance(item[0], slice):             # <<<<<<<<<<<<<<
 *                     row_iter = range(*item[0].indices(self.rows))
 *                 elif is_sequence(item[0]):
*/
      __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_item, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3546, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_1 = PySlice_Check(__pyx_t_2); 
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (__pyx_t_1) {

        /* "symengine/lib/symengine_wrapper.pyx":3547
 *             if is_sequence(item[0]) or is_sequence(item[1]):
 *                 if isinstance(item[0], slice):
 *                     row_iter = range(*item[0].indices(self.rows))             # <<<<<<<<<<<<<<
 *                 elif is_sequence(item[0]):
 *                     row_iter = item[0]
*/
        __pyx_t_11 = __Pyx_GetItemInt(__pyx_v_item, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3547, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_8 = __pyx_t_11;
        __Pyx_INCREF(__pyx_t_8);
        __pyx_t_12 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_rows); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3547, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_4 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_12};
          __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_indices, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3547, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_t_11 = __Pyx_PySequence_Tuple(__pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3547, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&PyRange_Type)), __pyx_t_11, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3547, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __pyx_v_row_iter = __pyx_t_2;
        __pyx_t_2 = 0;

        /* "symengine/lib/symengine_wrapper.pyx":3546
 *         elif isinstance(item, tuple) and len(item) == 2:
 *             if is_sequence(item[0]) or is_sequence(item[1]):
 *                 if isinstance(item[0], slice):             # <<<<<<<<<<<<<<
 *                     row_iter = range(*item[0].indices(self.rows))
 *                 elif is_sequence(item[0]):
*/
        goto __pyx_L19;
      }

      /* "symengine/lib/symengine_wrapper.pyx":3548
 *                 if isinstance(item[0], slice):
 *                     row_iter = range(*item[0].indices(self.rows))
 *                 elif is_sequence(item[0]):             # <<<<<<<<<<<<<<
 *                     row_iter = item[0]
 *                 else:
*/
      __pyx_t_11 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_is_sequence); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3548, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_item, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3548, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_4 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_12))) {
        __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_12);
        assert(__pyx_t_11);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_12);
        __Pyx_INCREF(__pyx_t_11);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_12, __pyx__function);
        __pyx_t_4 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_t_8};
        __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_12, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3548, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      }
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 3548, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (__pyx_t_1) {

        /* "symengine/lib/symengine_wrapper.pyx":3549
 *                     row_iter = range(*item[0].indices(self.rows))
 *                 elif is_sequence(item[0]):
 *                     row_iter = item[0]             # <<<<<<<<<<<<<<
 *                 else:
 *                     row_iter = [item[0]]
*/
        __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_item, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3549, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_v_row_iter = __pyx_t_2;
        __pyx_t_2 = 0;

        /* "symengine/lib/symengine_wrapper.pyx":3548
 *                 if isinstance(item[0], slice):
 *                     row_iter = range(*item[0].indices(self.rows))
 *                 elif is_sequence(item[0]):             # <<<<<<<<<<<<<<
 *                     row_iter = item[0]
 *                 else:
*/
        goto __pyx_L19;
      }

      /* "symengine/lib/symengine_wrapper.pyx":3551
 *                     row_iter = item[0]
 *                 else:
 *                     row_iter = [item[0]]             # <<<<<<<<<<<<<<
 * 
 *                 if isinstance(item[1], slice):
*/
      /*else*/ {
        __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_item, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3551, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_12 = PyList_New(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3551, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_GIVEREF(__pyx_t_2);
        if (__Pyx_PyList_SET_ITEM(__pyx_t_12, 0, __pyx_t_2) != (0)) __PYX_ERR(0, 3551, __pyx_L1_error);
        __pyx_t_2 = 0;
        __pyx_v_row_iter = __pyx_t_12;
        __pyx_t_12 = 0;
      }
      __pyx_L19:;

      /* "symengine/lib/symengine_wrapper.pyx":3553
 *                     row_iter = [item[0]]
 * 
 *                 if isinstance(item[1], slice):             # <<<<<<<<<<<<<<
 *                     col_iter = range(*item[1].indices(self.cols))
 *                 elif is_sequence(item[1]):
*/
      __pyx_t_12 = __Pyx_GetItemInt(__pyx_v_item, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3553, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __pyx_t_1 = PySlice_Check(__pyx_t_12); 
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      if (__pyx_t_1) {

        /* "symengine/lib/symengine_wrapper.pyx":3554
 * 
 *                 if isinstance(item[1], slice):
 *                     col_iter = range(*item[1].indices(self.cols))             # <<<<<<<<<<<<<<
 *                 elif is_sequence(item[1]):
 *                     col_iter = item[1]
*/
        __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_item, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3554, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_2 = __pyx_t_8;
        __Pyx_INCREF(__pyx_t_2);
        __pyx_t_11 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_cols); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3554, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_4 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_11};
          __pyx_t_12 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_indices, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3554, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_12);
        }
        __pyx_t_8 = __Pyx_PySequence_Tuple(__pyx_t_12); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3554, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_t_12 = __Pyx_PyObject_Call(((PyObject *)(&PyRange_Type)), __pyx_t_8, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3554, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_v_col_iter = __pyx_t_12;
        __pyx_t_12 = 0;

        /* "symengine/lib/symengine_wrapper.pyx":3553
 *                     row_iter = [item[0]]
 * 
 *                 if isinstance(item[1], slice):             # <<<<<<<<<<<<<<
 *                     col_iter = range(*item[1].indices(self.cols))
 *                 elif is_sequence(item[1]):
*/
        goto __pyx_L20;
      }

      /* "symengine/lib/symengine_wrapper.pyx":3555
 *                 if isinstance(item[1], slice):
 *                     col_iter = range(*item[1].indices(self.cols))
 *                 elif is_sequence(item[1]):             # <<<<<<<<<<<<<<
 *                     col_iter = item[1]
 *                 else:
*/
      __pyx_t_8 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_is_sequence); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3555, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_item, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3555, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_11))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_11);
        assert(__pyx_t_8);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_11);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_11, __pyx__function);
        __pyx_t_4 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_2};
        __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_11, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3555, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
      }
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 3555, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      if (__pyx_t_1) {

        /* "symengine/lib/symengine_wrapper.pyx":3556
 *                     col_iter = range(*item[1].indices(self.cols))
 *                 elif is_sequence(item[1]):
 *                     col_iter = item[1]             # <<<<<<<<<<<<<<
 *                 else:
 *                     col_iter = [item[1]]
*/
        __pyx_t_12 = __Pyx_GetItemInt(__pyx_v_item, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3556, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_v_col_iter = __pyx_t_12;
        __pyx_t_12 = 0;

        /* "symengine/lib/symengine_wrapper.pyx":3555
 *                 if isinstance(item[1], slice):
 *                     col_iter = range(*item[1].indices(self.cols))
 *                 elif is_sequence(item[1]):             # <<<<<<<<<<<<<<
 *                     col_iter = item[1]
 *                 else:
*/
        goto __pyx_L20;
      }

      /* "symengine/lib/symengine_wrapper.pyx":3558
 *                     col_iter = item[1]
 *                 else:
 *                     col_iter = [item[1]]             # <<<<<<<<<<<<<<
 * 
 *                 v = []
*/
      /*else*/ {
        __pyx_t_12 = __Pyx_GetItemInt(__pyx_v_item, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3558, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_11 = PyList_New(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3558, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_GIVEREF(__pyx_t_12);
        if (__Pyx_PyList_SET_ITEM(__pyx_t_11, 0, __pyx_t_12) != (0)) __PYX_ERR(0, 3558, __pyx_L1_error);
        __pyx_t_12 = 0;
        __pyx_v_col_iter = __pyx_t_11;
        __pyx_t_11 = 0;
      }
      __pyx_L20:;

      /* "symengine/lib/symengine_wrapper.pyx":3560
 *                     col_iter = [item[1]]
 * 
 *                 v = []             # <<<<<<<<<<<<<<
 *                 for row in row_iter:
 *                     for col in col_iter:
*/
      __pyx_t_11 = PyList_New(0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3560, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_v_v = ((PyObject*)__pyx_t_11);
      __pyx_t_11 = 0;

      /* "symengine/lib/symengine_wrapper.pyx":3561
 * 
 *                 v = []
 *                 for row in row_iter:             # <<<<<<<<<<<<<<
 *                     for col in col_iter:
 *                         v.append(self.get(row, col))
*/
      if (likely(PyList_CheckExact(__pyx_v_row_iter)) || PyTuple_CheckExact(__pyx_v_row_iter)) {
        __pyx_t_11 = __pyx_v_row_iter; __Pyx_INCREF(__pyx_t_11);
        __pyx_t_7 = 0;
        __pyx_t_9 = NULL;
      } else {
        __pyx_t_7 = -1; __pyx_t_11 = PyObject_GetIter(__pyx_v_row_iter); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3561, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_9 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_11); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3561, __pyx_L1_error)
      }
      for (;;) {
        if (likely(!__pyx_t_9)) {
          if (likely(PyList_CheckExact(__pyx_t_11))) {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_11);
              #if !CYTHON_ASSUME_SAFE_SIZE
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3561, __pyx_L1_error)
              #endif
              if (__pyx_t_7 >= __pyx_temp) break;
            }
            __pyx_t_12 = __Pyx_PyList_GetItemRefFast(__pyx_t_11, __pyx_t_7, __Pyx_ReferenceSharing_OwnStrongReference);
            ++__pyx_t_7;
          } else {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_11);
              #if !CYTHON_ASSUME_SAFE_SIZE
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3561, __pyx_L1_error)
              #endif
              if (__pyx_t_7 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_12 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_11, __pyx_t_7));
            #else
            __pyx_t_12 = __Pyx_PySequence_ITEM(__pyx_t_11, __pyx_t_7);
            #endif
            ++__pyx_t_7;
          }
          if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3561, __pyx_L1_error)
        } else {
          __pyx_t_12 = __pyx_t_9(__pyx_t_11);
          if (unlikely(!__pyx_t_12)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 3561, __pyx_L1_error)
              PyErr_Clear();
            }
            break;
          }
        }
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_XDECREF_SET(__pyx_v_row, __pyx_t_12);
        __pyx_t_12 = 0;

        /* "symengine/lib/symengine_wrapper.pyx":3562
 *                 v = []
 *                 for row in row_iter:
 *                     for col in col_iter:             # <<<<<<<<<<<<<<
 *                         v.append(self.get(row, col))
 *                 return self.__class__(len(row_iter), len(col_iter), v)
*/
        if (likely(PyList_CheckExact(__pyx_v_col_iter)) || PyTuple_CheckExact(__pyx_v_col_iter)) {
          __pyx_t_12 = __pyx_v_col_iter; __Pyx_INCREF(__pyx_t_12);
          __pyx_t_13 = 0;
          __pyx_t_14 = NULL;
        } else {
          __pyx_t_13 = -1; __pyx_t_12 = PyObject_GetIter(__pyx_v_col_iter); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3562, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_12);
          __pyx_t_14 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_12); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3562, __pyx_L1_error)
        }
        for (;;) {
          if (likely(!__pyx_t_14)) {
            if (likely(PyList_CheckExact(__pyx_t_12))) {
              {
                Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_12);
                #if !CYTHON_ASSUME_SAFE_SIZE
                if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3562, __pyx_L1_error)
                #endif
                if (__pyx_t_13 >= __pyx_temp) break;
              }
              __pyx_t_2 = __Pyx_PyList_GetItemRefFast(__pyx_t_12, __pyx_t_13, __Pyx_ReferenceSharing_OwnStrongReference);
              ++__pyx_t_13;
            } else {
              {
                Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_12);
                #if !CYTHON_ASSUME_SAFE_SIZE
                if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3562, __pyx_L1_error)
                #endif
                if (__pyx_t_13 >= __pyx_temp) break;
              }
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_2 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_12, __pyx_t_13));
              #else
              __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_12, __pyx_t_13);
              #endif
              ++__pyx_t_13;
            }
            if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3562, __pyx_L1_error)
          } else {
            __pyx_t_2 = __pyx_t_14(__pyx_t_12);
            if (unlikely(!__pyx_t_2)) {
              PyObject* exc_type = PyErr_Occurred();
              if (exc_type) {
                if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 3562, __pyx_L1_error)
                PyErr_Clear();
              }
              break;
            }
          }
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_XDECREF_SET(__pyx_v_col, __pyx_t_2);
          __pyx_t_2 = 0;

          /* "symengine/lib/symengine_wrapper.pyx":3563
 *                 for row in row_iter:
 *                     for col in col_iter:
 *                         v.append(self.get(row, col))             # <<<<<<<<<<<<<<
 *                 return self.__class__(len(row_iter), len(col_iter), v)
 * 
*/
          __pyx_t_8 = ((PyObject *)__pyx_v_self);
          __Pyx_INCREF(__pyx_t_8);
          __pyx_t_4 = 0;
          {
            PyObject *__pyx_callargs[3] = {__pyx_t_8, __pyx_v_row, __pyx_v_col};
            __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3563, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
          }
          __pyx_t_15 = __Pyx_PyList_Append(__pyx_v_v, __pyx_t_2); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 3563, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

          /* "symengine/lib/symengine_wrapper.pyx":3562
 *                 v = []
 *                 for row in row_iter:
 *                     for col in col_iter:             # <<<<<<<<<<<<<<
 *                         v.append(self.get(row, col))
 *                 return self.__class__(len(row_iter), len(col_iter), v)
*/
        }
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

        /* "symengine/lib/symengine_wrapper.pyx":3561
 * 
 *                 v = []
 *                 for row in row_iter:             # <<<<<<<<<<<<<<
 *                     for col in col_iter:
 *                         v.append(self.get(row, col))
*/
      }
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

      /* "symengine/lib/symengine_wrapper.pyx":3564
 *                     for col in col_iter:
 *                         v.append(self.get(row, col))
 *                 return self.__class__(len(row_iter), len(col_iter), v)             # <<<<<<<<<<<<<<
 * 
 *             if isinstance(item[0], int) and isinstance(item[1], int):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_12 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_12);
      __pyx_t_7 = PyObject_Length(__pyx_v_row_iter); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3564, __pyx_L1_error)
      __pyx_t_2 = PyLong_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3564, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_7 = PyObject_Length(__pyx_v_col_iter); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3564, __pyx_L1_error)
      __pyx_t_8 = PyLong_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3564, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_4 = 0;
      {
        PyObject *__pyx_callargs[4] = {__pyx_t_12, __pyx_t_2, __pyx_t_8, __pyx_v_v};
        __pyx_t_11 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_class, __pyx_callargs+__pyx_t_4, (4-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3564, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
      }
      __pyx_r = __pyx_t_11;
      __pyx_t_11 = 0;
      goto __pyx_L0;

      /* "symengine/lib/symengine_wrapper.pyx":3545
 *             return self.get(item // self.ncols(), item % self.ncols())
 *         elif isinstance(item, tuple) and len(item) == 2:
 *             if is_sequence(item[0]) or is_sequence(item[1]):             # <<<<<<<<<<<<<<
 *                 if isinstance(item[0], slice):
 *                     row_iter = range(*item[0].indices(self.rows))
*/
    }

    /* "symengine/lib/symengine_wrapper.pyx":3566
 *                 return self.__class__(len(row_iter), len(col_iter), v)
 * 
 *             if isinstance(item[0], int) and isinstance(item[1], int):             # <<<<<<<<<<<<<<
 *                 return self.get(item[0], item[1])
 *             else:
*/
    __pyx_t_11 = __Pyx_GetItemInt(__pyx_v_item, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3566, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_5 = PyLong_Check(__pyx_t_11); 
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    if (__pyx_t_5) {
    } else {
      __pyx_t_1 = __pyx_t_5;
      goto __pyx_L28_bool_binop_done;
    }
    __pyx_t_11 = __Pyx_GetItemInt(__pyx_v_item, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3566, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_5 = PyLong_Check(__pyx_t_11); 
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_t_1 = __pyx_t_5;
    __pyx_L28_bool_binop_done:;
    if (__pyx_t_1) {

      /* "symengine/lib/symengine_wrapper.pyx":3567
 * 
 *             if isinstance(item[0], int) and isinstance(item[1], int):
 *                 return self.get(item[0], item[1])             # <<<<<<<<<<<<<<
 *             else:
 *                 s = [0, 0, 0, 0, 0, 0]
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_8 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_8);
      __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_item, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3567, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_12 = __Pyx_GetItemInt(__pyx_v_item, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3567, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __pyx_t_4 = 0;
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_8, __pyx_t_2, __pyx_t_12};
        __pyx_t_11 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3567, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
      }
      __pyx_r = __pyx_t_11;
      __pyx_t_11 = 0;
      goto __pyx_L0;

      /* "symengine/lib/symengine_wrapper.pyx":3566
 *                 return self.__class__(len(row_iter), len(col_iter), v)
 * 
 *             if isinstance(item[0], int) and isinstance(item[1], int):             # <<<<<<<<<<<<<<
 *                 return self.get(item[0], item[1])
 *             else:
*/
    }

    /* "symengine/lib/symengine_wrapper.pyx":3569
 *                 return self.get(item[0], item[1])
 *             else:
 *                 s = [0, 0, 0, 0, 0, 0]             # <<<<<<<<<<<<<<
 *                 for i in (0, 1):
 *                     if isinstance(item[i], slice):
*/
    /*else*/ {
      __pyx_t_11 = PyList_New(6); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3569, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0);
      __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_0);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_11, 0, __pyx_mstate_global->__pyx_int_0) != (0)) __PYX_ERR(0, 3569, __pyx_L1_error);
      __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0);
      __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_0);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_11, 1, __pyx_mstate_global->__pyx_int_0) != (0)) __PYX_ERR(0, 3569, __pyx_L1_error);
      __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0);
      __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_0);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_11, 2, __pyx_mstate_global->__pyx_int_0) != (0)) __PYX_ERR(0, 3569, __pyx_L1_error);
      __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0);
      __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_0);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_11, 3, __pyx_mstate_global->__pyx_int_0) != (0)) __PYX_ERR(0, 3569, __pyx_L1_error);
      __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0);
      __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_0);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_11, 4, __pyx_mstate_global->__pyx_int_0) != (0)) __PYX_ERR(0, 3569, __pyx_L1_error);
      __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0);
      __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_0);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_11, 5, __pyx_mstate_global->__pyx_int_0) != (0)) __PYX_ERR(0, 3569, __pyx_L1_error);
      __pyx_v_s = ((PyObject*)__pyx_t_11);
      __pyx_t_11 = 0;

      /* "symengine/lib/symengine_wrapper.pyx":3570
 *             else:
 *                 s = [0, 0, 0, 0, 0, 0]
 *                 for i in (0, 1):             # <<<<<<<<<<<<<<
 *                     if isinstance(item[i], slice):
 *                         s[i], s[i+2], s[i+4] = item[i].indices(self.nrows() if i == 0 else self.ncols())
*/
      __pyx_t_11 = __pyx_mstate_global->__pyx_tuple[2]; __Pyx_INCREF(__pyx_t_11);
      __pyx_t_7 = 0;
      for (;;) {
        if (__pyx_t_7 >= 2) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_12 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_11, __pyx_t_7));
        #else
        __pyx_t_12 = __Pyx_PySequence_ITEM(__pyx_t_11, __pyx_t_7);
        #endif
        ++__pyx_t_7;
        if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3570, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_12);
        __pyx_t_12 = 0;

        /* "symengine/lib/symengine_wrapper.pyx":3571
 *                 s = [0, 0, 0, 0, 0, 0]
 *                 for i in (0, 1):
 *                     if isinstance(item[i], slice):             # <<<<<<<<<<<<<<
 *                         s[i], s[i+2], s[i+4] = item[i].indices(self.nrows() if i == 0 else self.ncols())
 *                     else:
*/
        __pyx_t_12 = __Pyx_PyObject_GetItem(__pyx_v_item, __pyx_v_i); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3571, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_1 = PySlice_Check(__pyx_t_12); 
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        if (__pyx_t_1) {

          /* "symengine/lib/symengine_wrapper.pyx":3572
 *                 for i in (0, 1):
 *                     if isinstance(item[i], slice):
 *                         s[i], s[i+2], s[i+4] = item[i].indices(self.nrows() if i == 0 else self.ncols())             # <<<<<<<<<<<<<<
 *                     else:
 *                         s[i], s[i+2], s[i+4] = item[i], item[i] + 1, 1
*/
          __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_v_item, __pyx_v_i); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3572, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __pyx_t_2 = __pyx_t_8;
          __Pyx_INCREF(__pyx_t_2);
          __pyx_t_1 = (__Pyx_PyLong_BoolEqObjC(__pyx_v_i, __pyx_mstate_global->__pyx_int_0, 0, 0)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 3572, __pyx_L1_error)
          if (__pyx_t_1) {
            __pyx_t_10 = ((PyObject *)__pyx_v_self);
            __Pyx_INCREF(__pyx_t_10);
            __pyx_t_4 = 0;
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_10, NULL};
              __pyx_t_6 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_nrows, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3572, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_6);
            }
            __pyx_t_3 = __pyx_t_6;
            __pyx_t_6 = 0;
          } else {
            __pyx_t_10 = ((PyObject *)__pyx_v_self);
            __Pyx_INCREF(__pyx_t_10);
            __pyx_t_4 = 0;
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_10, NULL};
              __pyx_t_6 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_ncols, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3572, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_6);
            }
            __pyx_t_3 = __pyx_t_6;
            __pyx_t_6 = 0;
          }
          __pyx_t_4 = 0;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
            __pyx_t_12 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_indices, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
            if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3572, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_12);
          }
          if ((likely(PyTuple_CheckExact(__pyx_t_12))) || (PyList_CheckExact(__pyx_t_12))) {
            PyObject* sequence = __pyx_t_12;
            Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
            if (unlikely(size != 3)) {
              if (size > 3) __Pyx_RaiseTooManyValuesError(3);
              else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
              __PYX_ERR(0, 3572, __pyx_L1_error)
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            if (likely(PyTuple_CheckExact(sequence))) {
              __pyx_t_8 = PyTuple_GET_ITEM(sequence, 0);
              __Pyx_INCREF(__pyx_t_8);
              __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1);
              __Pyx_INCREF(__pyx_t_3);
              __pyx_t_2 = PyTuple_GET_ITEM(sequence, 2);
              __Pyx_INCREF(__pyx_t_2);
            } else {
              __pyx_t_8 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference);
              if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3572, __pyx_L1_error)
              __Pyx_XGOTREF(__pyx_t_8);
              __pyx_t_3 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference);
              if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3572, __pyx_L1_error)
              __Pyx_XGOTREF(__pyx_t_3);
              __pyx_t_2 = __Pyx_PyList_GetItemRefFast(sequence, 2, __Pyx_ReferenceSharing_SharedReference);
              if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3572, __pyx_L1_error)
              __Pyx_XGOTREF(__pyx_t_2);
            }
            #else
            __pyx_t_8 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3572, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_8);
            __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3572, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3572, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            #endif
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          } else {
            Py_ssize_t index = -1;
            __pyx_t_6 = PyObject_GetIter(__pyx_t_12); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3572, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
            __pyx_t_16 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_6);
            index = 0; __pyx_t_8 = __pyx_t_16(__pyx_t_6); if (unlikely(!__pyx_t_8)) goto __pyx_L33_unpacking_failed;
            __Pyx_GOTREF(__pyx_t_8);
            index = 1; __pyx_t_3 = __pyx_t_16(__pyx_t_6); if (unlikely(!__pyx_t_3)) goto __pyx_L33_unpacking_failed;
            __Pyx_GOTREF(__pyx_t_3);
            index = 2; __pyx_t_2 = __pyx_t_16(__pyx_t_6); if (unlikely(!__pyx_t_2)) goto __pyx_L33_unpacking_failed;
            __Pyx_GOTREF(__pyx_t_2);
            if (__Pyx_IternextUnpackEndCheck(__pyx_t_16(__pyx_t_6), 3) < (0)) __PYX_ERR(0, 3572, __pyx_L1_error)
            __pyx_t_16 = NULL;
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            goto __pyx_L34_unpacking_done;
            __pyx_L33_unpacking_failed:;
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            __pyx_t_16 = NULL;
            if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
            __PYX_ERR(0, 3572, __pyx_L1_error)
            __pyx_L34_unpacking_done:;
          }
          if (unlikely((PyObject_SetItem(__pyx_v_s, __pyx_v_i, __pyx_t_8) < 0))) __PYX_ERR(0, 3572, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_6 = __Pyx_PyLong_AddObjC(__pyx_v_i, __pyx_mstate_global->__pyx_int_2, 2, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3572, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          if (unlikely((PyObject_SetItem(__pyx_v_s, __pyx_t_6, __pyx_t_3) < 0))) __PYX_ERR(0, 3572, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_6 = __Pyx_PyLong_AddObjC(__pyx_v_i, __pyx_mstate_global->__pyx_int_4, 4, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3572, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          if (unlikely((PyObject_SetItem(__pyx_v_s, __pyx_t_6, __pyx_t_2) < 0))) __PYX_ERR(0, 3572, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

          /* "symengine/lib/symengine_wrapper.pyx":3571
 *                 s = [0, 0, 0, 0, 0, 0]
 *                 for i in (0, 1):
 *                     if isinstance(item[i], slice):             # <<<<<<<<<<<<<<
 *                         s[i], s[i+2], s[i+4] = item[i].indices(self.nrows() if i == 0 else self.ncols())
 *                     else:
*/
          goto __pyx_L32;
        }

        /* "symengine/lib/symengine_wrapper.pyx":3574
 *                         s[i], s[i+2], s[i+4] = item[i].indices(self.nrows() if i == 0 else self.ncols())
 *                     else:
 *                         s[i], s[i+2], s[i+4] = item[i], item[i] + 1, 1             # <<<<<<<<<<<<<<
 *                 if (s[0] < 0 or s[0] > self.rows or s[0] >= s[2] or s[2] < 0 or s[2] > self.rows):
 *                     raise IndexError
*/
        /*else*/ {
          __pyx_t_12 = __Pyx_PyObject_GetItem(__pyx_v_item, __pyx_v_i); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3574, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_12);
          __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_item, __pyx_v_i); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3574, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_3 = __Pyx_PyLong_AddObjC(__pyx_t_2, __pyx_mstate_global->__pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3574, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_2 = __pyx_mstate_global->__pyx_int_1;
          __Pyx_INCREF(__pyx_t_2);
          if (unlikely((PyObject_SetItem(__pyx_v_s, __pyx_v_i, __pyx_t_12) < 0))) __PYX_ERR(0, 3574, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          __pyx_t_12 = __Pyx_PyLong_AddObjC(__pyx_v_i, __pyx_mstate_global->__pyx_int_2, 2, 0, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3574, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_12);
          if (unlikely((PyObject_SetItem(__pyx_v_s, __pyx_t_12, __pyx_t_3) < 0))) __PYX_ERR(0, 3574, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_3 = __Pyx_PyLong_AddObjC(__pyx_v_i, __pyx_mstate_global->__pyx_int_4, 4, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3574, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          if (unlikely((PyObject_SetItem(__pyx_v_s, __pyx_t_3, __pyx_t_2) < 0))) __PYX_ERR(0, 3574, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        }
        __pyx_L32:;

        /* "symengine/lib/symengine_wrapper.pyx":3570
 *             else:
 *                 s = [0, 0, 0, 0, 0, 0]
 *                 for i in (0, 1):             # <<<<<<<<<<<<<<
 *                     if isinstance(item[i], slice):
 *                         s[i], s[i+2], s[i+4] = item[i].indices(self.nrows() if i == 0 else self.ncols())
*/
      }
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

      /* "symengine/lib/symengine_wrapper.pyx":3575
 *                     else:
 *                         s[i], s[i+2], s[i+4] = item[i], item[i] + 1, 1
 *                 if (s[0] < 0 or s[0] > self.rows or s[0] >= s[2] or s[2] < 0 or s[2] > self.rows):             # <<<<<<<<<<<<<<
 *                     raise IndexError
 *                 if (s[1] < 0 or s[1] > self.cols or s[1] >= s[3] or s[3] < 0 or s[3] > self.cols):
*/
      __pyx_t_11 = __Pyx_GetItemInt_List(__pyx_v_s, 0, long, 1, __Pyx_PyLong_From_long, 1, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3575, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_2 = PyObject_RichCompare(__pyx_t_11, __pyx_mstate_global->__pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3575, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 3575, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (!__pyx_t_5) {
      } else {
        __pyx_t_1 = __pyx_t_5;
        goto __pyx_L37_bool_binop_done;
      }
      __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_s, 0, long, 1, __Pyx_PyLong_From_long, 1, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3575, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_11 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_rows); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3575, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_t_11, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3575, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 3575, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (!__pyx_t_5) {
      } else {
        __pyx_t_1 = __pyx_t_5;
        goto __pyx_L37_bool_binop_done;
      }
      __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_s, 0, long, 1, __Pyx_PyLong_From_long, 1, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3575, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_11 = __Pyx_GetItemInt_List(__pyx_v_s, 2, long, 1, __Pyx_PyLong_From_long, 1, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3575, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_2 = PyObject_RichCompare(__pyx_t_3, __pyx_t_11, Py_GE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3575, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 3575, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (!__pyx_t_5) {
      } else {
        __pyx_t_1 = __pyx_t_5;
        goto __pyx_L37_bool_binop_done;
      }
      __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_s, 2, long, 1, __Pyx_PyLong_From_long, 1, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3575, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_11 = PyObject_RichCompare(__pyx_t_2, __pyx_mstate_global->__pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3575, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 3575, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      if (!__pyx_t_5) {
      } else {
        __pyx_t_1 = __pyx_t_5;
        goto __pyx_L37_bool_binop_done;
      }
      __pyx_t_11 = __Pyx_GetItemInt_List(__pyx_v_s, 2, long, 1, __Pyx_PyLong_From_long, 1, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3575, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_rows); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3575, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PyObject_RichCompare(__pyx_t_11, __pyx_t_2, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3575, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 3575, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_1 = __pyx_t_5;
      __pyx_L37_bool_binop_done:;
      if (unlikely(__pyx_t_1)) {

        /* "symengine/lib/symengine_wrapper.pyx":3576
 *                         s[i], s[i+2], s[i+4] = item[i], item[i] + 1, 1
 *                 if (s[0] < 0 or s[0] > self.rows or s[0] >= s[2] or s[2] < 0 or s[2] > self.rows):
 *                     raise IndexError             # <<<<<<<<<<<<<<
 *                 if (s[1] < 0 or s[1] > self.cols or s[1] >= s[3] or s[3] < 0 or s[3] > self.cols):
 *                     raise IndexError
*/
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_IndexError))), 0, 0, 0);
        __PYX_ERR(0, 3576, __pyx_L1_error)

        /* "symengine/lib/symengine_wrapper.pyx":3575
 *                     else:
 *                         s[i], s[i+2], s[i+4] = item[i], item[i] + 1, 1
 *                 if (s[0] < 0 or s[0] > self.rows or s[0] >= s[2] or s[2] < 0 or s[2] > self.rows):             # <<<<<<<<<<<<<<
 *                     raise IndexError
 *                 if (s[1] < 0 or s[1] > self.cols or s[1] >= s[3] or s[3] < 0 or s[3] > self.cols):
*/
      }

      /* "symengine/lib/symengine_wrapper.pyx":3577
 *                 if (s[0] < 0 or s[0] > self.rows or s[0] >= s[2] or s[2] < 0 or s[2] > self.rows):
 *                     raise IndexError
 *                 if (s[1] < 0 or s[1] > self.cols or s[1] >= s[3] or s[3] < 0 or s[3] > self.cols):             # <<<<<<<<<<<<<<
 *                     raise IndexError
 *                 return self._submatrix(*s)
*/
      __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_s, 1, long, 1, __Pyx_PyLong_From_long, 1, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3577, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = PyObject_RichCompare(__pyx_t_3, __pyx_mstate_global->__pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3577, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 3577, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (!__pyx_t_5) {
      } else {
        __pyx_t_1 = __pyx_t_5;
        goto __pyx_L43_bool_binop_done;
      }
      __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_s, 1, long, 1, __Pyx_PyLong_From_long, 1, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3577, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_cols); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3577, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_11 = PyObject_RichCompare(__pyx_t_2, __pyx_t_3, Py_GT); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3577, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 3577, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      if (!__pyx_t_5) {
      } else {
        __pyx_t_1 = __pyx_t_5;
        goto __pyx_L43_bool_binop_done;
      }
      __pyx_t_11 = __Pyx_GetItemInt_List(__pyx_v_s, 1, long, 1, __Pyx_PyLong_From_long, 1, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3577, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_s, 3, long, 1, __Pyx_PyLong_From_long, 1, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3577, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = PyObject_RichCompare(__pyx_t_11, __pyx_t_3, Py_GE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3577, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 3577, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (!__pyx_t_5) {
      } else {
        __pyx_t_1 = __pyx_t_5;
        goto __pyx_L43_bool_binop_done;
      }
      __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_s, 3, long, 1, __Pyx_PyLong_From_long, 1, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3577, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_mstate_global->__pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3577, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 3577, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (!__pyx_t_5) {
      } else {
        __pyx_t_1 = __pyx_t_5;
        goto __pyx_L43_bool_binop_done;
      }
      __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_s, 3, long, 1, __Pyx_PyLong_From_long, 1, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3577, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_cols); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3577, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_11 = PyObject_RichCompare(__pyx_t_3, __pyx_t_2, Py_GT); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3577, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 3577, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_1 = __pyx_t_5;
      __pyx_L43_bool_binop_done:;
      if (unlikely(__pyx_t_1)) {

        /* "symengine/lib/symengine_wrapper.pyx":3578
 *                     raise IndexError
 *                 if (s[1] < 0 or s[1] > self.cols or s[1] >= s[3] or s[3] < 0 or s[3] > self.cols):
 *                     raise IndexError             # <<<<<<<<<<<<<<
 *                 return self._submatrix(*s)
 *         elif is_sequence(item):
*/
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_IndexError))), 0, 0, 0);
        __PYX_ERR(0, 3578, __pyx_L1_error)

        /* "symengine/lib/symengine_wrapper.pyx":3577
 *                 if (s[0] < 0 or s[0] > self.rows or s[0] >= s[2] or s[2] < 0 or s[2] > self.rows):
 *                     raise IndexError
 *                 if (s[1] < 0 or s[1] > self.cols or s[1] >= s[3] or s[3] < 0 or s[3] > self.cols):             # <<<<<<<<<<<<<<
 *                     raise IndexError
 *                 return self._submatrix(*s)
*/
      }

      /* "symengine/lib/symengine_wrapper.pyx":3579
 *                 if (s[1] < 0 or s[1] > self.cols or s[1] >= s[3] or s[3] < 0 or s[3] > self.cols):
 *                     raise IndexError
 *                 return self._submatrix(*s)             # <<<<<<<<<<<<<<
 *         elif is_sequence(item):
 *             return [self.get(ind // self.ncols(), ind % self.ncols()) for ind in item]
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_11 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_submatrix); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3579, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_2 = PySequence_Tuple(__pyx_v_s); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3579, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3579, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L0;
    }

    /* "symengine/lib/symengine_wrapper.pyx":3544
 *         elif isinstance(item, int):
 *             return self.get(item // self.ncols(), item % self.ncols())
 *         elif isinstance(item, tuple) and len(item) == 2:             # <<<<<<<<<<<<<<
 *             if is_sequence(item[0]) or is_sequence(item[1]):
 *                 if isinstance(item[0], slice):
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":3580
 *                     raise IndexError
 *                 return self._submatrix(*s)
 *         elif is_sequence(item):             # <<<<<<<<<<<<<<
 *             return [self.get(ind // self.ncols(), ind % self.ncols()) for ind in item]
 *         else:
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_is_sequence); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3580, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_11))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_11);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_11);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_11, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_item};
    __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_11, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3580, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 3580, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (likely(__pyx_t_1)) {

    /* "symengine/lib/symengine_wrapper.pyx":3581
 *                 return self._submatrix(*s)
 *         elif is_sequence(item):
 *             return [self.get(ind // self.ncols(), ind % self.ncols()) for ind in item]             # <<<<<<<<<<<<<<
 *         else:
 *             raise NotImplementedError
*/
    __Pyx_XDECREF(__pyx_r);
    { /* enter inner scope */
      __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3581, __pyx_L50_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (likely(PyList_CheckExact(__pyx_v_item)) || PyTuple_CheckExact(__pyx_v_item)) {
        __pyx_t_11 = __pyx_v_item; __Pyx_INCREF(__pyx_t_11);
        __pyx_t_7 = 0;
        __pyx_t_9 = NULL;
      } else {
        __pyx_t_7 = -1; __pyx_t_11 = PyObject_GetIter(__pyx_v_item); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3581, __pyx_L50_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_9 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_11); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3581, __pyx_L50_error)
      }
      for (;;) {
        if (likely(!__pyx_t_9)) {
          if (likely(PyList_CheckExact(__pyx_t_11))) {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_11);
              #if !CYTHON_ASSUME_SAFE_SIZE
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3581, __pyx_L50_error)
              #endif
              if (__pyx_t_7 >= __pyx_temp) break;
            }
            __pyx_t_2 = __Pyx_PyList_GetItemRefFast(__pyx_t_11, __pyx_t_7, __Pyx_ReferenceSharing_OwnStrongReference);
            ++__pyx_t_7;
          } else {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_11);
              #if !CYTHON_ASSUME_SAFE_SIZE
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3581, __pyx_L50_error)
              #endif
              if (__pyx_t_7 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_2 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_11, __pyx_t_7));
            #else
            __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_11, __pyx_t_7);
            #endif
            ++__pyx_t_7;
          }
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3581, __pyx_L50_error)
        } else {
          __pyx_t_2 = __pyx_t_9(__pyx_t_11);
          if (unlikely(!__pyx_t_2)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 3581, __pyx_L50_error)
              PyErr_Clear();
            }
            break;
          }
        }
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_XDECREF_SET(__pyx_9genexpr11__pyx_v_ind, __pyx_t_2);
        __pyx_t_2 = 0;
        __pyx_t_12 = ((PyObject *)__pyx_v_self);
        __Pyx_INCREF(__pyx_t_12);
        __pyx_t_6 = ((PyObject *)__pyx_v_self);
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_4 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
          __pyx_t_8 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_ncols, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3581, __pyx_L50_error)
          __Pyx_GOTREF(__pyx_t_8);
        }
        __pyx_t_6 = PyNumber_FloorDivide(__pyx_9genexpr11__pyx_v_ind, __pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3581, __pyx_L50_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_10 = ((PyObject *)__pyx_v_self);
        __Pyx_INCREF(__pyx_t_10);
        __pyx_t_4 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_10, NULL};
          __pyx_t_8 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_ncols, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3581, __pyx_L50_error)
          __Pyx_GOTREF(__pyx_t_8);
        }
        __pyx_t_10 = PyNumber_Remainder(__pyx_9genexpr11__pyx_v_ind, __pyx_t_8); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3581, __pyx_L50_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_4 = 0;
        {
          PyObject *__pyx_callargs[3] = {__pyx_t_12, __pyx_t_6, __pyx_t_10};
          __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3581, __pyx_L50_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 3581, __pyx_L50_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_XDECREF(__pyx_9genexpr11__pyx_v_ind); __pyx_9genexpr11__pyx_v_ind = 0;
      goto __pyx_L54_exit_scope;
      __pyx_L50_error:;
      __Pyx_XDECREF(__pyx_9genexpr11__pyx_v_ind); __pyx_9genexpr11__pyx_v_ind = 0;
      goto __pyx_L1_error;
      __pyx_L54_exit_scope:;
    } /* exit inner scope */
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":3580
 *                     raise IndexError
 *                 return self._submatrix(*s)
 *         elif is_sequence(item):             # <<<<<<<<<<<<<<
 *             return [self.get(ind // self.ncols(), ind % self.ncols()) for ind in item]
 *         else:
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":3583
 *             return [self.get(ind // self.ncols(), ind % self.ncols()) for ind in item]
 *         else:
 *             raise NotImplementedError             # <<<<<<<<<<<<<<
 * 
 *     def __setitem__(self, key, value):
*/
  /*else*/ {
    __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_NotImplementedError))), 0, 0, 0);
    __PYX_ERR(0, 3583, __pyx_L1_error)
  }

  /* "symengine/lib/symengine_wrapper.pyx":3537
 *         return self.applyfunc(abs)
 * 
 *     def __getitem__(self, item):             # <<<<<<<<<<<<<<
 *         if isinstance(item, slice):
 *             if (self.ncols() == 0 or self.nrows() == 0):
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_row_iter);
  __Pyx_XDECREF(__pyx_v_col_iter);
  __Pyx_XDECREF(__pyx_v_v);
  __Pyx_XDECREF(__pyx_v_row);
  __Pyx_XDECREF(__pyx_v_col);
  __Pyx_XDECREF(__pyx_v_s);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_9genexpr10__pyx_v_i);
  __Pyx_XDECREF(__pyx_9genexpr11__pyx_v_ind);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3585
 *             raise NotImplementedError
 * 
 *     def __setitem__(self, key, value):             # <<<<<<<<<<<<<<
 *         cdef unsigned k, l
 *         if isinstance(key, int):
*/

/* Python wrapper */
static int __pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_35__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_35__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_34__setitem__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_self), ((PyObject *)__pyx_v_key), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_34__setitem__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value) {
  unsigned int __pyx_v_k;
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_v_row_iter = NULL;
  PyObject *__pyx_v_col_iter = NULL;
  PyObject *__pyx_v_r = NULL;
  PyObject *__pyx_v_row = NULL;
  PyObject *__pyx_v_c = NULL;
  PyObject *__pyx_v_col = NULL;
  PyObject *__pyx_v_val = NULL;
  PyObject *__pyx_v_ind = NULL;
  int __pyx_r;
  __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;
  size_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  PyObject *(*__pyx_t_9)(PyObject *);
  PyObject *__pyx_t_10 = NULL;
  int __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  PyObject *(*__pyx_t_13)(PyObject *);
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  int __pyx_t_19;
  Py_ssize_t __pyx_t_20;
  PyObject *(*__pyx_t_21)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setitem__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3587
 *     def __setitem__(self, key, value):
 *         cdef unsigned k, l
 *         if isinstance(key, int):             # <<<<<<<<<<<<<<
 *             self.set(key // self.ncols(), key % self.ncols(), value)
 *         elif isinstance(key, slice):
*/
  __pyx_t_1 = PyLong_Check(__pyx_v_key); 
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":3588
 *         cdef unsigned k, l
 *         if isinstance(key, int):
 *             self.set(key // self.ncols(), key % self.ncols(), value)             # <<<<<<<<<<<<<<
 *         elif isinstance(key, slice):
 *             k = 0
*/
    __pyx_t_3 = ((PyObject *)__pyx_v_self);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_5 = ((PyObject *)__pyx_v_self);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_6 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
      __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_ncols, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3588, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    __pyx_t_5 = PyNumber_FloorDivide(__pyx_v_key, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3588, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_7 = ((PyObject *)__pyx_v_self);
    __Pyx_INCREF(__pyx_t_7);
    __pyx_t_6 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL};
      __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_ncols, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3588, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    __pyx_t_7 = PyNumber_Remainder(__pyx_v_key, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3588, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_6 = 0;
    {
      PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_t_5, __pyx_t_7, __pyx_v_value};
      __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_set, __pyx_callargs+__pyx_t_6, (4-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3588, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":3587
 *     def __setitem__(self, key, value):
 *         cdef unsigned k, l
 *         if isinstance(key, int):             # <<<<<<<<<<<<<<
 *             self.set(key // self.ncols(), key % self.ncols(), value)
 *         elif isinstance(key, slice):
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":3589
 *         if isinstance(key, int):
 *             self.set(key // self.ncols(), key % self.ncols(), value)
 *         elif isinstance(key, slice):             # <<<<<<<<<<<<<<
 *             k = 0
 *             for i in range(*key.indices(len(self))):
*/
  __pyx_t_1 = PySlice_Check(__pyx_v_key); 
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":3590
 *             self.set(key // self.ncols(), key % self.ncols(), value)
 *         elif isinstance(key, slice):
 *             k = 0             # <<<<<<<<<<<<<<
 *             for i in range(*key.indices(len(self))):
 *                 self.set(i // self.ncols(), i % self.ncols(), value[k])
*/
    __pyx_v_k = 0;

    /* "symengine/lib/symengine_wrapper.pyx":3591
 *         elif isinstance(key, slice):
 *             k = 0
 *             for i in range(*key.indices(len(self))):             # <<<<<<<<<<<<<<
 *                 self.set(i // self.ncols(), i % self.ncols(), value[k])
 *                 k = k + 1
*/
    __pyx_t_7 = __pyx_v_key;
    __Pyx_INCREF(__pyx_t_7);
    __pyx_t_8 = PyObject_Length(((PyObject *)__pyx_v_self)); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3591, __pyx_L1_error)
    __pyx_t_5 = PyLong_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3591, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_indices, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3591, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __pyx_t_5 = __Pyx_PySequence_Tuple(__pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3591, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&PyRange_Type)), __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3591, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3591, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_9 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3591, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    for (;;) {
      {
        __pyx_t_2 = __pyx_t_9(__pyx_t_5);
        if (unlikely(!__pyx_t_2)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 3591, __pyx_L1_error)
            PyErr_Clear();
          }
          break;
        }
      }
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "symengine/lib/symengine_wrapper.pyx":3592
 *             k = 0
 *             for i in range(*key.indices(len(self))):
 *                 self.set(i // self.ncols(), i % self.ncols(), value[k])             # <<<<<<<<<<<<<<
 *                 k = k + 1
 *         elif isinstance(key, tuple) and len(key) == 2:
*/
      __pyx_t_7 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_7);
      __pyx_t_4 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_4);
      __pyx_t_6 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_ncols, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3592, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __pyx_t_4 = PyNumber_FloorDivide(__pyx_v_i, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3592, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_10 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_10);
      __pyx_t_6 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_10, NULL};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_ncols, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3592, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __pyx_t_10 = PyNumber_Remainder(__pyx_v_i, __pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3592, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_value, __pyx_v_k, unsigned int, 0, __Pyx_PyLong_From_unsigned_int, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3592, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_6 = 0;
      {
        PyObject *__pyx_callargs[4] = {__pyx_t_7, __pyx_t_4, __pyx_t_10, __pyx_t_3};
        __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_set, __pyx_callargs+__pyx_t_6, (4-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3592, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "symengine/lib/symengine_wrapper.pyx":3593
 *             for i in range(*key.indices(len(self))):
 *                 self.set(i // self.ncols(), i % self.ncols(), value[k])
 *                 k = k + 1             # <<<<<<<<<<<<<<
 *         elif isinstance(key, tuple) and len(key) == 2:
 *             if isinstance(key[0], slice):
*/
      __pyx_v_k = (__pyx_v_k + 1);

      /* "symengine/lib/symengine_wrapper.pyx":3591
 *         elif isinstance(key, slice):
 *             k = 0
 *             for i in range(*key.indices(len(self))):             # <<<<<<<<<<<<<<
 *                 self.set(i // self.ncols(), i % self.ncols(), value[k])
 *                 k = k + 1
*/
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":3589
 *         if isinstance(key, int):
 *             self.set(key // self.ncols(), key % self.ncols(), value)
 *         elif isinstance(key, slice):             # <<<<<<<<<<<<<<
 *             k = 0
 *             for i in range(*key.indices(len(self))):
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":3594
 *                 self.set(i // self.ncols(), i % self.ncols(), value[k])
 *                 k = k + 1
 *         elif isinstance(key, tuple) and len(key) == 2:             # <<<<<<<<<<<<<<
 *             if isinstance(key[0], slice):
 *                 row_iter = range(*key[0].indices(self.rows))
*/
  __pyx_t_11 = PyTuple_Check(__pyx_v_key); 
  if (__pyx_t_11) {
  } else {
    __pyx_t_1 = __pyx_t_11;
    goto __pyx_L7_bool_binop_done;
  }
  __pyx_t_8 = PyObject_Length(__pyx_v_key); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3594, __pyx_L1_error)
  __pyx_t_11 = (__pyx_t_8 == 2);
  __pyx_t_1 = __pyx_t_11;
  __pyx_L7_bool_binop_done:;
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":3595
 *                 k = k + 1
 *         elif isinstance(key, tuple) and len(key) == 2:
 *             if isinstance(key[0], slice):             # <<<<<<<<<<<<<<
 *                 row_iter = range(*key[0].indices(self.rows))
 *             elif is_sequence(key[0]):
*/
    __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_key, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3595, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = PySlice_Check(__pyx_t_5); 
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_1) {

      /* "symengine/lib/symengine_wrapper.pyx":3596
 *         elif isinstance(key, tuple) and len(key) == 2:
 *             if isinstance(key[0], slice):
 *                 row_iter = range(*key[0].indices(self.rows))             # <<<<<<<<<<<<<<
 *             elif is_sequence(key[0]):
 *                 row_iter = key[0]
*/
      __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_key, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3596, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = __pyx_t_3;
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_10 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_rows); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3596, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_6 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_10};
        __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_indices, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3596, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
      }
      __pyx_t_3 = __Pyx_PySequence_Tuple(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3596, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)(&PyRange_Type)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3596, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_v_row_iter = __pyx_t_5;
      __pyx_t_5 = 0;

      /* "symengine/lib/symengine_wrapper.pyx":3595
 *                 k = k + 1
 *         elif isinstance(key, tuple) and len(key) == 2:
 *             if isinstance(key[0], slice):             # <<<<<<<<<<<<<<
 *                 row_iter = range(*key[0].indices(self.rows))
 *             elif is_sequence(key[0]):
*/
      goto __pyx_L9;
    }

    /* "symengine/lib/symengine_wrapper.pyx":3597
 *             if isinstance(key[0], slice):
 *                 row_iter = range(*key[0].indices(self.rows))
 *             elif is_sequence(key[0]):             # <<<<<<<<<<<<<<
 *                 row_iter = key[0]
 *             else:
*/
    __pyx_t_3 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_is_sequence); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3597, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_key, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3597, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_10))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_10);
      assert(__pyx_t_3);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_10);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_10, __pyx__function);
      __pyx_t_6 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_2};
      __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_10, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3597, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
    }
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 3597, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_1) {

      /* "symengine/lib/symengine_wrapper.pyx":3598
 *                 row_iter = range(*key[0].indices(self.rows))
 *             elif is_sequence(key[0]):
 *                 row_iter = key[0]             # <<<<<<<<<<<<<<
 *             else:
 *                 row_iter = [key[0]]
*/
      __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_key, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3598, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_v_row_iter = __pyx_t_5;
      __pyx_t_5 = 0;

      /* "symengine/lib/symengine_wrapper.pyx":3597
 *             if isinstance(key[0], slice):
 *                 row_iter = range(*key[0].indices(self.rows))
 *             elif is_sequence(key[0]):             # <<<<<<<<<<<<<<
 *                 row_iter = key[0]
 *             else:
*/
      goto __pyx_L9;
    }

    /* "symengine/lib/symengine_wrapper.pyx":3600
 *                 row_iter = key[0]
 *             else:
 *                 row_iter = [key[0]]             # <<<<<<<<<<<<<<
 * 
 *             if isinstance(key[1], slice):
*/
    /*else*/ {
      __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_key, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3600, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_10 = PyList_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3600, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_GIVEREF(__pyx_t_5);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_10, 0, __pyx_t_5) != (0)) __PYX_ERR(0, 3600, __pyx_L1_error);
      __pyx_t_5 = 0;
      __pyx_v_row_iter = __pyx_t_10;
      __pyx_t_10 = 0;
    }
    __pyx_L9:;

    /* "symengine/lib/symengine_wrapper.pyx":3602
 *                 row_iter = [key[0]]
 * 
 *             if isinstance(key[1], slice):             # <<<<<<<<<<<<<<
 *                 col_iter = range(*key[1].indices(self.cols))
 *             elif is_sequence(key[1]):
*/
    __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_key, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3602, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_1 = PySlice_Check(__pyx_t_10); 
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (__pyx_t_1) {

      /* "symengine/lib/symengine_wrapper.pyx":3603
 * 
 *             if isinstance(key[1], slice):
 *                 col_iter = range(*key[1].indices(self.cols))             # <<<<<<<<<<<<<<
 *             elif is_sequence(key[1]):
 *                 col_iter = key[1]
*/
      __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_key, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3603, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_5 = __pyx_t_2;
      __Pyx_INCREF(__pyx_t_5);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_cols); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3603, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_6 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_3};
        __pyx_t_10 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_indices, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3603, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
      }
      __pyx_t_2 = __Pyx_PySequence_Tuple(__pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3603, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_10 = __Pyx_PyObject_Call(((PyObject *)(&PyRange_Type)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3603, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_v_col_iter = __pyx_t_10;
      __pyx_t_10 = 0;

      /* "symengine/lib/symengine_wrapper.pyx":3602
 *                 row_iter = [key[0]]
 * 
 *             if isinstance(key[1], slice):             # <<<<<<<<<<<<<<
 *                 col_iter = range(*key[1].indices(self.cols))
 *             elif is_sequence(key[1]):
*/
      goto __pyx_L10;
    }

    /* "symengine/lib/symengine_wrapper.pyx":3604
 *             if isinstance(key[1], slice):
 *                 col_iter = range(*key[1].indices(self.cols))
 *             elif is_sequence(key[1]):             # <<<<<<<<<<<<<<
 *                 col_iter = key[1]
 *             else:
*/
    __pyx_t_2 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_is_sequence); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3604, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_key, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3604, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
      assert(__pyx_t_2);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
      __pyx_t_6 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_5};
      __pyx_t_10 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3604, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
    }
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 3604, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (__pyx_t_1) {

      /* "symengine/lib/symengine_wrapper.pyx":3605
 *                 col_iter = range(*key[1].indices(self.cols))
 *             elif is_sequence(key[1]):
 *                 col_iter = key[1]             # <<<<<<<<<<<<<<
 *             else:
 *                 col_iter = [key[1]]
*/
      __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_key, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3605, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_v_col_iter = __pyx_t_10;
      __pyx_t_10 = 0;

      /* "symengine/lib/symengine_wrapper.pyx":3604
 *             if isinstance(key[1], slice):
 *                 col_iter = range(*key[1].indices(self.cols))
 *             elif is_sequence(key[1]):             # <<<<<<<<<<<<<<
 *                 col_iter = key[1]
 *             else:
*/
      goto __pyx_L10;
    }

    /* "symengine/lib/symengine_wrapper.pyx":3607
 *                 col_iter = key[1]
 *             else:
 *                 col_iter = [key[1]]             # <<<<<<<<<<<<<<
 * 
 *             for r, row in enumerate(row_iter):
*/
    /*else*/ {
      __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_key, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3607, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3607, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_10);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_10) != (0)) __PYX_ERR(0, 3607, __pyx_L1_error);
      __pyx_t_10 = 0;
      __pyx_v_col_iter = __pyx_t_3;
      __pyx_t_3 = 0;
    }
    __pyx_L10:;

    /* "symengine/lib/symengine_wrapper.pyx":3609
 *                 col_iter = [key[1]]
 * 
 *             for r, row in enumerate(row_iter):             # <<<<<<<<<<<<<<
 *                 for c, col in enumerate(col_iter):
 *                     if not is_sequence(value):
*/
    __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0);
    __pyx_t_3 = __pyx_mstate_global->__pyx_int_0;
    if (likely(PyList_CheckExact(__pyx_v_row_iter)) || PyTuple_CheckExact(__pyx_v_row_iter)) {
      __pyx_t_10 = __pyx_v_row_iter; __Pyx_INCREF(__pyx_t_10);
      __pyx_t_8 = 0;
      __pyx_t_9 = NULL;
    } else {
      __pyx_t_8 = -1; __pyx_t_10 = PyObject_GetIter(__pyx_v_row_iter); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3609, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_9 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3609, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_9)) {
        if (likely(PyList_CheckExact(__pyx_t_10))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_10);
            #if !CYTHON_ASSUME_SAFE_SIZE
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3609, __pyx_L1_error)
            #endif
            if (__pyx_t_8 >= __pyx_temp) break;
          }
          __pyx_t_5 = __Pyx_PyList_GetItemRefFast(__pyx_t_10, __pyx_t_8, __Pyx_ReferenceSharing_OwnStrongReference);
          ++__pyx_t_8;
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_10);
            #if !CYTHON_ASSUME_SAFE_SIZE
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3609, __pyx_L1_error)
            #endif
            if (__pyx_t_8 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_10, __pyx_t_8));
          #else
          __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_10, __pyx_t_8);
          #endif
          ++__pyx_t_8;
        }
        if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3609, __pyx_L1_error)
      } else {
        __pyx_t_5 = __pyx_t_9(__pyx_t_10);
        if (unlikely(!__pyx_t_5)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 3609, __pyx_L1_error)
            PyErr_Clear();
          }
          break;
        }
      }
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_XDECREF_SET(__pyx_v_row, __pyx_t_5);
      __pyx_t_5 = 0;
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_XDECREF_SET(__pyx_v_r, __pyx_t_3);
      __pyx_t_5 = __Pyx_PyLong_AddObjC(__pyx_t_3, __pyx_mstate_global->__pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3609, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3);
      __pyx_t_3 = __pyx_t_5;
      __pyx_t_5 = 0;

      /* "symengine/lib/symengine_wrapper.pyx":3610
 * 
 *             for r, row in enumerate(row_iter):
 *                 for c, col in enumerate(col_iter):             # <<<<<<<<<<<<<<
 *                     if not is_sequence(value):
 *                         self.set(row, col, value)
*/
      __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0);
      __pyx_t_5 = __pyx_mstate_global->__pyx_int_0;
      if (likely(PyList_CheckExact(__pyx_v_col_iter)) || PyTuple_CheckExact(__pyx_v_col_iter)) {
        __pyx_t_2 = __pyx_v_col_iter; __Pyx_INCREF(__pyx_t_2);
        __pyx_t_12 = 0;
        __pyx_t_13 = NULL;
      } else {
        __pyx_t_12 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_col_iter); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3610, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_13 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3610, __pyx_L1_error)
      }
      for (;;) {
        if (likely(!__pyx_t_13)) {
          if (likely(PyList_CheckExact(__pyx_t_2))) {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
              #if !CYTHON_ASSUME_SAFE_SIZE
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3610, __pyx_L1_error)
              #endif
              if (__pyx_t_12 >= __pyx_temp) break;
            }
            __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_2, __pyx_t_12, __Pyx_ReferenceSharing_OwnStrongReference);
            ++__pyx_t_12;
          } else {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
              #if !CYTHON_ASSUME_SAFE_SIZE
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3610, __pyx_L1_error)
              #endif
              if (__pyx_t_12 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_12));
            #else
            __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_12);
            #endif
            ++__pyx_t_12;
          }
          if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3610, __pyx_L1_error)
        } else {
          __pyx_t_4 = __pyx_t_13(__pyx_t_2);
          if (unlikely(!__pyx_t_4)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 3610, __pyx_L1_error)
              PyErr_Clear();
            }
            break;
          }
        }
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_XDECREF_SET(__pyx_v_col, __pyx_t_4);
        __pyx_t_4 = 0;
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_XDECREF_SET(__pyx_v_c, __pyx_t_5);
        __pyx_t_4 = __Pyx_PyLong_AddObjC(__pyx_t_5, __pyx_mstate_global->__pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3610, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_5);
        __pyx_t_5 = __pyx_t_4;
        __pyx_t_4 = 0;

        /* "symengine/lib/symengine_wrapper.pyx":3611
 *             for r, row in enumerate(row_iter):
 *                 for c, col in enumerate(col_iter):
 *                     if not is_sequence(value):             # <<<<<<<<<<<<<<
 *                         self.set(row, col, value)
 *                         continue
*/
        __pyx_t_7 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_is_sequence); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3611, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_14);
        __pyx_t_6 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_14))) {
          __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_14);
          assert(__pyx_t_7);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_14);
          __Pyx_INCREF(__pyx_t_7);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_14, __pyx__function);
          __pyx_t_6 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_value};
          __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_14, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
          if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3611, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
        }
        __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 3611, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_11 = (!__pyx_t_1);
        if (__pyx_t_11) {

          /* "symengine/lib/symengine_wrapper.pyx":3612
 *                 for c, col in enumerate(col_iter):
 *                     if not is_sequence(value):
 *                         self.set(row, col, value)             # <<<<<<<<<<<<<<
 *                         continue
 *                     try:
*/
          __pyx_t_14 = ((PyObject *)__pyx_v_self);
          __Pyx_INCREF(__pyx_t_14);
          __pyx_t_6 = 0;
          {
            PyObject *__pyx_callargs[4] = {__pyx_t_14, __pyx_v_row, __pyx_v_col, __pyx_v_value};
            __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_set, __pyx_callargs+__pyx_t_6, (4-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
            if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3612, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
          }
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

          /* "symengine/lib/symengine_wrapper.pyx":3613
 *                     if not is_sequence(value):
 *                         self.set(row, col, value)
 *                         continue             # <<<<<<<<<<<<<<
 *                     try:
 *                         self.set(row, col, value[r, c])
*/
          goto __pyx_L13_continue;

          /* "symengine/lib/symengine_wrapper.pyx":3611
 *             for r, row in enumerate(row_iter):
 *                 for c, col in enumerate(col_iter):
 *                     if not is_sequence(value):             # <<<<<<<<<<<<<<
 *                         self.set(row, col, value)
 *                         continue
*/
        }

        /* "symengine/lib/symengine_wrapper.pyx":3614
 *                         self.set(row, col, value)
 *                         continue
 *                     try:             # <<<<<<<<<<<<<<
 *                         self.set(row, col, value[r, c])
 *                         continue
*/
        {
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __Pyx_ExceptionSave(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17);
          __Pyx_XGOTREF(__pyx_t_15);
          __Pyx_XGOTREF(__pyx_t_16);
          __Pyx_XGOTREF(__pyx_t_17);
          /*try:*/ {

            /* "symengine/lib/symengine_wrapper.pyx":3615
 *                         continue
 *                     try:
 *                         self.set(row, col, value[r, c])             # <<<<<<<<<<<<<<
 *                         continue
 *                     except TypeError:
*/
            __pyx_t_14 = ((PyObject *)__pyx_v_self);
            __Pyx_INCREF(__pyx_t_14);
            __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3615, __pyx_L16_error)
            __Pyx_GOTREF(__pyx_t_7);
            __Pyx_INCREF(__pyx_v_r);
            __Pyx_GIVEREF(__pyx_v_r);
            if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_r) != (0)) __PYX_ERR(0, 3615, __pyx_L16_error);
            __Pyx_INCREF(__pyx_v_c);
            __Pyx_GIVEREF(__pyx_v_c);
            if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_c) != (0)) __PYX_ERR(0, 3615, __pyx_L16_error);
            __pyx_t_18 = __Pyx_PyObject_GetItem(__pyx_v_value, __pyx_t_7); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 3615, __pyx_L16_error)
            __Pyx_GOTREF(__pyx_t_18);
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
            __pyx_t_6 = 0;
            {
              PyObject *__pyx_callargs[4] = {__pyx_t_14, __pyx_v_row, __pyx_v_col, __pyx_t_18};
              __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_set, __pyx_callargs+__pyx_t_6, (4-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
              __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
              __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
              if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3615, __pyx_L16_error)
              __Pyx_GOTREF(__pyx_t_4);
            }
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "symengine/lib/symengine_wrapper.pyx":3616
 *                     try:
 *                         self.set(row, col, value[r, c])
 *                         continue             # <<<<<<<<<<<<<<
 *                     except TypeError:
 *                         pass
*/
            goto __pyx_L22_try_continue;

            /* "symengine/lib/symengine_wrapper.pyx":3614
 *                         self.set(row, col, value)
 *                         continue
 *                     try:             # <<<<<<<<<<<<<<
 *                         self.set(row, col, value[r, c])
 *                         continue
*/
          }
          __pyx_L16_error:;
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;

          /* "symengine/lib/symengine_wrapper.pyx":3617
 *                         self.set(row, col, value[r, c])
 *                         continue
 *                     except TypeError:             # <<<<<<<<<<<<<<
 *                         pass
 *                     try:
*/
          __pyx_t_19 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_TypeError))));
          if (__pyx_t_19) {
            __Pyx_ErrRestore(0,0,0);
            goto __pyx_L17_exception_handled;
          }
          goto __pyx_L18_except_error;

          /* "symengine/lib/symengine_wrapper.pyx":3614
 *                         self.set(row, col, value)
 *                         continue
 *                     try:             # <<<<<<<<<<<<<<
 *                         self.set(row, col, value[r, c])
 *                         continue
*/
          __pyx_L18_except_error:;
          __Pyx_XGIVEREF(__pyx_t_15);
          __Pyx_XGIVEREF(__pyx_t_16);
          __Pyx_XGIVEREF(__pyx_t_17);
          __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17);
          goto __pyx_L1_error;
          __pyx_L22_try_continue:;
          __Pyx_XGIVEREF(__pyx_t_15);
          __Pyx_XGIVEREF(__pyx_t_16);
          __Pyx_XGIVEREF(__pyx_t_17);
          __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17);
          goto __pyx_L13_continue;
          __pyx_L17_exception_handled:;
          __Pyx_XGIVEREF(__pyx_t_15);
          __Pyx_XGIVEREF(__pyx_t_16);
          __Pyx_XGIVEREF(__pyx_t_17);
          __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17);
        }

        /* "symengine/lib/symengine_wrapper.pyx":3619
 *                     except TypeError:
 *                         pass
 *                     try:             # <<<<<<<<<<<<<<
 *                         self.set(row, col, value[r][c])
 *                         continue
*/
        {
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __Pyx_ExceptionSave(&__pyx_t_17, &__pyx_t_16, &__pyx_t_15);
          __Pyx_XGOTREF(__pyx_t_17);
          __Pyx_XGOTREF(__pyx_t_16);
          __Pyx_XGOTREF(__pyx_t_15);
          /*try:*/ {

            /* "symengine/lib/symengine_wrapper.pyx":3620
 *                         pass
 *                     try:
 *                         self.set(row, col, value[r][c])             # <<<<<<<<<<<<<<
 *                         continue
 *                     except TypeError:
*/
            __pyx_t_18 = ((PyObject *)__pyx_v_self);
            __Pyx_INCREF(__pyx_t_18);
            __pyx_t_14 = __Pyx_PyObject_GetItem(__pyx_v_value, __pyx_v_r); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3620, __pyx_L26_error)
            __Pyx_GOTREF(__pyx_t_14);
            __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_t_14, __pyx_v_c); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3620, __pyx_L26_error)
            __Pyx_GOTREF(__pyx_t_7);
            __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
            __pyx_t_6 = 0;
            {
              PyObject *__pyx_callargs[4] = {__pyx_t_18, __pyx_v_row, __pyx_v_col, __pyx_t_7};
              __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_set, __pyx_callargs+__pyx_t_6, (4-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
              __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
              __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
              if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3620, __pyx_L26_error)
              __Pyx_GOTREF(__pyx_t_4);
            }
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "symengine/lib/symengine_wrapper.pyx":3621
 *                     try:
 *                         self.set(row, col, value[r][c])
 *                         continue             # <<<<<<<<<<<<<<
 *                     except TypeError:
 *                         pass
*/
            goto __pyx_L32_try_continue;

            /* "symengine/lib/symengine_wrapper.pyx":3619
 *                     except TypeError:
 *                         pass
 *                     try:             # <<<<<<<<<<<<<<
 *                         self.set(row, col, value[r][c])
 *                         continue
*/
          }
          __pyx_L26_error:;
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;

          /* "symengine/lib/symengine_wrapper.pyx":3622
 *                         self.set(row, col, value[r][c])
 *                         continue
 *                     except TypeError:             # <<<<<<<<<<<<<<
 *                         pass
 * 
*/
          __pyx_t_19 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_TypeError))));
          if (__pyx_t_19) {
            __Pyx_ErrRestore(0,0,0);
            goto __pyx_L27_exception_handled;
          }
          goto __pyx_L28_except_error;

          /* "symengine/lib/symengine_wrapper.pyx":3619
 *                     except TypeError:
 *                         pass
 *                     try:             # <<<<<<<<<<<<<<
 *                         self.set(row, col, value[r][c])
 *                         continue
*/
          __pyx_L28_except_error:;
          __Pyx_XGIVEREF(__pyx_t_17);
          __Pyx_XGIVEREF(__pyx_t_16);
          __Pyx_XGIVEREF(__pyx_t_15);
          __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_16, __pyx_t_15);
          goto __pyx_L1_error;
          __pyx_L32_try_continue:;
          __Pyx_XGIVEREF(__pyx_t_17);
          __Pyx_XGIVEREF(__pyx_t_16);
          __Pyx_XGIVEREF(__pyx_t_15);
          __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_16, __pyx_t_15);
          goto __pyx_L13_continue;
          __pyx_L27_exception_handled:;
          __Pyx_XGIVEREF(__pyx_t_17);
          __Pyx_XGIVEREF(__pyx_t_16);
          __Pyx_XGIVEREF(__pyx_t_15);
          __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_16, __pyx_t_15);
        }

        /* "symengine/lib/symengine_wrapper.pyx":3625
 *                         pass
 * 
 *                     if len(row_iter) == 1:             # <<<<<<<<<<<<<<
 *                         self.set(row, col, value[c])
 *                         continue
*/
        __pyx_t_20 = PyObject_Length(__pyx_v_row_iter); if (unlikely(__pyx_t_20 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3625, __pyx_L1_error)
        __pyx_t_11 = (__pyx_t_20 == 1);
        if (__pyx_t_11) {

          /* "symengine/lib/symengine_wrapper.pyx":3626
 * 
 *                     if len(row_iter) == 1:
 *                         self.set(row, col, value[c])             # <<<<<<<<<<<<<<
 *                         continue
 * 
*/
          __pyx_t_7 = ((PyObject *)__pyx_v_self);
          __Pyx_INCREF(__pyx_t_7);
          __pyx_t_18 = __Pyx_PyObject_GetItem(__pyx_v_value, __pyx_v_c); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 3626, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_18);
          __pyx_t_6 = 0;
          {
            PyObject *__pyx_callargs[4] = {__pyx_t_7, __pyx_v_row, __pyx_v_col, __pyx_t_18};
            __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_set, __pyx_callargs+__pyx_t_6, (4-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
            if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3626, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
          }
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

          /* "symengine/lib/symengine_wrapper.pyx":3627
 *                     if len(row_iter) == 1:
 *                         self.set(row, col, value[c])
 *                         continue             # <<<<<<<<<<<<<<
 * 
 *                     if len(col_iter) == 1:
*/
          goto __pyx_L13_continue;

          /* "symengine/lib/symengine_wrapper.pyx":3625
 *                         pass
 * 
 *                     if len(row_iter) == 1:             # <<<<<<<<<<<<<<
 *                         self.set(row, col, value[c])
 *                         continue
*/
        }

        /* "symengine/lib/symengine_wrapper.pyx":3629
 *                         continue
 * 
 *                     if len(col_iter) == 1:             # <<<<<<<<<<<<<<
 *                         self.set(row, col, value[r])
 *                         continue
*/
        __pyx_t_20 = PyObject_Length(__pyx_v_col_iter); if (unlikely(__pyx_t_20 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3629, __pyx_L1_error)
        __pyx_t_11 = (__pyx_t_20 == 1);
        if (__pyx_t_11) {

          /* "symengine/lib/symengine_wrapper.pyx":3630
 * 
 *                     if len(col_iter) == 1:
 *                         self.set(row, col, value[r])             # <<<<<<<<<<<<<<
 *                         continue
 * 
*/
          __pyx_t_18 = ((PyObject *)__pyx_v_self);
          __Pyx_INCREF(__pyx_t_18);
          __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_value, __pyx_v_r); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3630, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __pyx_t_6 = 0;
          {
            PyObject *__pyx_callargs[4] = {__pyx_t_18, __pyx_v_row, __pyx_v_col, __pyx_t_7};
            __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_set, __pyx_callargs+__pyx_t_6, (4-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
            if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3630, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
          }
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

          /* "symengine/lib/symengine_wrapper.pyx":3631
 *                     if len(col_iter) == 1:
 *                         self.set(row, col, value[r])
 *                         continue             # <<<<<<<<<<<<<<
 * 
 *         elif is_sequence(key) and is_sequence(value):
*/
          goto __pyx_L13_continue;

          /* "symengine/lib/symengine_wrapper.pyx":3629
 *                         continue
 * 
 *                     if len(col_iter) == 1:             # <<<<<<<<<<<<<<
 *                         self.set(row, col, value[r])
 *                         continue
*/
        }

        /* "symengine/lib/symengine_wrapper.pyx":3610
 * 
 *             for r, row in enumerate(row_iter):
 *                 for c, col in enumerate(col_iter):             # <<<<<<<<<<<<<<
 *                     if not is_sequence(value):
 *                         self.set(row, col, value)
*/
        __pyx_L13_continue:;
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "symengine/lib/symengine_wrapper.pyx":3609
 *                 col_iter = [key[1]]
 * 
 *             for r, row in enumerate(row_iter):             # <<<<<<<<<<<<<<
 *                 for c, col in enumerate(col_iter):
 *                     if not is_sequence(value):
*/
    }
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":3594
 *                 self.set(i // self.ncols(), i % self.ncols(), value[k])
 *                 k = k + 1
 *         elif isinstance(key, tuple) and len(key) == 2:             # <<<<<<<<<<<<<<
 *             if isinstance(key[0], slice):
 *                 row_iter = range(*key[0].indices(self.rows))
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":3633
 *                         continue
 * 
 *         elif is_sequence(key) and is_sequence(value):             # <<<<<<<<<<<<<<
 *             for val, ind in zip(value, key):
 *                 self.set(ind // self.ncols(), ind % self.ncols(), val)
*/
  __pyx_t_10 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_is_sequence); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3633, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_10);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_10);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_v_key};
    __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3633, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 3633, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_1) {
  } else {
    __pyx_t_11 = __pyx_t_1;
    goto __pyx_L40_bool_binop_done;
  }
  __pyx_t_5 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_is_sequence); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3633, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_10))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_10);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_10);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_10, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_value};
    __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_10, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3633, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 3633, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_11 = __pyx_t_1;
  __pyx_L40_bool_binop_done:;
  if (likely(__pyx_t_11)) {

    /* "symengine/lib/symengine_wrapper.pyx":3634
 * 
 *         elif is_sequence(key) and is_sequence(value):
 *             for val, ind in zip(value, key):             # <<<<<<<<<<<<<<
 *                 self.set(ind // self.ncols(), ind % self.ncols(), val)
 *         else:
*/
    __pyx_t_10 = NULL;
    __pyx_t_6 = 1;
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_10, __pyx_v_value, __pyx_v_key};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_zip, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3634, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
      __pyx_t_10 = __pyx_t_3; __Pyx_INCREF(__pyx_t_10);
      __pyx_t_8 = 0;
      __pyx_t_9 = NULL;
    } else {
      __pyx_t_8 = -1; __pyx_t_10 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3634, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_9 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3634, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    for (;;) {
      if (likely(!__pyx_t_9)) {
        if (likely(PyList_CheckExact(__pyx_t_10))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_10);
            #if !CYTHON_ASSUME_SAFE_SIZE
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3634, __pyx_L1_error)
            #endif
            if (__pyx_t_8 >= __pyx_temp) break;
          }
          __pyx_t_3 = __Pyx_PyList_GetItemRefFast(__pyx_t_10, __pyx_t_8, __Pyx_ReferenceSharing_OwnStrongReference);
          ++__pyx_t_8;
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_10);
            #if !CYTHON_ASSUME_SAFE_SIZE
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3634, __pyx_L1_error)
            #endif
            if (__pyx_t_8 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_3 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_10, __pyx_t_8));
          #else
          __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_10, __pyx_t_8);
          #endif
          ++__pyx_t_8;
        }
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3634, __pyx_L1_error)
      } else {
        __pyx_t_3 = __pyx_t_9(__pyx_t_10);
        if (unlikely(!__pyx_t_3)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 3634, __pyx_L1_error)
            PyErr_Clear();
          }
          break;
        }
      }
      __Pyx_GOTREF(__pyx_t_3);
      if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) {
        PyObject* sequence = __pyx_t_3;
        Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
        if (unlikely(size != 2)) {
          if (size > 2) __Pyx_RaiseTooManyValuesError(2);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          __PYX_ERR(0, 3634, __pyx_L1_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0);
          __Pyx_INCREF(__pyx_t_5);
          __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1);
          __Pyx_INCREF(__pyx_t_2);
        } else {
          __pyx_t_5 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference);
          if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3634, __pyx_L1_error)
          __Pyx_XGOTREF(__pyx_t_5);
          __pyx_t_2 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference);
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3634, __pyx_L1_error)
          __Pyx_XGOTREF(__pyx_t_2);
        }
        #else
        __pyx_t_5 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3634, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3634, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      } else {
        Py_ssize_t index = -1;
        __pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3634, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_21 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_4);
        index = 0; __pyx_t_5 = __pyx_t_21(__pyx_t_4); if (unlikely(!__pyx_t_5)) goto __pyx_L44_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_5);
        index = 1; __pyx_t_2 = __pyx_t_21(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L44_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_2);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_21(__pyx_t_4), 2) < (0)) __PYX_ERR(0, 3634, __pyx_L1_error)
        __pyx_t_21 = NULL;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        goto __pyx_L45_unpacking_done;
        __pyx_L44_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_21 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(0, 3634, __pyx_L1_error)
        __pyx_L45_unpacking_done:;
      }
      __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_5);
      __pyx_t_5 = 0;
      __Pyx_XDECREF_SET(__pyx_v_ind, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "symengine/lib/symengine_wrapper.pyx":3635
 *         elif is_sequence(key) and is_sequence(value):
 *             for val, ind in zip(value, key):
 *                 self.set(ind // self.ncols(), ind % self.ncols(), val)             # <<<<<<<<<<<<<<
 *         else:
 *             raise NotImplementedError
*/
      __pyx_t_2 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_4 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_4);
      __pyx_t_6 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
        __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_ncols, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3635, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
      }
      __pyx_t_4 = PyNumber_FloorDivide(__pyx_v_ind, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3635, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_7 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_7);
      __pyx_t_6 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL};
        __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_ncols, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3635, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
      }
      __pyx_t_7 = PyNumber_Remainder(__pyx_v_ind, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3635, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_6 = 0;
      {
        PyObject *__pyx_callargs[4] = {__pyx_t_2, __pyx_t_4, __pyx_t_7, __pyx_v_val};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_set, __pyx_callargs+__pyx_t_6, (4-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3635, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "symengine/lib/symengine_wrapper.pyx":3634
 * 
 *         elif is_sequence(key) and is_sequence(value):
 *             for val, ind in zip(value, key):             # <<<<<<<<<<<<<<
 *                 self.set(ind // self.ncols(), ind % self.ncols(), val)
 *         else:
*/
    }
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":3633
 *                         continue
 * 
 *         elif is_sequence(key) and is_sequence(value):             # <<<<<<<<<<<<<<
 *             for val, ind in zip(value, key):
 *                 self.set(ind // self.ncols(), ind % self.ncols(), val)
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":3637
 *                 self.set(ind // self.ncols(), ind % self.ncols(), val)
 *         else:
 *             raise NotImplementedError             # <<<<<<<<<<<<<<
 * 
 *     def row_join(self, rhs):
*/
  /*else*/ {
    __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_NotImplementedError))), 0, 0, 0);
    __PYX_ERR(0, 3637, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "symengine/lib/symengine_wrapper.pyx":3585
 *             raise NotImplementedError
 * 
 *     def __setitem__(self, key, value):             # <<<<<<<<<<<<<<
 *         cdef unsigned k, l
 *         if isinstance(key, int):
*/

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __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_7);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_18);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_v_row_iter);
  __Pyx_XDECREF(__pyx_v_col_iter);
  __Pyx_XDECREF(__pyx_v_r);
  __Pyx_XDECREF(__pyx_v_row);
  __Pyx_XDECREF(__pyx_v_c);
  __Pyx_XDECREF(__pyx_v_col);
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XDECREF(__pyx_v_ind);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3639
 *             raise NotImplementedError
 * 
 *     def row_join(self, rhs):             # <<<<<<<<<<<<<<
 *         cdef DenseMatrixBase o = sympify(rhs)
 *         if self.rows != o.rows:
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_37row_join(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_37row_join = {"row_join", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_37row_join, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_37row_join(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_rhs = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("row_join (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_rhs,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 3639, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3639, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "row_join", 0) < (0)) __PYX_ERR(0, 3639, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("row_join", 1, 1, 1, i); __PYX_ERR(0, 3639, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3639, __pyx_L3_error)
    }
    __pyx_v_rhs = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("row_join", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3639, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.row_join", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_36row_join(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_self), __pyx_v_rhs);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_36row_join(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self, PyObject *__pyx_v_rhs) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_o = 0;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_d = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("row_join", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3640
 * 
 *     def row_join(self, rhs):
 *         cdef DenseMatrixBase o = sympify(rhs)             # <<<<<<<<<<<<<<
 *         if self.rows != o.rows:
 *             raise ShapeError("`self` and `rhs` must have the same number of rows.")
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3640, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_rhs};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3640, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase))))) __PYX_ERR(0, 3640, __pyx_L1_error)
  __pyx_v_o = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3641
 *     def row_join(self, rhs):
 *         cdef DenseMatrixBase o = sympify(rhs)
 *         if self.rows != o.rows:             # <<<<<<<<<<<<<<
 *             raise ShapeError("`self` and `rhs` must have the same number of rows.")
 *         cdef DenseMatrixBase d = self.__class__(self)
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_rows); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3641, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_o), __pyx_mstate_global->__pyx_n_u_rows); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3641, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3641, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 3641, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(__pyx_t_5)) {

    /* "symengine/lib/symengine_wrapper.pyx":3642
 *         cdef DenseMatrixBase o = sympify(rhs)
 *         if self.rows != o.rows:
 *             raise ShapeError("`self` and `rhs` must have the same number of rows.")             # <<<<<<<<<<<<<<
 *         cdef DenseMatrixBase d = self.__class__(self)
 *         deref(symengine.static_cast_DenseMatrix(d.thisptr)).row_join(deref(symengine.static_cast_DenseMatrix(o.thisptr)))
*/
    __pyx_t_3 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_ShapeError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3642, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
      assert(__pyx_t_3);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_1, __pyx__function);
      __pyx_t_4 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_self_and_rhs_must_have_the_same};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_1, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3642, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 3642, __pyx_L1_error)

    /* "symengine/lib/symengine_wrapper.pyx":3641
 *     def row_join(self, rhs):
 *         cdef DenseMatrixBase o = sympify(rhs)
 *         if self.rows != o.rows:             # <<<<<<<<<<<<<<
 *             raise ShapeError("`self` and `rhs` must have the same number of rows.")
 *         cdef DenseMatrixBase d = self.__class__(self)
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":3643
 *         if self.rows != o.rows:
 *             raise ShapeError("`self` and `rhs` must have the same number of rows.")
 *         cdef DenseMatrixBase d = self.__class__(self)             # <<<<<<<<<<<<<<
 *         deref(symengine.static_cast_DenseMatrix(d.thisptr)).row_join(deref(symengine.static_cast_DenseMatrix(o.thisptr)))
 *         return d
*/
  __pyx_t_1 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, ((PyObject *)__pyx_v_self)};
    __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_class, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3643, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase))))) __PYX_ERR(0, 3643, __pyx_L1_error)
  __pyx_v_d = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3644
 *             raise ShapeError("`self` and `rhs` must have the same number of rows.")
 *         cdef DenseMatrixBase d = self.__class__(self)
 *         deref(symengine.static_cast_DenseMatrix(d.thisptr)).row_join(deref(symengine.static_cast_DenseMatrix(o.thisptr)))             # <<<<<<<<<<<<<<
 *         return d
 * 
*/
  (*static_cast<SymEngine::DenseMatrix*>(__pyx_v_d->__pyx_base.thisptr)).row_join((*static_cast<SymEngine::DenseMatrix*>(__pyx_v_o->__pyx_base.thisptr)));

  /* "symengine/lib/symengine_wrapper.pyx":3645
 *         cdef DenseMatrixBase d = self.__class__(self)
 *         deref(symengine.static_cast_DenseMatrix(d.thisptr)).row_join(deref(symengine.static_cast_DenseMatrix(o.thisptr)))
 *         return d             # <<<<<<<<<<<<<<
 * 
 *     def col_join(self, bott):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_d);
  __pyx_r = ((PyObject *)__pyx_v_d);
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3639
 *             raise NotImplementedError
 * 
 *     def row_join(self, rhs):             # <<<<<<<<<<<<<<
 *         cdef DenseMatrixBase o = sympify(rhs)
 *         if self.rows != o.rows:
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.row_join", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_o);
  __Pyx_XDECREF((PyObject *)__pyx_v_d);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3647
 *         return d
 * 
 *     def col_join(self, bott):             # <<<<<<<<<<<<<<
 *         cdef DenseMatrixBase o = sympify(bott)
 *         if self.cols != o.cols:
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_39col_join(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_39col_join = {"col_join", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_39col_join, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_39col_join(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_bott = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("col_join (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_bott,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 3647, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3647, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "col_join", 0) < (0)) __PYX_ERR(0, 3647, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("col_join", 1, 1, 1, i); __PYX_ERR(0, 3647, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3647, __pyx_L3_error)
    }
    __pyx_v_bott = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("col_join", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3647, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.col_join", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_38col_join(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_self), __pyx_v_bott);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_38col_join(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self, PyObject *__pyx_v_bott) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_o = 0;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_d = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("col_join", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3648
 * 
 *     def col_join(self, bott):
 *         cdef DenseMatrixBase o = sympify(bott)             # <<<<<<<<<<<<<<
 *         if self.cols != o.cols:
 *             raise ShapeError("`self` and `rhs` must have the same number of columns.")
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3648, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_bott};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3648, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase))))) __PYX_ERR(0, 3648, __pyx_L1_error)
  __pyx_v_o = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3649
 *     def col_join(self, bott):
 *         cdef DenseMatrixBase o = sympify(bott)
 *         if self.cols != o.cols:             # <<<<<<<<<<<<<<
 *             raise ShapeError("`self` and `rhs` must have the same number of columns.")
 *         cdef DenseMatrixBase d = self.__class__(self)
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_cols); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3649, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_o), __pyx_mstate_global->__pyx_n_u_cols); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3649, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3649, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 3649, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(__pyx_t_5)) {

    /* "symengine/lib/symengine_wrapper.pyx":3650
 *         cdef DenseMatrixBase o = sympify(bott)
 *         if self.cols != o.cols:
 *             raise ShapeError("`self` and `rhs` must have the same number of columns.")             # <<<<<<<<<<<<<<
 *         cdef DenseMatrixBase d = self.__class__(self)
 *         deref(symengine.static_cast_DenseMatrix(d.thisptr)).col_join(deref(symengine.static_cast_DenseMatrix(o.thisptr)))
*/
    __pyx_t_3 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_ShapeError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3650, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
      assert(__pyx_t_3);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_1, __pyx__function);
      __pyx_t_4 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_self_and_rhs_must_have_the_same_2};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_1, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3650, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 3650, __pyx_L1_error)

    /* "symengine/lib/symengine_wrapper.pyx":3649
 *     def col_join(self, bott):
 *         cdef DenseMatrixBase o = sympify(bott)
 *         if self.cols != o.cols:             # <<<<<<<<<<<<<<
 *             raise ShapeError("`self` and `rhs` must have the same number of columns.")
 *         cdef DenseMatrixBase d = self.__class__(self)
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":3651
 *         if self.cols != o.cols:
 *             raise ShapeError("`self` and `rhs` must have the same number of columns.")
 *         cdef DenseMatrixBase d = self.__class__(self)             # <<<<<<<<<<<<<<
 *         deref(symengine.static_cast_DenseMatrix(d.thisptr)).col_join(deref(symengine.static_cast_DenseMatrix(o.thisptr)))
 *         return d
*/
  __pyx_t_1 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, ((PyObject *)__pyx_v_self)};
    __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_class, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3651, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase))))) __PYX_ERR(0, 3651, __pyx_L1_error)
  __pyx_v_d = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3652
 *             raise ShapeError("`self` and `rhs` must have the same number of columns.")
 *         cdef DenseMatrixBase d = self.__class__(self)
 *         deref(symengine.static_cast_DenseMatrix(d.thisptr)).col_join(deref(symengine.static_cast_DenseMatrix(o.thisptr)))             # <<<<<<<<<<<<<<
 *         return d
 * 
*/
  (*static_cast<SymEngine::DenseMatrix*>(__pyx_v_d->__pyx_base.thisptr)).col_join((*static_cast<SymEngine::DenseMatrix*>(__pyx_v_o->__pyx_base.thisptr)));

  /* "symengine/lib/symengine_wrapper.pyx":3653
 *         cdef DenseMatrixBase d = self.__class__(self)
 *         deref(symengine.static_cast_DenseMatrix(d.thisptr)).col_join(deref(symengine.static_cast_DenseMatrix(o.thisptr)))
 *         return d             # <<<<<<<<<<<<<<
 * 
 *     def row_insert(self, pos, bott):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_d);
  __pyx_r = ((PyObject *)__pyx_v_d);
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3647
 *         return d
 * 
 *     def col_join(self, bott):             # <<<<<<<<<<<<<<
 *         cdef DenseMatrixBase o = sympify(bott)
 *         if self.cols != o.cols:
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.col_join", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_o);
  __Pyx_XDECREF((PyObject *)__pyx_v_d);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3655
 *         return d
 * 
 *     def row_insert(self, pos, bott):             # <<<<<<<<<<<<<<
 *         cdef DenseMatrixBase o = sympify(bott)
 *         if pos < 0:
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_41row_insert(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_41row_insert = {"row_insert", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_41row_insert, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_41row_insert(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_pos = 0;
  PyObject *__pyx_v_bott = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("row_insert (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pos,&__pyx_mstate_global->__pyx_n_u_bott,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 3655, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3655, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3655, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "row_insert", 0) < (0)) __PYX_ERR(0, 3655, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("row_insert", 1, 2, 2, i); __PYX_ERR(0, 3655, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3655, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3655, __pyx_L3_error)
    }
    __pyx_v_pos = values[0];
    __pyx_v_bott = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("row_insert", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 3655, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.row_insert", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_40row_insert(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_self), __pyx_v_pos, __pyx_v_bott);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_40row_insert(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self, PyObject *__pyx_v_pos, PyObject *__pyx_v_bott) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_o = 0;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_d = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_t_5;
  unsigned int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("row_insert", 0);
  __Pyx_INCREF(__pyx_v_pos);

  /* "symengine/lib/symengine_wrapper.pyx":3656
 * 
 *     def row_insert(self, pos, bott):
 *         cdef DenseMatrixBase o = sympify(bott)             # <<<<<<<<<<<<<<
 *         if pos < 0:
 *             pos = self.rows + pos
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3656, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_bott};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3656, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase))))) __PYX_ERR(0, 3656, __pyx_L1_error)
  __pyx_v_o = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3657
 *     def row_insert(self, pos, bott):
 *         cdef DenseMatrixBase o = sympify(bott)
 *         if pos < 0:             # <<<<<<<<<<<<<<
 *             pos = self.rows + pos
 *         if pos < 0:
*/
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_pos, __pyx_mstate_global->__pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3657, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 3657, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":3658
 *         cdef DenseMatrixBase o = sympify(bott)
 *         if pos < 0:
 *             pos = self.rows + pos             # <<<<<<<<<<<<<<
 *         if pos < 0:
 *             pos = 0
*/
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_rows); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3658, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_v_pos); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3658, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_pos, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":3657
 *     def row_insert(self, pos, bott):
 *         cdef DenseMatrixBase o = sympify(bott)
 *         if pos < 0:             # <<<<<<<<<<<<<<
 *             pos = self.rows + pos
 *         if pos < 0:
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":3659
 *         if pos < 0:
 *             pos = self.rows + pos
 *         if pos < 0:             # <<<<<<<<<<<<<<
 *             pos = 0
 *         elif pos > self.rows:
*/
  __pyx_t_3 = PyObject_RichCompare(__pyx_v_pos, __pyx_mstate_global->__pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3659, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 3659, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":3660
 *             pos = self.rows + pos
 *         if pos < 0:
 *             pos = 0             # <<<<<<<<<<<<<<
 *         elif pos > self.rows:
 *             pos = self.rows
*/
    __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0);
    __Pyx_DECREF_SET(__pyx_v_pos, __pyx_mstate_global->__pyx_int_0);

    /* "symengine/lib/symengine_wrapper.pyx":3659
 *         if pos < 0:
 *             pos = self.rows + pos
 *         if pos < 0:             # <<<<<<<<<<<<<<
 *             pos = 0
 *         elif pos > self.rows:
*/
    goto __pyx_L4;
  }

  /* "symengine/lib/symengine_wrapper.pyx":3661
 *         if pos < 0:
 *             pos = 0
 *         elif pos > self.rows:             # <<<<<<<<<<<<<<
 *             pos = self.rows
 *         if self.cols != o.cols:
*/
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_rows); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3661, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_pos, __pyx_t_3, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3661, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 3661, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":3662
 *             pos = 0
 *         elif pos > self.rows:
 *             pos = self.rows             # <<<<<<<<<<<<<<
 *         if self.cols != o.cols:
 *             raise ShapeError("`self` and `other` must have the same number of columns.")
*/
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_rows); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3662, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF_SET(__pyx_v_pos, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":3661
 *         if pos < 0:
 *             pos = 0
 *         elif pos > self.rows:             # <<<<<<<<<<<<<<
 *             pos = self.rows
 *         if self.cols != o.cols:
*/
  }
  __pyx_L4:;

  /* "symengine/lib/symengine_wrapper.pyx":3663
 *         elif pos > self.rows:
 *             pos = self.rows
 *         if self.cols != o.cols:             # <<<<<<<<<<<<<<
 *             raise ShapeError("`self` and `other` must have the same number of columns.")
 *         cdef DenseMatrixBase d = self.__class__(self)
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_cols); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3663, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_o), __pyx_mstate_global->__pyx_n_u_cols); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3663, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3663, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 3663, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(__pyx_t_5)) {

    /* "symengine/lib/symengine_wrapper.pyx":3664
 *             pos = self.rows
 *         if self.cols != o.cols:
 *             raise ShapeError("`self` and `other` must have the same number of columns.")             # <<<<<<<<<<<<<<
 *         cdef DenseMatrixBase d = self.__class__(self)
 *         deref(symengine.static_cast_DenseMatrix(d.thisptr)).row_insert(deref(symengine.static_cast_DenseMatrix(o.thisptr)), pos)
*/
    __pyx_t_3 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_ShapeError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3664, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
      assert(__pyx_t_3);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_1, __pyx__function);
      __pyx_t_4 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_self_and_other_must_have_the_sa};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_1, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3664, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 3664, __pyx_L1_error)

    /* "symengine/lib/symengine_wrapper.pyx":3663
 *         elif pos > self.rows:
 *             pos = self.rows
 *         if self.cols != o.cols:             # <<<<<<<<<<<<<<
 *             raise ShapeError("`self` and `other` must have the same number of columns.")
 *         cdef DenseMatrixBase d = self.__class__(self)
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":3665
 *         if self.cols != o.cols:
 *             raise ShapeError("`self` and `other` must have the same number of columns.")
 *         cdef DenseMatrixBase d = self.__class__(self)             # <<<<<<<<<<<<<<
 *         deref(symengine.static_cast_DenseMatrix(d.thisptr)).row_insert(deref(symengine.static_cast_DenseMatrix(o.thisptr)), pos)
 *         return d
*/
  __pyx_t_1 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, ((PyObject *)__pyx_v_self)};
    __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_class, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3665, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase))))) __PYX_ERR(0, 3665, __pyx_L1_error)
  __pyx_v_d = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3666
 *             raise ShapeError("`self` and `other` must have the same number of columns.")
 *         cdef DenseMatrixBase d = self.__class__(self)
 *         deref(symengine.static_cast_DenseMatrix(d.thisptr)).row_insert(deref(symengine.static_cast_DenseMatrix(o.thisptr)), pos)             # <<<<<<<<<<<<<<
 *         return d
 * 
*/
  __pyx_t_6 = __Pyx_PyLong_As_unsigned_int(__pyx_v_pos); if (unlikely((__pyx_t_6 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3666, __pyx_L1_error)
  (*static_cast<SymEngine::DenseMatrix*>(__pyx_v_d->__pyx_base.thisptr)).row_insert((*static_cast<SymEngine::DenseMatrix*>(__pyx_v_o->__pyx_base.thisptr)), __pyx_t_6);

  /* "symengine/lib/symengine_wrapper.pyx":3667
 *         cdef DenseMatrixBase d = self.__class__(self)
 *         deref(symengine.static_cast_DenseMatrix(d.thisptr)).row_insert(deref(symengine.static_cast_DenseMatrix(o.thisptr)), pos)
 *         return d             # <<<<<<<<<<<<<<
 * 
 *     def col_insert(self, pos, bott):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_d);
  __pyx_r = ((PyObject *)__pyx_v_d);
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3655
 *         return d
 * 
 *     def row_insert(self, pos, bott):             # <<<<<<<<<<<<<<
 *         cdef DenseMatrixBase o = sympify(bott)
 *         if pos < 0:
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.row_insert", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_o);
  __Pyx_XDECREF((PyObject *)__pyx_v_d);
  __Pyx_XDECREF(__pyx_v_pos);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3669
 *         return d
 * 
 *     def col_insert(self, pos, bott):             # <<<<<<<<<<<<<<
 *         cdef DenseMatrixBase o = sympify(bott)
 *         if pos < 0:
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_43col_insert(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_43col_insert = {"col_insert", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_43col_insert, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_43col_insert(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_pos = 0;
  PyObject *__pyx_v_bott = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("col_insert (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pos,&__pyx_mstate_global->__pyx_n_u_bott,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 3669, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3669, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3669, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "col_insert", 0) < (0)) __PYX_ERR(0, 3669, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("col_insert", 1, 2, 2, i); __PYX_ERR(0, 3669, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3669, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3669, __pyx_L3_error)
    }
    __pyx_v_pos = values[0];
    __pyx_v_bott = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("col_insert", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 3669, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.col_insert", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_42col_insert(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_self), __pyx_v_pos, __pyx_v_bott);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_42col_insert(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self, PyObject *__pyx_v_pos, PyObject *__pyx_v_bott) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_o = 0;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_d = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_t_5;
  unsigned int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("col_insert", 0);
  __Pyx_INCREF(__pyx_v_pos);

  /* "symengine/lib/symengine_wrapper.pyx":3670
 * 
 *     def col_insert(self, pos, bott):
 *         cdef DenseMatrixBase o = sympify(bott)             # <<<<<<<<<<<<<<
 *         if pos < 0:
 *             pos = self.cols + pos
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3670, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_bott};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3670, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase))))) __PYX_ERR(0, 3670, __pyx_L1_error)
  __pyx_v_o = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3671
 *     def col_insert(self, pos, bott):
 *         cdef DenseMatrixBase o = sympify(bott)
 *         if pos < 0:             # <<<<<<<<<<<<<<
 *             pos = self.cols + pos
 *         if pos < 0:
*/
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_pos, __pyx_mstate_global->__pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3671, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 3671, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":3672
 *         cdef DenseMatrixBase o = sympify(bott)
 *         if pos < 0:
 *             pos = self.cols + pos             # <<<<<<<<<<<<<<
 *         if pos < 0:
 *             pos = 0
*/
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_cols); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3672, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_v_pos); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3672, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_pos, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":3671
 *     def col_insert(self, pos, bott):
 *         cdef DenseMatrixBase o = sympify(bott)
 *         if pos < 0:             # <<<<<<<<<<<<<<
 *             pos = self.cols + pos
 *         if pos < 0:
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":3673
 *         if pos < 0:
 *             pos = self.cols + pos
 *         if pos < 0:             # <<<<<<<<<<<<<<
 *             pos = 0
 *         elif pos > self.cols:
*/
  __pyx_t_3 = PyObject_RichCompare(__pyx_v_pos, __pyx_mstate_global->__pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3673, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 3673, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":3674
 *             pos = self.cols + pos
 *         if pos < 0:
 *             pos = 0             # <<<<<<<<<<<<<<
 *         elif pos > self.cols:
 *             pos = self.cols
*/
    __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0);
    __Pyx_DECREF_SET(__pyx_v_pos, __pyx_mstate_global->__pyx_int_0);

    /* "symengine/lib/symengine_wrapper.pyx":3673
 *         if pos < 0:
 *             pos = self.cols + pos
 *         if pos < 0:             # <<<<<<<<<<<<<<
 *             pos = 0
 *         elif pos > self.cols:
*/
    goto __pyx_L4;
  }

  /* "symengine/lib/symengine_wrapper.pyx":3675
 *         if pos < 0:
 *             pos = 0
 *         elif pos > self.cols:             # <<<<<<<<<<<<<<
 *             pos = self.cols
 *         if self.rows != o.rows:
*/
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_cols); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3675, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_pos, __pyx_t_3, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3675, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 3675, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":3676
 *             pos = 0
 *         elif pos > self.cols:
 *             pos = self.cols             # <<<<<<<<<<<<<<
 *         if self.rows != o.rows:
 *             raise ShapeError("`self` and `other` must have the same number of rows.")
*/
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_cols); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3676, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF_SET(__pyx_v_pos, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":3675
 *         if pos < 0:
 *             pos = 0
 *         elif pos > self.cols:             # <<<<<<<<<<<<<<
 *             pos = self.cols
 *         if self.rows != o.rows:
*/
  }
  __pyx_L4:;

  /* "symengine/lib/symengine_wrapper.pyx":3677
 *         elif pos > self.cols:
 *             pos = self.cols
 *         if self.rows != o.rows:             # <<<<<<<<<<<<<<
 *             raise ShapeError("`self` and `other` must have the same number of rows.")
 *         cdef DenseMatrixBase d = self.__class__(self)
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_rows); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3677, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_o), __pyx_mstate_global->__pyx_n_u_rows); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3677, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3677, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 3677, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(__pyx_t_5)) {

    /* "symengine/lib/symengine_wrapper.pyx":3678
 *             pos = self.cols
 *         if self.rows != o.rows:
 *             raise ShapeError("`self` and `other` must have the same number of rows.")             # <<<<<<<<<<<<<<
 *         cdef DenseMatrixBase d = self.__class__(self)
 *         deref(symengine.static_cast_DenseMatrix(d.thisptr)).col_insert(deref(symengine.static_cast_DenseMatrix(o.thisptr)), pos)
*/
    __pyx_t_3 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_ShapeError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3678, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
      assert(__pyx_t_3);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_1, __pyx__function);
      __pyx_t_4 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_self_and_other_must_have_the_sa_2};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_1, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3678, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 3678, __pyx_L1_error)

    /* "symengine/lib/symengine_wrapper.pyx":3677
 *         elif pos > self.cols:
 *             pos = self.cols
 *         if self.rows != o.rows:             # <<<<<<<<<<<<<<
 *             raise ShapeError("`self` and `other` must have the same number of rows.")
 *         cdef DenseMatrixBase d = self.__class__(self)
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":3679
 *         if self.rows != o.rows:
 *             raise ShapeError("`self` and `other` must have the same number of rows.")
 *         cdef DenseMatrixBase d = self.__class__(self)             # <<<<<<<<<<<<<<
 *         deref(symengine.static_cast_DenseMatrix(d.thisptr)).col_insert(deref(symengine.static_cast_DenseMatrix(o.thisptr)), pos)
 *         return d
*/
  __pyx_t_1 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, ((PyObject *)__pyx_v_self)};
    __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_class, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3679, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase))))) __PYX_ERR(0, 3679, __pyx_L1_error)
  __pyx_v_d = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3680
 *             raise ShapeError("`self` and `other` must have the same number of rows.")
 *         cdef DenseMatrixBase d = self.__class__(self)
 *         deref(symengine.static_cast_DenseMatrix(d.thisptr)).col_insert(deref(symengine.static_cast_DenseMatrix(o.thisptr)), pos)             # <<<<<<<<<<<<<<
 *         return d
 * 
*/
  __pyx_t_6 = __Pyx_PyLong_As_unsigned_int(__pyx_v_pos); if (unlikely((__pyx_t_6 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3680, __pyx_L1_error)
  (*static_cast<SymEngine::DenseMatrix*>(__pyx_v_d->__pyx_base.thisptr)).col_insert((*static_cast<SymEngine::DenseMatrix*>(__pyx_v_o->__pyx_base.thisptr)), __pyx_t_6);

  /* "symengine/lib/symengine_wrapper.pyx":3681
 *         cdef DenseMatrixBase d = self.__class__(self)
 *         deref(symengine.static_cast_DenseMatrix(d.thisptr)).col_insert(deref(symengine.static_cast_DenseMatrix(o.thisptr)), pos)
 *         return d             # <<<<<<<<<<<<<<
 * 
 *     def dot(self, b):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_d);
  __pyx_r = ((PyObject *)__pyx_v_d);
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3669
 *         return d
 * 
 *     def col_insert(self, pos, bott):             # <<<<<<<<<<<<<<
 *         cdef DenseMatrixBase o = sympify(bott)
 *         if pos < 0:
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.col_insert", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_o);
  __Pyx_XDECREF((PyObject *)__pyx_v_d);
  __Pyx_XDECREF(__pyx_v_pos);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3683
 *         return d
 * 
 *     def dot(self, b):             # <<<<<<<<<<<<<<
 *         cdef DenseMatrixBase o = sympify(b)
 *         cdef DenseMatrixBase result = self.__class__(self.rows, self.cols)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_45dot(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_45dot = {"dot", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_45dot, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_45dot(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_b = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("dot (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_b,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 3683, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3683, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "dot", 0) < (0)) __PYX_ERR(0, 3683, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("dot", 1, 1, 1, i); __PYX_ERR(0, 3683, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3683, __pyx_L3_error)
    }
    __pyx_v_b = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("dot", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3683, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.dot", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_44dot(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_self), __pyx_v_b);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_44dot(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self, PyObject *__pyx_v_b) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_o = 0;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dot", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3684
 * 
 *     def dot(self, b):
 *         cdef DenseMatrixBase o = sympify(b)             # <<<<<<<<<<<<<<
 *         cdef DenseMatrixBase result = self.__class__(self.rows, self.cols)
 *         symengine.dot(deref(symengine.static_cast_DenseMatrix(self.thisptr)), deref(symengine.static_cast_DenseMatrix(o.thisptr)), deref(symengine.static_cast_DenseMatrix(result.thisptr)))
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3684, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_b};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3684, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase))))) __PYX_ERR(0, 3684, __pyx_L1_error)
  __pyx_v_o = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3685
 *     def dot(self, b):
 *         cdef DenseMatrixBase o = sympify(b)
 *         cdef DenseMatrixBase result = self.__class__(self.rows, self.cols)             # <<<<<<<<<<<<<<
 *         symengine.dot(deref(symengine.static_cast_DenseMatrix(self.thisptr)), deref(symengine.static_cast_DenseMatrix(o.thisptr)), deref(symengine.static_cast_DenseMatrix(result.thisptr)))
 *         if len(result) == 1:
*/
  __pyx_t_3 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_rows); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3685, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_cols); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3685, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_t_2, __pyx_t_5};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_class, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3685, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase))))) __PYX_ERR(0, 3685, __pyx_L1_error)
  __pyx_v_result = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3686
 *         cdef DenseMatrixBase o = sympify(b)
 *         cdef DenseMatrixBase result = self.__class__(self.rows, self.cols)
 *         symengine.dot(deref(symengine.static_cast_DenseMatrix(self.thisptr)), deref(symengine.static_cast_DenseMatrix(o.thisptr)), deref(symengine.static_cast_DenseMatrix(result.thisptr)))             # <<<<<<<<<<<<<<
 *         if len(result) == 1:
 *             return result[0, 0]
*/
  SymEngine::dot((*static_cast<SymEngine::DenseMatrix*>(__pyx_v_self->__pyx_base.thisptr)), (*static_cast<SymEngine::DenseMatrix*>(__pyx_v_o->__pyx_base.thisptr)), (*static_cast<SymEngine::DenseMatrix*>(__pyx_v_result->__pyx_base.thisptr)));

  /* "symengine/lib/symengine_wrapper.pyx":3687
 *         cdef DenseMatrixBase result = self.__class__(self.rows, self.cols)
 *         symengine.dot(deref(symengine.static_cast_DenseMatrix(self.thisptr)), deref(symengine.static_cast_DenseMatrix(o.thisptr)), deref(symengine.static_cast_DenseMatrix(result.thisptr)))
 *         if len(result) == 1:             # <<<<<<<<<<<<<<
 *             return result[0, 0]
 *         else:
*/
  __pyx_t_6 = PyObject_Length(((PyObject *)__pyx_v_result)); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3687, __pyx_L1_error)
  __pyx_t_7 = (__pyx_t_6 == 1);
  if (__pyx_t_7) {

    /* "symengine/lib/symengine_wrapper.pyx":3688
 *         symengine.dot(deref(symengine.static_cast_DenseMatrix(self.thisptr)), deref(symengine.static_cast_DenseMatrix(o.thisptr)), deref(symengine.static_cast_DenseMatrix(result.thisptr)))
 *         if len(result) == 1:
 *             return result[0, 0]             # <<<<<<<<<<<<<<
 *         else:
 *             return result
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_result), __pyx_mstate_global->__pyx_tuple[1]); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3688, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":3687
 *         cdef DenseMatrixBase result = self.__class__(self.rows, self.cols)
 *         symengine.dot(deref(symengine.static_cast_DenseMatrix(self.thisptr)), deref(symengine.static_cast_DenseMatrix(o.thisptr)), deref(symengine.static_cast_DenseMatrix(result.thisptr)))
 *         if len(result) == 1:             # <<<<<<<<<<<<<<
 *             return result[0, 0]
 *         else:
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":3690
 *             return result[0, 0]
 *         else:
 *             return result             # <<<<<<<<<<<<<<
 * 
 *     def cross(self, b):
*/
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF((PyObject *)__pyx_v_result);
    __pyx_r = ((PyObject *)__pyx_v_result);
    goto __pyx_L0;
  }

  /* "symengine/lib/symengine_wrapper.pyx":3683
 *         return d
 * 
 *     def dot(self, b):             # <<<<<<<<<<<<<<
 *         cdef DenseMatrixBase o = sympify(b)
 *         cdef DenseMatrixBase result = self.__class__(self.rows, self.cols)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.dot", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_o);
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3692
 *             return result
 * 
 *     def cross(self, b):             # <<<<<<<<<<<<<<
 *         cdef DenseMatrixBase o = sympify(b)
 *         if self.cols * self.rows != 3 or o.cols * o.rows != 3:
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_47cross(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_47cross = {"cross", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_47cross, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_47cross(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_b = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cross (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_b,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 3692, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3692, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "cross", 0) < (0)) __PYX_ERR(0, 3692, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("cross", 1, 1, 1, i); __PYX_ERR(0, 3692, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3692, __pyx_L3_error)
    }
    __pyx_v_b = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cross", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3692, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.cross", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_46cross(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_self), __pyx_v_b);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_46cross(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self, PyObject *__pyx_v_b) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_o = 0;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11[4];
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("cross", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3693
 * 
 *     def cross(self, b):
 *         cdef DenseMatrixBase o = sympify(b)             # <<<<<<<<<<<<<<
 *         if self.cols * self.rows != 3 or o.cols * o.rows != 3:
 *             raise ShapeError("Dimensions incorrect for cross product: %s x %s" %
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3693, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_b};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3693, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase))))) __PYX_ERR(0, 3693, __pyx_L1_error)
  __pyx_v_o = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3694
 *     def cross(self, b):
 *         cdef DenseMatrixBase o = sympify(b)
 *         if self.cols * self.rows != 3 or o.cols * o.rows != 3:             # <<<<<<<<<<<<<<
 *             raise ShapeError("Dimensions incorrect for cross product: %s x %s" %
 *                              ((self.rows, self.cols), (b.rows, b.cols)))
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_cols); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3694, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_rows); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3694, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyNumber_Multiply(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3694, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_6 = (__Pyx_PyLong_BoolNeObjC(__pyx_t_2, __pyx_mstate_global->__pyx_int_3, 3, 0)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 3694, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (!__pyx_t_6) {
  } else {
    __pyx_t_5 = __pyx_t_6;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_o), __pyx_mstate_global->__pyx_n_u_cols); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3694, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_o), __pyx_mstate_global->__pyx_n_u_rows); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3694, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyNumber_Multiply(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3694, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_6 = (__Pyx_PyLong_BoolNeObjC(__pyx_t_1, __pyx_mstate_global->__pyx_int_3, 3, 0)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 3694, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_5 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (unlikely(__pyx_t_5)) {

    /* "symengine/lib/symengine_wrapper.pyx":3695
 *         cdef DenseMatrixBase o = sympify(b)
 *         if self.cols * self.rows != 3 or o.cols * o.rows != 3:
 *             raise ShapeError("Dimensions incorrect for cross product: %s x %s" %             # <<<<<<<<<<<<<<
 *                              ((self.rows, self.cols), (b.rows, b.cols)))
 *         cdef DenseMatrixBase result = self.__class__(self.rows, self.cols)
*/
    __pyx_t_3 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_ShapeError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3695, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);

    /* "symengine/lib/symengine_wrapper.pyx":3696
 *         if self.cols * self.rows != 3 or o.cols * o.rows != 3:
 *             raise ShapeError("Dimensions incorrect for cross product: %s x %s" %
 *                              ((self.rows, self.cols), (b.rows, b.cols)))             # <<<<<<<<<<<<<<
 *         cdef DenseMatrixBase result = self.__class__(self.rows, self.cols)
 *         symengine.cross(deref(symengine.static_cast_DenseMatrix(self.thisptr)), deref(symengine.static_cast_DenseMatrix(o.thisptr)), deref(symengine.static_cast_DenseMatrix(result.thisptr)))
*/
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_rows); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3696, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_cols); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3696, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3696, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_GIVEREF(__pyx_t_7);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7) != (0)) __PYX_ERR(0, 3696, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_8);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_8) != (0)) __PYX_ERR(0, 3696, __pyx_L1_error);
    __pyx_t_7 = 0;
    __pyx_t_8 = 0;
    __pyx_t_8 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_9), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3696, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_b, __pyx_mstate_global->__pyx_n_u_rows); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3696, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_b, __pyx_mstate_global->__pyx_n_u_cols); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3696, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3696, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_GIVEREF(__pyx_t_9);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9) != (0)) __PYX_ERR(0, 3696, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_7);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_7) != (0)) __PYX_ERR(0, 3696, __pyx_L1_error);
    __pyx_t_9 = 0;
    __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_10), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3696, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_11[0] = __pyx_mstate_global->__pyx_kp_u_Dimensions_incorrect_for_cross_p;
    __pyx_t_11[1] = __pyx_t_8;
    __pyx_t_11[2] = __pyx_mstate_global->__pyx_kp_u_x_2;
    __pyx_t_11[3] = __pyx_t_7;

    /* "symengine/lib/symengine_wrapper.pyx":3695
 *         cdef DenseMatrixBase o = sympify(b)
 *         if self.cols * self.rows != 3 or o.cols * o.rows != 3:
 *             raise ShapeError("Dimensions incorrect for cross product: %s x %s" %             # <<<<<<<<<<<<<<
 *                              ((self.rows, self.cols), (b.rows, b.cols)))
 *         cdef DenseMatrixBase result = self.__class__(self.rows, self.cols)
*/
    __pyx_t_10 = __Pyx_PyUnicode_Join(__pyx_t_11, 4, 40 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8) + 3 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7));
    if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3695, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_4 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      assert(__pyx_t_3);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
      __pyx_t_4 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_10};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3695, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 3695, __pyx_L1_error)

    /* "symengine/lib/symengine_wrapper.pyx":3694
 *     def cross(self, b):
 *         cdef DenseMatrixBase o = sympify(b)
 *         if self.cols * self.rows != 3 or o.cols * o.rows != 3:             # <<<<<<<<<<<<<<
 *             raise ShapeError("Dimensions incorrect for cross product: %s x %s" %
 *                              ((self.rows, self.cols), (b.rows, b.cols)))
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":3697
 *             raise ShapeError("Dimensions incorrect for cross product: %s x %s" %
 *                              ((self.rows, self.cols), (b.rows, b.cols)))
 *         cdef DenseMatrixBase result = self.__class__(self.rows, self.cols)             # <<<<<<<<<<<<<<
 *         symengine.cross(deref(symengine.static_cast_DenseMatrix(self.thisptr)), deref(symengine.static_cast_DenseMatrix(o.thisptr)), deref(symengine.static_cast_DenseMatrix(result.thisptr)))
 *         return result
*/
  __pyx_t_2 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_rows); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3697, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_cols); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3697, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_t_10, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_class, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3697, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase))))) __PYX_ERR(0, 3697, __pyx_L1_error)
  __pyx_v_result = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3698
 *                              ((self.rows, self.cols), (b.rows, b.cols)))
 *         cdef DenseMatrixBase result = self.__class__(self.rows, self.cols)
 *         symengine.cross(deref(symengine.static_cast_DenseMatrix(self.thisptr)), deref(symengine.static_cast_DenseMatrix(o.thisptr)), deref(symengine.static_cast_DenseMatrix(result.thisptr)))             # <<<<<<<<<<<<<<
 *         return result
 * 
*/
  SymEngine::cross((*static_cast<SymEngine::DenseMatrix*>(__pyx_v_self->__pyx_base.thisptr)), (*static_cast<SymEngine::DenseMatrix*>(__pyx_v_o->__pyx_base.thisptr)), (*static_cast<SymEngine::DenseMatrix*>(__pyx_v_result->__pyx_base.thisptr)));

  /* "symengine/lib/symengine_wrapper.pyx":3699
 *         cdef DenseMatrixBase result = self.__class__(self.rows, self.cols)
 *         symengine.cross(deref(symengine.static_cast_DenseMatrix(self.thisptr)), deref(symengine.static_cast_DenseMatrix(o.thisptr)), deref(symengine.static_cast_DenseMatrix(result.thisptr)))
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_result);
  __pyx_r = ((PyObject *)__pyx_v_result);
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3692
 *             return result
 * 
 *     def cross(self, b):             # <<<<<<<<<<<<<<
 *         cdef DenseMatrixBase o = sympify(b)
 *         if self.cols * self.rows != 3 or o.cols * o.rows != 3:
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.cross", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_o);
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3701
 *         return result
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def rows(self):
 *         return self.nrows()
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_4rows_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_4rows_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_4rows___get__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_4rows___get__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3703
 *     @property
 *     def rows(self):
 *         return self.nrows()             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_nrows, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3703, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3701
 *         return result
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def rows(self):
 *         return self.nrows()
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.rows.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3705
 *         return self.nrows()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def cols(self):
 *         return self.ncols()
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_4cols_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_4cols_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_4cols___get__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_4cols___get__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3707
 *     @property
 *     def cols(self):
 *         return self.ncols()             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_ncols, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3707, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3705
 *         return self.nrows()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def cols(self):
 *         return self.ncols()
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.cols.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3709
 *         return self.ncols()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_square(self):
 *         return deref(self.thisptr).is_square()
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_9is_square_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_9is_square_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_9is_square___get__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_9is_square___get__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3711
 *     @property
 *     def is_square(self):
 *         return deref(self.thisptr).is_square()             # <<<<<<<<<<<<<<
 * 
 *     def nrows(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong((*__pyx_v_self->__pyx_base.thisptr).is_square()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3711, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3709
 *         return self.ncols()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_square(self):
 *         return deref(self.thisptr).is_square()
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.is_square.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3713
 *         return deref(self.thisptr).is_square()
 * 
 *     def nrows(self):             # <<<<<<<<<<<<<<
 *         return deref(self.thisptr).nrows()
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_49nrows(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_49nrows = {"nrows", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_49nrows, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_49nrows(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("nrows (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("nrows", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("nrows", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_48nrows(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_48nrows(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("nrows", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3714
 * 
 *     def nrows(self):
 *         return deref(self.thisptr).nrows()             # <<<<<<<<<<<<<<
 * 
 *     def ncols(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_int((*__pyx_v_self->__pyx_base.thisptr).nrows()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3714, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3713
 *         return deref(self.thisptr).is_square()
 * 
 *     def nrows(self):             # <<<<<<<<<<<<<<
 *         return deref(self.thisptr).nrows()
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.nrows", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3716
 *         return deref(self.thisptr).nrows()
 * 
 *     def ncols(self):             # <<<<<<<<<<<<<<
 *         return deref(self.thisptr).ncols()
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_51ncols(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_51ncols = {"ncols", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_51ncols, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_51ncols(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ncols (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("ncols", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("ncols", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_50ncols(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_50ncols(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("ncols", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3717
 * 
 *     def ncols(self):
 *         return deref(self.thisptr).ncols()             # <<<<<<<<<<<<<<
 * 
 *     def __len__(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_int((*__pyx_v_self->__pyx_base.thisptr).ncols()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3717, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3716
 *         return deref(self.thisptr).nrows()
 * 
 *     def ncols(self):             # <<<<<<<<<<<<<<
 *         return deref(self.thisptr).ncols()
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.ncols", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3719
 *         return deref(self.thisptr).ncols()
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self.nrows() * self.ncols()
 * 
*/

/* Python wrapper */
static Py_ssize_t __pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_53__len__(PyObject *__pyx_v_self); /*proto*/
static Py_ssize_t __pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_53__len__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_52__len__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_self));

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

static Py_ssize_t __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_52__len__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self) {
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__len__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3720
 * 
 *     def __len__(self):
 *         return self.nrows() * self.ncols()             # <<<<<<<<<<<<<<
 * 
 *     property shape:
*/
  __pyx_t_2 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_nrows, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3720, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_t_4 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_3 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_ncols, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3720, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  __pyx_t_4 = PyNumber_Multiply(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3720, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_4); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3720, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_5;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3719
 *         return deref(self.thisptr).ncols()
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self.nrows() * self.ncols()
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3723
 * 
 *     property shape:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return (self.nrows(), self.ncols())
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_5shape_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_5shape_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_5shape___get__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_5shape___get__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3724
 *     property shape:
 *         def __get__(self):
 *             return (self.nrows(), self.ncols())             # <<<<<<<<<<<<<<
 * 
 *     property size:
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_nrows, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3724, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_t_4 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_3 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_ncols, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3724, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3724, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 3724, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2) != (0)) __PYX_ERR(0, 3724, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3723
 * 
 *     property shape:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return (self.nrows(), self.ncols())
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.shape.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3727
 * 
 *     property size:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.nrows()*self.ncols()
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_4size_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_4size_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_4size___get__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_4size___get__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3728
 *     property size:
 *         def __get__(self):
 *             return self.nrows()*self.ncols()             # <<<<<<<<<<<<<<
 * 
 *     def ravel(self, order='C'):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_nrows, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3728, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_t_4 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_3 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_ncols, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3728, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  __pyx_t_4 = PyNumber_Multiply(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3728, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3727
 * 
 *     property size:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.nrows()*self.ncols()
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.size.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3730
 *             return self.nrows()*self.ncols()
 * 
 *     def ravel(self, order='C'):             # <<<<<<<<<<<<<<
 *         if order == 'C':
 *             return [self._get(i, j) for i in range(self.nrows())
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_55ravel(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_55ravel = {"ravel", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_55ravel, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_55ravel(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_order = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ravel (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_order,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 3730, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3730, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "ravel", 0) < (0)) __PYX_ERR(0, 3730, __pyx_L3_error)
      if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_n_u_C));
    } else {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3730, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_n_u_C));
    }
    __pyx_v_order = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("ravel", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 3730, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.ravel", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_54ravel(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_self), __pyx_v_order);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_54ravel(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self, PyObject *__pyx_v_order) {
  PyObject *__pyx_9genexpr12__pyx_v_i = NULL;
  PyObject *__pyx_9genexpr12__pyx_v_j = NULL;
  PyObject *__pyx_9genexpr13__pyx_v_j = NULL;
  PyObject *__pyx_9genexpr13__pyx_v_i = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  size_t __pyx_t_7;
  PyObject *(*__pyx_t_8)(PyObject *);
  PyObject *__pyx_t_9 = NULL;
  PyObject *(*__pyx_t_10)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("ravel", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3731
 * 
 *     def ravel(self, order='C'):
 *         if order == 'C':             # <<<<<<<<<<<<<<
 *             return [self._get(i, j) for i in range(self.nrows())
 *                     for j in range(self.ncols())]
*/
  __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_order, __pyx_mstate_global->__pyx_n_u_C, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 3731, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":3732
 *     def ravel(self, order='C'):
 *         if order == 'C':
 *             return [self._get(i, j) for i in range(self.nrows())             # <<<<<<<<<<<<<<
 *                     for j in range(self.ncols())]
 *         elif order == 'F':
*/
    __Pyx_XDECREF(__pyx_r);
    { /* enter inner scope */
      __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3732, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = NULL;
      __pyx_t_6 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
        __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_nrows, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3732, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_5);
      }
      __pyx_t_7 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_5};
        __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(&PyRange_Type), __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3732, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __pyx_t_5 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3732, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_8 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3732, __pyx_L6_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      for (;;) {
        {
          __pyx_t_3 = __pyx_t_8(__pyx_t_5);
          if (unlikely(!__pyx_t_3)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 3732, __pyx_L6_error)
              PyErr_Clear();
            }
            break;
          }
        }
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_XDECREF_SET(__pyx_9genexpr12__pyx_v_i, __pyx_t_3);
        __pyx_t_3 = 0;

        /* "symengine/lib/symengine_wrapper.pyx":3733
 *         if order == 'C':
 *             return [self._get(i, j) for i in range(self.nrows())
 *                     for j in range(self.ncols())]             # <<<<<<<<<<<<<<
 *         elif order == 'F':
 *             return [self._get(i, j) for j in range(self.ncols())
*/
        __pyx_t_4 = NULL;
        __pyx_t_9 = ((PyObject *)__pyx_v_self);
        __Pyx_INCREF(__pyx_t_9);
        __pyx_t_7 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL};
          __pyx_t_6 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_ncols, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3733, __pyx_L6_error)
          __Pyx_GOTREF(__pyx_t_6);
        }
        __pyx_t_7 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_6};
          __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(&PyRange_Type), __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3733, __pyx_L6_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3733, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_10 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3733, __pyx_L6_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        for (;;) {
          {
            __pyx_t_3 = __pyx_t_10(__pyx_t_6);
            if (unlikely(!__pyx_t_3)) {
              PyObject* exc_type = PyErr_Occurred();
              if (exc_type) {
                if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 3733, __pyx_L6_error)
                PyErr_Clear();
              }
              break;
            }
          }
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_XDECREF_SET(__pyx_9genexpr12__pyx_v_j, __pyx_t_3);
          __pyx_t_3 = 0;

          /* "symengine/lib/symengine_wrapper.pyx":3732
 *     def ravel(self, order='C'):
 *         if order == 'C':
 *             return [self._get(i, j) for i in range(self.nrows())             # <<<<<<<<<<<<<<
 *                     for j in range(self.ncols())]
 *         elif order == 'F':
*/
          __pyx_t_4 = ((PyObject *)__pyx_v_self);
          __Pyx_INCREF(__pyx_t_4);
          __pyx_t_7 = 0;
          {
            PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_9genexpr12__pyx_v_i, __pyx_9genexpr12__pyx_v_j};
            __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_2, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
            if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3732, __pyx_L6_error)
            __Pyx_GOTREF(__pyx_t_3);
          }
          if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 3732, __pyx_L6_error)
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

          /* "symengine/lib/symengine_wrapper.pyx":3733
 *         if order == 'C':
 *             return [self._get(i, j) for i in range(self.nrows())
 *                     for j in range(self.ncols())]             # <<<<<<<<<<<<<<
 *         elif order == 'F':
 *             return [self._get(i, j) for j in range(self.ncols())
*/
        }
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

        /* "symengine/lib/symengine_wrapper.pyx":3732
 *     def ravel(self, order='C'):
 *         if order == 'C':
 *             return [self._get(i, j) for i in range(self.nrows())             # <<<<<<<<<<<<<<
 *                     for j in range(self.ncols())]
 *         elif order == 'F':
*/
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_9genexpr12__pyx_v_i); __pyx_9genexpr12__pyx_v_i = 0;
      __Pyx_XDECREF(__pyx_9genexpr12__pyx_v_j); __pyx_9genexpr12__pyx_v_j = 0;
      goto __pyx_L13_exit_scope;
      __pyx_L6_error:;
      __Pyx_XDECREF(__pyx_9genexpr12__pyx_v_i); __pyx_9genexpr12__pyx_v_i = 0;
      __Pyx_XDECREF(__pyx_9genexpr12__pyx_v_j); __pyx_9genexpr12__pyx_v_j = 0;
      goto __pyx_L1_error;
      __pyx_L13_exit_scope:;
    } /* exit inner scope */
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":3731
 * 
 *     def ravel(self, order='C'):
 *         if order == 'C':             # <<<<<<<<<<<<<<
 *             return [self._get(i, j) for i in range(self.nrows())
 *                     for j in range(self.ncols())]
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":3734
 *             return [self._get(i, j) for i in range(self.nrows())
 *                     for j in range(self.ncols())]
 *         elif order == 'F':             # <<<<<<<<<<<<<<
 *             return [self._get(i, j) for j in range(self.ncols())
 *                     for i in range(self.nrows())]
*/
  __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_order, __pyx_mstate_global->__pyx_n_u_F, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 3734, __pyx_L1_error)
  if (likely(__pyx_t_1)) {

    /* "symengine/lib/symengine_wrapper.pyx":3735
 *                     for j in range(self.ncols())]
 *         elif order == 'F':
 *             return [self._get(i, j) for j in range(self.ncols())             # <<<<<<<<<<<<<<
 *                     for i in range(self.nrows())]
 *         else:
*/
    __Pyx_XDECREF(__pyx_r);
    { /* enter inner scope */
      __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3735, __pyx_L16_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_6 = NULL;
      __pyx_t_4 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_4);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_ncols, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3735, __pyx_L16_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __pyx_t_7 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_3};
        __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)(&PyRange_Type), __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3735, __pyx_L16_error)
        __Pyx_GOTREF(__pyx_t_5);
      }
      __pyx_t_3 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3735, __pyx_L16_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_8 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3735, __pyx_L16_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      for (;;) {
        {
          __pyx_t_5 = __pyx_t_8(__pyx_t_3);
          if (unlikely(!__pyx_t_5)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 3735, __pyx_L16_error)
              PyErr_Clear();
            }
            break;
          }
        }
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_XDECREF_SET(__pyx_9genexpr13__pyx_v_j, __pyx_t_5);
        __pyx_t_5 = 0;

        /* "symengine/lib/symengine_wrapper.pyx":3736
 *         elif order == 'F':
 *             return [self._get(i, j) for j in range(self.ncols())
 *                     for i in range(self.nrows())]             # <<<<<<<<<<<<<<
 *         else:
 *             raise NotImplementedError("Unknown order '%s'" % order)
*/
        __pyx_t_6 = NULL;
        __pyx_t_9 = ((PyObject *)__pyx_v_self);
        __Pyx_INCREF(__pyx_t_9);
        __pyx_t_7 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL};
          __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_nrows, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3736, __pyx_L16_error)
          __Pyx_GOTREF(__pyx_t_4);
        }
        __pyx_t_7 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_4};
          __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)(&PyRange_Type), __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3736, __pyx_L16_error)
          __Pyx_GOTREF(__pyx_t_5);
        }
        __pyx_t_4 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3736, __pyx_L16_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_10 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3736, __pyx_L16_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        for (;;) {
          {
            __pyx_t_5 = __pyx_t_10(__pyx_t_4);
            if (unlikely(!__pyx_t_5)) {
              PyObject* exc_type = PyErr_Occurred();
              if (exc_type) {
                if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 3736, __pyx_L16_error)
                PyErr_Clear();
              }
              break;
            }
          }
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_XDECREF_SET(__pyx_9genexpr13__pyx_v_i, __pyx_t_5);
          __pyx_t_5 = 0;

          /* "symengine/lib/symengine_wrapper.pyx":3735
 *                     for j in range(self.ncols())]
 *         elif order == 'F':
 *             return [self._get(i, j) for j in range(self.ncols())             # <<<<<<<<<<<<<<
 *                     for i in range(self.nrows())]
 *         else:
*/
          __pyx_t_6 = ((PyObject *)__pyx_v_self);
          __Pyx_INCREF(__pyx_t_6);
          __pyx_t_7 = 0;
          {
            PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_9genexpr13__pyx_v_i, __pyx_9genexpr13__pyx_v_j};
            __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_2, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
            if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3735, __pyx_L16_error)
            __Pyx_GOTREF(__pyx_t_5);
          }
          if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 3735, __pyx_L16_error)
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

          /* "symengine/lib/symengine_wrapper.pyx":3736
 *         elif order == 'F':
 *             return [self._get(i, j) for j in range(self.ncols())
 *                     for i in range(self.nrows())]             # <<<<<<<<<<<<<<
 *         else:
 *             raise NotImplementedError("Unknown order '%s'" % order)
*/
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

        /* "symengine/lib/symengine_wrapper.pyx":3735
 *                     for j in range(self.ncols())]
 *         elif order == 'F':
 *             return [self._get(i, j) for j in range(self.ncols())             # <<<<<<<<<<<<<<
 *                     for i in range(self.nrows())]
 *         else:
*/
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_9genexpr13__pyx_v_i); __pyx_9genexpr13__pyx_v_i = 0;
      __Pyx_XDECREF(__pyx_9genexpr13__pyx_v_j); __pyx_9genexpr13__pyx_v_j = 0;
      goto __pyx_L23_exit_scope;
      __pyx_L16_error:;
      __Pyx_XDECREF(__pyx_9genexpr13__pyx_v_i); __pyx_9genexpr13__pyx_v_i = 0;
      __Pyx_XDECREF(__pyx_9genexpr13__pyx_v_j); __pyx_9genexpr13__pyx_v_j = 0;
      goto __pyx_L1_error;
      __pyx_L23_exit_scope:;
    } /* exit inner scope */
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":3734
 *             return [self._get(i, j) for i in range(self.nrows())
 *                     for j in range(self.ncols())]
 *         elif order == 'F':             # <<<<<<<<<<<<<<
 *             return [self._get(i, j) for j in range(self.ncols())
 *                     for i in range(self.nrows())]
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":3738
 *                     for i in range(self.nrows())]
 *         else:
 *             raise NotImplementedError("Unknown order '%s'" % order)             # <<<<<<<<<<<<<<
 * 
 *     def reshape(self, rows, cols):
*/
  /*else*/ {
    __pyx_t_3 = NULL;
    __pyx_t_4 = __Pyx_PyUnicode_FormatSafe(__pyx_mstate_global->__pyx_kp_u_Unknown_order_s, __pyx_v_order); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3738, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_NotImplementedError)), __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3738, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 3738, __pyx_L1_error)
  }

  /* "symengine/lib/symengine_wrapper.pyx":3730
 *             return self.nrows()*self.ncols()
 * 
 *     def ravel(self, order='C'):             # <<<<<<<<<<<<<<
 *         if order == 'C':
 *             return [self._get(i, j) for i in range(self.nrows())
*/

  /* 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_9);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.ravel", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_9genexpr12__pyx_v_i);
  __Pyx_XDECREF(__pyx_9genexpr12__pyx_v_j);
  __Pyx_XDECREF(__pyx_9genexpr13__pyx_v_j);
  __Pyx_XDECREF(__pyx_9genexpr13__pyx_v_i);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3740
 *             raise NotImplementedError("Unknown order '%s'" % order)
 * 
 *     def reshape(self, rows, cols):             # <<<<<<<<<<<<<<
 *         if len(self) != rows*cols:
 *             raise ValueError("Invalid reshape parameters %d %d" % (rows, cols))
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_57reshape(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_57reshape = {"reshape", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_57reshape, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_57reshape(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_rows = 0;
  PyObject *__pyx_v_cols = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("reshape (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_rows,&__pyx_mstate_global->__pyx_n_u_cols,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 3740, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3740, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3740, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "reshape", 0) < (0)) __PYX_ERR(0, 3740, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("reshape", 1, 2, 2, i); __PYX_ERR(0, 3740, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3740, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3740, __pyx_L3_error)
    }
    __pyx_v_rows = values[0];
    __pyx_v_cols = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("reshape", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 3740, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.reshape", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_56reshape(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_self), __pyx_v_rows, __pyx_v_cols);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_56reshape(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self, PyObject *__pyx_v_rows, PyObject *__pyx_v_cols) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_r = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7[4];
  PyObject *__pyx_t_8 = NULL;
  size_t __pyx_t_9;
  unsigned int __pyx_t_10;
  unsigned int __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("reshape", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3741
 * 
 *     def reshape(self, rows, cols):
 *         if len(self) != rows*cols:             # <<<<<<<<<<<<<<
 *             raise ValueError("Invalid reshape parameters %d %d" % (rows, cols))
 *         cdef DenseMatrixBase r = self.__class__(self)
*/
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_self)); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3741, __pyx_L1_error)
  __pyx_t_2 = PyLong_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3741, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_Multiply(__pyx_v_rows, __pyx_v_cols); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3741, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3741, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 3741, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(__pyx_t_5)) {

    /* "symengine/lib/symengine_wrapper.pyx":3742
 *     def reshape(self, rows, cols):
 *         if len(self) != rows*cols:
 *             raise ValueError("Invalid reshape parameters %d %d" % (rows, cols))             # <<<<<<<<<<<<<<
 *         cdef DenseMatrixBase r = self.__class__(self)
 *         deref(symengine.static_cast_DenseMatrix(r.thisptr)).resize(rows, cols)
*/
    __pyx_t_3 = NULL;
    __pyx_t_2 = __Pyx_PyObject_FormatAndDecref(__Pyx_PyNumber_Long(__pyx_v_rows), __pyx_mstate_global->__pyx_n_u_d); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3742, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = __Pyx_PyObject_FormatAndDecref(__Pyx_PyNumber_Long(__pyx_v_cols), __pyx_mstate_global->__pyx_n_u_d); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3742, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7[0] = __pyx_mstate_global->__pyx_kp_u_Invalid_reshape_parameters;
    __pyx_t_7[1] = __pyx_t_2;
    __pyx_t_7[2] = __pyx_mstate_global->__pyx_kp_u__12;
    __pyx_t_7[3] = __pyx_t_6;
    __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_7, 4, 27 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + 1 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6));
    if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3742, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_9 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_8};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3742, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(0, 3742, __pyx_L1_error)

    /* "symengine/lib/symengine_wrapper.pyx":3741
 * 
 *     def reshape(self, rows, cols):
 *         if len(self) != rows*cols:             # <<<<<<<<<<<<<<
 *             raise ValueError("Invalid reshape parameters %d %d" % (rows, cols))
 *         cdef DenseMatrixBase r = self.__class__(self)
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":3743
 *         if len(self) != rows*cols:
 *             raise ValueError("Invalid reshape parameters %d %d" % (rows, cols))
 *         cdef DenseMatrixBase r = self.__class__(self)             # <<<<<<<<<<<<<<
 *         deref(symengine.static_cast_DenseMatrix(r.thisptr)).resize(rows, cols)
 *         return r
*/
  __pyx_t_8 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_8);
  __pyx_t_9 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_8, ((PyObject *)__pyx_v_self)};
    __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_class, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3743, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase))))) __PYX_ERR(0, 3743, __pyx_L1_error)
  __pyx_v_r = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3744
 *             raise ValueError("Invalid reshape parameters %d %d" % (rows, cols))
 *         cdef DenseMatrixBase r = self.__class__(self)
 *         deref(symengine.static_cast_DenseMatrix(r.thisptr)).resize(rows, cols)             # <<<<<<<<<<<<<<
 *         return r
 * 
*/
  __pyx_t_10 = __Pyx_PyLong_As_unsigned_int(__pyx_v_rows); if (unlikely((__pyx_t_10 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3744, __pyx_L1_error)
  __pyx_t_11 = __Pyx_PyLong_As_unsigned_int(__pyx_v_cols); if (unlikely((__pyx_t_11 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3744, __pyx_L1_error)
  (*static_cast<SymEngine::DenseMatrix*>(__pyx_v_r->__pyx_base.thisptr)).resize(__pyx_t_10, __pyx_t_11);

  /* "symengine/lib/symengine_wrapper.pyx":3745
 *         cdef DenseMatrixBase r = self.__class__(self)
 *         deref(symengine.static_cast_DenseMatrix(r.thisptr)).resize(rows, cols)
 *         return r             # <<<<<<<<<<<<<<
 * 
 *     def _get_index(self, i, j):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_r);
  __pyx_r = ((PyObject *)__pyx_v_r);
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3740
 *             raise NotImplementedError("Unknown order '%s'" % order)
 * 
 *     def reshape(self, rows, cols):             # <<<<<<<<<<<<<<
 *         if len(self) != rows*cols:
 *             raise ValueError("Invalid reshape parameters %d %d" % (rows, cols))
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.reshape", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_r);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3747
 *         return r
 * 
 *     def _get_index(self, i, j):             # <<<<<<<<<<<<<<
 *         nr = self.nrows()
 *         nc = self.ncols()
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_59_get_index(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_59_get_index = {"_get_index", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_59_get_index, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_59_get_index(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_i = 0;
  PyObject *__pyx_v_j = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_get_index (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_i,&__pyx_mstate_global->__pyx_n_u_j,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 3747, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3747, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3747, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_get_index", 0) < (0)) __PYX_ERR(0, 3747, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_get_index", 1, 2, 2, i); __PYX_ERR(0, 3747, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3747, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3747, __pyx_L3_error)
    }
    __pyx_v_i = values[0];
    __pyx_v_j = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_get_index", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 3747, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase._get_index", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_58_get_index(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_self), __pyx_v_i, __pyx_v_j);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_58_get_index(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self, PyObject *__pyx_v_i, PyObject *__pyx_v_j) {
  PyObject *__pyx_v_nr = NULL;
  PyObject *__pyx_v_nc = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_get_index", 0);
  __Pyx_INCREF(__pyx_v_i);
  __Pyx_INCREF(__pyx_v_j);

  /* "symengine/lib/symengine_wrapper.pyx":3748
 * 
 *     def _get_index(self, i, j):
 *         nr = self.nrows()             # <<<<<<<<<<<<<<
 *         nc = self.ncols()
 *         if i < 0:
*/
  __pyx_t_2 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_nrows, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3748, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_nr = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3749
 *     def _get_index(self, i, j):
 *         nr = self.nrows()
 *         nc = self.ncols()             # <<<<<<<<<<<<<<
 *         if i < 0:
 *             i += nr
*/
  __pyx_t_2 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_ncols, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3749, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_nc = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3750
 *         nr = self.nrows()
 *         nc = self.ncols()
 *         if i < 0:             # <<<<<<<<<<<<<<
 *             i += nr
 *         if j < 0:
*/
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_i, __pyx_mstate_global->__pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3750, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 3750, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_4) {

    /* "symengine/lib/symengine_wrapper.pyx":3751
 *         nc = self.ncols()
 *         if i < 0:
 *             i += nr             # <<<<<<<<<<<<<<
 *         if j < 0:
 *             j += nc
*/
    __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_i, __pyx_v_nr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3751, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF_SET(__pyx_v_i, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":3750
 *         nr = self.nrows()
 *         nc = self.ncols()
 *         if i < 0:             # <<<<<<<<<<<<<<
 *             i += nr
 *         if j < 0:
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":3752
 *         if i < 0:
 *             i += nr
 *         if j < 0:             # <<<<<<<<<<<<<<
 *             j += nc
 *         if i < 0 or i >= nr:
*/
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_j, __pyx_mstate_global->__pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3752, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 3752, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_4) {

    /* "symengine/lib/symengine_wrapper.pyx":3753
 *             i += nr
 *         if j < 0:
 *             j += nc             # <<<<<<<<<<<<<<
 *         if i < 0 or i >= nr:
 *             raise IndexError("Row index out of bounds: %d" % i)
*/
    __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_j, __pyx_v_nc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3753, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF_SET(__pyx_v_j, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":3752
 *         if i < 0:
 *             i += nr
 *         if j < 0:             # <<<<<<<<<<<<<<
 *             j += nc
 *         if i < 0 or i >= nr:
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":3754
 *         if j < 0:
 *             j += nc
 *         if i < 0 or i >= nr:             # <<<<<<<<<<<<<<
 *             raise IndexError("Row index out of bounds: %d" % i)
 *         if j < 0 or j >= nc:
*/
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_i, __pyx_mstate_global->__pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3754, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 3754, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (!__pyx_t_5) {
  } else {
    __pyx_t_4 = __pyx_t_5;
    goto __pyx_L6_bool_binop_done;
  }
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_i, __pyx_v_nr, Py_GE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3754, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 3754, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4 = __pyx_t_5;
  __pyx_L6_bool_binop_done:;
  if (unlikely(__pyx_t_4)) {

    /* "symengine/lib/symengine_wrapper.pyx":3755
 *             j += nc
 *         if i < 0 or i >= nr:
 *             raise IndexError("Row index out of bounds: %d" % i)             # <<<<<<<<<<<<<<
 *         if j < 0 or j >= nc:
 *             raise IndexError("Column index out of bounds: %d" % j)
*/
    __pyx_t_2 = NULL;
    __pyx_t_6 = __Pyx_PyUnicode_FormatSafe(__pyx_mstate_global->__pyx_kp_u_Row_index_out_of_bounds_d, __pyx_v_i); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3755, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_3 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_6};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_IndexError)), __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3755, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 3755, __pyx_L1_error)

    /* "symengine/lib/symengine_wrapper.pyx":3754
 *         if j < 0:
 *             j += nc
 *         if i < 0 or i >= nr:             # <<<<<<<<<<<<<<
 *             raise IndexError("Row index out of bounds: %d" % i)
 *         if j < 0 or j >= nc:
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":3756
 *         if i < 0 or i >= nr:
 *             raise IndexError("Row index out of bounds: %d" % i)
 *         if j < 0 or j >= nc:             # <<<<<<<<<<<<<<
 *             raise IndexError("Column index out of bounds: %d" % j)
 *         return i, j
*/
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_j, __pyx_mstate_global->__pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3756, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 3756, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (!__pyx_t_5) {
  } else {
    __pyx_t_4 = __pyx_t_5;
    goto __pyx_L9_bool_binop_done;
  }
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_j, __pyx_v_nc, Py_GE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3756, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 3756, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4 = __pyx_t_5;
  __pyx_L9_bool_binop_done:;
  if (unlikely(__pyx_t_4)) {

    /* "symengine/lib/symengine_wrapper.pyx":3757
 *             raise IndexError("Row index out of bounds: %d" % i)
 *         if j < 0 or j >= nc:
 *             raise IndexError("Column index out of bounds: %d" % j)             # <<<<<<<<<<<<<<
 *         return i, j
 * 
*/
    __pyx_t_6 = NULL;
    __pyx_t_2 = __Pyx_PyUnicode_FormatSafe(__pyx_mstate_global->__pyx_kp_u_Column_index_out_of_bounds_d, __pyx_v_j); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3757, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_2};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_IndexError)), __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3757, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 3757, __pyx_L1_error)

    /* "symengine/lib/symengine_wrapper.pyx":3756
 *         if i < 0 or i >= nr:
 *             raise IndexError("Row index out of bounds: %d" % i)
 *         if j < 0 or j >= nc:             # <<<<<<<<<<<<<<
 *             raise IndexError("Column index out of bounds: %d" % j)
 *         return i, j
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":3758
 *         if j < 0 or j >= nc:
 *             raise IndexError("Column index out of bounds: %d" % j)
 *         return i, j             # <<<<<<<<<<<<<<
 * 
 *     def get(self, i, j):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3758, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_i);
  __Pyx_GIVEREF(__pyx_v_i);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_i) != (0)) __PYX_ERR(0, 3758, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_j);
  __Pyx_GIVEREF(__pyx_v_j);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_j) != (0)) __PYX_ERR(0, 3758, __pyx_L1_error);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3747
 *         return r
 * 
 *     def _get_index(self, i, j):             # <<<<<<<<<<<<<<
 *         nr = self.nrows()
 *         nc = self.ncols()
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase._get_index", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_nr);
  __Pyx_XDECREF(__pyx_v_nc);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_v_j);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3760
 *         return i, j
 * 
 *     def get(self, i, j):             # <<<<<<<<<<<<<<
 *         i, j = self._get_index(i, j)
 *         return self._get(i, j)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_61get(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_61get = {"get", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_61get, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_61get(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_i = 0;
  PyObject *__pyx_v_j = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_i,&__pyx_mstate_global->__pyx_n_u_j,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 3760, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3760, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3760, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "get", 0) < (0)) __PYX_ERR(0, 3760, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("get", 1, 2, 2, i); __PYX_ERR(0, 3760, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3760, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3760, __pyx_L3_error)
    }
    __pyx_v_i = values[0];
    __pyx_v_j = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("get", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 3760, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.get", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_60get(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_self), __pyx_v_i, __pyx_v_j);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_60get(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self, PyObject *__pyx_v_i, PyObject *__pyx_v_j) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *(*__pyx_t_6)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get", 0);
  __Pyx_INCREF(__pyx_v_i);
  __Pyx_INCREF(__pyx_v_j);

  /* "symengine/lib/symengine_wrapper.pyx":3761
 * 
 *     def get(self, i, j):
 *         i, j = self._get_index(i, j)             # <<<<<<<<<<<<<<
 *         return self._get(i, j)
 * 
*/
  __pyx_t_2 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = 0;
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_i, __pyx_v_j};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_index, __pyx_callargs+__pyx_t_3, (3-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3761, __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;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 3761, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1);
      __Pyx_INCREF(__pyx_t_4);
    } else {
      __pyx_t_2 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference);
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3761, __pyx_L1_error)
      __Pyx_XGOTREF(__pyx_t_2);
      __pyx_t_4 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference);
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3761, __pyx_L1_error)
      __Pyx_XGOTREF(__pyx_t_4);
    }
    #else
    __pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3761, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3761, __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(0, 3761, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_6 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_5);
    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_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), 2) < (0)) __PYX_ERR(0, 3761, __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(0, 3761, __pyx_L1_error)
    __pyx_L4_unpacking_done:;
  }
  __Pyx_DECREF_SET(__pyx_v_i, __pyx_t_2);
  __pyx_t_2 = 0;
  __Pyx_DECREF_SET(__pyx_v_j, __pyx_t_4);
  __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3762
 *     def get(self, i, j):
 *         i, j = self._get_index(i, j)
 *         return self._get(i, j)             # <<<<<<<<<<<<<<
 * 
 *     def _get(self, i, j):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_3 = 0;
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_v_i, __pyx_v_j};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_2, __pyx_callargs+__pyx_t_3, (3-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3762, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3760
 *         return i, j
 * 
 *     def get(self, i, j):             # <<<<<<<<<<<<<<
 *         i, j = self._get_index(i, j)
 *         return self._get(i, j)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.get", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_v_j);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3764
 *         return self._get(i, j)
 * 
 *     def _get(self, i, j):             # <<<<<<<<<<<<<<
 *         # No error checking is done
 *         return c2py(deref(self.thisptr).get(i, j))
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_63_get(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_63_get = {"_get", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_63_get, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_63_get(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_i = 0;
  PyObject *__pyx_v_j = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_get (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_i,&__pyx_mstate_global->__pyx_n_u_j,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 3764, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3764, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3764, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_get", 0) < (0)) __PYX_ERR(0, 3764, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_get", 1, 2, 2, i); __PYX_ERR(0, 3764, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3764, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3764, __pyx_L3_error)
    }
    __pyx_v_i = values[0];
    __pyx_v_j = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_get", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 3764, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase._get", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_62_get(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_self), __pyx_v_i, __pyx_v_j);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_62_get(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self, PyObject *__pyx_v_i, PyObject *__pyx_v_j) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  unsigned int __pyx_t_1;
  unsigned int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_get", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3766
 *     def _get(self, i, j):
 *         # No error checking is done
 *         return c2py(deref(self.thisptr).get(i, j))             # <<<<<<<<<<<<<<
 * 
 *     def col(self, j):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_As_unsigned_int(__pyx_v_i); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3766, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyLong_As_unsigned_int(__pyx_v_j); if (unlikely((__pyx_t_2 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3766, __pyx_L1_error)
  __pyx_t_3 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py((*__pyx_v_self->__pyx_base.thisptr).get(__pyx_t_1, __pyx_t_2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3766, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3764
 *         return self._get(i, j)
 * 
 *     def _get(self, i, j):             # <<<<<<<<<<<<<<
 *         # No error checking is done
 *         return c2py(deref(self.thisptr).get(i, j))
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase._get", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3768
 *         return c2py(deref(self.thisptr).get(i, j))
 * 
 *     def col(self, j):             # <<<<<<<<<<<<<<
 *         return self[:, j]
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_65col(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_65col = {"col", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_65col, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_65col(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_j = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("col (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_j,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 3768, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3768, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "col", 0) < (0)) __PYX_ERR(0, 3768, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("col", 1, 1, 1, i); __PYX_ERR(0, 3768, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3768, __pyx_L3_error)
    }
    __pyx_v_j = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("col", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3768, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.col", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_64col(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_self), __pyx_v_j);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_64col(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self, PyObject *__pyx_v_j) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("col", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3769
 * 
 *     def col(self, j):
 *         return self[:, j]             # <<<<<<<<<<<<<<
 * 
 *     def row(self, i):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3769, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_slice[0]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_slice[0]);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_mstate_global->__pyx_slice[0]) != (0)) __PYX_ERR(0, 3769, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_j);
  __Pyx_GIVEREF(__pyx_v_j);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_j) != (0)) __PYX_ERR(0, 3769, __pyx_L1_error);
  __pyx_t_2 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3769, __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;

  /* "symengine/lib/symengine_wrapper.pyx":3768
 *         return c2py(deref(self.thisptr).get(i, j))
 * 
 *     def col(self, j):             # <<<<<<<<<<<<<<
 *         return self[:, j]
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.col", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3771
 *         return self[:, j]
 * 
 *     def row(self, i):             # <<<<<<<<<<<<<<
 *         return self[i, :]
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_67row(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_67row = {"row", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_67row, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_67row(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_i = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("row (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_i,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 3771, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3771, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "row", 0) < (0)) __PYX_ERR(0, 3771, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("row", 1, 1, 1, i); __PYX_ERR(0, 3771, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3771, __pyx_L3_error)
    }
    __pyx_v_i = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("row", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3771, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.row", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_66row(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_self), __pyx_v_i);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_66row(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self, PyObject *__pyx_v_i) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("row", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3772
 * 
 *     def row(self, i):
 *         return self[i, :]             # <<<<<<<<<<<<<<
 * 
 *     def set(self, i, j, e):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3772, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_i);
  __Pyx_GIVEREF(__pyx_v_i);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_i) != (0)) __PYX_ERR(0, 3772, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_slice[0]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_slice[0]);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_slice[0]) != (0)) __PYX_ERR(0, 3772, __pyx_L1_error);
  __pyx_t_2 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3772, __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;

  /* "symengine/lib/symengine_wrapper.pyx":3771
 *         return self[:, j]
 * 
 *     def row(self, i):             # <<<<<<<<<<<<<<
 *         return self[i, :]
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.row", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3774
 *         return self[i, :]
 * 
 *     def set(self, i, j, e):             # <<<<<<<<<<<<<<
 *         i, j = self._get_index(i, j)
 *         return self._set(i, j, e)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_69set(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_69set = {"set", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_69set, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_69set(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_i = 0;
  PyObject *__pyx_v_j = 0;
  PyObject *__pyx_v_e = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_i,&__pyx_mstate_global->__pyx_n_u_j,&__pyx_mstate_global->__pyx_n_u_e,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 3774, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 3774, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3774, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3774, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "set", 0) < (0)) __PYX_ERR(0, 3774, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("set", 1, 3, 3, i); __PYX_ERR(0, 3774, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3774, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3774, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 3774, __pyx_L3_error)
    }
    __pyx_v_i = values[0];
    __pyx_v_j = values[1];
    __pyx_v_e = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 3774, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.set", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_68set(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_self), __pyx_v_i, __pyx_v_j, __pyx_v_e);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_68set(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self, PyObject *__pyx_v_i, PyObject *__pyx_v_j, PyObject *__pyx_v_e) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *(*__pyx_t_6)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set", 0);
  __Pyx_INCREF(__pyx_v_i);
  __Pyx_INCREF(__pyx_v_j);

  /* "symengine/lib/symengine_wrapper.pyx":3775
 * 
 *     def set(self, i, j, e):
 *         i, j = self._get_index(i, j)             # <<<<<<<<<<<<<<
 *         return self._set(i, j, e)
 * 
*/
  __pyx_t_2 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = 0;
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_i, __pyx_v_j};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_index, __pyx_callargs+__pyx_t_3, (3-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3775, __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;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 3775, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1);
      __Pyx_INCREF(__pyx_t_4);
    } else {
      __pyx_t_2 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference);
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3775, __pyx_L1_error)
      __Pyx_XGOTREF(__pyx_t_2);
      __pyx_t_4 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference);
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3775, __pyx_L1_error)
      __Pyx_XGOTREF(__pyx_t_4);
    }
    #else
    __pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3775, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3775, __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(0, 3775, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_6 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_5);
    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_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), 2) < (0)) __PYX_ERR(0, 3775, __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(0, 3775, __pyx_L1_error)
    __pyx_L4_unpacking_done:;
  }
  __Pyx_DECREF_SET(__pyx_v_i, __pyx_t_2);
  __pyx_t_2 = 0;
  __Pyx_DECREF_SET(__pyx_v_j, __pyx_t_4);
  __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3776
 *     def set(self, i, j, e):
 *         i, j = self._get_index(i, j)
 *         return self._set(i, j, e)             # <<<<<<<<<<<<<<
 * 
 *     def _set(self, i, j, e):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_3 = 0;
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_4, __pyx_v_i, __pyx_v_j, __pyx_v_e};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_set_2, __pyx_callargs+__pyx_t_3, (4-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3776, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3774
 *         return self[i, :]
 * 
 *     def set(self, i, j, e):             # <<<<<<<<<<<<<<
 *         i, j = self._get_index(i, j)
 *         return self._set(i, j, e)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.set", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_v_j);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3778
 *         return self._set(i, j, e)
 * 
 *     def _set(self, i, j, e):             # <<<<<<<<<<<<<<
 *         # No error checking is done
 *         cdef Basic e_ = sympify(e)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_71_set(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_71_set = {"_set", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_71_set, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_71_set(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_i = 0;
  PyObject *__pyx_v_j = 0;
  PyObject *__pyx_v_e = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_set (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_i,&__pyx_mstate_global->__pyx_n_u_j,&__pyx_mstate_global->__pyx_n_u_e,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 3778, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 3778, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3778, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3778, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_set", 0) < (0)) __PYX_ERR(0, 3778, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_set", 1, 3, 3, i); __PYX_ERR(0, 3778, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3778, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3778, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 3778, __pyx_L3_error)
    }
    __pyx_v_i = values[0];
    __pyx_v_j = values[1];
    __pyx_v_e = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_set", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 3778, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase._set", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_70_set(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_self), __pyx_v_i, __pyx_v_j, __pyx_v_e);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_70_set(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self, PyObject *__pyx_v_i, PyObject *__pyx_v_j, PyObject *__pyx_v_e) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_e_ = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_t_5;
  unsigned int __pyx_t_6;
  unsigned int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_set", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3780
 *     def _set(self, i, j, e):
 *         # No error checking is done
 *         cdef Basic e_ = sympify(e)             # <<<<<<<<<<<<<<
 *         if e_ is not None:
 *             deref(self.thisptr).set(i, j, e_.thisptr)
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3780, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_e};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3780, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 3780, __pyx_L1_error)
  __pyx_v_e_ = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3781
 *         # No error checking is done
 *         cdef Basic e_ = sympify(e)
 *         if e_ is not None:             # <<<<<<<<<<<<<<
 *             deref(self.thisptr).set(i, j, e_.thisptr)
 * 
*/
  __pyx_t_5 = (((PyObject *)__pyx_v_e_) != Py_None);
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":3782
 *         cdef Basic e_ = sympify(e)
 *         if e_ is not None:
 *             deref(self.thisptr).set(i, j, e_.thisptr)             # <<<<<<<<<<<<<<
 * 
 *     def det(self):
*/
    __pyx_t_6 = __Pyx_PyLong_As_unsigned_int(__pyx_v_i); if (unlikely((__pyx_t_6 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3782, __pyx_L1_error)
    __pyx_t_7 = __Pyx_PyLong_As_unsigned_int(__pyx_v_j); if (unlikely((__pyx_t_7 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3782, __pyx_L1_error)
    (void)((*__pyx_v_self->__pyx_base.thisptr).set(__pyx_t_6, __pyx_t_7, __pyx_v_e_->thisptr));

    /* "symengine/lib/symengine_wrapper.pyx":3781
 *         # No error checking is done
 *         cdef Basic e_ = sympify(e)
 *         if e_ is not None:             # <<<<<<<<<<<<<<
 *             deref(self.thisptr).set(i, j, e_.thisptr)
 * 
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":3778
 *         return self._set(i, j, e)
 * 
 *     def _set(self, i, j, e):             # <<<<<<<<<<<<<<
 *         # No error checking is done
 *         cdef Basic e_ = sympify(e)
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase._set", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_e_);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3784
 *             deref(self.thisptr).set(i, j, e_.thisptr)
 * 
 *     def det(self):             # <<<<<<<<<<<<<<
 *         if self.nrows() != self.ncols():
 *             raise NonSquareMatrixError()
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_73det(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_73det = {"det", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_73det, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_73det(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("det (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("det", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("det", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_72det(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_72det(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("det", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3785
 * 
 *     def det(self):
 *         if self.nrows() != self.ncols():             # <<<<<<<<<<<<<<
 *             raise NonSquareMatrixError()
 *         return c2py(deref(self.thisptr).det())
*/
  __pyx_t_2 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_nrows, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3785, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_t_4 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_3 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_ncols, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3785, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3785, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 3785, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(__pyx_t_5)) {

    /* "symengine/lib/symengine_wrapper.pyx":3786
 *     def det(self):
 *         if self.nrows() != self.ncols():
 *             raise NonSquareMatrixError()             # <<<<<<<<<<<<<<
 *         return c2py(deref(self.thisptr).det())
 * 
*/
    __pyx_t_2 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_NonSquareMatrixError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3786, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
      assert(__pyx_t_2);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_1, __pyx__function);
      __pyx_t_3 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_1, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3786, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(0, 3786, __pyx_L1_error)

    /* "symengine/lib/symengine_wrapper.pyx":3785
 * 
 *     def det(self):
 *         if self.nrows() != self.ncols():             # <<<<<<<<<<<<<<
 *             raise NonSquareMatrixError()
 *         return c2py(deref(self.thisptr).det())
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":3787
 *         if self.nrows() != self.ncols():
 *             raise NonSquareMatrixError()
 *         return c2py(deref(self.thisptr).det())             # <<<<<<<<<<<<<<
 * 
 *     def inv(self, method='LU'):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py((*__pyx_v_self->__pyx_base.thisptr).det()); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3787, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3784
 *             deref(self.thisptr).set(i, j, e_.thisptr)
 * 
 *     def det(self):             # <<<<<<<<<<<<<<
 *         if self.nrows() != self.ncols():
 *             raise NonSquareMatrixError()
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.det", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3789
 *         return c2py(deref(self.thisptr).det())
 * 
 *     def inv(self, method='LU'):             # <<<<<<<<<<<<<<
 *         cdef DenseMatrixBase result = self.__class__(self.nrows(), self.ncols())
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_75inv(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_75inv = {"inv", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_75inv, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_75inv(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_method = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("inv (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_method,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 3789, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3789, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "inv", 0) < (0)) __PYX_ERR(0, 3789, __pyx_L3_error)
      if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_n_u_LU));
    } else {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3789, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_n_u_LU));
    }
    __pyx_v_method = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("inv", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 3789, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.inv", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_74inv(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_self), __pyx_v_method);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_74inv(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self, PyObject *__pyx_v_method) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_result = 0;
  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;
  size_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("inv", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3790
 * 
 *     def inv(self, method='LU'):
 *         cdef DenseMatrixBase result = self.__class__(self.nrows(), self.ncols())             # <<<<<<<<<<<<<<
 * 
 *         if method.upper() == 'LU':
*/
  __pyx_t_2 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_4 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_nrows, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3790, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __pyx_t_6 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_6);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
    __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_ncols, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3790, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_t_3, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_class, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3790, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase))))) __PYX_ERR(0, 3790, __pyx_L1_error)
  __pyx_v_result = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3792
 *         cdef DenseMatrixBase result = self.__class__(self.nrows(), self.ncols())
 * 
 *         if method.upper() == 'LU':             # <<<<<<<<<<<<<<
 *             ## inv() method of DenseMatrixBase uses LU factorization
 *             deref(self.thisptr).inv(deref(result.thisptr))
*/
  __pyx_t_4 = __pyx_v_method;
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_upper, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3792, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_LU, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 3792, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_7) {

    /* "symengine/lib/symengine_wrapper.pyx":3794
 *         if method.upper() == 'LU':
 *             ## inv() method of DenseMatrixBase uses LU factorization
 *             deref(self.thisptr).inv(deref(result.thisptr))             # <<<<<<<<<<<<<<
 *         elif method.upper() == 'FFLU':
 *             symengine.inverse_FFLU(deref(symengine.static_cast_DenseMatrix(self.thisptr)),
*/
    (*__pyx_v_self->__pyx_base.thisptr).inv((*__pyx_v_result->__pyx_base.thisptr));

    /* "symengine/lib/symengine_wrapper.pyx":3792
 *         cdef DenseMatrixBase result = self.__class__(self.nrows(), self.ncols())
 * 
 *         if method.upper() == 'LU':             # <<<<<<<<<<<<<<
 *             ## inv() method of DenseMatrixBase uses LU factorization
 *             deref(self.thisptr).inv(deref(result.thisptr))
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":3795
 *             ## inv() method of DenseMatrixBase uses LU factorization
 *             deref(self.thisptr).inv(deref(result.thisptr))
 *         elif method.upper() == 'FFLU':             # <<<<<<<<<<<<<<
 *             symengine.inverse_FFLU(deref(symengine.static_cast_DenseMatrix(self.thisptr)),
 *                 deref(symengine.static_cast_DenseMatrix(result.thisptr)))
*/
  __pyx_t_4 = __pyx_v_method;
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_upper, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3795, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_FFLU, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 3795, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_7) {

    /* "symengine/lib/symengine_wrapper.pyx":3796
 *             deref(self.thisptr).inv(deref(result.thisptr))
 *         elif method.upper() == 'FFLU':
 *             symengine.inverse_FFLU(deref(symengine.static_cast_DenseMatrix(self.thisptr)),             # <<<<<<<<<<<<<<
 *                 deref(symengine.static_cast_DenseMatrix(result.thisptr)))
 *         elif method.upper() == 'GJ':
*/
    try {
      SymEngine::inverse_fraction_free_LU((*static_cast<SymEngine::DenseMatrix*>(__pyx_v_self->__pyx_base.thisptr)), (*static_cast<SymEngine::DenseMatrix*>(__pyx_v_result->__pyx_base.thisptr)));
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(0, 3796, __pyx_L1_error)
    }

    /* "symengine/lib/symengine_wrapper.pyx":3795
 *             ## inv() method of DenseMatrixBase uses LU factorization
 *             deref(self.thisptr).inv(deref(result.thisptr))
 *         elif method.upper() == 'FFLU':             # <<<<<<<<<<<<<<
 *             symengine.inverse_FFLU(deref(symengine.static_cast_DenseMatrix(self.thisptr)),
 *                 deref(symengine.static_cast_DenseMatrix(result.thisptr)))
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":3798
 *             symengine.inverse_FFLU(deref(symengine.static_cast_DenseMatrix(self.thisptr)),
 *                 deref(symengine.static_cast_DenseMatrix(result.thisptr)))
 *         elif method.upper() == 'GJ':             # <<<<<<<<<<<<<<
 *             symengine.inverse_GJ(deref(symengine.static_cast_DenseMatrix(self.thisptr)),
 *                 deref(symengine.static_cast_DenseMatrix(result.thisptr)))
*/
  __pyx_t_4 = __pyx_v_method;
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_upper, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3798, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_GJ, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 3798, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (likely(__pyx_t_7)) {

    /* "symengine/lib/symengine_wrapper.pyx":3799
 *                 deref(symengine.static_cast_DenseMatrix(result.thisptr)))
 *         elif method.upper() == 'GJ':
 *             symengine.inverse_GJ(deref(symengine.static_cast_DenseMatrix(self.thisptr)),             # <<<<<<<<<<<<<<
 *                 deref(symengine.static_cast_DenseMatrix(result.thisptr)))
 *         else:
*/
    try {
      SymEngine::inverse_gauss_jordan((*static_cast<SymEngine::DenseMatrix*>(__pyx_v_self->__pyx_base.thisptr)), (*static_cast<SymEngine::DenseMatrix*>(__pyx_v_result->__pyx_base.thisptr)));
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(0, 3799, __pyx_L1_error)
    }

    /* "symengine/lib/symengine_wrapper.pyx":3798
 *             symengine.inverse_FFLU(deref(symengine.static_cast_DenseMatrix(self.thisptr)),
 *                 deref(symengine.static_cast_DenseMatrix(result.thisptr)))
 *         elif method.upper() == 'GJ':             # <<<<<<<<<<<<<<
 *             symengine.inverse_GJ(deref(symengine.static_cast_DenseMatrix(self.thisptr)),
 *                 deref(symengine.static_cast_DenseMatrix(result.thisptr)))
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":3802
 *                 deref(symengine.static_cast_DenseMatrix(result.thisptr)))
 *         else:
 *             raise Exception("Unsupported method.")             # <<<<<<<<<<<<<<
 *         return result
 * 
*/
  /*else*/ {
    __pyx_t_4 = NULL;
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Unsupported_method};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_Exception)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3802, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 3802, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "symengine/lib/symengine_wrapper.pyx":3803
 *         else:
 *             raise Exception("Unsupported method.")
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     def add_matrix(self, A):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_result);
  __pyx_r = ((PyObject *)__pyx_v_result);
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3789
 *         return c2py(deref(self.thisptr).det())
 * 
 *     def inv(self, method='LU'):             # <<<<<<<<<<<<<<
 *         cdef DenseMatrixBase result = self.__class__(self.nrows(), self.ncols())
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.inv", __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;
}

/* "symengine/lib/symengine_wrapper.pyx":3805
 *         return result
 * 
 *     def add_matrix(self, A):             # <<<<<<<<<<<<<<
 *         cdef MatrixBase A_ = sympify(A)
 *         if isinstance(A, ImmutableDenseMatrix):
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_77add_matrix(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_77add_matrix = {"add_matrix", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_77add_matrix, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_77add_matrix(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_A = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("add_matrix (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_A,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 3805, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3805, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "add_matrix", 0) < (0)) __PYX_ERR(0, 3805, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("add_matrix", 1, 1, 1, i); __PYX_ERR(0, 3805, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3805, __pyx_L3_error)
    }
    __pyx_v_A = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("add_matrix", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3805, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.add_matrix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_76add_matrix(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_self), __pyx_v_A);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_76add_matrix(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self, PyObject *__pyx_v_A) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_MatrixBase *__pyx_v_A_ = 0;
  PyObject *__pyx_v_cls = NULL;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("add_matrix", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3806
 * 
 *     def add_matrix(self, A):
 *         cdef MatrixBase A_ = sympify(A)             # <<<<<<<<<<<<<<
 *         if isinstance(A, ImmutableDenseMatrix):
 *             cls = A.__class__
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3806, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_A};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3806, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_MatrixBase))))) __PYX_ERR(0, 3806, __pyx_L1_error)
  __pyx_v_A_ = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_MatrixBase *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3807
 *     def add_matrix(self, A):
 *         cdef MatrixBase A_ = sympify(A)
 *         if isinstance(A, ImmutableDenseMatrix):             # <<<<<<<<<<<<<<
 *             cls = A.__class__
 *         else:
*/
  __pyx_t_5 = __Pyx_TypeCheck(__pyx_v_A, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ImmutableDenseMatrix); 
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":3808
 *         cdef MatrixBase A_ = sympify(A)
 *         if isinstance(A, ImmutableDenseMatrix):
 *             cls = A.__class__             # <<<<<<<<<<<<<<
 *         else:
 *             cls = self.__class__
*/
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_A, __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3808, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_cls = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":3807
 *     def add_matrix(self, A):
 *         cdef MatrixBase A_ = sympify(A)
 *         if isinstance(A, ImmutableDenseMatrix):             # <<<<<<<<<<<<<<
 *             cls = A.__class__
 *         else:
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":3810
 *             cls = A.__class__
 *         else:
 *             cls = self.__class__             # <<<<<<<<<<<<<<
 *         cdef DenseMatrixBase result = cls(self.nrows(), self.ncols())
 *         deref(self.thisptr).add_matrix(deref(A_.thisptr), deref(result.thisptr))
*/
  /*else*/ {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3810, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_cls = __pyx_t_1;
    __pyx_t_1 = 0;
  }
  __pyx_L3:;

  /* "symengine/lib/symengine_wrapper.pyx":3811
 *         else:
 *             cls = self.__class__
 *         cdef DenseMatrixBase result = cls(self.nrows(), self.ncols())             # <<<<<<<<<<<<<<
 *         deref(self.thisptr).add_matrix(deref(A_.thisptr), deref(result.thisptr))
 *         return result
*/
  __pyx_t_3 = NULL;
  __Pyx_INCREF(__pyx_v_cls);
  __pyx_t_2 = __pyx_v_cls; 
  __pyx_t_7 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_7);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL};
    __pyx_t_6 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_nrows, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3811, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
  }
  __pyx_t_8 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_8);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL};
    __pyx_t_7 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_ncols, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3811, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
  }
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_t_6, __pyx_t_7};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3811, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase))))) __PYX_ERR(0, 3811, __pyx_L1_error)
  __pyx_v_result = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3812
 *             cls = self.__class__
 *         cdef DenseMatrixBase result = cls(self.nrows(), self.ncols())
 *         deref(self.thisptr).add_matrix(deref(A_.thisptr), deref(result.thisptr))             # <<<<<<<<<<<<<<
 *         return result
 * 
*/
  (*__pyx_v_self->__pyx_base.thisptr).add_matrix((*__pyx_v_A_->thisptr), (*__pyx_v_result->__pyx_base.thisptr));

  /* "symengine/lib/symengine_wrapper.pyx":3813
 *         cdef DenseMatrixBase result = cls(self.nrows(), self.ncols())
 *         deref(self.thisptr).add_matrix(deref(A_.thisptr), deref(result.thisptr))
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     def mul_matrix(self, A):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_result);
  __pyx_r = ((PyObject *)__pyx_v_result);
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3805
 *         return result
 * 
 *     def add_matrix(self, A):             # <<<<<<<<<<<<<<
 *         cdef MatrixBase A_ = sympify(A)
 *         if isinstance(A, ImmutableDenseMatrix):
*/

  /* 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_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.add_matrix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_A_);
  __Pyx_XDECREF(__pyx_v_cls);
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3815
 *         return result
 * 
 *     def mul_matrix(self, A):             # <<<<<<<<<<<<<<
 *         cdef MatrixBase A_ = sympify(A)
 *         if isinstance(A, ImmutableDenseMatrix):
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_79mul_matrix(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_79mul_matrix = {"mul_matrix", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_79mul_matrix, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_79mul_matrix(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_A = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("mul_matrix (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_A,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 3815, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3815, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "mul_matrix", 0) < (0)) __PYX_ERR(0, 3815, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("mul_matrix", 1, 1, 1, i); __PYX_ERR(0, 3815, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3815, __pyx_L3_error)
    }
    __pyx_v_A = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("mul_matrix", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3815, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.mul_matrix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_78mul_matrix(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_self), __pyx_v_A);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_78mul_matrix(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self, PyObject *__pyx_v_A) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_MatrixBase *__pyx_v_A_ = 0;
  PyObject *__pyx_v_cls = NULL;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("mul_matrix", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3816
 * 
 *     def mul_matrix(self, A):
 *         cdef MatrixBase A_ = sympify(A)             # <<<<<<<<<<<<<<
 *         if isinstance(A, ImmutableDenseMatrix):
 *             cls = A.__class__
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3816, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_A};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3816, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_MatrixBase))))) __PYX_ERR(0, 3816, __pyx_L1_error)
  __pyx_v_A_ = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_MatrixBase *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3817
 *     def mul_matrix(self, A):
 *         cdef MatrixBase A_ = sympify(A)
 *         if isinstance(A, ImmutableDenseMatrix):             # <<<<<<<<<<<<<<
 *             cls = A.__class__
 *         else:
*/
  __pyx_t_5 = __Pyx_TypeCheck(__pyx_v_A, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ImmutableDenseMatrix); 
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":3818
 *         cdef MatrixBase A_ = sympify(A)
 *         if isinstance(A, ImmutableDenseMatrix):
 *             cls = A.__class__             # <<<<<<<<<<<<<<
 *         else:
 *             cls = self.__class__
*/
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_A, __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3818, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_cls = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":3817
 *     def mul_matrix(self, A):
 *         cdef MatrixBase A_ = sympify(A)
 *         if isinstance(A, ImmutableDenseMatrix):             # <<<<<<<<<<<<<<
 *             cls = A.__class__
 *         else:
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":3820
 *             cls = A.__class__
 *         else:
 *             cls = self.__class__             # <<<<<<<<<<<<<<
 *         cdef DenseMatrixBase result = cls(self.nrows(), A.ncols())
 *         deref(self.thisptr).mul_matrix(deref(A_.thisptr), deref(result.thisptr))
*/
  /*else*/ {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3820, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_cls = __pyx_t_1;
    __pyx_t_1 = 0;
  }
  __pyx_L3:;

  /* "symengine/lib/symengine_wrapper.pyx":3821
 *         else:
 *             cls = self.__class__
 *         cdef DenseMatrixBase result = cls(self.nrows(), A.ncols())             # <<<<<<<<<<<<<<
 *         deref(self.thisptr).mul_matrix(deref(A_.thisptr), deref(result.thisptr))
 *         return result
*/
  __pyx_t_3 = NULL;
  __Pyx_INCREF(__pyx_v_cls);
  __pyx_t_2 = __pyx_v_cls; 
  __pyx_t_7 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_7);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL};
    __pyx_t_6 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_nrows, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3821, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
  }
  __pyx_t_8 = __pyx_v_A;
  __Pyx_INCREF(__pyx_t_8);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL};
    __pyx_t_7 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_ncols, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3821, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
  }
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_t_6, __pyx_t_7};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3821, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase))))) __PYX_ERR(0, 3821, __pyx_L1_error)
  __pyx_v_result = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3822
 *             cls = self.__class__
 *         cdef DenseMatrixBase result = cls(self.nrows(), A.ncols())
 *         deref(self.thisptr).mul_matrix(deref(A_.thisptr), deref(result.thisptr))             # <<<<<<<<<<<<<<
 *         return result
 * 
*/
  (*__pyx_v_self->__pyx_base.thisptr).mul_matrix((*__pyx_v_A_->thisptr), (*__pyx_v_result->__pyx_base.thisptr));

  /* "symengine/lib/symengine_wrapper.pyx":3823
 *         cdef DenseMatrixBase result = cls(self.nrows(), A.ncols())
 *         deref(self.thisptr).mul_matrix(deref(A_.thisptr), deref(result.thisptr))
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     def multiply_elementwise(self, A):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_result);
  __pyx_r = ((PyObject *)__pyx_v_result);
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3815
 *         return result
 * 
 *     def mul_matrix(self, A):             # <<<<<<<<<<<<<<
 *         cdef MatrixBase A_ = sympify(A)
 *         if isinstance(A, ImmutableDenseMatrix):
*/

  /* 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_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.mul_matrix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_A_);
  __Pyx_XDECREF(__pyx_v_cls);
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3825
 *         return result
 * 
 *     def multiply_elementwise(self, A):             # <<<<<<<<<<<<<<
 *         cdef MatrixBase A_ = sympify(A)
 *         if isinstance(A, ImmutableDenseMatrix):
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_81multiply_elementwise(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_81multiply_elementwise = {"multiply_elementwise", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_81multiply_elementwise, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_81multiply_elementwise(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_A = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("multiply_elementwise (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_A,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 3825, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3825, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "multiply_elementwise", 0) < (0)) __PYX_ERR(0, 3825, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("multiply_elementwise", 1, 1, 1, i); __PYX_ERR(0, 3825, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3825, __pyx_L3_error)
    }
    __pyx_v_A = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("multiply_elementwise", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3825, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.multiply_elementwise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_80multiply_elementwise(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_self), __pyx_v_A);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_80multiply_elementwise(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self, PyObject *__pyx_v_A) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_MatrixBase *__pyx_v_A_ = 0;
  PyObject *__pyx_v_cls = NULL;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("multiply_elementwise", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3826
 * 
 *     def multiply_elementwise(self, A):
 *         cdef MatrixBase A_ = sympify(A)             # <<<<<<<<<<<<<<
 *         if isinstance(A, ImmutableDenseMatrix):
 *             cls = A.__class__
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3826, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_A};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3826, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_MatrixBase))))) __PYX_ERR(0, 3826, __pyx_L1_error)
  __pyx_v_A_ = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_MatrixBase *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3827
 *     def multiply_elementwise(self, A):
 *         cdef MatrixBase A_ = sympify(A)
 *         if isinstance(A, ImmutableDenseMatrix):             # <<<<<<<<<<<<<<
 *             cls = A.__class__
 *         else:
*/
  __pyx_t_5 = __Pyx_TypeCheck(__pyx_v_A, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ImmutableDenseMatrix); 
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":3828
 *         cdef MatrixBase A_ = sympify(A)
 *         if isinstance(A, ImmutableDenseMatrix):
 *             cls = A.__class__             # <<<<<<<<<<<<<<
 *         else:
 *             cls = self.__class__
*/
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_A, __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3828, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_cls = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":3827
 *     def multiply_elementwise(self, A):
 *         cdef MatrixBase A_ = sympify(A)
 *         if isinstance(A, ImmutableDenseMatrix):             # <<<<<<<<<<<<<<
 *             cls = A.__class__
 *         else:
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":3830
 *             cls = A.__class__
 *         else:
 *             cls = self.__class__             # <<<<<<<<<<<<<<
 *         cdef DenseMatrixBase result = cls(self.nrows(), self.ncols())
 *         deref(self.thisptr).elementwise_mul_matrix(deref(A_.thisptr), deref(result.thisptr))
*/
  /*else*/ {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3830, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_cls = __pyx_t_1;
    __pyx_t_1 = 0;
  }
  __pyx_L3:;

  /* "symengine/lib/symengine_wrapper.pyx":3831
 *         else:
 *             cls = self.__class__
 *         cdef DenseMatrixBase result = cls(self.nrows(), self.ncols())             # <<<<<<<<<<<<<<
 *         deref(self.thisptr).elementwise_mul_matrix(deref(A_.thisptr), deref(result.thisptr))
 *         return result
*/
  __pyx_t_3 = NULL;
  __Pyx_INCREF(__pyx_v_cls);
  __pyx_t_2 = __pyx_v_cls; 
  __pyx_t_7 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_7);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL};
    __pyx_t_6 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_nrows, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3831, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
  }
  __pyx_t_8 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_8);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL};
    __pyx_t_7 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_ncols, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3831, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
  }
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_t_6, __pyx_t_7};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3831, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase))))) __PYX_ERR(0, 3831, __pyx_L1_error)
  __pyx_v_result = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3832
 *             cls = self.__class__
 *         cdef DenseMatrixBase result = cls(self.nrows(), self.ncols())
 *         deref(self.thisptr).elementwise_mul_matrix(deref(A_.thisptr), deref(result.thisptr))             # <<<<<<<<<<<<<<
 *         return result
 * 
*/
  (*__pyx_v_self->__pyx_base.thisptr).elementwise_mul_matrix((*__pyx_v_A_->thisptr), (*__pyx_v_result->__pyx_base.thisptr));

  /* "symengine/lib/symengine_wrapper.pyx":3833
 *         cdef DenseMatrixBase result = cls(self.nrows(), self.ncols())
 *         deref(self.thisptr).elementwise_mul_matrix(deref(A_.thisptr), deref(result.thisptr))
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     def add_scalar(self, k):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_result);
  __pyx_r = ((PyObject *)__pyx_v_result);
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3825
 *         return result
 * 
 *     def multiply_elementwise(self, A):             # <<<<<<<<<<<<<<
 *         cdef MatrixBase A_ = sympify(A)
 *         if isinstance(A, ImmutableDenseMatrix):
*/

  /* 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_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.multiply_elementwise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_A_);
  __Pyx_XDECREF(__pyx_v_cls);
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3835
 *         return result
 * 
 *     def add_scalar(self, k):             # <<<<<<<<<<<<<<
 *         cdef Basic k_ = sympify(k)
 *         cdef DenseMatrixBase result = self.__class__(self.nrows(), self.ncols())
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_83add_scalar(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_83add_scalar = {"add_scalar", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_83add_scalar, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_83add_scalar(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_k = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("add_scalar (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_k,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 3835, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3835, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "add_scalar", 0) < (0)) __PYX_ERR(0, 3835, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("add_scalar", 1, 1, 1, i); __PYX_ERR(0, 3835, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3835, __pyx_L3_error)
    }
    __pyx_v_k = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("add_scalar", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3835, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.add_scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_82add_scalar(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_self), __pyx_v_k);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_82add_scalar(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self, PyObject *__pyx_v_k) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_k_ = 0;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("add_scalar", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3836
 * 
 *     def add_scalar(self, k):
 *         cdef Basic k_ = sympify(k)             # <<<<<<<<<<<<<<
 *         cdef DenseMatrixBase result = self.__class__(self.nrows(), self.ncols())
 *         deref(self.thisptr).add_scalar(k_.thisptr, deref(result.thisptr))
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3836, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_k};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3836, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 3836, __pyx_L1_error)
  __pyx_v_k_ = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3837
 *     def add_scalar(self, k):
 *         cdef Basic k_ = sympify(k)
 *         cdef DenseMatrixBase result = self.__class__(self.nrows(), self.ncols())             # <<<<<<<<<<<<<<
 *         deref(self.thisptr).add_scalar(k_.thisptr, deref(result.thisptr))
 *         return result
*/
  __pyx_t_3 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_5 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_5);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
    __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_nrows, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3837, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  __pyx_t_6 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_6);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
    __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_ncols, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3837, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
  }
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_t_2, __pyx_t_5};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_class, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3837, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase))))) __PYX_ERR(0, 3837, __pyx_L1_error)
  __pyx_v_result = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3838
 *         cdef Basic k_ = sympify(k)
 *         cdef DenseMatrixBase result = self.__class__(self.nrows(), self.ncols())
 *         deref(self.thisptr).add_scalar(k_.thisptr, deref(result.thisptr))             # <<<<<<<<<<<<<<
 *         return result
 * 
*/
  (*__pyx_v_self->__pyx_base.thisptr).add_scalar(__pyx_v_k_->thisptr, (*__pyx_v_result->__pyx_base.thisptr));

  /* "symengine/lib/symengine_wrapper.pyx":3839
 *         cdef DenseMatrixBase result = self.__class__(self.nrows(), self.ncols())
 *         deref(self.thisptr).add_scalar(k_.thisptr, deref(result.thisptr))
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     def mul_scalar(self, k):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_result);
  __pyx_r = ((PyObject *)__pyx_v_result);
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3835
 *         return result
 * 
 *     def add_scalar(self, k):             # <<<<<<<<<<<<<<
 *         cdef Basic k_ = sympify(k)
 *         cdef DenseMatrixBase result = self.__class__(self.nrows(), self.ncols())
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.add_scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_k_);
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3841
 *         return result
 * 
 *     def mul_scalar(self, k):             # <<<<<<<<<<<<<<
 *         cdef Basic k_ = sympify(k)
 *         cdef DenseMatrixBase result = self.__class__(self.nrows(), self.ncols())
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_85mul_scalar(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_85mul_scalar = {"mul_scalar", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_85mul_scalar, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_85mul_scalar(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_k = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("mul_scalar (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_k,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 3841, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3841, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "mul_scalar", 0) < (0)) __PYX_ERR(0, 3841, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("mul_scalar", 1, 1, 1, i); __PYX_ERR(0, 3841, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3841, __pyx_L3_error)
    }
    __pyx_v_k = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("mul_scalar", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3841, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.mul_scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_84mul_scalar(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_self), __pyx_v_k);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_84mul_scalar(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self, PyObject *__pyx_v_k) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_k_ = 0;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("mul_scalar", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3842
 * 
 *     def mul_scalar(self, k):
 *         cdef Basic k_ = sympify(k)             # <<<<<<<<<<<<<<
 *         cdef DenseMatrixBase result = self.__class__(self.nrows(), self.ncols())
 *         deref(self.thisptr).mul_scalar(k_.thisptr, deref(result.thisptr))
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3842, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_k};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3842, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 3842, __pyx_L1_error)
  __pyx_v_k_ = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3843
 *     def mul_scalar(self, k):
 *         cdef Basic k_ = sympify(k)
 *         cdef DenseMatrixBase result = self.__class__(self.nrows(), self.ncols())             # <<<<<<<<<<<<<<
 *         deref(self.thisptr).mul_scalar(k_.thisptr, deref(result.thisptr))
 *         return result
*/
  __pyx_t_3 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_5 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_5);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
    __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_nrows, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3843, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  __pyx_t_6 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_6);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
    __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_ncols, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3843, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
  }
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_t_2, __pyx_t_5};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_class, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3843, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase))))) __PYX_ERR(0, 3843, __pyx_L1_error)
  __pyx_v_result = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3844
 *         cdef Basic k_ = sympify(k)
 *         cdef DenseMatrixBase result = self.__class__(self.nrows(), self.ncols())
 *         deref(self.thisptr).mul_scalar(k_.thisptr, deref(result.thisptr))             # <<<<<<<<<<<<<<
 *         return result
 * 
*/
  (*__pyx_v_self->__pyx_base.thisptr).mul_scalar(__pyx_v_k_->thisptr, (*__pyx_v_result->__pyx_base.thisptr));

  /* "symengine/lib/symengine_wrapper.pyx":3845
 *         cdef DenseMatrixBase result = self.__class__(self.nrows(), self.ncols())
 *         deref(self.thisptr).mul_scalar(k_.thisptr, deref(result.thisptr))
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     def transpose(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_result);
  __pyx_r = ((PyObject *)__pyx_v_result);
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3841
 *         return result
 * 
 *     def mul_scalar(self, k):             # <<<<<<<<<<<<<<
 *         cdef Basic k_ = sympify(k)
 *         cdef DenseMatrixBase result = self.__class__(self.nrows(), self.ncols())
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.mul_scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_k_);
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3847
 *         return result
 * 
 *     def transpose(self):             # <<<<<<<<<<<<<<
 *         cdef DenseMatrixBase result = self.__class__(self.ncols(), self.nrows())
 *         deref(self.thisptr).transpose(deref(result.thisptr))
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_87transpose(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_87transpose = {"transpose", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_87transpose, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_87transpose(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("transpose (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("transpose", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("transpose", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_86transpose(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_86transpose(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_result = 0;
  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;
  size_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("transpose", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3848
 * 
 *     def transpose(self):
 *         cdef DenseMatrixBase result = self.__class__(self.ncols(), self.nrows())             # <<<<<<<<<<<<<<
 *         deref(self.thisptr).transpose(deref(result.thisptr))
 *         return result
*/
  __pyx_t_2 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_4 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_ncols, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3848, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __pyx_t_6 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_6);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
    __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_nrows, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3848, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_t_3, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_class, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3848, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase))))) __PYX_ERR(0, 3848, __pyx_L1_error)
  __pyx_v_result = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3849
 *     def transpose(self):
 *         cdef DenseMatrixBase result = self.__class__(self.ncols(), self.nrows())
 *         deref(self.thisptr).transpose(deref(result.thisptr))             # <<<<<<<<<<<<<<
 *         return result
 * 
*/
  (*__pyx_v_self->__pyx_base.thisptr).transpose((*__pyx_v_result->__pyx_base.thisptr));

  /* "symengine/lib/symengine_wrapper.pyx":3850
 *         cdef DenseMatrixBase result = self.__class__(self.ncols(), self.nrows())
 *         deref(self.thisptr).transpose(deref(result.thisptr))
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     def conjugate(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_result);
  __pyx_r = ((PyObject *)__pyx_v_result);
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3847
 *         return result
 * 
 *     def transpose(self):             # <<<<<<<<<<<<<<
 *         cdef DenseMatrixBase result = self.__class__(self.ncols(), self.nrows())
 *         deref(self.thisptr).transpose(deref(result.thisptr))
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.transpose", __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;
}

/* "symengine/lib/symengine_wrapper.pyx":3852
 *         return result
 * 
 *     def conjugate(self):             # <<<<<<<<<<<<<<
 *         cdef DenseMatrixBase result = self.__class__(self.nrows(), self.ncols())
 *         deref(self.thisptr).conjugate(deref(result.thisptr))
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_89conjugate(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_89conjugate = {"conjugate", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_89conjugate, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_89conjugate(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("conjugate (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("conjugate", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("conjugate", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_88conjugate(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_88conjugate(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_result = 0;
  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;
  size_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("conjugate", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3853
 * 
 *     def conjugate(self):
 *         cdef DenseMatrixBase result = self.__class__(self.nrows(), self.ncols())             # <<<<<<<<<<<<<<
 *         deref(self.thisptr).conjugate(deref(result.thisptr))
 *         return result
*/
  __pyx_t_2 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_4 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_nrows, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3853, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __pyx_t_6 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_6);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
    __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_ncols, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3853, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_t_3, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_class, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3853, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase))))) __PYX_ERR(0, 3853, __pyx_L1_error)
  __pyx_v_result = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3854
 *     def conjugate(self):
 *         cdef DenseMatrixBase result = self.__class__(self.nrows(), self.ncols())
 *         deref(self.thisptr).conjugate(deref(result.thisptr))             # <<<<<<<<<<<<<<
 *         return result
 * 
*/
  (*__pyx_v_self->__pyx_base.thisptr).conjugate((*__pyx_v_result->__pyx_base.thisptr));

  /* "symengine/lib/symengine_wrapper.pyx":3855
 *         cdef DenseMatrixBase result = self.__class__(self.nrows(), self.ncols())
 *         deref(self.thisptr).conjugate(deref(result.thisptr))
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     def conjugate_transpose(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_result);
  __pyx_r = ((PyObject *)__pyx_v_result);
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3852
 *         return result
 * 
 *     def conjugate(self):             # <<<<<<<<<<<<<<
 *         cdef DenseMatrixBase result = self.__class__(self.nrows(), self.ncols())
 *         deref(self.thisptr).conjugate(deref(result.thisptr))
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.conjugate", __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;
}

/* "symengine/lib/symengine_wrapper.pyx":3857
 *         return result
 * 
 *     def conjugate_transpose(self):             # <<<<<<<<<<<<<<
 *         cdef DenseMatrixBase result = self.__class__(self.nrows(), self.ncols())
 *         deref(self.thisptr).conjugate_transpose(deref(result.thisptr))
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_91conjugate_transpose(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_91conjugate_transpose = {"conjugate_transpose", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_91conjugate_transpose, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_91conjugate_transpose(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("conjugate_transpose (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("conjugate_transpose", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("conjugate_transpose", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_90conjugate_transpose(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_90conjugate_transpose(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_result = 0;
  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;
  size_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("conjugate_transpose", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3858
 * 
 *     def conjugate_transpose(self):
 *         cdef DenseMatrixBase result = self.__class__(self.nrows(), self.ncols())             # <<<<<<<<<<<<<<
 *         deref(self.thisptr).conjugate_transpose(deref(result.thisptr))
 *         return result
*/
  __pyx_t_2 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_4 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_nrows, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3858, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __pyx_t_6 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_6);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
    __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_ncols, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3858, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_t_3, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_class, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3858, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase))))) __PYX_ERR(0, 3858, __pyx_L1_error)
  __pyx_v_result = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3859
 *     def conjugate_transpose(self):
 *         cdef DenseMatrixBase result = self.__class__(self.nrows(), self.ncols())
 *         deref(self.thisptr).conjugate_transpose(deref(result.thisptr))             # <<<<<<<<<<<<<<
 *         return result
 * 
*/
  (*__pyx_v_self->__pyx_base.thisptr).conjugate_transpose((*__pyx_v_result->__pyx_base.thisptr));

  /* "symengine/lib/symengine_wrapper.pyx":3860
 *         cdef DenseMatrixBase result = self.__class__(self.nrows(), self.ncols())
 *         deref(self.thisptr).conjugate_transpose(deref(result.thisptr))
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_result);
  __pyx_r = ((PyObject *)__pyx_v_result);
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3857
 *         return result
 * 
 *     def conjugate_transpose(self):             # <<<<<<<<<<<<<<
 *         cdef DenseMatrixBase result = self.__class__(self.nrows(), self.ncols())
 *         deref(self.thisptr).conjugate_transpose(deref(result.thisptr))
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.conjugate_transpose", __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;
}

/* "symengine/lib/symengine_wrapper.pyx":3862
 *         return result
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def H(self):
 *         return self.conjugate_transpose()
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_1H_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_1H_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_1H___get__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_1H___get__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3864
 *     @property
 *     def H(self):
 *         return self.conjugate_transpose()             # <<<<<<<<<<<<<<
 * 
 *     def trace(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_conjugate_transpose, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3864, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3862
 *         return result
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def H(self):
 *         return self.conjugate_transpose()
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.H.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3866
 *         return self.conjugate_transpose()
 * 
 *     def trace(self):             # <<<<<<<<<<<<<<
 *         return c2py(deref(symengine.static_cast_DenseMatrix(self.thisptr)).trace())
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_93trace(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_93trace = {"trace", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_93trace, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_93trace(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("trace (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("trace", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("trace", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_92trace(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_92trace(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("trace", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3867
 * 
 *     def trace(self):
 *         return c2py(deref(symengine.static_cast_DenseMatrix(self.thisptr)).trace())             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py((*static_cast<SymEngine::DenseMatrix*>(__pyx_v_self->__pyx_base.thisptr)).trace()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3867, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3866
 *         return self.conjugate_transpose()
 * 
 *     def trace(self):             # <<<<<<<<<<<<<<
 *         return c2py(deref(symengine.static_cast_DenseMatrix(self.thisptr)).trace())
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.trace", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3869
 *         return c2py(deref(symengine.static_cast_DenseMatrix(self.thisptr)).trace())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_zero_matrix(self):
 *         return tribool_py(deref(symengine.static_cast_DenseMatrix(self.thisptr)).is_zero())
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_14is_zero_matrix_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_14is_zero_matrix_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_14is_zero_matrix___get__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_14is_zero_matrix___get__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3871
 *     @property
 *     def is_zero_matrix(self):
 *         return tribool_py(deref(symengine.static_cast_DenseMatrix(self.thisptr)).is_zero())             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_tribool_py((*static_cast<SymEngine::DenseMatrix*>(__pyx_v_self->__pyx_base.thisptr)).is_zero()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3871, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3869
 *         return c2py(deref(symengine.static_cast_DenseMatrix(self.thisptr)).trace())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_zero_matrix(self):
 *         return tribool_py(deref(symengine.static_cast_DenseMatrix(self.thisptr)).is_zero())
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.is_zero_matrix.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3873
 *         return tribool_py(deref(symengine.static_cast_DenseMatrix(self.thisptr)).is_zero())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_real_matrix(self):
 *         return tribool_py(deref(symengine.static_cast_DenseMatrix(self.thisptr)).is_real())
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_14is_real_matrix_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_14is_real_matrix_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_14is_real_matrix___get__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_14is_real_matrix___get__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3875
 *     @property
 *     def is_real_matrix(self):
 *         return tribool_py(deref(symengine.static_cast_DenseMatrix(self.thisptr)).is_real())             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_tribool_py((*static_cast<SymEngine::DenseMatrix*>(__pyx_v_self->__pyx_base.thisptr)).is_real()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3875, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3873
 *         return tribool_py(deref(symengine.static_cast_DenseMatrix(self.thisptr)).is_zero())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_real_matrix(self):
 *         return tribool_py(deref(symengine.static_cast_DenseMatrix(self.thisptr)).is_real())
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.is_real_matrix.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3877
 *         return tribool_py(deref(symengine.static_cast_DenseMatrix(self.thisptr)).is_real())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_diagonal(self):
 *         return tribool_py(deref(symengine.static_cast_DenseMatrix(self.thisptr)).is_diagonal())
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_11is_diagonal_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_11is_diagonal_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_11is_diagonal___get__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_11is_diagonal___get__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3879
 *     @property
 *     def is_diagonal(self):
 *         return tribool_py(deref(symengine.static_cast_DenseMatrix(self.thisptr)).is_diagonal())             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_tribool_py((*static_cast<SymEngine::DenseMatrix*>(__pyx_v_self->__pyx_base.thisptr)).is_diagonal()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3879, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3877
 *         return tribool_py(deref(symengine.static_cast_DenseMatrix(self.thisptr)).is_real())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_diagonal(self):
 *         return tribool_py(deref(symengine.static_cast_DenseMatrix(self.thisptr)).is_diagonal())
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.is_diagonal.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3881
 *         return tribool_py(deref(symengine.static_cast_DenseMatrix(self.thisptr)).is_diagonal())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_symmetric(self):
 *         return tribool_py(deref(symengine.static_cast_DenseMatrix(self.thisptr)).is_symmetric())
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_12is_symmetric_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_12is_symmetric_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_12is_symmetric___get__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_12is_symmetric___get__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3883
 *     @property
 *     def is_symmetric(self):
 *         return tribool_py(deref(symengine.static_cast_DenseMatrix(self.thisptr)).is_symmetric())             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_tribool_py((*static_cast<SymEngine::DenseMatrix*>(__pyx_v_self->__pyx_base.thisptr)).is_symmetric()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3883, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3881
 *         return tribool_py(deref(symengine.static_cast_DenseMatrix(self.thisptr)).is_diagonal())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_symmetric(self):
 *         return tribool_py(deref(symengine.static_cast_DenseMatrix(self.thisptr)).is_symmetric())
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.is_symmetric.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3885
 *         return tribool_py(deref(symengine.static_cast_DenseMatrix(self.thisptr)).is_symmetric())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_hermitian(self):
 *         return tribool_py(deref(symengine.static_cast_DenseMatrix(self.thisptr)).is_hermitian())
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_12is_hermitian_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_12is_hermitian_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_12is_hermitian___get__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_12is_hermitian___get__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3887
 *     @property
 *     def is_hermitian(self):
 *         return tribool_py(deref(symengine.static_cast_DenseMatrix(self.thisptr)).is_hermitian())             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_tribool_py((*static_cast<SymEngine::DenseMatrix*>(__pyx_v_self->__pyx_base.thisptr)).is_hermitian()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3887, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3885
 *         return tribool_py(deref(symengine.static_cast_DenseMatrix(self.thisptr)).is_symmetric())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_hermitian(self):
 *         return tribool_py(deref(symengine.static_cast_DenseMatrix(self.thisptr)).is_hermitian())
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.is_hermitian.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3889
 *         return tribool_py(deref(symengine.static_cast_DenseMatrix(self.thisptr)).is_hermitian())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_weakly_diagonally_dominant(self):
 *         return tribool_py(deref(symengine.static_cast_DenseMatrix(self.thisptr)).is_weakly_diagonally_dominant())
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_29is_weakly_diagonally_dominant_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_29is_weakly_diagonally_dominant_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_29is_weakly_diagonally_dominant___get__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_29is_weakly_diagonally_dominant___get__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3891
 *     @property
 *     def is_weakly_diagonally_dominant(self):
 *         return tribool_py(deref(symengine.static_cast_DenseMatrix(self.thisptr)).is_weakly_diagonally_dominant())             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_tribool_py((*static_cast<SymEngine::DenseMatrix*>(__pyx_v_self->__pyx_base.thisptr)).is_weakly_diagonally_dominant()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3891, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3889
 *         return tribool_py(deref(symengine.static_cast_DenseMatrix(self.thisptr)).is_hermitian())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_weakly_diagonally_dominant(self):
 *         return tribool_py(deref(symengine.static_cast_DenseMatrix(self.thisptr)).is_weakly_diagonally_dominant())
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.is_weakly_diagonally_dominant.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3893
 *         return tribool_py(deref(symengine.static_cast_DenseMatrix(self.thisptr)).is_weakly_diagonally_dominant())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_strongly_diagonally_dominant(self):
 *         return tribool_py(deref(symengine.static_cast_DenseMatrix(self.thisptr)).is_strictly_diagonally_dominant())
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_31is_strongly_diagonally_dominant_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_31is_strongly_diagonally_dominant_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_31is_strongly_diagonally_dominant___get__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_31is_strongly_diagonally_dominant___get__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3895
 *     @property
 *     def is_strongly_diagonally_dominant(self):
 *         return tribool_py(deref(symengine.static_cast_DenseMatrix(self.thisptr)).is_strictly_diagonally_dominant())             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_tribool_py((*static_cast<SymEngine::DenseMatrix*>(__pyx_v_self->__pyx_base.thisptr)).is_strictly_diagonally_dominant()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3895, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3893
 *         return tribool_py(deref(symengine.static_cast_DenseMatrix(self.thisptr)).is_weakly_diagonally_dominant())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_strongly_diagonally_dominant(self):
 *         return tribool_py(deref(symengine.static_cast_DenseMatrix(self.thisptr)).is_strictly_diagonally_dominant())
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.is_strongly_diagonally_dominant.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3897
 *         return tribool_py(deref(symengine.static_cast_DenseMatrix(self.thisptr)).is_strictly_diagonally_dominant())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_positive_definite(self):
 *         return tribool_py(deref(symengine.static_cast_DenseMatrix(self.thisptr)).is_positive_definite())
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_20is_positive_definite_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_20is_positive_definite_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_20is_positive_definite___get__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_20is_positive_definite___get__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3899
 *     @property
 *     def is_positive_definite(self):
 *         return tribool_py(deref(symengine.static_cast_DenseMatrix(self.thisptr)).is_positive_definite())             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_tribool_py((*static_cast<SymEngine::DenseMatrix*>(__pyx_v_self->__pyx_base.thisptr)).is_positive_definite()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3899, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3897
 *         return tribool_py(deref(symengine.static_cast_DenseMatrix(self.thisptr)).is_strictly_diagonally_dominant())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_positive_definite(self):
 *         return tribool_py(deref(symengine.static_cast_DenseMatrix(self.thisptr)).is_positive_definite())
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.is_positive_definite.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3901
 *         return tribool_py(deref(symengine.static_cast_DenseMatrix(self.thisptr)).is_positive_definite())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_negative_definite(self):
 *         return tribool_py(deref(symengine.static_cast_DenseMatrix(self.thisptr)).is_negative_definite())
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_20is_negative_definite_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_20is_negative_definite_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_20is_negative_definite___get__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_20is_negative_definite___get__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3903
 *     @property
 *     def is_negative_definite(self):
 *         return tribool_py(deref(symengine.static_cast_DenseMatrix(self.thisptr)).is_negative_definite())             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_tribool_py((*static_cast<SymEngine::DenseMatrix*>(__pyx_v_self->__pyx_base.thisptr)).is_negative_definite()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3903, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3901
 *         return tribool_py(deref(symengine.static_cast_DenseMatrix(self.thisptr)).is_positive_definite())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_negative_definite(self):
 *         return tribool_py(deref(symengine.static_cast_DenseMatrix(self.thisptr)).is_negative_definite())
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.is_negative_definite.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3905
 *         return tribool_py(deref(symengine.static_cast_DenseMatrix(self.thisptr)).is_negative_definite())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def T(self):
 *         return self.transpose()
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_1T_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_1T_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_1T___get__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_1T___get__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3907
 *     @property
 *     def T(self):
 *         return self.transpose()             # <<<<<<<<<<<<<<
 * 
 *     def applyfunc(self, f):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_transpose, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3907, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3905
 *         return tribool_py(deref(symengine.static_cast_DenseMatrix(self.thisptr)).is_negative_definite())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def T(self):
 *         return self.transpose()
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.T.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3909
 *         return self.transpose()
 * 
 *     def applyfunc(self, f):             # <<<<<<<<<<<<<<
 *         cdef DenseMatrixBase out = self.__class__(self)
 *         cdef int nr = self.nrows()
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_95applyfunc(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_95applyfunc = {"applyfunc", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_95applyfunc, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_95applyfunc(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_f = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("applyfunc (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_f,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 3909, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3909, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "applyfunc", 0) < (0)) __PYX_ERR(0, 3909, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("applyfunc", 1, 1, 1, i); __PYX_ERR(0, 3909, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3909, __pyx_L3_error)
    }
    __pyx_v_f = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("applyfunc", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3909, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.applyfunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_94applyfunc(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_self), __pyx_v_f);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_94applyfunc(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self, PyObject *__pyx_v_f) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_out = 0;
  int __pyx_v_nr;
  int __pyx_v_nc;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_e_ = 0;
  int __pyx_v_i;
  int __pyx_v_j;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  int __pyx_t_18;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("applyfunc", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3910
 * 
 *     def applyfunc(self, f):
 *         cdef DenseMatrixBase out = self.__class__(self)             # <<<<<<<<<<<<<<
 *         cdef int nr = self.nrows()
 *         cdef int nc = self.ncols()
*/
  __pyx_t_2 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, ((PyObject *)__pyx_v_self)};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_class, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3910, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase))))) __PYX_ERR(0, 3910, __pyx_L1_error)
  __pyx_v_out = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3911
 *     def applyfunc(self, f):
 *         cdef DenseMatrixBase out = self.__class__(self)
 *         cdef int nr = self.nrows()             # <<<<<<<<<<<<<<
 *         cdef int nc = self.ncols()
 *         cdef Basic e_;
*/
  __pyx_t_2 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_nrows, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3911, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_t_4 = __Pyx_PyLong_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3911, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_nr = __pyx_t_4;

  /* "symengine/lib/symengine_wrapper.pyx":3912
 *         cdef DenseMatrixBase out = self.__class__(self)
 *         cdef int nr = self.nrows()
 *         cdef int nc = self.ncols()             # <<<<<<<<<<<<<<
 *         cdef Basic e_;
 *         for i in range(nr):
*/
  __pyx_t_2 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_ncols, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3912, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_t_4 = __Pyx_PyLong_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3912, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_nc = __pyx_t_4;

  /* "symengine/lib/symengine_wrapper.pyx":3914
 *         cdef int nc = self.ncols()
 *         cdef Basic e_;
 *         for i in range(nr):             # <<<<<<<<<<<<<<
 *             for j in range(nc):
 *                 e_ = sympify(f(self._get(i, j)))
*/
  __pyx_t_4 = __pyx_v_nr;
  __pyx_t_5 = __pyx_t_4;
  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
    __pyx_v_i = __pyx_t_6;

    /* "symengine/lib/symengine_wrapper.pyx":3915
 *         cdef Basic e_;
 *         for i in range(nr):
 *             for j in range(nc):             # <<<<<<<<<<<<<<
 *                 e_ = sympify(f(self._get(i, j)))
 *                 if e_ is not None:
*/
    __pyx_t_7 = __pyx_v_nc;
    __pyx_t_8 = __pyx_t_7;
    for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
      __pyx_v_j = __pyx_t_9;

      /* "symengine/lib/symengine_wrapper.pyx":3916
 *         for i in range(nr):
 *             for j in range(nc):
 *                 e_ = sympify(f(self._get(i, j)))             # <<<<<<<<<<<<<<
 *                 if e_ is not None:
 *                     deref(out.thisptr).set(i, j, e_.thisptr)
*/
      __pyx_t_2 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3916, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_12 = NULL;
      __Pyx_INCREF(__pyx_v_f);
      __pyx_t_13 = __pyx_v_f; 
      __pyx_t_15 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_15);
      __pyx_t_16 = __Pyx_PyLong_From_int(__pyx_v_i); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3916, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_16);
      __pyx_t_17 = __Pyx_PyLong_From_int(__pyx_v_j); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 3916, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_17);
      __pyx_t_3 = 0;
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_15, __pyx_t_16, __pyx_t_17};
        __pyx_t_14 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_2, __pyx_callargs+__pyx_t_3, (3-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
        __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
        if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3916, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_14);
      }
      __pyx_t_3 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_13))) {
        __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_13);
        assert(__pyx_t_12);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_13);
        __Pyx_INCREF(__pyx_t_12);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_13, __pyx__function);
        __pyx_t_3 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_t_14};
        __pyx_t_11 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_13, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3916, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
      }
      __pyx_t_3 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_10))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_10);
        assert(__pyx_t_2);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_10);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_10, __pyx__function);
        __pyx_t_3 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_11};
        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_10, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3916, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 3916, __pyx_L1_error)
      __Pyx_XDECREF_SET(__pyx_v_e_, ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1));
      __pyx_t_1 = 0;

      /* "symengine/lib/symengine_wrapper.pyx":3917
 *             for j in range(nc):
 *                 e_ = sympify(f(self._get(i, j)))
 *                 if e_ is not None:             # <<<<<<<<<<<<<<
 *                     deref(out.thisptr).set(i, j, e_.thisptr)
 *         return out
*/
      __pyx_t_18 = (((PyObject *)__pyx_v_e_) != Py_None);
      if (__pyx_t_18) {

        /* "symengine/lib/symengine_wrapper.pyx":3918
 *                 e_ = sympify(f(self._get(i, j)))
 *                 if e_ is not None:
 *                     deref(out.thisptr).set(i, j, e_.thisptr)             # <<<<<<<<<<<<<<
 *         return out
 * 
*/
        (void)((*__pyx_v_out->__pyx_base.thisptr).set(__pyx_v_i, __pyx_v_j, __pyx_v_e_->thisptr));

        /* "symengine/lib/symengine_wrapper.pyx":3917
 *             for j in range(nc):
 *                 e_ = sympify(f(self._get(i, j)))
 *                 if e_ is not None:             # <<<<<<<<<<<<<<
 *                     deref(out.thisptr).set(i, j, e_.thisptr)
 *         return out
*/
      }
    }
  }

  /* "symengine/lib/symengine_wrapper.pyx":3919
 *                 if e_ is not None:
 *                     deref(out.thisptr).set(i, j, e_.thisptr)
 *         return out             # <<<<<<<<<<<<<<
 * 
 *     def _applyfunc(self, f):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = ((PyObject *)__pyx_v_out);
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3909
 *         return self.transpose()
 * 
 *     def applyfunc(self, f):             # <<<<<<<<<<<<<<
 *         cdef DenseMatrixBase out = self.__class__(self)
 *         cdef int nr = self.nrows()
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_XDECREF(__pyx_t_17);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.applyfunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XDECREF((PyObject *)__pyx_v_e_);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3921
 *         return out
 * 
 *     def _applyfunc(self, f):             # <<<<<<<<<<<<<<
 *         cdef int nr = self.nrows()
 *         cdef int nc = self.ncols()
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_97_applyfunc(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_97_applyfunc = {"_applyfunc", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_97_applyfunc, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_97_applyfunc(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_f = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_applyfunc (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_f,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 3921, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3921, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_applyfunc", 0) < (0)) __PYX_ERR(0, 3921, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_applyfunc", 1, 1, 1, i); __PYX_ERR(0, 3921, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3921, __pyx_L3_error)
    }
    __pyx_v_f = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_applyfunc", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3921, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase._applyfunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_96_applyfunc(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_self), __pyx_v_f);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_96_applyfunc(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self, PyObject *__pyx_v_f) {
  int __pyx_v_nr;
  int __pyx_v_nc;
  int __pyx_v_i;
  int __pyx_v_j;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_applyfunc", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3922
 * 
 *     def _applyfunc(self, f):
 *         cdef int nr = self.nrows()             # <<<<<<<<<<<<<<
 *         cdef int nc = self.ncols()
 *         for i in range(nr):
*/
  __pyx_t_2 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_nrows, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3922, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_t_4 = __Pyx_PyLong_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3922, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_nr = __pyx_t_4;

  /* "symengine/lib/symengine_wrapper.pyx":3923
 *     def _applyfunc(self, f):
 *         cdef int nr = self.nrows()
 *         cdef int nc = self.ncols()             # <<<<<<<<<<<<<<
 *         for i in range(nr):
 *             for j in range(nc):
*/
  __pyx_t_2 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_ncols, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3923, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_t_4 = __Pyx_PyLong_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3923, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_nc = __pyx_t_4;

  /* "symengine/lib/symengine_wrapper.pyx":3924
 *         cdef int nr = self.nrows()
 *         cdef int nc = self.ncols()
 *         for i in range(nr):             # <<<<<<<<<<<<<<
 *             for j in range(nc):
 *                 self._set(i, j, f(self._get(i, j)))
*/
  __pyx_t_4 = __pyx_v_nr;
  __pyx_t_5 = __pyx_t_4;
  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
    __pyx_v_i = __pyx_t_6;

    /* "symengine/lib/symengine_wrapper.pyx":3925
 *         cdef int nc = self.ncols()
 *         for i in range(nr):
 *             for j in range(nc):             # <<<<<<<<<<<<<<
 *                 self._set(i, j, f(self._get(i, j)))
 * 
*/
    __pyx_t_7 = __pyx_v_nc;
    __pyx_t_8 = __pyx_t_7;
    for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
      __pyx_v_j = __pyx_t_9;

      /* "symengine/lib/symengine_wrapper.pyx":3926
 *         for i in range(nr):
 *             for j in range(nc):
 *                 self._set(i, j, f(self._get(i, j)))             # <<<<<<<<<<<<<<
 * 
 *     def msubs(self, *args):
*/
      __pyx_t_2 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_10 = __Pyx_PyLong_From_int(__pyx_v_i); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3926, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_11 = __Pyx_PyLong_From_int(__pyx_v_j); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3926, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_13 = NULL;
      __Pyx_INCREF(__pyx_v_f);
      __pyx_t_14 = __pyx_v_f; 
      __pyx_t_16 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_16);
      __pyx_t_17 = __Pyx_PyLong_From_int(__pyx_v_i); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 3926, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_17);
      __pyx_t_18 = __Pyx_PyLong_From_int(__pyx_v_j); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 3926, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_18);
      __pyx_t_3 = 0;
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_16, __pyx_t_17, __pyx_t_18};
        __pyx_t_15 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_2, __pyx_callargs+__pyx_t_3, (3-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
        __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
        __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
        if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3926, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_15);
      }
      __pyx_t_3 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_14))) {
        __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_14);
        assert(__pyx_t_13);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_14);
        __Pyx_INCREF(__pyx_t_13);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_14, __pyx__function);
        __pyx_t_3 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_13, __pyx_t_15};
        __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_14, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3926, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
      }
      __pyx_t_3 = 0;
      {
        PyObject *__pyx_callargs[4] = {__pyx_t_2, __pyx_t_10, __pyx_t_11, __pyx_t_12};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_set_2, __pyx_callargs+__pyx_t_3, (4-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3926, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
  }

  /* "symengine/lib/symengine_wrapper.pyx":3921
 *         return out
 * 
 *     def _applyfunc(self, f):             # <<<<<<<<<<<<<<
 *         cdef int nr = self.nrows()
 *         cdef int nc = self.ncols()
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_XDECREF(__pyx_t_17);
  __Pyx_XDECREF(__pyx_t_18);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase._applyfunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3928
 *                 self._set(i, j, f(self._get(i, j)))
 * 
 *     def msubs(self, *args):             # <<<<<<<<<<<<<<
 *         cdef _DictBasic D = get_dict(*args)
 *         return self.applyfunc(lambda x: x.msubs(D))
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_99msubs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_99msubs = {"msubs", (PyCFunction)(void(*)(void))(PyCFunctionWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_99msubs, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_99msubs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_args = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("msubs (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("msubs", __pyx_kwds); return NULL;}
  __Pyx_INCREF(__pyx_args);
  __pyx_v_args = __pyx_args;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_98msubs(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_self), __pyx_v_args);

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

/* "symengine/lib/symengine_wrapper.pyx":3930
 *     def msubs(self, *args):
 *         cdef _DictBasic D = get_dict(*args)
 *         return self.applyfunc(lambda x: x.msubs(D))             # <<<<<<<<<<<<<<
 * 
 *     def _diff(self, Basic x):
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_5msubs_lambda(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_5msubs_lambda = {"lambda", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_5msubs_lambda, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_5msubs_lambda(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_x = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_x,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 3930, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3930, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "lambda", 0) < (0)) __PYX_ERR(0, 3930, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("lambda", 1, 1, 1, i); __PYX_ERR(0, 3930, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3930, __pyx_L3_error)
    }
    __pyx_v_x = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("lambda", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3930, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.msubs.lambda", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_lambda_funcdef_lambda(__pyx_self, __pyx_v_x);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_lambda_funcdef_lambda(PyObject *__pyx_self, PyObject *__pyx_v_x) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct__msubs *__pyx_cur_scope;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct__msubs *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("lambda", 0);
  __pyx_outer_scope = (struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct__msubs *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_v_x;
  __Pyx_INCREF(__pyx_t_2);
  if (unlikely(!__pyx_cur_scope->__pyx_v_D)) { __Pyx_RaiseClosureNameError("D"); __PYX_ERR(0, 3930, __pyx_L1_error) }
  __pyx_t_3 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, ((PyObject *)__pyx_cur_scope->__pyx_v_D)};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_msubs, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3930, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.msubs.lambda", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3928
 *                 self._set(i, j, f(self._get(i, j)))
 * 
 *     def msubs(self, *args):             # <<<<<<<<<<<<<<
 *         cdef _DictBasic D = get_dict(*args)
 *         return self.applyfunc(lambda x: x.msubs(D))
*/

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_98msubs(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self, PyObject *__pyx_v_args) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct__msubs *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("msubs", 0);
  __pyx_cur_scope = (struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct__msubs *)__pyx_tp_new_9symengine_3lib_17symengine_wrapper___pyx_scope_struct__msubs(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct__msubs, __pyx_mstate_global->__pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct__msubs *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 3928, __pyx_L1_error)
  } else {
    __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
  }

  /* "symengine/lib/symengine_wrapper.pyx":3929
 * 
 *     def msubs(self, *args):
 *         cdef _DictBasic D = get_dict(*args)             # <<<<<<<<<<<<<<
 *         return self.applyfunc(lambda x: x.msubs(D))
 * 
*/
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_get_dict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3929, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3929, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper__DictBasic))))) __PYX_ERR(0, 3929, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_cur_scope->__pyx_v_D = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper__DictBasic *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3930
 *     def msubs(self, *args):
 *         cdef _DictBasic D = get_dict(*args)
 *         return self.applyfunc(lambda x: x.msubs(D))             # <<<<<<<<<<<<<<
 * 
 *     def _diff(self, Basic x):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_5msubs_lambda, 0, __pyx_mstate_global->__pyx_n_u_msubs_locals_lambda, ((PyObject*)__pyx_cur_scope), __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3930, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_3};
    __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_applyfunc, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3930, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3928
 *                 self._set(i, j, f(self._get(i, j)))
 * 
 *     def msubs(self, *args):             # <<<<<<<<<<<<<<
 *         cdef _DictBasic D = get_dict(*args)
 *         return self.applyfunc(lambda x: x.msubs(D))
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.msubs", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_DECREF((PyObject *)__pyx_cur_scope);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3932
 *         return self.applyfunc(lambda x: x.msubs(D))
 * 
 *     def _diff(self, Basic x):             # <<<<<<<<<<<<<<
 *         cdef DenseMatrixBase R = self.__class__(self.rows, self.cols)
 *         symengine.diff(<const symengine.DenseMatrix &>deref(self.thisptr),
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_101_diff(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_101_diff = {"_diff", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_101_diff, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_101_diff(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_x = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_diff (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_x,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 3932, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3932, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_diff", 0) < (0)) __PYX_ERR(0, 3932, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_diff", 1, 1, 1, i); __PYX_ERR(0, 3932, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3932, __pyx_L3_error)
    }
    __pyx_v_x = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_diff", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3932, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase._diff", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic, 1, "x", 0))) __PYX_ERR(0, 3932, __pyx_L1_error)
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_100_diff(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_self), __pyx_v_x);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_100_diff(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self, struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_x) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_R = 0;
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_diff", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3933
 * 
 *     def _diff(self, Basic x):
 *         cdef DenseMatrixBase R = self.__class__(self.rows, self.cols)             # <<<<<<<<<<<<<<
 *         symengine.diff(<const symengine.DenseMatrix &>deref(self.thisptr),
 *                 x.thisptr, <symengine.DenseMatrix &>deref(R.thisptr))
*/
  __pyx_t_2 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_rows); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3933, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_cols); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3933, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_t_3, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_class, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3933, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase))))) __PYX_ERR(0, 3933, __pyx_L1_error)
  __pyx_v_R = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3934
 *     def _diff(self, Basic x):
 *         cdef DenseMatrixBase R = self.__class__(self.rows, self.cols)
 *         symengine.diff(<const symengine.DenseMatrix &>deref(self.thisptr),             # <<<<<<<<<<<<<<
 *                 x.thisptr, <symengine.DenseMatrix &>deref(R.thisptr))
 *         return R
*/
  try {
    SymEngine::sdiff(((SymEngine::DenseMatrix const &)(*__pyx_v_self->__pyx_base.thisptr)), __pyx_v_x->thisptr, ((SymEngine::DenseMatrix &)(*__pyx_v_R->__pyx_base.thisptr)));
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 3934, __pyx_L1_error)
  }

  /* "symengine/lib/symengine_wrapper.pyx":3936
 *         symengine.diff(<const symengine.DenseMatrix &>deref(self.thisptr),
 *                 x.thisptr, <symengine.DenseMatrix &>deref(R.thisptr))
 *         return R             # <<<<<<<<<<<<<<
 * 
 *     def diff(self, *args):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_R);
  __pyx_r = ((PyObject *)__pyx_v_R);
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3932
 *         return self.applyfunc(lambda x: x.msubs(D))
 * 
 *     def _diff(self, Basic x):             # <<<<<<<<<<<<<<
 *         cdef DenseMatrixBase R = self.__class__(self.rows, self.cols)
 *         symengine.diff(<const symengine.DenseMatrix &>deref(self.thisptr),
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase._diff", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_R);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3938
 *         return R
 * 
 *     def diff(self, *args):             # <<<<<<<<<<<<<<
 *         return _diff(self, *args)
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_103diff(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_103diff = {"diff", (PyCFunction)(void(*)(void))(PyCFunctionWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_103diff, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_103diff(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_args = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("diff (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("diff", __pyx_kwds); return NULL;}
  __Pyx_INCREF(__pyx_args);
  __pyx_v_args = __pyx_args;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_102diff(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_self), __pyx_v_args);

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_102diff(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self, PyObject *__pyx_v_args) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("diff", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3939
 * 
 *     def diff(self, *args):
 *         return _diff(self, *args)             # <<<<<<<<<<<<<<
 * 
 *     #TODO: implement this in C++
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_diff); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3939, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3939, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF((PyObject *)__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self)) != (0)) __PYX_ERR(0, 3939, __pyx_L1_error);
  __pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_v_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3939, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3939, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3938
 *         return R
 * 
 *     def diff(self, *args):             # <<<<<<<<<<<<<<
 *         return _diff(self, *args)
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.diff", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3942
 * 
 *     #TODO: implement this in C++
 *     def subs(self, *args):             # <<<<<<<<<<<<<<
 *         cdef _DictBasic D = get_dict(*args)
 *         return self.applyfunc(lambda x: x.subs(D))
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_105subs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_105subs = {"subs", (PyCFunction)(void(*)(void))(PyCFunctionWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_105subs, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_105subs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_args = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("subs (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("subs", __pyx_kwds); return NULL;}
  __Pyx_INCREF(__pyx_args);
  __pyx_v_args = __pyx_args;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_104subs(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_self), __pyx_v_args);

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

/* "symengine/lib/symengine_wrapper.pyx":3944
 *     def subs(self, *args):
 *         cdef _DictBasic D = get_dict(*args)
 *         return self.applyfunc(lambda x: x.subs(D))             # <<<<<<<<<<<<<<
 * 
 *     def xreplace(self, *args):
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_4subs_lambda1(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_4subs_lambda1 = {"lambda1", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_4subs_lambda1, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_4subs_lambda1(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_x = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda1 (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_x,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 3944, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3944, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "lambda1", 0) < (0)) __PYX_ERR(0, 3944, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("lambda1", 1, 1, 1, i); __PYX_ERR(0, 3944, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3944, __pyx_L3_error)
    }
    __pyx_v_x = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("lambda1", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3944, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.subs.lambda1", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_lambda_funcdef_lambda1(__pyx_self, __pyx_v_x);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_lambda_funcdef_lambda1(PyObject *__pyx_self, PyObject *__pyx_v_x) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_1_subs *__pyx_cur_scope;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_1_subs *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("lambda1", 0);
  __pyx_outer_scope = (struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_1_subs *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_v_x;
  __Pyx_INCREF(__pyx_t_2);
  if (unlikely(!__pyx_cur_scope->__pyx_v_D)) { __Pyx_RaiseClosureNameError("D"); __PYX_ERR(0, 3944, __pyx_L1_error) }
  __pyx_t_3 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, ((PyObject *)__pyx_cur_scope->__pyx_v_D)};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_subs, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3944, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.subs.lambda1", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3942
 * 
 *     #TODO: implement this in C++
 *     def subs(self, *args):             # <<<<<<<<<<<<<<
 *         cdef _DictBasic D = get_dict(*args)
 *         return self.applyfunc(lambda x: x.subs(D))
*/

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_104subs(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self, PyObject *__pyx_v_args) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_1_subs *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("subs", 0);
  __pyx_cur_scope = (struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_1_subs *)__pyx_tp_new_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_1_subs(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_1_subs, __pyx_mstate_global->__pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_1_subs *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 3942, __pyx_L1_error)
  } else {
    __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
  }

  /* "symengine/lib/symengine_wrapper.pyx":3943
 *     #TODO: implement this in C++
 *     def subs(self, *args):
 *         cdef _DictBasic D = get_dict(*args)             # <<<<<<<<<<<<<<
 *         return self.applyfunc(lambda x: x.subs(D))
 * 
*/
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_get_dict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3943, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3943, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper__DictBasic))))) __PYX_ERR(0, 3943, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_cur_scope->__pyx_v_D = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper__DictBasic *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3944
 *     def subs(self, *args):
 *         cdef _DictBasic D = get_dict(*args)
 *         return self.applyfunc(lambda x: x.subs(D))             # <<<<<<<<<<<<<<
 * 
 *     def xreplace(self, *args):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_4subs_lambda1, 0, __pyx_mstate_global->__pyx_n_u_subs_locals_lambda, ((PyObject*)__pyx_cur_scope), __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[1])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3944, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_3};
    __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_applyfunc, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3944, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3942
 * 
 *     #TODO: implement this in C++
 *     def subs(self, *args):             # <<<<<<<<<<<<<<
 *         cdef _DictBasic D = get_dict(*args)
 *         return self.applyfunc(lambda x: x.subs(D))
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.subs", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_DECREF((PyObject *)__pyx_cur_scope);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3946
 *         return self.applyfunc(lambda x: x.subs(D))
 * 
 *     def xreplace(self, *args):             # <<<<<<<<<<<<<<
 *         cdef _DictBasic D = get_dict(*args)
 *         return self.applyfunc(lambda x: x.xreplace(D))
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_107xreplace(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_107xreplace = {"xreplace", (PyCFunction)(void(*)(void))(PyCFunctionWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_107xreplace, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_107xreplace(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_args = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("xreplace (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("xreplace", __pyx_kwds); return NULL;}
  __Pyx_INCREF(__pyx_args);
  __pyx_v_args = __pyx_args;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_106xreplace(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_self), __pyx_v_args);

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

/* "symengine/lib/symengine_wrapper.pyx":3948
 *     def xreplace(self, *args):
 *         cdef _DictBasic D = get_dict(*args)
 *         return self.applyfunc(lambda x: x.xreplace(D))             # <<<<<<<<<<<<<<
 * 
 *     replace = xreplace
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_8xreplace_lambda2(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_8xreplace_lambda2 = {"lambda2", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_8xreplace_lambda2, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_8xreplace_lambda2(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_x = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda2 (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_x,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 3948, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3948, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "lambda2", 0) < (0)) __PYX_ERR(0, 3948, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("lambda2", 1, 1, 1, i); __PYX_ERR(0, 3948, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3948, __pyx_L3_error)
    }
    __pyx_v_x = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("lambda2", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3948, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.xreplace.lambda2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_lambda_funcdef_lambda2(__pyx_self, __pyx_v_x);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_lambda_funcdef_lambda2(PyObject *__pyx_self, PyObject *__pyx_v_x) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_2_xreplace *__pyx_cur_scope;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_2_xreplace *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("lambda2", 0);
  __pyx_outer_scope = (struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_2_xreplace *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_v_x;
  __Pyx_INCREF(__pyx_t_2);
  if (unlikely(!__pyx_cur_scope->__pyx_v_D)) { __Pyx_RaiseClosureNameError("D"); __PYX_ERR(0, 3948, __pyx_L1_error) }
  __pyx_t_3 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, ((PyObject *)__pyx_cur_scope->__pyx_v_D)};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_xreplace, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3948, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.xreplace.lambda2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3946
 *         return self.applyfunc(lambda x: x.subs(D))
 * 
 *     def xreplace(self, *args):             # <<<<<<<<<<<<<<
 *         cdef _DictBasic D = get_dict(*args)
 *         return self.applyfunc(lambda x: x.xreplace(D))
*/

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_106xreplace(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self, PyObject *__pyx_v_args) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_2_xreplace *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("xreplace", 0);
  __pyx_cur_scope = (struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_2_xreplace *)__pyx_tp_new_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_2_xreplace(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_2_xreplace, __pyx_mstate_global->__pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_2_xreplace *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 3946, __pyx_L1_error)
  } else {
    __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
  }

  /* "symengine/lib/symengine_wrapper.pyx":3947
 * 
 *     def xreplace(self, *args):
 *         cdef _DictBasic D = get_dict(*args)             # <<<<<<<<<<<<<<
 *         return self.applyfunc(lambda x: x.xreplace(D))
 * 
*/
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_get_dict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3947, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3947, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper__DictBasic))))) __PYX_ERR(0, 3947, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_cur_scope->__pyx_v_D = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper__DictBasic *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3948
 *     def xreplace(self, *args):
 *         cdef _DictBasic D = get_dict(*args)
 *         return self.applyfunc(lambda x: x.xreplace(D))             # <<<<<<<<<<<<<<
 * 
 *     replace = xreplace
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_8xreplace_lambda2, 0, __pyx_mstate_global->__pyx_n_u_xreplace_locals_lambda, ((PyObject*)__pyx_cur_scope), __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[2])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3948, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_3};
    __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_applyfunc, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3948, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3946
 *         return self.applyfunc(lambda x: x.subs(D))
 * 
 *     def xreplace(self, *args):             # <<<<<<<<<<<<<<
 *         cdef _DictBasic D = get_dict(*args)
 *         return self.applyfunc(lambda x: x.xreplace(D))
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.xreplace", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_DECREF((PyObject *)__pyx_cur_scope);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3952
 *     replace = xreplace
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def free_symbols(self):
 *         cdef symengine.set_basic _set = symengine.free_symbols(deref(self.thisptr))
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_12free_symbols_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_12free_symbols_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_12free_symbols___get__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_12free_symbols___get__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self) {
  SymEngine::set_basic __pyx_v__set;
  std::set<SymEngine::RCP<const SymEngine::Basic>> ::value_type __pyx_9genexpr14__pyx_v_elem;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  SymEngine::set_basic __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  std::set<SymEngine::RCP<const SymEngine::Basic>> ::iterator __pyx_t_3;
  std::set<SymEngine::RCP<const SymEngine::Basic>> ::value_type __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3954
 *     @property
 *     def free_symbols(self):
 *         cdef symengine.set_basic _set = symengine.free_symbols(deref(self.thisptr))             # <<<<<<<<<<<<<<
 *         return {c2py(<rcp_const_basic>(elem)) for elem in _set}
 * 
*/
  try {
    __pyx_t_1 = SymEngine::free_symbols((*__pyx_v_self->__pyx_base.thisptr));
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 3954, __pyx_L1_error)
  }
  __pyx_v__set = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_1);

  /* "symengine/lib/symengine_wrapper.pyx":3955
 *     def free_symbols(self):
 *         cdef symengine.set_basic _set = symengine.free_symbols(deref(self.thisptr))
 *         return {c2py(<rcp_const_basic>(elem)) for elem in _set}             # <<<<<<<<<<<<<<
 * 
 *     def _submatrix(self, unsigned r_i, unsigned c_i, unsigned r_j, unsigned c_j, unsigned r_s=1, unsigned c_s=1):
*/
  __Pyx_XDECREF(__pyx_r);
  { /* enter inner scope */
    __pyx_t_2 = PySet_New(NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3955, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __pyx_v__set.begin();
    for (; __pyx_t_3 != __pyx_v__set.end(); ++__pyx_t_3) {
      __pyx_t_4 = *__pyx_t_3;
      __pyx_9genexpr14__pyx_v_elem = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_4);
      __pyx_t_5 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)__pyx_9genexpr14__pyx_v_elem)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3955, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (unlikely(PySet_Add(__pyx_t_2, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 3955, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  } /* exit inner scope */
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3952
 *     replace = xreplace
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def free_symbols(self):
 *         cdef symengine.set_basic _set = symengine.free_symbols(deref(self.thisptr))
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.free_symbols.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3957
 *         return {c2py(<rcp_const_basic>(elem)) for elem in _set}
 * 
 *     def _submatrix(self, unsigned r_i, unsigned c_i, unsigned r_j, unsigned c_j, unsigned r_s=1, unsigned c_s=1):             # <<<<<<<<<<<<<<
 *         r_j, c_j = r_j - 1, c_j - 1
 *         cdef DenseMatrixBase result = self.__class__(((r_j - r_i) // r_s) + 1, ((c_j - c_i) // c_s) + 1)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_109_submatrix(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_109_submatrix = {"_submatrix", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_109_submatrix, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_109_submatrix(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  unsigned int __pyx_v_r_i;
  unsigned int __pyx_v_c_i;
  unsigned int __pyx_v_r_j;
  unsigned int __pyx_v_c_j;
  unsigned int __pyx_v_r_s;
  unsigned int __pyx_v_c_s;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[6] = {0,0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_submatrix (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_r_i,&__pyx_mstate_global->__pyx_n_u_c_i,&__pyx_mstate_global->__pyx_n_u_r_j,&__pyx_mstate_global->__pyx_n_u_c_j,&__pyx_mstate_global->__pyx_n_u_r_s,&__pyx_mstate_global->__pyx_n_u_c_s,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 3957, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  6:
        values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 3957, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 3957, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 3957, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 3957, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3957, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3957, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_submatrix", 0) < (0)) __PYX_ERR(0, 3957, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 4; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_submatrix", 0, 4, 6, i); __PYX_ERR(0, 3957, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  6:
        values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 3957, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 3957, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 3957, __pyx_L3_error)
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 3957, __pyx_L3_error)
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3957, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3957, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_r_i = __Pyx_PyLong_As_unsigned_int(values[0]); if (unlikely((__pyx_v_r_i == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3957, __pyx_L3_error)
    __pyx_v_c_i = __Pyx_PyLong_As_unsigned_int(values[1]); if (unlikely((__pyx_v_c_i == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3957, __pyx_L3_error)
    __pyx_v_r_j = __Pyx_PyLong_As_unsigned_int(values[2]); if (unlikely((__pyx_v_r_j == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3957, __pyx_L3_error)
    __pyx_v_c_j = __Pyx_PyLong_As_unsigned_int(values[3]); if (unlikely((__pyx_v_c_j == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3957, __pyx_L3_error)
    if (values[4]) {
      __pyx_v_r_s = __Pyx_PyLong_As_unsigned_int(values[4]); if (unlikely((__pyx_v_r_s == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3957, __pyx_L3_error)
    } else {
      __pyx_v_r_s = ((unsigned int)1);
    }
    if (values[5]) {
      __pyx_v_c_s = __Pyx_PyLong_As_unsigned_int(values[5]); if (unlikely((__pyx_v_c_s == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3957, __pyx_L3_error)
    } else {
      __pyx_v_c_s = ((unsigned int)1);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_submatrix", 0, 4, 6, __pyx_nargs); __PYX_ERR(0, 3957, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase._submatrix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_108_submatrix(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_self), __pyx_v_r_i, __pyx_v_c_i, __pyx_v_r_j, __pyx_v_c_j, __pyx_v_r_s, __pyx_v_c_s);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_108_submatrix(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self, unsigned int __pyx_v_r_i, unsigned int __pyx_v_c_i, unsigned int __pyx_v_r_j, unsigned int __pyx_v_c_j, unsigned int __pyx_v_r_s, unsigned int __pyx_v_c_s) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  long __pyx_t_1;
  long __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  unsigned int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_submatrix", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3958
 * 
 *     def _submatrix(self, unsigned r_i, unsigned c_i, unsigned r_j, unsigned c_j, unsigned r_s=1, unsigned c_s=1):
 *         r_j, c_j = r_j - 1, c_j - 1             # <<<<<<<<<<<<<<
 *         cdef DenseMatrixBase result = self.__class__(((r_j - r_i) // r_s) + 1, ((c_j - c_i) // c_s) + 1)
 *         deref(self.thisptr).submatrix(deref(result.thisptr), r_i, c_i, r_j, c_j, r_s, c_s)
*/
  __pyx_t_1 = (__pyx_v_r_j - 1);
  __pyx_t_2 = (__pyx_v_c_j - 1);
  __pyx_v_r_j = __pyx_t_1;
  __pyx_v_c_j = __pyx_t_2;

  /* "symengine/lib/symengine_wrapper.pyx":3959
 *     def _submatrix(self, unsigned r_i, unsigned c_i, unsigned r_j, unsigned c_j, unsigned r_s=1, unsigned c_s=1):
 *         r_j, c_j = r_j - 1, c_j - 1
 *         cdef DenseMatrixBase result = self.__class__(((r_j - r_i) // r_s) + 1, ((c_j - c_i) // c_s) + 1)             # <<<<<<<<<<<<<<
 *         deref(self.thisptr).submatrix(deref(result.thisptr), r_i, c_i, r_j, c_j, r_s, c_s)
 *         return result
*/
  __pyx_t_4 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_5 = (__pyx_v_r_j - __pyx_v_r_i);
  if (unlikely(__pyx_v_r_s == 0)) {
    PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
    __PYX_ERR(0, 3959, __pyx_L1_error)
  }
  __pyx_t_6 = __Pyx_PyLong_From_long(((__pyx_t_5 / __pyx_v_r_s) + 1)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3959, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = (__pyx_v_c_j - __pyx_v_c_i);
  if (unlikely(__pyx_v_c_s == 0)) {
    PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
    __PYX_ERR(0, 3959, __pyx_L1_error)
  }
  __pyx_t_7 = __Pyx_PyLong_From_long(((__pyx_t_5 / __pyx_v_c_s) + 1)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3959, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = 0;
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_t_6, __pyx_t_7};
    __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_class, __pyx_callargs+__pyx_t_8, (3-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3959, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase))))) __PYX_ERR(0, 3959, __pyx_L1_error)
  __pyx_v_result = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3960
 *         r_j, c_j = r_j - 1, c_j - 1
 *         cdef DenseMatrixBase result = self.__class__(((r_j - r_i) // r_s) + 1, ((c_j - c_i) // c_s) + 1)
 *         deref(self.thisptr).submatrix(deref(result.thisptr), r_i, c_i, r_j, c_j, r_s, c_s)             # <<<<<<<<<<<<<<
 *         return result
 * 
*/
  (*__pyx_v_self->__pyx_base.thisptr).submatrix((*__pyx_v_result->__pyx_base.thisptr), __pyx_v_r_i, __pyx_v_c_i, __pyx_v_r_j, __pyx_v_c_j, __pyx_v_r_s, __pyx_v_c_s);

  /* "symengine/lib/symengine_wrapper.pyx":3961
 *         cdef DenseMatrixBase result = self.__class__(((r_j - r_i) // r_s) + 1, ((c_j - c_i) // c_s) + 1)
 *         deref(self.thisptr).submatrix(deref(result.thisptr), r_i, c_i, r_j, c_j, r_s, c_s)
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     def LU(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_result);
  __pyx_r = ((PyObject *)__pyx_v_result);
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3957
 *         return {c2py(<rcp_const_basic>(elem)) for elem in _set}
 * 
 *     def _submatrix(self, unsigned r_i, unsigned c_i, unsigned r_j, unsigned c_j, unsigned r_s=1, unsigned c_s=1):             # <<<<<<<<<<<<<<
 *         r_j, c_j = r_j - 1, c_j - 1
 *         cdef DenseMatrixBase result = self.__class__(((r_j - r_i) // r_s) + 1, ((c_j - c_i) // c_s) + 1)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase._submatrix", __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;
}

/* "symengine/lib/symengine_wrapper.pyx":3963
 *         return result
 * 
 *     def LU(self):             # <<<<<<<<<<<<<<
 *         cdef DenseMatrixBase L = self.__class__(self.nrows(), self.ncols())
 *         cdef DenseMatrixBase U = self.__class__(self.nrows(), self.ncols())
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_111LU(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_111LU = {"LU", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_111LU, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_111LU(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("LU (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("LU", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("LU", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_110LU(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_110LU(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_L = 0;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_U = 0;
  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;
  size_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("LU", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3964
 * 
 *     def LU(self):
 *         cdef DenseMatrixBase L = self.__class__(self.nrows(), self.ncols())             # <<<<<<<<<<<<<<
 *         cdef DenseMatrixBase U = self.__class__(self.nrows(), self.ncols())
 *         deref(self.thisptr).LU(deref(L.thisptr), deref(U.thisptr))
*/
  __pyx_t_2 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_4 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_nrows, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3964, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __pyx_t_6 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_6);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
    __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_ncols, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3964, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_t_3, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_class, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3964, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase))))) __PYX_ERR(0, 3964, __pyx_L1_error)
  __pyx_v_L = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3965
 *     def LU(self):
 *         cdef DenseMatrixBase L = self.__class__(self.nrows(), self.ncols())
 *         cdef DenseMatrixBase U = self.__class__(self.nrows(), self.ncols())             # <<<<<<<<<<<<<<
 *         deref(self.thisptr).LU(deref(L.thisptr), deref(U.thisptr))
 *         return L, U
*/
  __pyx_t_4 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_2 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_nrows, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3965, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __pyx_t_6 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_6);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
    __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_ncols, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3965, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_t_3, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_class, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__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;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3965, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase))))) __PYX_ERR(0, 3965, __pyx_L1_error)
  __pyx_v_U = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3966
 *         cdef DenseMatrixBase L = self.__class__(self.nrows(), self.ncols())
 *         cdef DenseMatrixBase U = self.__class__(self.nrows(), self.ncols())
 *         deref(self.thisptr).LU(deref(L.thisptr), deref(U.thisptr))             # <<<<<<<<<<<<<<
 *         return L, U
 * 
*/
  (*__pyx_v_self->__pyx_base.thisptr).LU((*__pyx_v_L->__pyx_base.thisptr), (*__pyx_v_U->__pyx_base.thisptr));

  /* "symengine/lib/symengine_wrapper.pyx":3967
 *         cdef DenseMatrixBase U = self.__class__(self.nrows(), self.ncols())
 *         deref(self.thisptr).LU(deref(L.thisptr), deref(U.thisptr))
 *         return L, U             # <<<<<<<<<<<<<<
 * 
 *     def LUdecomposition(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3967, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF((PyObject *)__pyx_v_L);
  __Pyx_GIVEREF((PyObject *)__pyx_v_L);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_L)) != (0)) __PYX_ERR(0, 3967, __pyx_L1_error);
  __Pyx_INCREF((PyObject *)__pyx_v_U);
  __Pyx_GIVEREF((PyObject *)__pyx_v_U);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_U)) != (0)) __PYX_ERR(0, 3967, __pyx_L1_error);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3963
 *         return result
 * 
 *     def LU(self):             # <<<<<<<<<<<<<<
 *         cdef DenseMatrixBase L = self.__class__(self.nrows(), self.ncols())
 *         cdef DenseMatrixBase U = self.__class__(self.nrows(), self.ncols())
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.LU", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_L);
  __Pyx_XDECREF((PyObject *)__pyx_v_U);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3969
 *         return L, U
 * 
 *     def LUdecomposition(self):             # <<<<<<<<<<<<<<
 *         if self.rows != self.cols:
 *             raise NotImplementedError("LU decomposition not implemented for non-square matrices yet.")
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_113LUdecomposition(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_113LUdecomposition = {"LUdecomposition", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_113LUdecomposition, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_113LUdecomposition(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("LUdecomposition (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("LUdecomposition", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("LUdecomposition", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_112LUdecomposition(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_112LUdecomposition(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_L = 0;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_U = 0;
  std::vector<std::pair<int,int> >  __pyx_v_perm;
  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;
  size_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("LUdecomposition", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3970
 * 
 *     def LUdecomposition(self):
 *         if self.rows != self.cols:             # <<<<<<<<<<<<<<
 *             raise NotImplementedError("LU decomposition not implemented for non-square matrices yet.")
 *         cdef DenseMatrixBase L = self.__class__(self.nrows(), self.ncols())
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_rows); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3970, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_cols); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3970, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3970, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 3970, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(__pyx_t_4)) {

    /* "symengine/lib/symengine_wrapper.pyx":3971
 *     def LUdecomposition(self):
 *         if self.rows != self.cols:
 *             raise NotImplementedError("LU decomposition not implemented for non-square matrices yet.")             # <<<<<<<<<<<<<<
 *         cdef DenseMatrixBase L = self.__class__(self.nrows(), self.ncols())
 *         cdef DenseMatrixBase U = self.__class__(self.nrows(), self.ncols())
*/
    __pyx_t_2 = NULL;
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_LU_decomposition_not_implemented};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_NotImplementedError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3971, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 3971, __pyx_L1_error)

    /* "symengine/lib/symengine_wrapper.pyx":3970
 * 
 *     def LUdecomposition(self):
 *         if self.rows != self.cols:             # <<<<<<<<<<<<<<
 *             raise NotImplementedError("LU decomposition not implemented for non-square matrices yet.")
 *         cdef DenseMatrixBase L = self.__class__(self.nrows(), self.ncols())
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":3972
 *         if self.rows != self.cols:
 *             raise NotImplementedError("LU decomposition not implemented for non-square matrices yet.")
 *         cdef DenseMatrixBase L = self.__class__(self.nrows(), self.ncols())             # <<<<<<<<<<<<<<
 *         cdef DenseMatrixBase U = self.__class__(self.nrows(), self.ncols())
 *         cdef vector[pair[int, int]] perm
*/
  __pyx_t_2 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_6 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_6);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_nrows, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3972, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_t_7 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_7);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL};
    __pyx_t_6 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_ncols, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3972, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
  }
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_t_1, __pyx_t_6};
    __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_class, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3972, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase))))) __PYX_ERR(0, 3972, __pyx_L1_error)
  __pyx_v_L = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3973
 *             raise NotImplementedError("LU decomposition not implemented for non-square matrices yet.")
 *         cdef DenseMatrixBase L = self.__class__(self.nrows(), self.ncols())
 *         cdef DenseMatrixBase U = self.__class__(self.nrows(), self.ncols())             # <<<<<<<<<<<<<<
 *         cdef vector[pair[int, int]] perm
 *         symengine.pivoted_LU(
*/
  __pyx_t_6 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_6);
  __pyx_t_2 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_nrows, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3973, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_t_7 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_7);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL};
    __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_ncols, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3973, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_t_1, __pyx_t_2};
    __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_class, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3973, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase))))) __PYX_ERR(0, 3973, __pyx_L1_error)
  __pyx_v_U = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3975
 *         cdef DenseMatrixBase U = self.__class__(self.nrows(), self.ncols())
 *         cdef vector[pair[int, int]] perm
 *         symengine.pivoted_LU(             # <<<<<<<<<<<<<<
 *             deref(symengine.static_cast_DenseMatrix(self.thisptr)),
 *             deref(symengine.static_cast_DenseMatrix(L.thisptr)),
*/
  try {
    pivoted_LU((*static_cast<SymEngine::DenseMatrix*>(__pyx_v_self->__pyx_base.thisptr)), (*static_cast<SymEngine::DenseMatrix*>(__pyx_v_L->__pyx_base.thisptr)), (*static_cast<SymEngine::DenseMatrix*>(__pyx_v_U->__pyx_base.thisptr)), __pyx_v_perm);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 3975, __pyx_L1_error)
  }

  /* "symengine/lib/symengine_wrapper.pyx":3980
 *             deref(symengine.static_cast_DenseMatrix(U.thisptr)),
 *             perm)
 *         return L, U, perm             # <<<<<<<<<<<<<<
 * 
 *     def LDL(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __pyx_convert_vector_to_py_std_3a__3a_pair_3c_int_2c_int_3e___(__pyx_v_perm); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3980, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3980, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF((PyObject *)__pyx_v_L);
  __Pyx_GIVEREF((PyObject *)__pyx_v_L);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_L)) != (0)) __PYX_ERR(0, 3980, __pyx_L1_error);
  __Pyx_INCREF((PyObject *)__pyx_v_U);
  __Pyx_GIVEREF((PyObject *)__pyx_v_U);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_U)) != (0)) __PYX_ERR(0, 3980, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_3) != (0)) __PYX_ERR(0, 3980, __pyx_L1_error);
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3969
 *         return L, U
 * 
 *     def LUdecomposition(self):             # <<<<<<<<<<<<<<
 *         if self.rows != self.cols:
 *             raise NotImplementedError("LU decomposition not implemented for non-square matrices yet.")
*/

  /* 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_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.LUdecomposition", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_L);
  __Pyx_XDECREF((PyObject *)__pyx_v_U);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3982
 *         return L, U, perm
 * 
 *     def LDL(self):             # <<<<<<<<<<<<<<
 *         cdef DenseMatrixBase L = self.__class__(self.nrows(), self.ncols())
 *         cdef DenseMatrixBase D = self.__class__(self.nrows(), self.ncols())
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_115LDL(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_115LDL = {"LDL", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_115LDL, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_115LDL(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("LDL (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("LDL", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("LDL", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_114LDL(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_114LDL(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_L = 0;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_D = 0;
  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;
  size_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("LDL", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3983
 * 
 *     def LDL(self):
 *         cdef DenseMatrixBase L = self.__class__(self.nrows(), self.ncols())             # <<<<<<<<<<<<<<
 *         cdef DenseMatrixBase D = self.__class__(self.nrows(), self.ncols())
 *         deref(self.thisptr).LDL(deref(L.thisptr), deref(D.thisptr))
*/
  __pyx_t_2 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_4 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_nrows, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3983, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __pyx_t_6 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_6);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
    __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_ncols, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3983, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_t_3, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_class, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3983, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase))))) __PYX_ERR(0, 3983, __pyx_L1_error)
  __pyx_v_L = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3984
 *     def LDL(self):
 *         cdef DenseMatrixBase L = self.__class__(self.nrows(), self.ncols())
 *         cdef DenseMatrixBase D = self.__class__(self.nrows(), self.ncols())             # <<<<<<<<<<<<<<
 *         deref(self.thisptr).LDL(deref(L.thisptr), deref(D.thisptr))
 *         return L, D
*/
  __pyx_t_4 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_2 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_nrows, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3984, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __pyx_t_6 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_6);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
    __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_ncols, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3984, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_t_3, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_class, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__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;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3984, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase))))) __PYX_ERR(0, 3984, __pyx_L1_error)
  __pyx_v_D = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3985
 *         cdef DenseMatrixBase L = self.__class__(self.nrows(), self.ncols())
 *         cdef DenseMatrixBase D = self.__class__(self.nrows(), self.ncols())
 *         deref(self.thisptr).LDL(deref(L.thisptr), deref(D.thisptr))             # <<<<<<<<<<<<<<
 *         return L, D
 * 
*/
  (*__pyx_v_self->__pyx_base.thisptr).LDL((*__pyx_v_L->__pyx_base.thisptr), (*__pyx_v_D->__pyx_base.thisptr));

  /* "symengine/lib/symengine_wrapper.pyx":3986
 *         cdef DenseMatrixBase D = self.__class__(self.nrows(), self.ncols())
 *         deref(self.thisptr).LDL(deref(L.thisptr), deref(D.thisptr))
 *         return L, D             # <<<<<<<<<<<<<<
 * 
 *     def solve(self, b, method='LU'):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3986, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF((PyObject *)__pyx_v_L);
  __Pyx_GIVEREF((PyObject *)__pyx_v_L);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_L)) != (0)) __PYX_ERR(0, 3986, __pyx_L1_error);
  __Pyx_INCREF((PyObject *)__pyx_v_D);
  __Pyx_GIVEREF((PyObject *)__pyx_v_D);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_D)) != (0)) __PYX_ERR(0, 3986, __pyx_L1_error);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3982
 *         return L, U, perm
 * 
 *     def LDL(self):             # <<<<<<<<<<<<<<
 *         cdef DenseMatrixBase L = self.__class__(self.nrows(), self.ncols())
 *         cdef DenseMatrixBase D = self.__class__(self.nrows(), self.ncols())
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.LDL", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_L);
  __Pyx_XDECREF((PyObject *)__pyx_v_D);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":3988
 *         return L, D
 * 
 *     def solve(self, b, method='LU'):             # <<<<<<<<<<<<<<
 *         cdef DenseMatrixBase b_ = sympify(b)
 *         cdef DenseMatrixBase x = self.__class__(b_.nrows(), b_.ncols())
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_117solve(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_117solve = {"solve", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_117solve, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_117solve(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_b = 0;
  PyObject *__pyx_v_method = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("solve (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_b,&__pyx_mstate_global->__pyx_n_u_method,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 3988, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3988, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3988, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "solve", 0) < (0)) __PYX_ERR(0, 3988, __pyx_L3_error)
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_n_u_LU));
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("solve", 0, 1, 2, i); __PYX_ERR(0, 3988, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3988, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3988, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_n_u_LU));
    }
    __pyx_v_b = values[0];
    __pyx_v_method = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("solve", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 3988, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.solve", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_116solve(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_self), __pyx_v_b, __pyx_v_method);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_116solve(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self, PyObject *__pyx_v_b, PyObject *__pyx_v_method) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_b_ = 0;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_x = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("solve", 0);

  /* "symengine/lib/symengine_wrapper.pyx":3989
 * 
 *     def solve(self, b, method='LU'):
 *         cdef DenseMatrixBase b_ = sympify(b)             # <<<<<<<<<<<<<<
 *         cdef DenseMatrixBase x = self.__class__(b_.nrows(), b_.ncols())
 * 
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3989, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_b};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3989, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase))))) __PYX_ERR(0, 3989, __pyx_L1_error)
  __pyx_v_b_ = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3990
 *     def solve(self, b, method='LU'):
 *         cdef DenseMatrixBase b_ = sympify(b)
 *         cdef DenseMatrixBase x = self.__class__(b_.nrows(), b_.ncols())             # <<<<<<<<<<<<<<
 * 
 *         if method.upper() == 'LU':
*/
  __pyx_t_3 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_5 = ((PyObject *)__pyx_v_b_);
  __Pyx_INCREF(__pyx_t_5);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
    __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_nrows, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3990, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  __pyx_t_6 = ((PyObject *)__pyx_v_b_);
  __Pyx_INCREF(__pyx_t_6);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
    __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_ncols, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3990, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
  }
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_t_2, __pyx_t_5};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_class, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3990, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase))))) __PYX_ERR(0, 3990, __pyx_L1_error)
  __pyx_v_x = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3992
 *         cdef DenseMatrixBase x = self.__class__(b_.nrows(), b_.ncols())
 * 
 *         if method.upper() == 'LU':             # <<<<<<<<<<<<<<
 *             ## solve() method of DenseMatrixBase uses LU factorization
 *             symengine.pivoted_LU_solve(deref(symengine.static_cast_DenseMatrix(self.thisptr)),
*/
  __pyx_t_5 = __pyx_v_method;
  __Pyx_INCREF(__pyx_t_5);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_upper, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3992, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_LU, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 3992, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_7) {

    /* "symengine/lib/symengine_wrapper.pyx":3994
 *         if method.upper() == 'LU':
 *             ## solve() method of DenseMatrixBase uses LU factorization
 *             symengine.pivoted_LU_solve(deref(symengine.static_cast_DenseMatrix(self.thisptr)),             # <<<<<<<<<<<<<<
 *                 deref(symengine.static_cast_DenseMatrix(b_.thisptr)),
 *                 deref(symengine.static_cast_DenseMatrix(x.thisptr)))
*/
    try {
      SymEngine::pivoted_LU_solve((*static_cast<SymEngine::DenseMatrix*>(__pyx_v_self->__pyx_base.thisptr)), (*static_cast<SymEngine::DenseMatrix*>(__pyx_v_b_->__pyx_base.thisptr)), (*static_cast<SymEngine::DenseMatrix*>(__pyx_v_x->__pyx_base.thisptr)));
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(0, 3994, __pyx_L1_error)
    }

    /* "symengine/lib/symengine_wrapper.pyx":3992
 *         cdef DenseMatrixBase x = self.__class__(b_.nrows(), b_.ncols())
 * 
 *         if method.upper() == 'LU':             # <<<<<<<<<<<<<<
 *             ## solve() method of DenseMatrixBase uses LU factorization
 *             symengine.pivoted_LU_solve(deref(symengine.static_cast_DenseMatrix(self.thisptr)),
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":3997
 *                 deref(symengine.static_cast_DenseMatrix(b_.thisptr)),
 *                 deref(symengine.static_cast_DenseMatrix(x.thisptr)))
 *         elif method.upper() == 'FFLU':             # <<<<<<<<<<<<<<
 *             symengine.FFLU_solve(deref(symengine.static_cast_DenseMatrix(self.thisptr)),
 *                 deref(symengine.static_cast_DenseMatrix(b_.thisptr)),
*/
  __pyx_t_5 = __pyx_v_method;
  __Pyx_INCREF(__pyx_t_5);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_upper, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3997, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_FFLU, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 3997, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_7) {

    /* "symengine/lib/symengine_wrapper.pyx":3998
 *                 deref(symengine.static_cast_DenseMatrix(x.thisptr)))
 *         elif method.upper() == 'FFLU':
 *             symengine.FFLU_solve(deref(symengine.static_cast_DenseMatrix(self.thisptr)),             # <<<<<<<<<<<<<<
 *                 deref(symengine.static_cast_DenseMatrix(b_.thisptr)),
 *                 deref(symengine.static_cast_DenseMatrix(x.thisptr)))
*/
    try {
      SymEngine::fraction_free_LU_solve((*static_cast<SymEngine::DenseMatrix*>(__pyx_v_self->__pyx_base.thisptr)), (*static_cast<SymEngine::DenseMatrix*>(__pyx_v_b_->__pyx_base.thisptr)), (*static_cast<SymEngine::DenseMatrix*>(__pyx_v_x->__pyx_base.thisptr)));
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(0, 3998, __pyx_L1_error)
    }

    /* "symengine/lib/symengine_wrapper.pyx":3997
 *                 deref(symengine.static_cast_DenseMatrix(b_.thisptr)),
 *                 deref(symengine.static_cast_DenseMatrix(x.thisptr)))
 *         elif method.upper() == 'FFLU':             # <<<<<<<<<<<<<<
 *             symengine.FFLU_solve(deref(symengine.static_cast_DenseMatrix(self.thisptr)),
 *                 deref(symengine.static_cast_DenseMatrix(b_.thisptr)),
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":4001
 *                 deref(symengine.static_cast_DenseMatrix(b_.thisptr)),
 *                 deref(symengine.static_cast_DenseMatrix(x.thisptr)))
 *         elif method.upper() == 'LDL':             # <<<<<<<<<<<<<<
 *             symengine.LDL_solve(deref(symengine.static_cast_DenseMatrix(self.thisptr)),
 *                 deref(symengine.static_cast_DenseMatrix(b_.thisptr)),
*/
  __pyx_t_5 = __pyx_v_method;
  __Pyx_INCREF(__pyx_t_5);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_upper, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4001, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_LDL, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 4001, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_7) {

    /* "symengine/lib/symengine_wrapper.pyx":4002
 *                 deref(symengine.static_cast_DenseMatrix(x.thisptr)))
 *         elif method.upper() == 'LDL':
 *             symengine.LDL_solve(deref(symengine.static_cast_DenseMatrix(self.thisptr)),             # <<<<<<<<<<<<<<
 *                 deref(symengine.static_cast_DenseMatrix(b_.thisptr)),
 *                 deref(symengine.static_cast_DenseMatrix(x.thisptr)))
*/
    try {
      SymEngine::LDL_solve((*static_cast<SymEngine::DenseMatrix*>(__pyx_v_self->__pyx_base.thisptr)), (*static_cast<SymEngine::DenseMatrix*>(__pyx_v_b_->__pyx_base.thisptr)), (*static_cast<SymEngine::DenseMatrix*>(__pyx_v_x->__pyx_base.thisptr)));
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(0, 4002, __pyx_L1_error)
    }

    /* "symengine/lib/symengine_wrapper.pyx":4001
 *                 deref(symengine.static_cast_DenseMatrix(b_.thisptr)),
 *                 deref(symengine.static_cast_DenseMatrix(x.thisptr)))
 *         elif method.upper() == 'LDL':             # <<<<<<<<<<<<<<
 *             symengine.LDL_solve(deref(symengine.static_cast_DenseMatrix(self.thisptr)),
 *                 deref(symengine.static_cast_DenseMatrix(b_.thisptr)),
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":4005
 *                 deref(symengine.static_cast_DenseMatrix(b_.thisptr)),
 *                 deref(symengine.static_cast_DenseMatrix(x.thisptr)))
 *         elif method.upper() == 'FFGJ':             # <<<<<<<<<<<<<<
 *             symengine.FFGJ_solve(deref(symengine.static_cast_DenseMatrix(self.thisptr)),
 *                 deref(symengine.static_cast_DenseMatrix(b_.thisptr)),
*/
  __pyx_t_5 = __pyx_v_method;
  __Pyx_INCREF(__pyx_t_5);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_upper, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4005, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_FFGJ, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 4005, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (likely(__pyx_t_7)) {

    /* "symengine/lib/symengine_wrapper.pyx":4006
 *                 deref(symengine.static_cast_DenseMatrix(x.thisptr)))
 *         elif method.upper() == 'FFGJ':
 *             symengine.FFGJ_solve(deref(symengine.static_cast_DenseMatrix(self.thisptr)),             # <<<<<<<<<<<<<<
 *                 deref(symengine.static_cast_DenseMatrix(b_.thisptr)),
 *                 deref(symengine.static_cast_DenseMatrix(x.thisptr)))
*/
    try {
      SymEngine::fraction_free_gauss_jordan_solve((*static_cast<SymEngine::DenseMatrix*>(__pyx_v_self->__pyx_base.thisptr)), (*static_cast<SymEngine::DenseMatrix*>(__pyx_v_b_->__pyx_base.thisptr)), (*static_cast<SymEngine::DenseMatrix*>(__pyx_v_x->__pyx_base.thisptr)));
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(0, 4006, __pyx_L1_error)
    }

    /* "symengine/lib/symengine_wrapper.pyx":4005
 *                 deref(symengine.static_cast_DenseMatrix(b_.thisptr)),
 *                 deref(symengine.static_cast_DenseMatrix(x.thisptr)))
 *         elif method.upper() == 'FFGJ':             # <<<<<<<<<<<<<<
 *             symengine.FFGJ_solve(deref(symengine.static_cast_DenseMatrix(self.thisptr)),
 *                 deref(symengine.static_cast_DenseMatrix(b_.thisptr)),
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":4010
 *                 deref(symengine.static_cast_DenseMatrix(x.thisptr)))
 *         else:
 *             raise Exception("Unsupported method.")             # <<<<<<<<<<<<<<
 * 
 *         return x
*/
  /*else*/ {
    __pyx_t_5 = NULL;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_Unsupported_method};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_Exception)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4010, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 4010, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "symengine/lib/symengine_wrapper.pyx":4012
 *             raise Exception("Unsupported method.")
 * 
 *         return x             # <<<<<<<<<<<<<<
 * 
 *     def LUsolve(self, b):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_x);
  __pyx_r = ((PyObject *)__pyx_v_x);
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":3988
 *         return L, D
 * 
 *     def solve(self, b, method='LU'):             # <<<<<<<<<<<<<<
 *         cdef DenseMatrixBase b_ = sympify(b)
 *         cdef DenseMatrixBase x = self.__class__(b_.nrows(), b_.ncols())
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.solve", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_b_);
  __Pyx_XDECREF((PyObject *)__pyx_v_x);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4014
 *         return x
 * 
 *     def LUsolve(self, b):             # <<<<<<<<<<<<<<
 *         cdef DenseMatrixBase b_ = sympify(b)
 *         cdef DenseMatrixBase x = self.__class__(b.nrows(), b.ncols())
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_119LUsolve(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_119LUsolve = {"LUsolve", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_119LUsolve, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_119LUsolve(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_b = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("LUsolve (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_b,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 4014, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4014, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "LUsolve", 0) < (0)) __PYX_ERR(0, 4014, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("LUsolve", 1, 1, 1, i); __PYX_ERR(0, 4014, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4014, __pyx_L3_error)
    }
    __pyx_v_b = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("LUsolve", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4014, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.LUsolve", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_118LUsolve(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_self), __pyx_v_b);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_118LUsolve(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self, PyObject *__pyx_v_b) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_b_ = 0;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_x = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("LUsolve", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4015
 * 
 *     def LUsolve(self, b):
 *         cdef DenseMatrixBase b_ = sympify(b)             # <<<<<<<<<<<<<<
 *         cdef DenseMatrixBase x = self.__class__(b.nrows(), b.ncols())
 *         symengine.pivoted_LU_solve(deref(symengine.static_cast_DenseMatrix(self.thisptr)),
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4015, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_b};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4015, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase))))) __PYX_ERR(0, 4015, __pyx_L1_error)
  __pyx_v_b_ = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4016
 *     def LUsolve(self, b):
 *         cdef DenseMatrixBase b_ = sympify(b)
 *         cdef DenseMatrixBase x = self.__class__(b.nrows(), b.ncols())             # <<<<<<<<<<<<<<
 *         symengine.pivoted_LU_solve(deref(symengine.static_cast_DenseMatrix(self.thisptr)),
 *             deref(symengine.static_cast_DenseMatrix(b_.thisptr)),
*/
  __pyx_t_3 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_5 = __pyx_v_b;
  __Pyx_INCREF(__pyx_t_5);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
    __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_nrows, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4016, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  __pyx_t_6 = __pyx_v_b;
  __Pyx_INCREF(__pyx_t_6);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
    __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_ncols, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4016, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
  }
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_t_2, __pyx_t_5};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_class, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4016, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase))))) __PYX_ERR(0, 4016, __pyx_L1_error)
  __pyx_v_x = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4017
 *         cdef DenseMatrixBase b_ = sympify(b)
 *         cdef DenseMatrixBase x = self.__class__(b.nrows(), b.ncols())
 *         symengine.pivoted_LU_solve(deref(symengine.static_cast_DenseMatrix(self.thisptr)),             # <<<<<<<<<<<<<<
 *             deref(symengine.static_cast_DenseMatrix(b_.thisptr)),
 *             deref(symengine.static_cast_DenseMatrix(x.thisptr)))
*/
  try {
    SymEngine::pivoted_LU_solve((*static_cast<SymEngine::DenseMatrix*>(__pyx_v_self->__pyx_base.thisptr)), (*static_cast<SymEngine::DenseMatrix*>(__pyx_v_b_->__pyx_base.thisptr)), (*static_cast<SymEngine::DenseMatrix*>(__pyx_v_x->__pyx_base.thisptr)));
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 4017, __pyx_L1_error)
  }

  /* "symengine/lib/symengine_wrapper.pyx":4020
 *             deref(symengine.static_cast_DenseMatrix(b_.thisptr)),
 *             deref(symengine.static_cast_DenseMatrix(x.thisptr)))
 *         return x             # <<<<<<<<<<<<<<
 * 
 *     def FFLU(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_x);
  __pyx_r = ((PyObject *)__pyx_v_x);
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4014
 *         return x
 * 
 *     def LUsolve(self, b):             # <<<<<<<<<<<<<<
 *         cdef DenseMatrixBase b_ = sympify(b)
 *         cdef DenseMatrixBase x = self.__class__(b.nrows(), b.ncols())
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.LUsolve", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_b_);
  __Pyx_XDECREF((PyObject *)__pyx_v_x);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4022
 *         return x
 * 
 *     def FFLU(self):             # <<<<<<<<<<<<<<
 *         cdef DenseMatrixBase L = self.__class__(self.nrows(), self.ncols())
 *         cdef DenseMatrixBase U = self.__class__(self.nrows(), self.ncols(), [0]*self.nrows()*self.ncols())
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_121FFLU(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_121FFLU = {"FFLU", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_121FFLU, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_121FFLU(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("FFLU (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("FFLU", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("FFLU", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_120FFLU(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_120FFLU(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_L = 0;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_U = 0;
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_v_j = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *(*__pyx_t_9)(PyObject *);
  PyObject *(*__pyx_t_10)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("FFLU", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4023
 * 
 *     def FFLU(self):
 *         cdef DenseMatrixBase L = self.__class__(self.nrows(), self.ncols())             # <<<<<<<<<<<<<<
 *         cdef DenseMatrixBase U = self.__class__(self.nrows(), self.ncols(), [0]*self.nrows()*self.ncols())
 *         deref(self.thisptr).FFLU(deref(L.thisptr))
*/
  __pyx_t_2 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_4 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_nrows, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4023, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __pyx_t_6 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_6);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
    __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_ncols, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4023, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_t_3, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_class, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4023, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase))))) __PYX_ERR(0, 4023, __pyx_L1_error)
  __pyx_v_L = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4024
 *     def FFLU(self):
 *         cdef DenseMatrixBase L = self.__class__(self.nrows(), self.ncols())
 *         cdef DenseMatrixBase U = self.__class__(self.nrows(), self.ncols(), [0]*self.nrows()*self.ncols())             # <<<<<<<<<<<<<<
 *         deref(self.thisptr).FFLU(deref(L.thisptr))
 * 
*/
  __pyx_t_4 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_2 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_nrows, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4024, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __pyx_t_6 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_6);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
    __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_ncols, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4024, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  __pyx_t_7 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_7);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL};
    __pyx_t_6 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_nrows, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4024, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
  }
  __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4024, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_0);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_7, 0, __pyx_mstate_global->__pyx_int_0) != (0)) __PYX_ERR(0, 4024, __pyx_L1_error);
  { PyObject* __pyx_temp = PyNumber_InPlaceMultiply(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_temp)) __PYX_ERR(0, 4024, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_temp);
    __Pyx_DECREF(__pyx_t_7);
    __pyx_t_7 = __pyx_temp;
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_8 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_8);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL};
    __pyx_t_6 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_ncols, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4024, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
  }
  __pyx_t_8 = PyNumber_Multiply(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4024, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_4, __pyx_t_3, __pyx_t_2, __pyx_t_8};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_class, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4024, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase))))) __PYX_ERR(0, 4024, __pyx_L1_error)
  __pyx_v_U = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4025
 *         cdef DenseMatrixBase L = self.__class__(self.nrows(), self.ncols())
 *         cdef DenseMatrixBase U = self.__class__(self.nrows(), self.ncols(), [0]*self.nrows()*self.ncols())
 *         deref(self.thisptr).FFLU(deref(L.thisptr))             # <<<<<<<<<<<<<<
 * 
 *         for i in range(self.nrows()):
*/
  (*__pyx_v_self->__pyx_base.thisptr).FFLU((*__pyx_v_L->__pyx_base.thisptr));

  /* "symengine/lib/symengine_wrapper.pyx":4027
 *         deref(self.thisptr).FFLU(deref(L.thisptr))
 * 
 *         for i in range(self.nrows()):             # <<<<<<<<<<<<<<
 *             for j in range(i + 1, self.ncols()):
 *                 U.set(i, j, L.get(i, j))
*/
  __pyx_t_8 = NULL;
  __pyx_t_3 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_nrows, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4027, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  __pyx_t_5 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(&PyRange_Type), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4027, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4027, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_9 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4027, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    {
      __pyx_t_1 = __pyx_t_9(__pyx_t_2);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 4027, __pyx_L1_error)
          PyErr_Clear();
        }
        break;
      }
    }
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":4028
 * 
 *         for i in range(self.nrows()):
 *             for j in range(i + 1, self.ncols()):             # <<<<<<<<<<<<<<
 *                 U.set(i, j, L.get(i, j))
 *                 L.set(i, j, 0)
*/
    __pyx_t_8 = NULL;
    __pyx_t_3 = __Pyx_PyLong_AddObjC(__pyx_v_i, __pyx_mstate_global->__pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4028, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = ((PyObject *)__pyx_v_self);
    __Pyx_INCREF(__pyx_t_6);
    __pyx_t_5 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
      __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_ncols, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4028, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_8, __pyx_t_3, __pyx_t_4};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(&PyRange_Type), __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4028, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4028, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_10 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4028, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    for (;;) {
      {
        __pyx_t_1 = __pyx_t_10(__pyx_t_4);
        if (unlikely(!__pyx_t_1)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 4028, __pyx_L1_error)
            PyErr_Clear();
          }
          break;
        }
      }
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_XDECREF_SET(__pyx_v_j, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "symengine/lib/symengine_wrapper.pyx":4029
 *         for i in range(self.nrows()):
 *             for j in range(i + 1, self.ncols()):
 *                 U.set(i, j, L.get(i, j))             # <<<<<<<<<<<<<<
 *                 L.set(i, j, 0)
 *             U.set(i, i, L.get(i, i))
*/
      __pyx_t_3 = ((PyObject *)__pyx_v_U);
      __Pyx_INCREF(__pyx_t_3);
      __pyx_t_6 = ((PyObject *)__pyx_v_L);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_5 = 0;
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_v_i, __pyx_v_j};
        __pyx_t_8 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4029, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
      }
      __pyx_t_5 = 0;
      {
        PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_i, __pyx_v_j, __pyx_t_8};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_set, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4029, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "symengine/lib/symengine_wrapper.pyx":4030
 *             for j in range(i + 1, self.ncols()):
 *                 U.set(i, j, L.get(i, j))
 *                 L.set(i, j, 0)             # <<<<<<<<<<<<<<
 *             U.set(i, i, L.get(i, i))
 * 
*/
      __pyx_t_8 = ((PyObject *)__pyx_v_L);
      __Pyx_INCREF(__pyx_t_8);
      __pyx_t_5 = 0;
      {
        PyObject *__pyx_callargs[4] = {__pyx_t_8, __pyx_v_i, __pyx_v_j, __pyx_mstate_global->__pyx_int_0};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_set, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4030, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "symengine/lib/symengine_wrapper.pyx":4028
 * 
 *         for i in range(self.nrows()):
 *             for j in range(i + 1, self.ncols()):             # <<<<<<<<<<<<<<
 *                 U.set(i, j, L.get(i, j))
 *                 L.set(i, j, 0)
*/
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":4031
 *                 U.set(i, j, L.get(i, j))
 *                 L.set(i, j, 0)
 *             U.set(i, i, L.get(i, i))             # <<<<<<<<<<<<<<
 * 
 *         return L, U
*/
    __pyx_t_1 = ((PyObject *)__pyx_v_U);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_3 = ((PyObject *)__pyx_v_L);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_5 = 0;
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_i, __pyx_v_i};
      __pyx_t_8 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4031, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
    }
    __pyx_t_5 = 0;
    {
      PyObject *__pyx_callargs[4] = {__pyx_t_1, __pyx_v_i, __pyx_v_i, __pyx_t_8};
      __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_set, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4031, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":4027
 *         deref(self.thisptr).FFLU(deref(L.thisptr))
 * 
 *         for i in range(self.nrows()):             # <<<<<<<<<<<<<<
 *             for j in range(i + 1, self.ncols()):
 *                 U.set(i, j, L.get(i, j))
*/
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4033
 *             U.set(i, i, L.get(i, i))
 * 
 *         return L, U             # <<<<<<<<<<<<<<
 * 
 *     def FFLDU(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4033, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF((PyObject *)__pyx_v_L);
  __Pyx_GIVEREF((PyObject *)__pyx_v_L);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_L)) != (0)) __PYX_ERR(0, 4033, __pyx_L1_error);
  __Pyx_INCREF((PyObject *)__pyx_v_U);
  __Pyx_GIVEREF((PyObject *)__pyx_v_U);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_U)) != (0)) __PYX_ERR(0, 4033, __pyx_L1_error);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4022
 *         return x
 * 
 *     def FFLU(self):             # <<<<<<<<<<<<<<
 *         cdef DenseMatrixBase L = self.__class__(self.nrows(), self.ncols())
 *         cdef DenseMatrixBase U = self.__class__(self.nrows(), self.ncols(), [0]*self.nrows()*self.ncols())
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.FFLU", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_L);
  __Pyx_XDECREF((PyObject *)__pyx_v_U);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_v_j);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4035
 *         return L, U
 * 
 *     def FFLDU(self):             # <<<<<<<<<<<<<<
 *         cdef DenseMatrixBase L = self.__class__(self.nrows(), self.ncols())
 *         cdef DenseMatrixBase D = self.__class__(self.nrows(), self.ncols())
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_123FFLDU(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_123FFLDU = {"FFLDU", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_123FFLDU, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_123FFLDU(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("FFLDU (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("FFLDU", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("FFLDU", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_122FFLDU(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_122FFLDU(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_L = 0;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_D = 0;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_U = 0;
  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;
  size_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("FFLDU", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4036
 * 
 *     def FFLDU(self):
 *         cdef DenseMatrixBase L = self.__class__(self.nrows(), self.ncols())             # <<<<<<<<<<<<<<
 *         cdef DenseMatrixBase D = self.__class__(self.nrows(), self.ncols())
 *         cdef DenseMatrixBase U = self.__class__(self.nrows(), self.ncols())
*/
  __pyx_t_2 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_4 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_nrows, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4036, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __pyx_t_6 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_6);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
    __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_ncols, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4036, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_t_3, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_class, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4036, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase))))) __PYX_ERR(0, 4036, __pyx_L1_error)
  __pyx_v_L = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4037
 *     def FFLDU(self):
 *         cdef DenseMatrixBase L = self.__class__(self.nrows(), self.ncols())
 *         cdef DenseMatrixBase D = self.__class__(self.nrows(), self.ncols())             # <<<<<<<<<<<<<<
 *         cdef DenseMatrixBase U = self.__class__(self.nrows(), self.ncols())
 *         deref(self.thisptr).FFLDU(deref(L.thisptr), deref(D.thisptr), deref(U.thisptr))
*/
  __pyx_t_4 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_2 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_nrows, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4037, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __pyx_t_6 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_6);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
    __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_ncols, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4037, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_t_3, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_class, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__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;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4037, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase))))) __PYX_ERR(0, 4037, __pyx_L1_error)
  __pyx_v_D = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4038
 *         cdef DenseMatrixBase L = self.__class__(self.nrows(), self.ncols())
 *         cdef DenseMatrixBase D = self.__class__(self.nrows(), self.ncols())
 *         cdef DenseMatrixBase U = self.__class__(self.nrows(), self.ncols())             # <<<<<<<<<<<<<<
 *         deref(self.thisptr).FFLDU(deref(L.thisptr), deref(D.thisptr), deref(U.thisptr))
 *         return L, D, U
*/
  __pyx_t_2 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_4 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_nrows, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4038, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __pyx_t_6 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_6);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
    __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_ncols, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4038, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_t_3, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_class, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4038, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase))))) __PYX_ERR(0, 4038, __pyx_L1_error)
  __pyx_v_U = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4039
 *         cdef DenseMatrixBase D = self.__class__(self.nrows(), self.ncols())
 *         cdef DenseMatrixBase U = self.__class__(self.nrows(), self.ncols())
 *         deref(self.thisptr).FFLDU(deref(L.thisptr), deref(D.thisptr), deref(U.thisptr))             # <<<<<<<<<<<<<<
 *         return L, D, U
 * 
*/
  (*__pyx_v_self->__pyx_base.thisptr).FFLDU((*__pyx_v_L->__pyx_base.thisptr), (*__pyx_v_D->__pyx_base.thisptr), (*__pyx_v_U->__pyx_base.thisptr));

  /* "symengine/lib/symengine_wrapper.pyx":4040
 *         cdef DenseMatrixBase U = self.__class__(self.nrows(), self.ncols())
 *         deref(self.thisptr).FFLDU(deref(L.thisptr), deref(D.thisptr), deref(U.thisptr))
 *         return L, D, U             # <<<<<<<<<<<<<<
 * 
 *     def QR(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4040, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF((PyObject *)__pyx_v_L);
  __Pyx_GIVEREF((PyObject *)__pyx_v_L);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_L)) != (0)) __PYX_ERR(0, 4040, __pyx_L1_error);
  __Pyx_INCREF((PyObject *)__pyx_v_D);
  __Pyx_GIVEREF((PyObject *)__pyx_v_D);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_D)) != (0)) __PYX_ERR(0, 4040, __pyx_L1_error);
  __Pyx_INCREF((PyObject *)__pyx_v_U);
  __Pyx_GIVEREF((PyObject *)__pyx_v_U);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)__pyx_v_U)) != (0)) __PYX_ERR(0, 4040, __pyx_L1_error);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4035
 *         return L, U
 * 
 *     def FFLDU(self):             # <<<<<<<<<<<<<<
 *         cdef DenseMatrixBase L = self.__class__(self.nrows(), self.ncols())
 *         cdef DenseMatrixBase D = self.__class__(self.nrows(), self.ncols())
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.FFLDU", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_L);
  __Pyx_XDECREF((PyObject *)__pyx_v_D);
  __Pyx_XDECREF((PyObject *)__pyx_v_U);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4042
 *         return L, D, U
 * 
 *     def QR(self):             # <<<<<<<<<<<<<<
 *         cdef DenseMatrixBase Q = self.__class__(self.nrows(), self.ncols())
 *         cdef DenseMatrixBase R = self.__class__(self.nrows(), self.ncols())
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_125QR(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_125QR = {"QR", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_125QR, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_125QR(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("QR (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("QR", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("QR", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_124QR(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_124QR(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_Q = 0;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_R = 0;
  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;
  size_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("QR", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4043
 * 
 *     def QR(self):
 *         cdef DenseMatrixBase Q = self.__class__(self.nrows(), self.ncols())             # <<<<<<<<<<<<<<
 *         cdef DenseMatrixBase R = self.__class__(self.nrows(), self.ncols())
 *         deref(self.thisptr).QR(deref(Q.thisptr), deref(R.thisptr))
*/
  __pyx_t_2 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_4 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_nrows, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4043, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __pyx_t_6 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_6);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
    __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_ncols, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4043, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_t_3, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_class, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4043, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase))))) __PYX_ERR(0, 4043, __pyx_L1_error)
  __pyx_v_Q = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4044
 *     def QR(self):
 *         cdef DenseMatrixBase Q = self.__class__(self.nrows(), self.ncols())
 *         cdef DenseMatrixBase R = self.__class__(self.nrows(), self.ncols())             # <<<<<<<<<<<<<<
 *         deref(self.thisptr).QR(deref(Q.thisptr), deref(R.thisptr))
 *         return Q, R
*/
  __pyx_t_4 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_2 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_nrows, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4044, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __pyx_t_6 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_6);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
    __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_ncols, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4044, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_t_3, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_class, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__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;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4044, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase))))) __PYX_ERR(0, 4044, __pyx_L1_error)
  __pyx_v_R = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4045
 *         cdef DenseMatrixBase Q = self.__class__(self.nrows(), self.ncols())
 *         cdef DenseMatrixBase R = self.__class__(self.nrows(), self.ncols())
 *         deref(self.thisptr).QR(deref(Q.thisptr), deref(R.thisptr))             # <<<<<<<<<<<<<<
 *         return Q, R
 * 
*/
  (*__pyx_v_self->__pyx_base.thisptr).QR((*__pyx_v_Q->__pyx_base.thisptr), (*__pyx_v_R->__pyx_base.thisptr));

  /* "symengine/lib/symengine_wrapper.pyx":4046
 *         cdef DenseMatrixBase R = self.__class__(self.nrows(), self.ncols())
 *         deref(self.thisptr).QR(deref(Q.thisptr), deref(R.thisptr))
 *         return Q, R             # <<<<<<<<<<<<<<
 * 
 *     def cholesky(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4046, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF((PyObject *)__pyx_v_Q);
  __Pyx_GIVEREF((PyObject *)__pyx_v_Q);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_Q)) != (0)) __PYX_ERR(0, 4046, __pyx_L1_error);
  __Pyx_INCREF((PyObject *)__pyx_v_R);
  __Pyx_GIVEREF((PyObject *)__pyx_v_R);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_R)) != (0)) __PYX_ERR(0, 4046, __pyx_L1_error);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4042
 *         return L, D, U
 * 
 *     def QR(self):             # <<<<<<<<<<<<<<
 *         cdef DenseMatrixBase Q = self.__class__(self.nrows(), self.ncols())
 *         cdef DenseMatrixBase R = self.__class__(self.nrows(), self.ncols())
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.QR", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_Q);
  __Pyx_XDECREF((PyObject *)__pyx_v_R);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4048
 *         return Q, R
 * 
 *     def cholesky(self):             # <<<<<<<<<<<<<<
 *         cdef DenseMatrixBase L = self.__class__(self.nrows(), self.ncols())
 *         deref(self.thisptr).cholesky(deref(L.thisptr))
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_127cholesky(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_127cholesky = {"cholesky", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_127cholesky, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_127cholesky(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cholesky (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("cholesky", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("cholesky", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_126cholesky(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_126cholesky(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_L = 0;
  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;
  size_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("cholesky", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4049
 * 
 *     def cholesky(self):
 *         cdef DenseMatrixBase L = self.__class__(self.nrows(), self.ncols())             # <<<<<<<<<<<<<<
 *         deref(self.thisptr).cholesky(deref(L.thisptr))
 *         return L
*/
  __pyx_t_2 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_4 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_nrows, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4049, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __pyx_t_6 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_6);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
    __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_ncols, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4049, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_t_3, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_class, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4049, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase))))) __PYX_ERR(0, 4049, __pyx_L1_error)
  __pyx_v_L = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4050
 *     def cholesky(self):
 *         cdef DenseMatrixBase L = self.__class__(self.nrows(), self.ncols())
 *         deref(self.thisptr).cholesky(deref(L.thisptr))             # <<<<<<<<<<<<<<
 *         return L
 * 
*/
  (*__pyx_v_self->__pyx_base.thisptr).cholesky((*__pyx_v_L->__pyx_base.thisptr));

  /* "symengine/lib/symengine_wrapper.pyx":4051
 *         cdef DenseMatrixBase L = self.__class__(self.nrows(), self.ncols())
 *         deref(self.thisptr).cholesky(deref(L.thisptr))
 *         return L             # <<<<<<<<<<<<<<
 * 
 *     def jacobian(self, x):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_L);
  __pyx_r = ((PyObject *)__pyx_v_L);
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4048
 *         return Q, R
 * 
 *     def cholesky(self):             # <<<<<<<<<<<<<<
 *         cdef DenseMatrixBase L = self.__class__(self.nrows(), self.ncols())
 *         deref(self.thisptr).cholesky(deref(L.thisptr))
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.cholesky", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_L);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4053
 *         return L
 * 
 *     def jacobian(self, x):             # <<<<<<<<<<<<<<
 *         cdef DenseMatrixBase x_ = sympify(x)
 *         cdef DenseMatrixBase R = self.__class__(self.nrows(), x.nrows())
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_129jacobian(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_129jacobian = {"jacobian", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_129jacobian, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_129jacobian(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_x = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("jacobian (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_x,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 4053, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4053, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "jacobian", 0) < (0)) __PYX_ERR(0, 4053, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("jacobian", 1, 1, 1, i); __PYX_ERR(0, 4053, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4053, __pyx_L3_error)
    }
    __pyx_v_x = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("jacobian", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4053, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.jacobian", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_128jacobian(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_self), __pyx_v_x);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_128jacobian(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self, PyObject *__pyx_v_x) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_x_ = 0;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_R = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("jacobian", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4054
 * 
 *     def jacobian(self, x):
 *         cdef DenseMatrixBase x_ = sympify(x)             # <<<<<<<<<<<<<<
 *         cdef DenseMatrixBase R = self.__class__(self.nrows(), x.nrows())
 *         symengine.jacobian(<const symengine.DenseMatrix &>deref(self.thisptr),
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4054, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_x};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4054, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase))))) __PYX_ERR(0, 4054, __pyx_L1_error)
  __pyx_v_x_ = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4055
 *     def jacobian(self, x):
 *         cdef DenseMatrixBase x_ = sympify(x)
 *         cdef DenseMatrixBase R = self.__class__(self.nrows(), x.nrows())             # <<<<<<<<<<<<<<
 *         symengine.jacobian(<const symengine.DenseMatrix &>deref(self.thisptr),
 *                 <const symengine.DenseMatrix &>deref(x_.thisptr),
*/
  __pyx_t_3 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_5 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_5);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
    __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_nrows, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4055, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  __pyx_t_6 = __pyx_v_x;
  __Pyx_INCREF(__pyx_t_6);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
    __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_nrows, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4055, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
  }
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_t_2, __pyx_t_5};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_class, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4055, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase))))) __PYX_ERR(0, 4055, __pyx_L1_error)
  __pyx_v_R = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4056
 *         cdef DenseMatrixBase x_ = sympify(x)
 *         cdef DenseMatrixBase R = self.__class__(self.nrows(), x.nrows())
 *         symengine.jacobian(<const symengine.DenseMatrix &>deref(self.thisptr),             # <<<<<<<<<<<<<<
 *                 <const symengine.DenseMatrix &>deref(x_.thisptr),
 *                 <symengine.DenseMatrix &>deref(R.thisptr))
*/
  try {
    SymEngine::sjacobian(((SymEngine::DenseMatrix const &)(*__pyx_v_self->__pyx_base.thisptr)), ((SymEngine::DenseMatrix const &)(*__pyx_v_x_->__pyx_base.thisptr)), ((SymEngine::DenseMatrix &)(*__pyx_v_R->__pyx_base.thisptr)));
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 4056, __pyx_L1_error)
  }

  /* "symengine/lib/symengine_wrapper.pyx":4059
 *                 <const symengine.DenseMatrix &>deref(x_.thisptr),
 *                 <symengine.DenseMatrix &>deref(R.thisptr))
 *         return R             # <<<<<<<<<<<<<<
 * 
 *     def _sympy_(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_R);
  __pyx_r = ((PyObject *)__pyx_v_R);
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4053
 *         return L
 * 
 *     def jacobian(self, x):             # <<<<<<<<<<<<<<
 *         cdef DenseMatrixBase x_ = sympify(x)
 *         cdef DenseMatrixBase R = self.__class__(self.nrows(), x.nrows())
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.jacobian", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_x_);
  __Pyx_XDECREF((PyObject *)__pyx_v_R);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4061
 *         return R
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         s = []
 *         cdef symengine.DenseMatrix A = deref(symengine.static_cast_DenseMatrix(self.thisptr))
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_131_sympy_(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_131_sympy_ = {"_sympy_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_131_sympy_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_131_sympy_(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sympy_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("_sympy_", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("_sympy_", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_130_sympy_(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_130_sympy_(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self) {
  PyObject *__pyx_v_s = NULL;
  SymEngine::DenseMatrix __pyx_v_A;
  unsigned int __pyx_v_i;
  PyObject *__pyx_v_l = NULL;
  unsigned int __pyx_v_j;
  PyObject *__pyx_v_sympy = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  unsigned int __pyx_t_2;
  unsigned int __pyx_t_3;
  unsigned int __pyx_t_4;
  unsigned int __pyx_t_5;
  unsigned int __pyx_t_6;
  unsigned int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  size_t __pyx_t_10;
  int __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sympy_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4062
 * 
 *     def _sympy_(self):
 *         s = []             # <<<<<<<<<<<<<<
 *         cdef symengine.DenseMatrix A = deref(symengine.static_cast_DenseMatrix(self.thisptr))
 *         for i in range(A.nrows()):
*/
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4062, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_s = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4063
 *     def _sympy_(self):
 *         s = []
 *         cdef symengine.DenseMatrix A = deref(symengine.static_cast_DenseMatrix(self.thisptr))             # <<<<<<<<<<<<<<
 *         for i in range(A.nrows()):
 *             l = []
*/
  __pyx_v_A = (*static_cast<SymEngine::DenseMatrix*>(__pyx_v_self->__pyx_base.thisptr));

  /* "symengine/lib/symengine_wrapper.pyx":4064
 *         s = []
 *         cdef symengine.DenseMatrix A = deref(symengine.static_cast_DenseMatrix(self.thisptr))
 *         for i in range(A.nrows()):             # <<<<<<<<<<<<<<
 *             l = []
 *             for j in range(A.ncols()):
*/
  __pyx_t_2 = __pyx_v_A.nrows();
  __pyx_t_3 = __pyx_t_2;
  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
    __pyx_v_i = __pyx_t_4;

    /* "symengine/lib/symengine_wrapper.pyx":4065
 *         cdef symengine.DenseMatrix A = deref(symengine.static_cast_DenseMatrix(self.thisptr))
 *         for i in range(A.nrows()):
 *             l = []             # <<<<<<<<<<<<<<
 *             for j in range(A.ncols()):
 *                 l.append(c2py(A.get(i, j))._sympy_())
*/
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4065, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_XDECREF_SET(__pyx_v_l, ((PyObject*)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":4066
 *         for i in range(A.nrows()):
 *             l = []
 *             for j in range(A.ncols()):             # <<<<<<<<<<<<<<
 *                 l.append(c2py(A.get(i, j))._sympy_())
 *             s.append(l)
*/
    __pyx_t_5 = __pyx_v_A.ncols();
    __pyx_t_6 = __pyx_t_5;
    for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
      __pyx_v_j = __pyx_t_7;

      /* "symengine/lib/symengine_wrapper.pyx":4067
 *             l = []
 *             for j in range(A.ncols()):
 *                 l.append(c2py(A.get(i, j))._sympy_())             # <<<<<<<<<<<<<<
 *             s.append(l)
 *         import sympy
*/
      __pyx_t_9 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(__pyx_v_A.get(__pyx_v_i, __pyx_v_j)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4067, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_8 = __pyx_t_9;
      __Pyx_INCREF(__pyx_t_8);
      __pyx_t_10 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_sympy_2, __pyx_callargs+__pyx_t_10, (1-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4067, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_l, __pyx_t_1); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 4067, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }

    /* "symengine/lib/symengine_wrapper.pyx":4068
 *             for j in range(A.ncols()):
 *                 l.append(c2py(A.get(i, j))._sympy_())
 *             s.append(l)             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.ImmutableMatrix(s)
*/
    __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_s, __pyx_v_l); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 4068, __pyx_L1_error)
  }

  /* "symengine/lib/symengine_wrapper.pyx":4069
 *                 l.append(c2py(A.get(i, j))._sympy_())
 *             s.append(l)
 *         import sympy             # <<<<<<<<<<<<<<
 *         return sympy.ImmutableMatrix(s)
 * 
*/
  __pyx_t_12 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sympy, 0, 0, NULL, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4069, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_12;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sympy = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4070
 *             s.append(l)
 *         import sympy
 *         return sympy.ImmutableMatrix(s)             # <<<<<<<<<<<<<<
 * 
 *     def _sage_(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_9 = __pyx_v_sympy;
  __Pyx_INCREF(__pyx_t_9);
  __pyx_t_10 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_v_s};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_ImmutableMatrix, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4070, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4061
 *         return R
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         s = []
 *         cdef symengine.DenseMatrix A = deref(symengine.static_cast_DenseMatrix(self.thisptr))
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase._sympy_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_s);
  __Pyx_XDECREF(__pyx_v_l);
  __Pyx_XDECREF(__pyx_v_sympy);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4072
 *         return sympy.ImmutableMatrix(s)
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         s = []
 *         cdef symengine.DenseMatrix A = deref(symengine.static_cast_DenseMatrix(self.thisptr))
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_133_sage_(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_133_sage_ = {"_sage_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_133_sage_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_133_sage_(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_sage_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("_sage_", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("_sage_", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_132_sage_(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_132_sage_(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self) {
  PyObject *__pyx_v_s = NULL;
  SymEngine::DenseMatrix __pyx_v_A;
  unsigned int __pyx_v_i;
  PyObject *__pyx_v_l = NULL;
  unsigned int __pyx_v_j;
  PyObject *__pyx_v_sage = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  unsigned int __pyx_t_2;
  unsigned int __pyx_t_3;
  unsigned int __pyx_t_4;
  unsigned int __pyx_t_5;
  unsigned int __pyx_t_6;
  unsigned int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  size_t __pyx_t_10;
  int __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_sage_", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4073
 * 
 *     def _sage_(self):
 *         s = []             # <<<<<<<<<<<<<<
 *         cdef symengine.DenseMatrix A = deref(symengine.static_cast_DenseMatrix(self.thisptr))
 *         for i in range(A.nrows()):
*/
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4073, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_s = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4074
 *     def _sage_(self):
 *         s = []
 *         cdef symengine.DenseMatrix A = deref(symengine.static_cast_DenseMatrix(self.thisptr))             # <<<<<<<<<<<<<<
 *         for i in range(A.nrows()):
 *             l = []
*/
  __pyx_v_A = (*static_cast<SymEngine::DenseMatrix*>(__pyx_v_self->__pyx_base.thisptr));

  /* "symengine/lib/symengine_wrapper.pyx":4075
 *         s = []
 *         cdef symengine.DenseMatrix A = deref(symengine.static_cast_DenseMatrix(self.thisptr))
 *         for i in range(A.nrows()):             # <<<<<<<<<<<<<<
 *             l = []
 *             for j in range(A.ncols()):
*/
  __pyx_t_2 = __pyx_v_A.nrows();
  __pyx_t_3 = __pyx_t_2;
  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
    __pyx_v_i = __pyx_t_4;

    /* "symengine/lib/symengine_wrapper.pyx":4076
 *         cdef symengine.DenseMatrix A = deref(symengine.static_cast_DenseMatrix(self.thisptr))
 *         for i in range(A.nrows()):
 *             l = []             # <<<<<<<<<<<<<<
 *             for j in range(A.ncols()):
 *                 l.append(c2py(A.get(i, j))._sage_())
*/
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4076, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_XDECREF_SET(__pyx_v_l, ((PyObject*)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":4077
 *         for i in range(A.nrows()):
 *             l = []
 *             for j in range(A.ncols()):             # <<<<<<<<<<<<<<
 *                 l.append(c2py(A.get(i, j))._sage_())
 *             s.append(l)
*/
    __pyx_t_5 = __pyx_v_A.ncols();
    __pyx_t_6 = __pyx_t_5;
    for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
      __pyx_v_j = __pyx_t_7;

      /* "symengine/lib/symengine_wrapper.pyx":4078
 *             l = []
 *             for j in range(A.ncols()):
 *                 l.append(c2py(A.get(i, j))._sage_())             # <<<<<<<<<<<<<<
 *             s.append(l)
 *         import sage.all as sage
*/
      __pyx_t_9 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(__pyx_v_A.get(__pyx_v_i, __pyx_v_j)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4078, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_8 = __pyx_t_9;
      __Pyx_INCREF(__pyx_t_8);
      __pyx_t_10 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_sage, __pyx_callargs+__pyx_t_10, (1-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4078, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_l, __pyx_t_1); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 4078, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }

    /* "symengine/lib/symengine_wrapper.pyx":4079
 *             for j in range(A.ncols()):
 *                 l.append(c2py(A.get(i, j))._sage_())
 *             s.append(l)             # <<<<<<<<<<<<<<
 *         import sage.all as sage
 *         return sage.Matrix(s, immutable=True)
*/
    __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_s, __pyx_v_l); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 4079, __pyx_L1_error)
  }

  /* "symengine/lib/symengine_wrapper.pyx":4080
 *                 l.append(c2py(A.get(i, j))._sage_())
 *             s.append(l)
 *         import sage.all as sage             # <<<<<<<<<<<<<<
 *         return sage.Matrix(s, immutable=True)
 * 
*/
  __pyx_t_12 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sage_all, 0, 0, NULL, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4080, __pyx_L1_error)
  __pyx_t_13 = __Pyx_ImportFrom(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_all);
  Py_DECREF(__pyx_t_12);
  if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 4080, __pyx_L1_error)
  __pyx_t_12 = __pyx_t_13;
  __pyx_t_1 = __pyx_t_12;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sage = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4081
 *             s.append(l)
 *         import sage.all as sage
 *         return sage.Matrix(s, immutable=True)             # <<<<<<<<<<<<<<
 * 
 *     def dump_real(self, double[::1] out):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_9 = __pyx_v_sage;
  __Pyx_INCREF(__pyx_t_9);
  __pyx_t_10 = 0;
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_9, __pyx_v_s};
    __pyx_t_8 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4081, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_immutable, Py_True, __pyx_t_8, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 4081, __pyx_L1_error)
    __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_Matrix, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_8);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4081, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4072
 *         return sympy.ImmutableMatrix(s)
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         s = []
 *         cdef symengine.DenseMatrix A = deref(symengine.static_cast_DenseMatrix(self.thisptr))
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase._sage_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_s);
  __Pyx_XDECREF(__pyx_v_l);
  __Pyx_XDECREF(__pyx_v_sage);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4083
 *         return sage.Matrix(s, immutable=True)
 * 
 *     def dump_real(self, double[::1] out):             # <<<<<<<<<<<<<<
 *         cdef size_t ri, ci, nr, nc
 *         if out.size < self.size:
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_135dump_real(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_135dump_real = {"dump_real", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_135dump_real, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_135dump_real(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  __Pyx_memviewslice __pyx_v_out = { 0, 0, { 0 }, { 0 }, { 0 } };
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("dump_real (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_out,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 4083, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4083, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "dump_real", 0) < (0)) __PYX_ERR(0, 4083, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("dump_real", 1, 1, 1, i); __PYX_ERR(0, 4083, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4083, __pyx_L3_error)
    }
    __pyx_v_out = __Pyx_PyObject_to_MemoryviewSlice_dc_double(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_out.memview)) __PYX_ERR(0, 4083, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("dump_real", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4083, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_out, 1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.dump_real", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_134dump_real(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_self), __pyx_v_out);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_out, 1);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_134dump_real(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self, __Pyx_memviewslice __pyx_v_out) {
  size_t __pyx_v_ri;
  size_t __pyx_v_ci;
  size_t __pyx_v_nr;
  size_t __pyx_v_nc;
  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;
  size_t __pyx_t_5;
  size_t __pyx_t_6;
  size_t __pyx_t_7;
  size_t __pyx_t_8;
  size_t __pyx_t_9;
  size_t __pyx_t_10;
  double __pyx_t_11;
  size_t __pyx_t_12;
  int __pyx_t_13;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dump_real", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4085
 *     def dump_real(self, double[::1] out):
 *         cdef size_t ri, ci, nr, nc
 *         if out.size < self.size:             # <<<<<<<<<<<<<<
 *             raise ValueError("out parameter too short")
 *         nr = self.nrows()
*/
  __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_out, 1, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4085, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4085, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4085, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4085, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 4085, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(__pyx_t_4)) {

    /* "symengine/lib/symengine_wrapper.pyx":4086
 *         cdef size_t ri, ci, nr, nc
 *         if out.size < self.size:
 *             raise ValueError("out parameter too short")             # <<<<<<<<<<<<<<
 *         nr = self.nrows()
 *         nc = self.ncols()
*/
    __pyx_t_1 = NULL;
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_mstate_global->__pyx_kp_u_out_parameter_too_short};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4086, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 4086, __pyx_L1_error)

    /* "symengine/lib/symengine_wrapper.pyx":4085
 *     def dump_real(self, double[::1] out):
 *         cdef size_t ri, ci, nr, nc
 *         if out.size < self.size:             # <<<<<<<<<<<<<<
 *             raise ValueError("out parameter too short")
 *         nr = self.nrows()
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":4087
 *         if out.size < self.size:
 *             raise ValueError("out parameter too short")
 *         nr = self.nrows()             # <<<<<<<<<<<<<<
 *         nc = self.ncols()
 *         for ri in range(nr):
*/
  __pyx_t_1 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_nrows, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4087, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __pyx_t_5 = __Pyx_PyLong_As_size_t(__pyx_t_3); if (unlikely((__pyx_t_5 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4087, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_nr = __pyx_t_5;

  /* "symengine/lib/symengine_wrapper.pyx":4088
 *             raise ValueError("out parameter too short")
 *         nr = self.nrows()
 *         nc = self.ncols()             # <<<<<<<<<<<<<<
 *         for ri in range(nr):
 *             for ci in range(nc):
*/
  __pyx_t_1 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_ncols, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4088, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __pyx_t_5 = __Pyx_PyLong_As_size_t(__pyx_t_3); if (unlikely((__pyx_t_5 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4088, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_nc = __pyx_t_5;

  /* "symengine/lib/symengine_wrapper.pyx":4089
 *         nr = self.nrows()
 *         nc = self.ncols()
 *         for ri in range(nr):             # <<<<<<<<<<<<<<
 *             for ci in range(nc):
 *                 out[ri*nc + ci] = symengine.eval_double(deref(
*/
  __pyx_t_5 = __pyx_v_nr;
  __pyx_t_6 = __pyx_t_5;
  for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
    __pyx_v_ri = __pyx_t_7;

    /* "symengine/lib/symengine_wrapper.pyx":4090
 *         nc = self.ncols()
 *         for ri in range(nr):
 *             for ci in range(nc):             # <<<<<<<<<<<<<<
 *                 out[ri*nc + ci] = symengine.eval_double(deref(
 *                     <symengine.rcp_const_basic>(deref(self.thisptr).get(ri, ci))))
*/
    __pyx_t_8 = __pyx_v_nc;
    __pyx_t_9 = __pyx_t_8;
    for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
      __pyx_v_ci = __pyx_t_10;

      /* "symengine/lib/symengine_wrapper.pyx":4091
 *         for ri in range(nr):
 *             for ci in range(nc):
 *                 out[ri*nc + ci] = symengine.eval_double(deref(             # <<<<<<<<<<<<<<
 *                     <symengine.rcp_const_basic>(deref(self.thisptr).get(ri, ci))))
 * 
*/
      try {
        __pyx_t_11 = SymEngine::eval_double((*((SymEngine::RCP<const SymEngine::Basic>)(*__pyx_v_self->__pyx_base.thisptr).get(__pyx_v_ri, __pyx_v_ci))));
      } catch(...) {
        __Pyx_CppExn2PyErr();
        __PYX_ERR(0, 4091, __pyx_L1_error)
      }
      __pyx_t_12 = ((__pyx_v_ri * __pyx_v_nc) + __pyx_v_ci);
      __pyx_t_13 = -1;
      if (unlikely(__pyx_t_12 >= (size_t)__pyx_v_out.shape[0])) __pyx_t_13 = 0;
      if (unlikely(__pyx_t_13 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_13);
        __PYX_ERR(0, 4091, __pyx_L1_error)
      }
      *((double *) ( /* dim=0 */ ((char *) (((double *) __pyx_v_out.data) + __pyx_t_12)) )) = __pyx_t_11;
    }
  }

  /* "symengine/lib/symengine_wrapper.pyx":4083
 *         return sage.Matrix(s, immutable=True)
 * 
 *     def dump_real(self, double[::1] out):             # <<<<<<<<<<<<<<
 *         cdef size_t ri, ci, nr, nc
 *         if out.size < self.size:
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.dump_real", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4094
 *                     <symengine.rcp_const_basic>(deref(self.thisptr).get(ri, ci))))
 * 
 *     def dump_complex(self, double complex[::1] out):             # <<<<<<<<<<<<<<
 *         cdef size_t ri, ci, nr, nc
 *         if out.size < self.size:
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_137dump_complex(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_137dump_complex = {"dump_complex", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_137dump_complex, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_137dump_complex(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  __Pyx_memviewslice __pyx_v_out = { 0, 0, { 0 }, { 0 }, { 0 } };
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("dump_complex (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_out,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 4094, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4094, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "dump_complex", 0) < (0)) __PYX_ERR(0, 4094, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("dump_complex", 1, 1, 1, i); __PYX_ERR(0, 4094, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4094, __pyx_L3_error)
    }
    __pyx_v_out = __Pyx_PyObject_to_MemoryviewSlice_dc___pyx_t_double_complex(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_out.memview)) __PYX_ERR(0, 4094, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("dump_complex", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4094, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_out, 1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.dump_complex", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_136dump_complex(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_self), __pyx_v_out);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_out, 1);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_136dump_complex(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self, __Pyx_memviewslice __pyx_v_out) {
  size_t __pyx_v_ri;
  size_t __pyx_v_ci;
  size_t __pyx_v_nr;
  size_t __pyx_v_nc;
  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;
  size_t __pyx_t_5;
  size_t __pyx_t_6;
  size_t __pyx_t_7;
  size_t __pyx_t_8;
  size_t __pyx_t_9;
  size_t __pyx_t_10;
  __pyx_t_double_complex __pyx_t_11;
  size_t __pyx_t_12;
  int __pyx_t_13;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dump_complex", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4096
 *     def dump_complex(self, double complex[::1] out):
 *         cdef size_t ri, ci, nr, nc
 *         if out.size < self.size:             # <<<<<<<<<<<<<<
 *             raise ValueError("out parameter too short")
 *         nr = self.nrows()
*/
  __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_out, 1, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_double_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_double_complex, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4096, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4096, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4096, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4096, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 4096, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(__pyx_t_4)) {

    /* "symengine/lib/symengine_wrapper.pyx":4097
 *         cdef size_t ri, ci, nr, nc
 *         if out.size < self.size:
 *             raise ValueError("out parameter too short")             # <<<<<<<<<<<<<<
 *         nr = self.nrows()
 *         nc = self.ncols()
*/
    __pyx_t_1 = NULL;
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_mstate_global->__pyx_kp_u_out_parameter_too_short};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4097, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 4097, __pyx_L1_error)

    /* "symengine/lib/symengine_wrapper.pyx":4096
 *     def dump_complex(self, double complex[::1] out):
 *         cdef size_t ri, ci, nr, nc
 *         if out.size < self.size:             # <<<<<<<<<<<<<<
 *             raise ValueError("out parameter too short")
 *         nr = self.nrows()
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":4098
 *         if out.size < self.size:
 *             raise ValueError("out parameter too short")
 *         nr = self.nrows()             # <<<<<<<<<<<<<<
 *         nc = self.ncols()
 *         for ri in range(nr):
*/
  __pyx_t_1 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_nrows, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4098, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __pyx_t_5 = __Pyx_PyLong_As_size_t(__pyx_t_3); if (unlikely((__pyx_t_5 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4098, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_nr = __pyx_t_5;

  /* "symengine/lib/symengine_wrapper.pyx":4099
 *             raise ValueError("out parameter too short")
 *         nr = self.nrows()
 *         nc = self.ncols()             # <<<<<<<<<<<<<<
 *         for ri in range(nr):
 *             for ci in range(nc):
*/
  __pyx_t_1 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_ncols, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4099, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __pyx_t_5 = __Pyx_PyLong_As_size_t(__pyx_t_3); if (unlikely((__pyx_t_5 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4099, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_nc = __pyx_t_5;

  /* "symengine/lib/symengine_wrapper.pyx":4100
 *         nr = self.nrows()
 *         nc = self.ncols()
 *         for ri in range(nr):             # <<<<<<<<<<<<<<
 *             for ci in range(nc):
 *                 out[ri*nc + ci] = symengine.eval_complex_double(deref(
*/
  __pyx_t_5 = __pyx_v_nr;
  __pyx_t_6 = __pyx_t_5;
  for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
    __pyx_v_ri = __pyx_t_7;

    /* "symengine/lib/symengine_wrapper.pyx":4101
 *         nc = self.ncols()
 *         for ri in range(nr):
 *             for ci in range(nc):             # <<<<<<<<<<<<<<
 *                 out[ri*nc + ci] = symengine.eval_complex_double(deref(
 *                     <symengine.rcp_const_basic>(deref(self.thisptr).get(ri, ci))))
*/
    __pyx_t_8 = __pyx_v_nc;
    __pyx_t_9 = __pyx_t_8;
    for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
      __pyx_v_ci = __pyx_t_10;

      /* "symengine/lib/symengine_wrapper.pyx":4102
 *         for ri in range(nr):
 *             for ci in range(nc):
 *                 out[ri*nc + ci] = symengine.eval_complex_double(deref(             # <<<<<<<<<<<<<<
 *                     <symengine.rcp_const_basic>(deref(self.thisptr).get(ri, ci))))
 * 
*/
      try {
        __pyx_t_11 = SymEngine::eval_complex_double((*((SymEngine::RCP<const SymEngine::Basic>)(*__pyx_v_self->__pyx_base.thisptr).get(__pyx_v_ri, __pyx_v_ci))));
      } catch(...) {
        __Pyx_CppExn2PyErr();
        __PYX_ERR(0, 4102, __pyx_L1_error)
      }
      __pyx_t_12 = ((__pyx_v_ri * __pyx_v_nc) + __pyx_v_ci);
      __pyx_t_13 = -1;
      if (unlikely(__pyx_t_12 >= (size_t)__pyx_v_out.shape[0])) __pyx_t_13 = 0;
      if (unlikely(__pyx_t_13 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_13);
        __PYX_ERR(0, 4102, __pyx_L1_error)
      }
      *((__pyx_t_double_complex *) ( /* dim=0 */ ((char *) (((__pyx_t_double_complex *) __pyx_v_out.data) + __pyx_t_12)) )) = __pyx_t_11;
    }
  }

  /* "symengine/lib/symengine_wrapper.pyx":4094
 *                     <symengine.rcp_const_basic>(deref(self.thisptr).get(ri, ci))))
 * 
 *     def dump_complex(self, double complex[::1] out):             # <<<<<<<<<<<<<<
 *         cdef size_t ri, ci, nr, nc
 *         if out.size < self.size:
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.dump_complex", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4105
 *                     <symengine.rcp_const_basic>(deref(self.thisptr).get(ri, ci))))
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return DenseMatrixBaseIter(self)
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_139__iter__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_139__iter__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_138__iter__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_138__iter__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__iter__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4106
 * 
 *     def __iter__(self):
 *         return DenseMatrixBaseIter(self)             # <<<<<<<<<<<<<<
 * 
 *     def as_mutable(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_DenseMatrixBaseIter); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4106, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, ((PyObject *)__pyx_v_self)};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4106, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4105
 *                     <symengine.rcp_const_basic>(deref(self.thisptr).get(ri, ci))))
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return DenseMatrixBaseIter(self)
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4108
 *         return DenseMatrixBaseIter(self)
 * 
 *     def as_mutable(self):             # <<<<<<<<<<<<<<
 *         return MutableDenseMatrix(self)
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_141as_mutable(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_141as_mutable = {"as_mutable", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_141as_mutable, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_141as_mutable(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("as_mutable (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("as_mutable", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("as_mutable", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_140as_mutable(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_140as_mutable(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("as_mutable", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4109
 * 
 *     def as_mutable(self):
 *         return MutableDenseMatrix(self)             # <<<<<<<<<<<<<<
 * 
 *     def as_immutable(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __pyx_t_3 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, ((PyObject *)__pyx_v_self)};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_MutableDenseMatrix, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4109, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_1);
  }
  __pyx_r = ((PyObject *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4108
 *         return DenseMatrixBaseIter(self)
 * 
 *     def as_mutable(self):             # <<<<<<<<<<<<<<
 *         return MutableDenseMatrix(self)
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.as_mutable", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4111
 *         return MutableDenseMatrix(self)
 * 
 *     def as_immutable(self):             # <<<<<<<<<<<<<<
 *         return ImmutableDenseMatrix(self)
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_143as_immutable(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_143as_immutable = {"as_immutable", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_143as_immutable, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_143as_immutable(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("as_immutable (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("as_immutable", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("as_immutable", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_142as_immutable(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_142as_immutable(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("as_immutable", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4112
 * 
 *     def as_immutable(self):
 *         return ImmutableDenseMatrix(self)             # <<<<<<<<<<<<<<
 * 
 *     def tolist(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __pyx_t_3 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, ((PyObject *)__pyx_v_self)};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ImmutableDenseMatrix, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4112, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_1);
  }
  __pyx_r = ((PyObject *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4111
 *         return MutableDenseMatrix(self)
 * 
 *     def as_immutable(self):             # <<<<<<<<<<<<<<
 *         return ImmutableDenseMatrix(self)
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.as_immutable", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4114
 *         return ImmutableDenseMatrix(self)
 * 
 *     def tolist(self):             # <<<<<<<<<<<<<<
 *         return [[self[rowi, coli] for coli in range(self.ncols())]
 *                 for rowi in range(self.nrows())]
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_145tolist(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_145tolist = {"tolist", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_145tolist, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_145tolist(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("tolist (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("tolist", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("tolist", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_144tolist(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_144tolist(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self) {
  PyObject *__pyx_9genexpr15__pyx_v_rowi = NULL;
  PyObject *__pyx_9genexpr16__pyx_v_coli = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  PyObject *(*__pyx_t_7)(PyObject *);
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *(*__pyx_t_10)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("tolist", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4115
 * 
 *     def tolist(self):
 *         return [[self[rowi, coli] for coli in range(self.ncols())]             # <<<<<<<<<<<<<<
 *                 for rowi in range(self.nrows())]
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  { /* enter inner scope */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4115, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_1);

    /* "symengine/lib/symengine_wrapper.pyx":4116
 *     def tolist(self):
 *         return [[self[rowi, coli] for coli in range(self.ncols())]
 *                 for rowi in range(self.nrows())]             # <<<<<<<<<<<<<<
 * 
 *     def __array__(self):
*/
    __pyx_t_3 = NULL;
    __pyx_t_5 = ((PyObject *)__pyx_v_self);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_6 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
      __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_nrows, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4116, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    __pyx_t_6 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(&PyRange_Type), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4116, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __pyx_t_4 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4116, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4116, __pyx_L5_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    for (;;) {
      {
        __pyx_t_2 = __pyx_t_7(__pyx_t_4);
        if (unlikely(!__pyx_t_2)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 4116, __pyx_L5_error)
            PyErr_Clear();
          }
          break;
        }
      }
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_XDECREF_SET(__pyx_9genexpr15__pyx_v_rowi, __pyx_t_2);
      __pyx_t_2 = 0;
      { /* enter inner scope */

        /* "symengine/lib/symengine_wrapper.pyx":4115
 * 
 *     def tolist(self):
 *         return [[self[rowi, coli] for coli in range(self.ncols())]             # <<<<<<<<<<<<<<
 *                 for rowi in range(self.nrows())]
 * 
*/
        __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4115, __pyx_L10_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_5 = NULL;
        __pyx_t_9 = ((PyObject *)__pyx_v_self);
        __Pyx_INCREF(__pyx_t_9);
        __pyx_t_6 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL};
          __pyx_t_8 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_ncols, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4115, __pyx_L10_error)
          __Pyx_GOTREF(__pyx_t_8);
        }
        __pyx_t_6 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_8};
          __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(&PyRange_Type), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4115, __pyx_L10_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        __pyx_t_8 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4115, __pyx_L10_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_10 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_8); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4115, __pyx_L10_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        for (;;) {
          {
            __pyx_t_3 = __pyx_t_10(__pyx_t_8);
            if (unlikely(!__pyx_t_3)) {
              PyObject* exc_type = PyErr_Occurred();
              if (exc_type) {
                if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 4115, __pyx_L10_error)
                PyErr_Clear();
              }
              break;
            }
          }
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_XDECREF_SET(__pyx_9genexpr16__pyx_v_coli, __pyx_t_3);
          __pyx_t_3 = 0;
          __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4115, __pyx_L10_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_INCREF(__pyx_9genexpr15__pyx_v_rowi);
          __Pyx_GIVEREF(__pyx_9genexpr15__pyx_v_rowi);
          if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_9genexpr15__pyx_v_rowi) != (0)) __PYX_ERR(0, 4115, __pyx_L10_error);
          __Pyx_INCREF(__pyx_9genexpr16__pyx_v_coli);
          __Pyx_GIVEREF(__pyx_9genexpr16__pyx_v_coli);
          if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_9genexpr16__pyx_v_coli) != (0)) __PYX_ERR(0, 4115, __pyx_L10_error);
          __pyx_t_5 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4115, __pyx_L10_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 4115, __pyx_L10_error)
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_XDECREF(__pyx_9genexpr16__pyx_v_coli); __pyx_9genexpr16__pyx_v_coli = 0;
        goto __pyx_L14_exit_scope;
        __pyx_L10_error:;
        __Pyx_XDECREF(__pyx_9genexpr16__pyx_v_coli); __pyx_9genexpr16__pyx_v_coli = 0;
        goto __pyx_L5_error;
        __pyx_L14_exit_scope:;
      } /* exit inner scope */
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 4115, __pyx_L5_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "symengine/lib/symengine_wrapper.pyx":4116
 *     def tolist(self):
 *         return [[self[rowi, coli] for coli in range(self.ncols())]
 *                 for rowi in range(self.nrows())]             # <<<<<<<<<<<<<<
 * 
 *     def __array__(self):
*/
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_9genexpr15__pyx_v_rowi); __pyx_9genexpr15__pyx_v_rowi = 0;
    goto __pyx_L16_exit_scope;
    __pyx_L5_error:;
    __Pyx_XDECREF(__pyx_9genexpr15__pyx_v_rowi); __pyx_9genexpr15__pyx_v_rowi = 0;
    goto __pyx_L1_error;
    __pyx_L16_exit_scope:;
  } /* exit inner scope */
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4114
 *         return ImmutableDenseMatrix(self)
 * 
 *     def tolist(self):             # <<<<<<<<<<<<<<
 *         return [[self[rowi, coli] for coli in range(self.ncols())]
 *                 for rowi in range(self.nrows())]
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.tolist", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_9genexpr15__pyx_v_rowi);
  __Pyx_XDECREF(__pyx_9genexpr16__pyx_v_coli);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4118
 *                 for rowi in range(self.nrows())]
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return np.array(self.tolist())
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_147__array__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_147__array__ = {"__array__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_147__array__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_147__array__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__array__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__array__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__array__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_146__array__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_146__array__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__array__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4119
 * 
 *     def __array__(self):
 *         return np.array(self.tolist())             # <<<<<<<<<<<<<<
 * 
 *     def _mat(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4119, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_array); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4119, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_5);
  __pyx_t_6 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_tolist, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4119, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4119, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4118
 *                 for rowi in range(self.nrows())]
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return np.array(self.tolist())
 * 
*/

  /* 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("symengine.lib.symengine_wrapper.DenseMatrixBase.__array__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4121
 *         return np.array(self.tolist())
 * 
 *     def _mat(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_149_mat(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_149_mat = {"_mat", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_149_mat, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_149_mat(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_mat (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("_mat", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("_mat", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_148_mat(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_148_mat(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_mat", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4122
 * 
 *     def _mat(self):
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def atoms(self, *types):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_self);
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4121
 *         return np.array(self.tolist())
 * 
 *     def _mat(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
*/

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

/* "symengine/lib/symengine_wrapper.pyx":4124
 *         return self
 * 
 *     def atoms(self, *types):             # <<<<<<<<<<<<<<
 *         if types:
 *             s = set()
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_151atoms(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_151atoms = {"atoms", (PyCFunction)(void(*)(void))(PyCFunctionWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_151atoms, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_151atoms(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_types = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("atoms (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("atoms", __pyx_kwds); return NULL;}
  __Pyx_INCREF(__pyx_args);
  __pyx_v_types = __pyx_args;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_150atoms(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_self), __pyx_v_types);

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_150atoms(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self, PyObject *__pyx_v_types) {
  PyObject *__pyx_v_s = NULL;
  PyObject *__pyx_v_arg = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("atoms", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4125
 * 
 *     def atoms(self, *types):
 *         if types:             # <<<<<<<<<<<<<<
 *             s = set()
 *             if (isinstance(self, types)):
*/
  {
    Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_v_types);
    if (unlikely(((!CYTHON_ASSUME_SAFE_SIZE) && __pyx_temp < 0))) __PYX_ERR(0, 4125, __pyx_L1_error)
    __pyx_t_1 = (__pyx_temp != 0);
  }

  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":4126
 *     def atoms(self, *types):
 *         if types:
 *             s = set()             # <<<<<<<<<<<<<<
 *             if (isinstance(self, types)):
 *                 s.add(self)
*/
    __pyx_t_2 = PySet_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4126, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_s = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":4127
 *         if types:
 *             s = set()
 *             if (isinstance(self, types)):             # <<<<<<<<<<<<<<
 *                 s.add(self)
 *             for arg in self:
*/
    __pyx_t_1 = PyObject_IsInstance(((PyObject *)__pyx_v_self), __pyx_v_types); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4127, __pyx_L1_error)
    if (__pyx_t_1) {

      /* "symengine/lib/symengine_wrapper.pyx":4128
 *             s = set()
 *             if (isinstance(self, types)):
 *                 s.add(self)             # <<<<<<<<<<<<<<
 *             for arg in self:
 *                 s.update(arg.atoms(*types))
*/
      __pyx_t_3 = PySet_Add(__pyx_v_s, ((PyObject *)__pyx_v_self)); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 4128, __pyx_L1_error)

      /* "symengine/lib/symengine_wrapper.pyx":4127
 *         if types:
 *             s = set()
 *             if (isinstance(self, types)):             # <<<<<<<<<<<<<<
 *                 s.add(self)
 *             for arg in self:
*/
    }

    /* "symengine/lib/symengine_wrapper.pyx":4129
 *             if (isinstance(self, types)):
 *                 s.add(self)
 *             for arg in self:             # <<<<<<<<<<<<<<
 *                 s.update(arg.atoms(*types))
 *             return s
*/
    if (likely(PyList_CheckExact(((PyObject *)__pyx_v_self))) || PyTuple_CheckExact(((PyObject *)__pyx_v_self))) {
      __pyx_t_2 = ((PyObject *)__pyx_v_self); __Pyx_INCREF(__pyx_t_2);
      __pyx_t_4 = 0;
      __pyx_t_5 = NULL;
    } else {
      __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4129, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_5 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4129, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_5)) {
        if (likely(PyList_CheckExact(__pyx_t_2))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
            #if !CYTHON_ASSUME_SAFE_SIZE
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 4129, __pyx_L1_error)
            #endif
            if (__pyx_t_4 >= __pyx_temp) break;
          }
          __pyx_t_6 = __Pyx_PyList_GetItemRefFast(__pyx_t_2, __pyx_t_4, __Pyx_ReferenceSharing_OwnStrongReference);
          ++__pyx_t_4;
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
            #if !CYTHON_ASSUME_SAFE_SIZE
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 4129, __pyx_L1_error)
            #endif
            if (__pyx_t_4 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4));
          #else
          __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_4);
          #endif
          ++__pyx_t_4;
        }
        if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4129, __pyx_L1_error)
      } else {
        __pyx_t_6 = __pyx_t_5(__pyx_t_2);
        if (unlikely(!__pyx_t_6)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 4129, __pyx_L1_error)
            PyErr_Clear();
          }
          break;
        }
      }
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_XDECREF_SET(__pyx_v_arg, __pyx_t_6);
      __pyx_t_6 = 0;

      /* "symengine/lib/symengine_wrapper.pyx":4130
 *                 s.add(self)
 *             for arg in self:
 *                 s.update(arg.atoms(*types))             # <<<<<<<<<<<<<<
 *             return s
 *         else:
*/
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_mstate_global->__pyx_n_u_atoms); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4130, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_v_types, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4130, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_CallUnboundCMethod1(&__pyx_mstate_global->__pyx_umethod_PySet_Type__update, __pyx_v_s, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4130, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "symengine/lib/symengine_wrapper.pyx":4129
 *             if (isinstance(self, types)):
 *                 s.add(self)
 *             for arg in self:             # <<<<<<<<<<<<<<
 *                 s.update(arg.atoms(*types))
 *             return s
*/
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":4131
 *             for arg in self:
 *                 s.update(arg.atoms(*types))
 *             return s             # <<<<<<<<<<<<<<
 *         else:
 *            return self.free_symbols
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_s);
    __pyx_r = __pyx_v_s;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":4125
 * 
 *     def atoms(self, *types):
 *         if types:             # <<<<<<<<<<<<<<
 *             s = set()
 *             if (isinstance(self, types)):
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":4133
 *             return s
 *         else:
 *            return self.free_symbols             # <<<<<<<<<<<<<<
 * 
 *     def simplify(self, *args, **kwargs):
*/
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_free_symbols); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4133, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

  /* "symengine/lib/symengine_wrapper.pyx":4124
 *         return self
 * 
 *     def atoms(self, *types):             # <<<<<<<<<<<<<<
 *         if types:
 *             s = set()
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.atoms", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_s);
  __Pyx_XDECREF(__pyx_v_arg);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4135
 *            return self.free_symbols
 * 
 *     def simplify(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self._applyfunc(lambda x : x.simplify(*args, **kwargs))
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_153simplify(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_153simplify = {"simplify", (PyCFunction)(void(*)(void))(PyCFunctionWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_153simplify, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_153simplify(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_v_kwargs = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("simplify (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (__pyx_kwds_len > 0) {
    if (unlikely(__Pyx_CheckKeywordStrings("simplify", __pyx_kwds) == -1)) return NULL;
    __pyx_v_kwargs = __Pyx_KwargsAsDict_VARARGS(__pyx_kwds, __pyx_kwvalues);
    if (unlikely(!__pyx_v_kwargs)) return NULL;
    __Pyx_GOTREF(__pyx_v_kwargs);
  } else {
    __pyx_v_kwargs = PyDict_New();
    if (unlikely(!__pyx_v_kwargs)) return NULL;
    __Pyx_GOTREF(__pyx_v_kwargs);
  }
  __Pyx_INCREF(__pyx_args);
  __pyx_v_args = __pyx_args;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_152simplify(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);

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

/* "symengine/lib/symengine_wrapper.pyx":4136
 * 
 *     def simplify(self, *args, **kwargs):
 *         return self._applyfunc(lambda x : x.simplify(*args, **kwargs))             # <<<<<<<<<<<<<<
 * 
 *     def expand(self, *args, **kwargs):
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_8simplify_lambda3(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_8simplify_lambda3 = {"lambda3", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_8simplify_lambda3, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_8simplify_lambda3(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_x = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda3 (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_x,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 4136, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4136, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "lambda3", 0) < (0)) __PYX_ERR(0, 4136, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("lambda3", 1, 1, 1, i); __PYX_ERR(0, 4136, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4136, __pyx_L3_error)
    }
    __pyx_v_x = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("lambda3", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4136, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.simplify.lambda3", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_lambda_funcdef_lambda3(__pyx_self, __pyx_v_x);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_lambda_funcdef_lambda3(PyObject *__pyx_self, PyObject *__pyx_v_x) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_3_simplify *__pyx_cur_scope;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_3_simplify *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("lambda3", 0);
  __pyx_outer_scope = (struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_3_simplify *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_x, __pyx_mstate_global->__pyx_n_u_simplify); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4136, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(!__pyx_cur_scope->__pyx_v_args)) { __Pyx_RaiseClosureNameError("args"); __PYX_ERR(0, 4136, __pyx_L1_error) }
  if (unlikely(__pyx_cur_scope->__pyx_v_args == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(0, 4136, __pyx_L1_error)
  }
  if (unlikely(!__pyx_cur_scope->__pyx_v_kwargs)) { __Pyx_RaiseClosureNameError("kwargs"); __PYX_ERR(0, 4136, __pyx_L1_error) }
  if (unlikely(__pyx_cur_scope->__pyx_v_kwargs == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType");
    __PYX_ERR(0, 4136, __pyx_L1_error)
  }
  __pyx_t_2 = PyDict_Copy(__pyx_cur_scope->__pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4136, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_cur_scope->__pyx_v_args, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4136, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.simplify.lambda3", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4135
 *            return self.free_symbols
 * 
 *     def simplify(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self._applyfunc(lambda x : x.simplify(*args, **kwargs))
 * 
*/

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_152simplify(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_3_simplify *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("simplify", 0);
  __pyx_cur_scope = (struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_3_simplify *)__pyx_tp_new_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_3_simplify(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_3_simplify, __pyx_mstate_global->__pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_3_simplify *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 4135, __pyx_L1_error)
  } else {
    __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_args = __pyx_v_args;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_args);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_args);
  __pyx_cur_scope->__pyx_v_kwargs = __pyx_v_kwargs;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_kwargs);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_kwargs);

  /* "symengine/lib/symengine_wrapper.pyx":4136
 * 
 *     def simplify(self, *args, **kwargs):
 *         return self._applyfunc(lambda x : x.simplify(*args, **kwargs))             # <<<<<<<<<<<<<<
 * 
 *     def expand(self, *args, **kwargs):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_8simplify_lambda3, 0, __pyx_mstate_global->__pyx_n_u_simplify_locals_lambda, ((PyObject*)__pyx_cur_scope), __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[3])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4136, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_applyfunc_2, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4136, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4135
 *            return self.free_symbols
 * 
 *     def simplify(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self._applyfunc(lambda x : x.simplify(*args, **kwargs))
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.simplify", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_DECREF((PyObject *)__pyx_cur_scope);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4138
 *         return self._applyfunc(lambda x : x.simplify(*args, **kwargs))
 * 
 *     def expand(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.applyfunc(lambda x : x.expand(*args, **kwargs))
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_155expand(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_155expand = {"expand", (PyCFunction)(void(*)(void))(PyCFunctionWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_155expand, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_155expand(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_v_kwargs = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("expand (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (__pyx_kwds_len > 0) {
    if (unlikely(__Pyx_CheckKeywordStrings("expand", __pyx_kwds) == -1)) return NULL;
    __pyx_v_kwargs = __Pyx_KwargsAsDict_VARARGS(__pyx_kwds, __pyx_kwvalues);
    if (unlikely(!__pyx_v_kwargs)) return NULL;
    __Pyx_GOTREF(__pyx_v_kwargs);
  } else {
    __pyx_v_kwargs = PyDict_New();
    if (unlikely(!__pyx_v_kwargs)) return NULL;
    __Pyx_GOTREF(__pyx_v_kwargs);
  }
  __Pyx_INCREF(__pyx_args);
  __pyx_v_args = __pyx_args;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_154expand(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);

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

/* "symengine/lib/symengine_wrapper.pyx":4139
 * 
 *     def expand(self, *args, **kwargs):
 *         return self.applyfunc(lambda x : x.expand(*args, **kwargs))             # <<<<<<<<<<<<<<
 * 
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_6expand_lambda4(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_6expand_lambda4 = {"lambda4", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_6expand_lambda4, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_6expand_lambda4(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_x = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda4 (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_x,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 4139, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4139, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "lambda4", 0) < (0)) __PYX_ERR(0, 4139, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("lambda4", 1, 1, 1, i); __PYX_ERR(0, 4139, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4139, __pyx_L3_error)
    }
    __pyx_v_x = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("lambda4", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4139, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.expand.lambda4", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_lambda_funcdef_lambda4(__pyx_self, __pyx_v_x);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_lambda_funcdef_lambda4(PyObject *__pyx_self, PyObject *__pyx_v_x) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_4_expand *__pyx_cur_scope;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_4_expand *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("lambda4", 0);
  __pyx_outer_scope = (struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_4_expand *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_x, __pyx_mstate_global->__pyx_n_u_expand); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4139, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(!__pyx_cur_scope->__pyx_v_args)) { __Pyx_RaiseClosureNameError("args"); __PYX_ERR(0, 4139, __pyx_L1_error) }
  if (unlikely(__pyx_cur_scope->__pyx_v_args == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(0, 4139, __pyx_L1_error)
  }
  if (unlikely(!__pyx_cur_scope->__pyx_v_kwargs)) { __Pyx_RaiseClosureNameError("kwargs"); __PYX_ERR(0, 4139, __pyx_L1_error) }
  if (unlikely(__pyx_cur_scope->__pyx_v_kwargs == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType");
    __PYX_ERR(0, 4139, __pyx_L1_error)
  }
  __pyx_t_2 = PyDict_Copy(__pyx_cur_scope->__pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4139, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_cur_scope->__pyx_v_args, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4139, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.expand.lambda4", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4138
 *         return self._applyfunc(lambda x : x.simplify(*args, **kwargs))
 * 
 *     def expand(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.applyfunc(lambda x : x.expand(*args, **kwargs))
 * 
*/

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_154expand(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_4_expand *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("expand", 0);
  __pyx_cur_scope = (struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_4_expand *)__pyx_tp_new_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_4_expand(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_4_expand, __pyx_mstate_global->__pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_4_expand *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 4138, __pyx_L1_error)
  } else {
    __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_args = __pyx_v_args;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_args);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_args);
  __pyx_cur_scope->__pyx_v_kwargs = __pyx_v_kwargs;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_kwargs);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_kwargs);

  /* "symengine/lib/symengine_wrapper.pyx":4139
 * 
 *     def expand(self, *args, **kwargs):
 *         return self.applyfunc(lambda x : x.expand(*args, **kwargs))             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_6expand_lambda4, 0, __pyx_mstate_global->__pyx_n_u_expand_locals_lambda, ((PyObject*)__pyx_cur_scope), __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[4])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4139, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_applyfunc, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4139, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4138
 *         return self._applyfunc(lambda x : x.simplify(*args, **kwargs))
 * 
 *     def expand(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.applyfunc(lambda x : x.expand(*args, **kwargs))
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.expand", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_DECREF((PyObject *)__pyx_cur_scope);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_157__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_157__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_157__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_157__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_156__reduce_cython__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_156__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_159__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_159__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_159__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_159__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(1, 3, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 3, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 3, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3, __pyx_L3_error)
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_158__setstate_cython__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_v_self), __pyx_v___pyx_state);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_158__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBase.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4144
 * class DenseMatrixBaseIter(object):
 * 
 *     def __init__(self, d):             # <<<<<<<<<<<<<<
 *         self.curr = -1
 *         self.d = d
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_19DenseMatrixBaseIter_1__init__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_19DenseMatrixBaseIter_1__init__ = {"__init__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_19DenseMatrixBaseIter_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_19DenseMatrixBaseIter_1__init__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_d = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_d,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 4144, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4144, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4144, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 4144, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, i); __PYX_ERR(0, 4144, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4144, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4144, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
    __pyx_v_d = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 4144, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBaseIter.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_19DenseMatrixBaseIter___init__(__pyx_self, __pyx_v_self, __pyx_v_d);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_19DenseMatrixBaseIter___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_d) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4145
 * 
 *     def __init__(self, d):
 *         self.curr = -1             # <<<<<<<<<<<<<<
 *         self.d = d
 * 
*/
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_curr, __pyx_mstate_global->__pyx_int_neg_1) < (0)) __PYX_ERR(0, 4145, __pyx_L1_error)

  /* "symengine/lib/symengine_wrapper.pyx":4146
 *     def __init__(self, d):
 *         self.curr = -1
 *         self.d = d             # <<<<<<<<<<<<<<
 * 
 *     def __iter__(self):
*/
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_d, __pyx_v_d) < (0)) __PYX_ERR(0, 4146, __pyx_L1_error)

  /* "symengine/lib/symengine_wrapper.pyx":4144
 * class DenseMatrixBaseIter(object):
 * 
 *     def __init__(self, d):             # <<<<<<<<<<<<<<
 *         self.curr = -1
 *         self.d = d
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBaseIter.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4148
 *         self.d = d
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_19DenseMatrixBaseIter_3__iter__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_19DenseMatrixBaseIter_3__iter__ = {"__iter__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_19DenseMatrixBaseIter_3__iter__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_19DenseMatrixBaseIter_3__iter__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 4148, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4148, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__iter__", 0) < (0)) __PYX_ERR(0, 4148, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__iter__", 1, 1, 1, i); __PYX_ERR(0, 4148, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4148, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__iter__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4148, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBaseIter.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_19DenseMatrixBaseIter_2__iter__(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_19DenseMatrixBaseIter_2__iter__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4149
 * 
 *     def __iter__(self):
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def __next__(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self);
  __pyx_r = __pyx_v_self;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4148
 *         self.d = d
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
*/

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

/* "symengine/lib/symengine_wrapper.pyx":4151
 *         return self
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         self.curr = self.curr + 1
 *         if (self.curr < self.d.rows * self.d.cols):
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_19DenseMatrixBaseIter_5__next__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_19DenseMatrixBaseIter_5__next__ = {"__next__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_19DenseMatrixBaseIter_5__next__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_19DenseMatrixBaseIter_5__next__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 4151, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4151, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__next__", 0) < (0)) __PYX_ERR(0, 4151, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__next__", 1, 1, 1, i); __PYX_ERR(0, 4151, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4151, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__next__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4151, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBaseIter.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_19DenseMatrixBaseIter_4__next__(__pyx_self, __pyx_v_self);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_19DenseMatrixBaseIter_4__next__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  size_t __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__next__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4152
 * 
 *     def __next__(self):
 *         self.curr = self.curr + 1             # <<<<<<<<<<<<<<
 *         if (self.curr < self.d.rows * self.d.cols):
 *             return self.d._get(self.curr // self.d.cols, self.curr % self.d.cols)
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_curr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4152, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyLong_AddObjC(__pyx_t_1, __pyx_mstate_global->__pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4152, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_curr, __pyx_t_2) < (0)) __PYX_ERR(0, 4152, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4153
 *     def __next__(self):
 *         self.curr = self.curr + 1
 *         if (self.curr < self.d.rows * self.d.cols):             # <<<<<<<<<<<<<<
 *             return self.d._get(self.curr // self.d.cols, self.curr % self.d.cols)
 *         else:
*/
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_curr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4153, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_d); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4153, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_rows); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4153, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_d); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4153, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_cols); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4153, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyNumber_Multiply(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4153, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4153, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 4153, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (likely(__pyx_t_5)) {

    /* "symengine/lib/symengine_wrapper.pyx":4154
 *         self.curr = self.curr + 1
 *         if (self.curr < self.d.rows * self.d.cols):
 *             return self.d._get(self.curr // self.d.cols, self.curr % self.d.cols)             # <<<<<<<<<<<<<<
 *         else:
 *             raise StopIteration
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_d); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4154, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_curr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4154, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_d); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4154, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_cols); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4154, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyNumber_FloorDivide(__pyx_t_3, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4154, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_curr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4154, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_d); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4154, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_cols); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4154, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyNumber_Remainder(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4154, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_9 = 0;
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_1, __pyx_t_6, __pyx_t_3};
      __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_2, __pyx_callargs+__pyx_t_9, (3-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4154, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":4153
 *     def __next__(self):
 *         self.curr = self.curr + 1
 *         if (self.curr < self.d.rows * self.d.cols):             # <<<<<<<<<<<<<<
 *             return self.d._get(self.curr // self.d.cols, self.curr % self.d.cols)
 *         else:
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":4156
 *             return self.d._get(self.curr // self.d.cols, self.curr % self.d.cols)
 *         else:
 *             raise StopIteration             # <<<<<<<<<<<<<<
 * 
 *     next = __next__
*/
  /*else*/ {
    __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_StopIteration))), 0, 0, 0);
    __PYX_ERR(0, 4156, __pyx_L1_error)
  }

  /* "symengine/lib/symengine_wrapper.pyx":4151
 *         return self
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         self.curr = self.curr + 1
 *         if (self.curr < self.d.rows * self.d.cols):
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.DenseMatrixBaseIter.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4162
 * cdef class MutableDenseMatrix(DenseMatrixBase):
 * 
 *     def col_swap(self, i, j):             # <<<<<<<<<<<<<<
 *         symengine.column_exchange_dense(deref(symengine.static_cast_DenseMatrix(self.thisptr)), i, j)
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_18MutableDenseMatrix_1col_swap(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_18MutableDenseMatrix_1col_swap = {"col_swap", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_18MutableDenseMatrix_1col_swap, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_18MutableDenseMatrix_1col_swap(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_i = 0;
  PyObject *__pyx_v_j = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("col_swap (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_i,&__pyx_mstate_global->__pyx_n_u_j,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 4162, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4162, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4162, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "col_swap", 0) < (0)) __PYX_ERR(0, 4162, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("col_swap", 1, 2, 2, i); __PYX_ERR(0, 4162, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4162, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4162, __pyx_L3_error)
    }
    __pyx_v_i = values[0];
    __pyx_v_j = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("col_swap", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 4162, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.MutableDenseMatrix.col_swap", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_18MutableDenseMatrix_col_swap(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_MutableDenseMatrix *)__pyx_v_self), __pyx_v_i, __pyx_v_j);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_18MutableDenseMatrix_col_swap(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_MutableDenseMatrix *__pyx_v_self, PyObject *__pyx_v_i, PyObject *__pyx_v_j) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  unsigned int __pyx_t_1;
  unsigned int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("col_swap", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4163
 * 
 *     def col_swap(self, i, j):
 *         symengine.column_exchange_dense(deref(symengine.static_cast_DenseMatrix(self.thisptr)), i, j)             # <<<<<<<<<<<<<<
 * 
 *     def fill(self, value):
*/
  __pyx_t_1 = __Pyx_PyLong_As_unsigned_int(__pyx_v_i); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4163, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyLong_As_unsigned_int(__pyx_v_j); if (unlikely((__pyx_t_2 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4163, __pyx_L1_error)
  SymEngine::column_exchange_dense((*static_cast<SymEngine::DenseMatrix*>(__pyx_v_self->__pyx_base.__pyx_base.thisptr)), __pyx_t_1, __pyx_t_2);

  /* "symengine/lib/symengine_wrapper.pyx":4162
 * cdef class MutableDenseMatrix(DenseMatrixBase):
 * 
 *     def col_swap(self, i, j):             # <<<<<<<<<<<<<<
 *         symengine.column_exchange_dense(deref(symengine.static_cast_DenseMatrix(self.thisptr)), i, j)
 * 
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.MutableDenseMatrix.col_swap", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4165
 *         symengine.column_exchange_dense(deref(symengine.static_cast_DenseMatrix(self.thisptr)), i, j)
 * 
 *     def fill(self, value):             # <<<<<<<<<<<<<<
 *         for i in range(self.rows):
 *             for j in range(self.cols):
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_18MutableDenseMatrix_3fill(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_18MutableDenseMatrix_3fill = {"fill", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_18MutableDenseMatrix_3fill, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_18MutableDenseMatrix_3fill(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_value = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("fill (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_value,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 4165, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4165, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "fill", 0) < (0)) __PYX_ERR(0, 4165, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("fill", 1, 1, 1, i); __PYX_ERR(0, 4165, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4165, __pyx_L3_error)
    }
    __pyx_v_value = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("fill", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4165, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.MutableDenseMatrix.fill", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_18MutableDenseMatrix_2fill(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_MutableDenseMatrix *)__pyx_v_self), __pyx_v_value);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_18MutableDenseMatrix_2fill(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_MutableDenseMatrix *__pyx_v_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_v_j = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  PyObject *(*__pyx_t_7)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("fill", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4166
 * 
 *     def fill(self, value):
 *         for i in range(self.rows):             # <<<<<<<<<<<<<<
 *             for j in range(self.cols):
 *                 self[i, j] = value
*/
  __pyx_t_2 = NULL;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_rows); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(&PyRange_Type), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4166, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4166, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    {
      __pyx_t_1 = __pyx_t_5(__pyx_t_3);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 4166, __pyx_L1_error)
          PyErr_Clear();
        }
        break;
      }
    }
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":4167
 *     def fill(self, value):
 *         for i in range(self.rows):
 *             for j in range(self.cols):             # <<<<<<<<<<<<<<
 *                 self[i, j] = value
 * 
*/
    __pyx_t_2 = NULL;
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_cols); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4167, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_6};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(&PyRange_Type), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4167, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4167, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4167, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    for (;;) {
      {
        __pyx_t_1 = __pyx_t_7(__pyx_t_6);
        if (unlikely(!__pyx_t_1)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 4167, __pyx_L1_error)
            PyErr_Clear();
          }
          break;
        }
      }
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_XDECREF_SET(__pyx_v_j, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "symengine/lib/symengine_wrapper.pyx":4168
 *         for i in range(self.rows):
 *             for j in range(self.cols):
 *                 self[i, j] = value             # <<<<<<<<<<<<<<
 * 
 *     def row_swap(self, i, j):
*/
      __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4168, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_v_i);
      __Pyx_GIVEREF(__pyx_v_i);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_i) != (0)) __PYX_ERR(0, 4168, __pyx_L1_error);
      __Pyx_INCREF(__pyx_v_j);
      __Pyx_GIVEREF(__pyx_v_j);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_j) != (0)) __PYX_ERR(0, 4168, __pyx_L1_error);
      if (unlikely((PyObject_SetItem(((PyObject *)__pyx_v_self), __pyx_t_1, __pyx_v_value) < 0))) __PYX_ERR(0, 4168, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "symengine/lib/symengine_wrapper.pyx":4167
 *     def fill(self, value):
 *         for i in range(self.rows):
 *             for j in range(self.cols):             # <<<<<<<<<<<<<<
 *                 self[i, j] = value
 * 
*/
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":4166
 * 
 *     def fill(self, value):
 *         for i in range(self.rows):             # <<<<<<<<<<<<<<
 *             for j in range(self.cols):
 *                 self[i, j] = value
*/
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4165
 *         symengine.column_exchange_dense(deref(symengine.static_cast_DenseMatrix(self.thisptr)), i, j)
 * 
 *     def fill(self, value):             # <<<<<<<<<<<<<<
 *         for i in range(self.rows):
 *             for j in range(self.cols):
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.MutableDenseMatrix.fill", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_v_j);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4170
 *                 self[i, j] = value
 * 
 *     def row_swap(self, i, j):             # <<<<<<<<<<<<<<
 *         symengine.row_exchange_dense(deref(symengine.static_cast_DenseMatrix(self.thisptr)), i, j)
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_18MutableDenseMatrix_5row_swap(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_18MutableDenseMatrix_5row_swap = {"row_swap", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_18MutableDenseMatrix_5row_swap, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_18MutableDenseMatrix_5row_swap(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_i = 0;
  PyObject *__pyx_v_j = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("row_swap (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_i,&__pyx_mstate_global->__pyx_n_u_j,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 4170, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4170, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4170, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "row_swap", 0) < (0)) __PYX_ERR(0, 4170, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("row_swap", 1, 2, 2, i); __PYX_ERR(0, 4170, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4170, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4170, __pyx_L3_error)
    }
    __pyx_v_i = values[0];
    __pyx_v_j = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("row_swap", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 4170, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.MutableDenseMatrix.row_swap", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_18MutableDenseMatrix_4row_swap(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_MutableDenseMatrix *)__pyx_v_self), __pyx_v_i, __pyx_v_j);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_18MutableDenseMatrix_4row_swap(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_MutableDenseMatrix *__pyx_v_self, PyObject *__pyx_v_i, PyObject *__pyx_v_j) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  unsigned int __pyx_t_1;
  unsigned int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("row_swap", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4171
 * 
 *     def row_swap(self, i, j):
 *         symengine.row_exchange_dense(deref(symengine.static_cast_DenseMatrix(self.thisptr)), i, j)             # <<<<<<<<<<<<<<
 * 
 *     def rowmul(self, i, c, *args):
*/
  __pyx_t_1 = __Pyx_PyLong_As_unsigned_int(__pyx_v_i); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4171, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyLong_As_unsigned_int(__pyx_v_j); if (unlikely((__pyx_t_2 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4171, __pyx_L1_error)
  SymEngine::row_exchange_dense((*static_cast<SymEngine::DenseMatrix*>(__pyx_v_self->__pyx_base.__pyx_base.thisptr)), __pyx_t_1, __pyx_t_2);

  /* "symengine/lib/symengine_wrapper.pyx":4170
 *                 self[i, j] = value
 * 
 *     def row_swap(self, i, j):             # <<<<<<<<<<<<<<
 *         symengine.row_exchange_dense(deref(symengine.static_cast_DenseMatrix(self.thisptr)), i, j)
 * 
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.MutableDenseMatrix.row_swap", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4173
 *         symengine.row_exchange_dense(deref(symengine.static_cast_DenseMatrix(self.thisptr)), i, j)
 * 
 *     def rowmul(self, i, c, *args):             # <<<<<<<<<<<<<<
 *         cdef Basic _c = sympify(c)
 *         symengine.row_mul_scalar_dense(deref(symengine.static_cast_DenseMatrix(self.thisptr)), i, _c.thisptr)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_18MutableDenseMatrix_7rowmul(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_18MutableDenseMatrix_7rowmul = {"rowmul", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_18MutableDenseMatrix_7rowmul, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_18MutableDenseMatrix_7rowmul(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_i = 0;
  PyObject *__pyx_v_c = 0;
  CYTHON_UNUSED PyObject *__pyx_v_args = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("rowmul (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  __pyx_v_args = __Pyx_ArgsSlice_FASTCALL(__pyx_args, 2, __pyx_nargs);
  if (unlikely(!__pyx_v_args)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_v_args);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_i,&__pyx_mstate_global->__pyx_n_u_c,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 4173, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        default:
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4173, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4173, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      const Py_ssize_t used_pos_args = (kwd_pos_args < 2) ? kwd_pos_args : 2;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, used_pos_args, __pyx_kwds_len, "rowmul", 0) < (0)) __PYX_ERR(0, 4173, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("rowmul", 0, 2, 2, i); __PYX_ERR(0, 4173, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs < 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4173, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4173, __pyx_L3_error)
    }
    __pyx_v_i = values[0];
    __pyx_v_c = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("rowmul", 0, 2, 2, __pyx_nargs); __PYX_ERR(0, 4173, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.MutableDenseMatrix.rowmul", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_18MutableDenseMatrix_6rowmul(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_MutableDenseMatrix *)__pyx_v_self), __pyx_v_i, __pyx_v_c, __pyx_v_args);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_args);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_18MutableDenseMatrix_6rowmul(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_MutableDenseMatrix *__pyx_v_self, PyObject *__pyx_v_i, PyObject *__pyx_v_c, CYTHON_UNUSED PyObject *__pyx_v_args) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v__c = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  unsigned int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("rowmul", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4174
 * 
 *     def rowmul(self, i, c, *args):
 *         cdef Basic _c = sympify(c)             # <<<<<<<<<<<<<<
 *         symengine.row_mul_scalar_dense(deref(symengine.static_cast_DenseMatrix(self.thisptr)), i, _c.thisptr)
 *         return self
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4174, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_c};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4174, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 4174, __pyx_L1_error)
  __pyx_v__c = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4175
 *     def rowmul(self, i, c, *args):
 *         cdef Basic _c = sympify(c)
 *         symengine.row_mul_scalar_dense(deref(symengine.static_cast_DenseMatrix(self.thisptr)), i, _c.thisptr)             # <<<<<<<<<<<<<<
 *         return self
 * 
*/
  __pyx_t_5 = __Pyx_PyLong_As_unsigned_int(__pyx_v_i); if (unlikely((__pyx_t_5 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4175, __pyx_L1_error)
  SymEngine::row_mul_scalar_dense((*static_cast<SymEngine::DenseMatrix*>(__pyx_v_self->__pyx_base.__pyx_base.thisptr)), __pyx_t_5, __pyx_v__c->thisptr);

  /* "symengine/lib/symengine_wrapper.pyx":4176
 *         cdef Basic _c = sympify(c)
 *         symengine.row_mul_scalar_dense(deref(symengine.static_cast_DenseMatrix(self.thisptr)), i, _c.thisptr)
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def rowadd(self, i, j, c, *args):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_self);
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4173
 *         symengine.row_exchange_dense(deref(symengine.static_cast_DenseMatrix(self.thisptr)), i, j)
 * 
 *     def rowmul(self, i, c, *args):             # <<<<<<<<<<<<<<
 *         cdef Basic _c = sympify(c)
 *         symengine.row_mul_scalar_dense(deref(symengine.static_cast_DenseMatrix(self.thisptr)), i, _c.thisptr)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.MutableDenseMatrix.rowmul", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v__c);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4178
 *         return self
 * 
 *     def rowadd(self, i, j, c, *args):             # <<<<<<<<<<<<<<
 *         cdef Basic _c = sympify(c)
 *         symengine.row_add_row_dense(deref(symengine.static_cast_DenseMatrix(self.thisptr)), i, j, _c.thisptr)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_18MutableDenseMatrix_9rowadd(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_18MutableDenseMatrix_9rowadd = {"rowadd", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_18MutableDenseMatrix_9rowadd, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_18MutableDenseMatrix_9rowadd(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_i = 0;
  PyObject *__pyx_v_j = 0;
  PyObject *__pyx_v_c = 0;
  CYTHON_UNUSED PyObject *__pyx_v_args = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("rowadd (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  __pyx_v_args = __Pyx_ArgsSlice_FASTCALL(__pyx_args, 3, __pyx_nargs);
  if (unlikely(!__pyx_v_args)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_v_args);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_i,&__pyx_mstate_global->__pyx_n_u_j,&__pyx_mstate_global->__pyx_n_u_c,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 4178, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        default:
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 4178, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4178, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4178, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      const Py_ssize_t used_pos_args = (kwd_pos_args < 3) ? kwd_pos_args : 3;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, used_pos_args, __pyx_kwds_len, "rowadd", 0) < (0)) __PYX_ERR(0, 4178, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("rowadd", 0, 3, 3, i); __PYX_ERR(0, 4178, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs < 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4178, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4178, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 4178, __pyx_L3_error)
    }
    __pyx_v_i = values[0];
    __pyx_v_j = values[1];
    __pyx_v_c = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("rowadd", 0, 3, 3, __pyx_nargs); __PYX_ERR(0, 4178, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.MutableDenseMatrix.rowadd", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_18MutableDenseMatrix_8rowadd(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_MutableDenseMatrix *)__pyx_v_self), __pyx_v_i, __pyx_v_j, __pyx_v_c, __pyx_v_args);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_args);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_18MutableDenseMatrix_8rowadd(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_MutableDenseMatrix *__pyx_v_self, PyObject *__pyx_v_i, PyObject *__pyx_v_j, PyObject *__pyx_v_c, CYTHON_UNUSED PyObject *__pyx_v_args) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v__c = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  unsigned int __pyx_t_5;
  unsigned int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("rowadd", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4179
 * 
 *     def rowadd(self, i, j, c, *args):
 *         cdef Basic _c = sympify(c)             # <<<<<<<<<<<<<<
 *         symengine.row_add_row_dense(deref(symengine.static_cast_DenseMatrix(self.thisptr)), i, j, _c.thisptr)
 *         return self
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4179, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_c};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4179, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 4179, __pyx_L1_error)
  __pyx_v__c = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4180
 *     def rowadd(self, i, j, c, *args):
 *         cdef Basic _c = sympify(c)
 *         symengine.row_add_row_dense(deref(symengine.static_cast_DenseMatrix(self.thisptr)), i, j, _c.thisptr)             # <<<<<<<<<<<<<<
 *         return self
 * 
*/
  __pyx_t_5 = __Pyx_PyLong_As_unsigned_int(__pyx_v_i); if (unlikely((__pyx_t_5 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4180, __pyx_L1_error)
  __pyx_t_6 = __Pyx_PyLong_As_unsigned_int(__pyx_v_j); if (unlikely((__pyx_t_6 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4180, __pyx_L1_error)
  SymEngine::row_add_row_dense((*static_cast<SymEngine::DenseMatrix*>(__pyx_v_self->__pyx_base.__pyx_base.thisptr)), __pyx_t_5, __pyx_t_6, __pyx_v__c->thisptr);

  /* "symengine/lib/symengine_wrapper.pyx":4181
 *         cdef Basic _c = sympify(c)
 *         symengine.row_add_row_dense(deref(symengine.static_cast_DenseMatrix(self.thisptr)), i, j, _c.thisptr)
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def row_del(self, i):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_self);
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4178
 *         return self
 * 
 *     def rowadd(self, i, j, c, *args):             # <<<<<<<<<<<<<<
 *         cdef Basic _c = sympify(c)
 *         symengine.row_add_row_dense(deref(symengine.static_cast_DenseMatrix(self.thisptr)), i, j, _c.thisptr)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.MutableDenseMatrix.rowadd", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v__c);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4183
 *         return self
 * 
 *     def row_del(self, i):             # <<<<<<<<<<<<<<
 *         if i < -self.rows or i >= self.rows:
 *             raise IndexError("Index out of range: 'i = %s', valid -%s <= i"
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_18MutableDenseMatrix_11row_del(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_18MutableDenseMatrix_11row_del = {"row_del", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_18MutableDenseMatrix_11row_del, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_18MutableDenseMatrix_11row_del(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_i = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("row_del (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_i,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 4183, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4183, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "row_del", 0) < (0)) __PYX_ERR(0, 4183, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("row_del", 1, 1, 1, i); __PYX_ERR(0, 4183, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4183, __pyx_L3_error)
    }
    __pyx_v_i = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("row_del", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4183, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.MutableDenseMatrix.row_del", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_18MutableDenseMatrix_10row_del(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_MutableDenseMatrix *)__pyx_v_self), __pyx_v_i);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_18MutableDenseMatrix_10row_del(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_MutableDenseMatrix *__pyx_v_self, PyObject *__pyx_v_i) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9[6];
  size_t __pyx_t_10;
  unsigned int __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("row_del", 0);
  __Pyx_INCREF(__pyx_v_i);

  /* "symengine/lib/symengine_wrapper.pyx":4184
 * 
 *     def row_del(self, i):
 *         if i < -self.rows or i >= self.rows:             # <<<<<<<<<<<<<<
 *             raise IndexError("Index out of range: 'i = %s', valid -%s <= i"
 *                              " < %s" % (i, self.rows, self.rows))
*/
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_rows); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4184, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_Negative(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4184, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_RichCompare(__pyx_v_i, __pyx_t_3, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4184, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 4184, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (!__pyx_t_4) {
  } else {
    __pyx_t_1 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_rows); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4184, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_RichCompare(__pyx_v_i, __pyx_t_2, Py_GE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4184, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 4184, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_1 = __pyx_t_4;
  __pyx_L4_bool_binop_done:;
  if (unlikely(__pyx_t_1)) {

    /* "symengine/lib/symengine_wrapper.pyx":4185
 *     def row_del(self, i):
 *         if i < -self.rows or i >= self.rows:
 *             raise IndexError("Index out of range: 'i = %s', valid -%s <= i"             # <<<<<<<<<<<<<<
 *                              " < %s" % (i, self.rows, self.rows))
 *         if i < 0:
*/
    __pyx_t_2 = NULL;

    /* "symengine/lib/symengine_wrapper.pyx":4186
 *         if i < -self.rows or i >= self.rows:
 *             raise IndexError("Index out of range: 'i = %s', valid -%s <= i"
 *                              " < %s" % (i, self.rows, self.rows))             # <<<<<<<<<<<<<<
 *         if i < 0:
 *             i += self.rows
*/
    __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_i), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4186, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_rows); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4186, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_6), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4186, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_rows); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4186, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_6), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4186, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_9[0] = __pyx_mstate_global->__pyx_kp_u_Index_out_of_range_i;
    __pyx_t_9[1] = __pyx_t_5;
    __pyx_t_9[2] = __pyx_mstate_global->__pyx_kp_u_valid;
    __pyx_t_9[3] = __pyx_t_7;
    __pyx_t_9[4] = __pyx_mstate_global->__pyx_kp_u_i_2;
    __pyx_t_9[5] = __pyx_t_8;

    /* "symengine/lib/symengine_wrapper.pyx":4185
 *     def row_del(self, i):
 *         if i < -self.rows or i >= self.rows:
 *             raise IndexError("Index out of range: 'i = %s', valid -%s <= i"             # <<<<<<<<<<<<<<
 *                              " < %s" % (i, self.rows, self.rows))
 *         if i < 0:
*/
    __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_9, 6, 25 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + 10 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7) + 8 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8));
    if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4185, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_10 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_6};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_IndexError)), __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4185, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 4185, __pyx_L1_error)

    /* "symengine/lib/symengine_wrapper.pyx":4184
 * 
 *     def row_del(self, i):
 *         if i < -self.rows or i >= self.rows:             # <<<<<<<<<<<<<<
 *             raise IndexError("Index out of range: 'i = %s', valid -%s <= i"
 *                              " < %s" % (i, self.rows, self.rows))
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":4187
 *             raise IndexError("Index out of range: 'i = %s', valid -%s <= i"
 *                              " < %s" % (i, self.rows, self.rows))
 *         if i < 0:             # <<<<<<<<<<<<<<
 *             i += self.rows
 *         deref(symengine.static_cast_DenseMatrix(self.thisptr)).row_del(i)
*/
  __pyx_t_3 = PyObject_RichCompare(__pyx_v_i, __pyx_mstate_global->__pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4187, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 4187, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":4188
 *                              " < %s" % (i, self.rows, self.rows))
 *         if i < 0:
 *             i += self.rows             # <<<<<<<<<<<<<<
 *         deref(symengine.static_cast_DenseMatrix(self.thisptr)).row_del(i)
 *         return self
*/
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_rows); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4188, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = PyNumber_InPlaceAdd(__pyx_v_i, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4188, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_i, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":4187
 *             raise IndexError("Index out of range: 'i = %s', valid -%s <= i"
 *                              " < %s" % (i, self.rows, self.rows))
 *         if i < 0:             # <<<<<<<<<<<<<<
 *             i += self.rows
 *         deref(symengine.static_cast_DenseMatrix(self.thisptr)).row_del(i)
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":4189
 *         if i < 0:
 *             i += self.rows
 *         deref(symengine.static_cast_DenseMatrix(self.thisptr)).row_del(i)             # <<<<<<<<<<<<<<
 *         return self
 * 
*/
  __pyx_t_11 = __Pyx_PyLong_As_unsigned_int(__pyx_v_i); if (unlikely((__pyx_t_11 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4189, __pyx_L1_error)
  (*static_cast<SymEngine::DenseMatrix*>(__pyx_v_self->__pyx_base.__pyx_base.thisptr)).row_del(__pyx_t_11);

  /* "symengine/lib/symengine_wrapper.pyx":4190
 *             i += self.rows
 *         deref(symengine.static_cast_DenseMatrix(self.thisptr)).row_del(i)
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def col_del(self, i):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_self);
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4183
 *         return self
 * 
 *     def row_del(self, i):             # <<<<<<<<<<<<<<
 *         if i < -self.rows or i >= self.rows:
 *             raise IndexError("Index out of range: 'i = %s', valid -%s <= i"
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.MutableDenseMatrix.row_del", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4192
 *         return self
 * 
 *     def col_del(self, i):             # <<<<<<<<<<<<<<
 *         if i < -self.cols or i >= self.cols:
 *             raise IndexError("Index out of range: 'i=%s', valid -%s <= i < %s"
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_18MutableDenseMatrix_13col_del(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_18MutableDenseMatrix_13col_del = {"col_del", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_18MutableDenseMatrix_13col_del, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_18MutableDenseMatrix_13col_del(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_i = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("col_del (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_i,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 4192, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4192, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "col_del", 0) < (0)) __PYX_ERR(0, 4192, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("col_del", 1, 1, 1, i); __PYX_ERR(0, 4192, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4192, __pyx_L3_error)
    }
    __pyx_v_i = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("col_del", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4192, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.MutableDenseMatrix.col_del", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_18MutableDenseMatrix_12col_del(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_MutableDenseMatrix *)__pyx_v_self), __pyx_v_i);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_18MutableDenseMatrix_12col_del(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_MutableDenseMatrix *__pyx_v_self, PyObject *__pyx_v_i) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9[6];
  size_t __pyx_t_10;
  unsigned int __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("col_del", 0);
  __Pyx_INCREF(__pyx_v_i);

  /* "symengine/lib/symengine_wrapper.pyx":4193
 * 
 *     def col_del(self, i):
 *         if i < -self.cols or i >= self.cols:             # <<<<<<<<<<<<<<
 *             raise IndexError("Index out of range: 'i=%s', valid -%s <= i < %s"
 *                              % (i, self.cols, self.cols))
*/
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_cols); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4193, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_Negative(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4193, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_RichCompare(__pyx_v_i, __pyx_t_3, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4193, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 4193, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (!__pyx_t_4) {
  } else {
    __pyx_t_1 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_cols); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4193, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_RichCompare(__pyx_v_i, __pyx_t_2, Py_GE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4193, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 4193, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_1 = __pyx_t_4;
  __pyx_L4_bool_binop_done:;
  if (unlikely(__pyx_t_1)) {

    /* "symengine/lib/symengine_wrapper.pyx":4194
 *     def col_del(self, i):
 *         if i < -self.cols or i >= self.cols:
 *             raise IndexError("Index out of range: 'i=%s', valid -%s <= i < %s"             # <<<<<<<<<<<<<<
 *                              % (i, self.cols, self.cols))
 *         if i < 0:
*/
    __pyx_t_2 = NULL;

    /* "symengine/lib/symengine_wrapper.pyx":4195
 *         if i < -self.cols or i >= self.cols:
 *             raise IndexError("Index out of range: 'i=%s', valid -%s <= i < %s"
 *                              % (i, self.cols, self.cols))             # <<<<<<<<<<<<<<
 *         if i < 0:
 *             i += self.cols
*/
    __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_i), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4195, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_cols); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4195, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_6), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4195, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_cols); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4195, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_6), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4195, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_9[0] = __pyx_mstate_global->__pyx_kp_u_Index_out_of_range_i_2;
    __pyx_t_9[1] = __pyx_t_5;
    __pyx_t_9[2] = __pyx_mstate_global->__pyx_kp_u_valid;
    __pyx_t_9[3] = __pyx_t_7;
    __pyx_t_9[4] = __pyx_mstate_global->__pyx_kp_u_i_2;
    __pyx_t_9[5] = __pyx_t_8;

    /* "symengine/lib/symengine_wrapper.pyx":4194
 *     def col_del(self, i):
 *         if i < -self.cols or i >= self.cols:
 *             raise IndexError("Index out of range: 'i=%s', valid -%s <= i < %s"             # <<<<<<<<<<<<<<
 *                              % (i, self.cols, self.cols))
 *         if i < 0:
*/
    __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_9, 6, 23 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + 10 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7) + 8 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8));
    if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4194, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_10 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_6};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_IndexError)), __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4194, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 4194, __pyx_L1_error)

    /* "symengine/lib/symengine_wrapper.pyx":4193
 * 
 *     def col_del(self, i):
 *         if i < -self.cols or i >= self.cols:             # <<<<<<<<<<<<<<
 *             raise IndexError("Index out of range: 'i=%s', valid -%s <= i < %s"
 *                              % (i, self.cols, self.cols))
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":4196
 *             raise IndexError("Index out of range: 'i=%s', valid -%s <= i < %s"
 *                              % (i, self.cols, self.cols))
 *         if i < 0:             # <<<<<<<<<<<<<<
 *             i += self.cols
 *         deref(symengine.static_cast_DenseMatrix(self.thisptr)).col_del(i)
*/
  __pyx_t_3 = PyObject_RichCompare(__pyx_v_i, __pyx_mstate_global->__pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4196, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 4196, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":4197
 *                              % (i, self.cols, self.cols))
 *         if i < 0:
 *             i += self.cols             # <<<<<<<<<<<<<<
 *         deref(symengine.static_cast_DenseMatrix(self.thisptr)).col_del(i)
 *         return self
*/
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_cols); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4197, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = PyNumber_InPlaceAdd(__pyx_v_i, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4197, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_i, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":4196
 *             raise IndexError("Index out of range: 'i=%s', valid -%s <= i < %s"
 *                              % (i, self.cols, self.cols))
 *         if i < 0:             # <<<<<<<<<<<<<<
 *             i += self.cols
 *         deref(symengine.static_cast_DenseMatrix(self.thisptr)).col_del(i)
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":4198
 *         if i < 0:
 *             i += self.cols
 *         deref(symengine.static_cast_DenseMatrix(self.thisptr)).col_del(i)             # <<<<<<<<<<<<<<
 *         return self
 * 
*/
  __pyx_t_11 = __Pyx_PyLong_As_unsigned_int(__pyx_v_i); if (unlikely((__pyx_t_11 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4198, __pyx_L1_error)
  (*static_cast<SymEngine::DenseMatrix*>(__pyx_v_self->__pyx_base.__pyx_base.thisptr)).col_del(__pyx_t_11);

  /* "symengine/lib/symengine_wrapper.pyx":4199
 *             i += self.cols
 *         deref(symengine.static_cast_DenseMatrix(self.thisptr)).col_del(i)
 *         return self             # <<<<<<<<<<<<<<
 * 
 * Matrix = DenseMatrix = MutableDenseMatrix
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_self);
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4192
 *         return self
 * 
 *     def col_del(self, i):             # <<<<<<<<<<<<<<
 *         if i < -self.cols or i >= self.cols:
 *             raise IndexError("Index out of range: 'i=%s', valid -%s <= i < %s"
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.MutableDenseMatrix.col_del", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_18MutableDenseMatrix_15__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_18MutableDenseMatrix_15__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_18MutableDenseMatrix_15__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_18MutableDenseMatrix_15__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_18MutableDenseMatrix_14__reduce_cython__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_MutableDenseMatrix *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_18MutableDenseMatrix_14__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_MutableDenseMatrix *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.MutableDenseMatrix.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_18MutableDenseMatrix_17__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_18MutableDenseMatrix_17__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_18MutableDenseMatrix_17__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_18MutableDenseMatrix_17__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(1, 3, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 3, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 3, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3, __pyx_L3_error)
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.MutableDenseMatrix.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_18MutableDenseMatrix_16__setstate_cython__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_MutableDenseMatrix *)__pyx_v_self), __pyx_v___pyx_state);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_18MutableDenseMatrix_16__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_MutableDenseMatrix *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.MutableDenseMatrix.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4205
 * cdef class ImmutableDenseMatrix(DenseMatrixBase):
 * 
 *     def __setitem__(self, key, value):             # <<<<<<<<<<<<<<
 *         raise TypeError("Cannot set values of {}".format(self.__class__))
 * 
*/

/* Python wrapper */
static int __pyx_pw_9symengine_3lib_17symengine_wrapper_20ImmutableDenseMatrix_1__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_9symengine_3lib_17symengine_wrapper_20ImmutableDenseMatrix_1__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_20ImmutableDenseMatrix___setitem__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_ImmutableDenseMatrix *)__pyx_v_self), ((PyObject *)__pyx_v_key), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_9symengine_3lib_17symengine_wrapper_20ImmutableDenseMatrix___setitem__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_ImmutableDenseMatrix *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_key, CYTHON_UNUSED 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;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setitem__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4206
 * 
 *     def __setitem__(self, key, value):
 *         raise TypeError("Cannot set values of {}".format(self.__class__))             # <<<<<<<<<<<<<<
 * 
 *     def _applyfunc(self, f):
*/
  __pyx_t_2 = NULL;
  __pyx_t_4 = __pyx_mstate_global->__pyx_kp_u_Cannot_set_values_of;
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_5};
    __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4206, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4206, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(0, 4206, __pyx_L1_error)

  /* "symengine/lib/symengine_wrapper.pyx":4205
 * cdef class ImmutableDenseMatrix(DenseMatrixBase):
 * 
 *     def __setitem__(self, key, value):             # <<<<<<<<<<<<<<
 *         raise TypeError("Cannot set values of {}".format(self.__class__))
 * 
*/

  /* 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("symengine.lib.symengine_wrapper.ImmutableDenseMatrix.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4208
 *         raise TypeError("Cannot set values of {}".format(self.__class__))
 * 
 *     def _applyfunc(self, f):             # <<<<<<<<<<<<<<
 *         res = DenseMatrix(self)
 *         res._applyfunc(f)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_20ImmutableDenseMatrix_3_applyfunc(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_20ImmutableDenseMatrix_3_applyfunc = {"_applyfunc", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_20ImmutableDenseMatrix_3_applyfunc, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_20ImmutableDenseMatrix_3_applyfunc(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_f = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_applyfunc (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_f,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 4208, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4208, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_applyfunc", 0) < (0)) __PYX_ERR(0, 4208, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_applyfunc", 1, 1, 1, i); __PYX_ERR(0, 4208, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4208, __pyx_L3_error)
    }
    __pyx_v_f = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_applyfunc", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4208, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.ImmutableDenseMatrix._applyfunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_20ImmutableDenseMatrix_2_applyfunc(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_ImmutableDenseMatrix *)__pyx_v_self), __pyx_v_f);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_20ImmutableDenseMatrix_2_applyfunc(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_ImmutableDenseMatrix *__pyx_v_self, PyObject *__pyx_v_f) {
  PyObject *__pyx_v_res = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_applyfunc", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4209
 * 
 *     def _applyfunc(self, f):
 *         res = DenseMatrix(self)             # <<<<<<<<<<<<<<
 *         res._applyfunc(f)
 *         return ImmutableDenseMatrix(res)
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_DenseMatrix); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4209, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, ((PyObject *)__pyx_v_self)};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4209, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_res = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4210
 *     def _applyfunc(self, f):
 *         res = DenseMatrix(self)
 *         res._applyfunc(f)             # <<<<<<<<<<<<<<
 *         return ImmutableDenseMatrix(res)
 * 
*/
  __pyx_t_3 = __pyx_v_res;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_f};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_applyfunc_2, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4210, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4211
 *         res = DenseMatrix(self)
 *         res._applyfunc(f)
 *         return ImmutableDenseMatrix(res)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_res};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ImmutableDenseMatrix, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4211, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_1);
  }
  __pyx_r = ((PyObject *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4208
 *         raise TypeError("Cannot set values of {}".format(self.__class__))
 * 
 *     def _applyfunc(self, f):             # <<<<<<<<<<<<<<
 *         res = DenseMatrix(self)
 *         res._applyfunc(f)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.ImmutableDenseMatrix._applyfunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_res);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_20ImmutableDenseMatrix_5__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_20ImmutableDenseMatrix_5__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_20ImmutableDenseMatrix_5__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_20ImmutableDenseMatrix_5__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_20ImmutableDenseMatrix_4__reduce_cython__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_ImmutableDenseMatrix *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_20ImmutableDenseMatrix_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_ImmutableDenseMatrix *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.ImmutableDenseMatrix.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_20ImmutableDenseMatrix_7__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_20ImmutableDenseMatrix_7__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_20ImmutableDenseMatrix_7__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_20ImmutableDenseMatrix_7__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(1, 3, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 3, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 3, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3, __pyx_L3_error)
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.ImmutableDenseMatrix.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_20ImmutableDenseMatrix_6__setstate_cython__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_ImmutableDenseMatrix *)__pyx_v_self), __pyx_v___pyx_state);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_20ImmutableDenseMatrix_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_ImmutableDenseMatrix *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.ImmutableDenseMatrix.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4217
 * 
 * 
 * cdef matrix_to_vec(DenseMatrixBase d, symengine.vec_basic& v):             # <<<<<<<<<<<<<<
 *     cdef Basic e_
 *     for i in range(d.nrows()):
*/

static PyObject *__pyx_f_9symengine_3lib_17symengine_wrapper_matrix_to_vec(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_d, SymEngine::vec_basic &__pyx_v_v) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_e_ = 0;
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_v_j = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  PyObject *(*__pyx_t_6)(PyObject *);
  PyObject *__pyx_t_7 = NULL;
  PyObject *(*__pyx_t_8)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("matrix_to_vec", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4219
 * cdef matrix_to_vec(DenseMatrixBase d, symengine.vec_basic& v):
 *     cdef Basic e_
 *     for i in range(d.nrows()):             # <<<<<<<<<<<<<<
 *         for j in range(d.ncols()):
 *             e_ = d._get(i, j)
*/
  __pyx_t_2 = NULL;
  __pyx_t_4 = ((PyObject *)__pyx_v_d);
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_nrows, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4219, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __pyx_t_5 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(&PyRange_Type), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4219, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4219, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4219, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    {
      __pyx_t_1 = __pyx_t_6(__pyx_t_3);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 4219, __pyx_L1_error)
          PyErr_Clear();
        }
        break;
      }
    }
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":4220
 *     cdef Basic e_
 *     for i in range(d.nrows()):
 *         for j in range(d.ncols()):             # <<<<<<<<<<<<<<
 *             e_ = d._get(i, j)
 *             v.push_back(e_.thisptr)
*/
    __pyx_t_2 = NULL;
    __pyx_t_7 = ((PyObject *)__pyx_v_d);
    __Pyx_INCREF(__pyx_t_7);
    __pyx_t_5 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL};
      __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_ncols, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4220, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(&PyRange_Type), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4220, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4220, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_8 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4220, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    for (;;) {
      {
        __pyx_t_1 = __pyx_t_8(__pyx_t_4);
        if (unlikely(!__pyx_t_1)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 4220, __pyx_L1_error)
            PyErr_Clear();
          }
          break;
        }
      }
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_XDECREF_SET(__pyx_v_j, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "symengine/lib/symengine_wrapper.pyx":4221
 *     for i in range(d.nrows()):
 *         for j in range(d.ncols()):
 *             e_ = d._get(i, j)             # <<<<<<<<<<<<<<
 *             v.push_back(e_.thisptr)
 * 
*/
      __pyx_t_2 = ((PyObject *)__pyx_v_d);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_5 = 0;
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_i, __pyx_v_j};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_2, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4221, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 4221, __pyx_L1_error)
      __Pyx_XDECREF_SET(__pyx_v_e_, ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1));
      __pyx_t_1 = 0;

      /* "symengine/lib/symengine_wrapper.pyx":4222
 *         for j in range(d.ncols()):
 *             e_ = d._get(i, j)
 *             v.push_back(e_.thisptr)             # <<<<<<<<<<<<<<
 * 
 * 
*/
      try {
        __pyx_v_v.push_back(__pyx_v_e_->thisptr);
      } catch(...) {
        __Pyx_CppExn2PyErr();
        __PYX_ERR(0, 4222, __pyx_L1_error)
      }

      /* "symengine/lib/symengine_wrapper.pyx":4220
 *     cdef Basic e_
 *     for i in range(d.nrows()):
 *         for j in range(d.ncols()):             # <<<<<<<<<<<<<<
 *             e_ = d._get(i, j)
 *             v.push_back(e_.thisptr)
*/
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":4219
 * cdef matrix_to_vec(DenseMatrixBase d, symengine.vec_basic& v):
 *     cdef Basic e_
 *     for i in range(d.nrows()):             # <<<<<<<<<<<<<<
 *         for j in range(d.ncols()):
 *             e_ = d._get(i, j)
*/
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4217
 * 
 * 
 * cdef matrix_to_vec(DenseMatrixBase d, symengine.vec_basic& v):             # <<<<<<<<<<<<<<
 *     cdef Basic e_
 *     for i in range(d.nrows()):
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.matrix_to_vec", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_e_);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_v_j);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4225
 * 
 * 
 * def eye(n):             # <<<<<<<<<<<<<<
 *     cdef DenseMatrixBase d = DenseMatrix(n, n)
 *     symengine.eye(deref(symengine.static_cast_DenseMatrix(d.thisptr)), 0)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_29eye(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_29eye = {"eye", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_29eye, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_29eye(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_n = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("eye (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_n,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 4225, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4225, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "eye", 0) < (0)) __PYX_ERR(0, 4225, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("eye", 1, 1, 1, i); __PYX_ERR(0, 4225, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4225, __pyx_L3_error)
    }
    __pyx_v_n = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("eye", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4225, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.eye", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_28eye(__pyx_self, __pyx_v_n);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_28eye(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_n) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_d = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("eye", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4226
 * 
 * def eye(n):
 *     cdef DenseMatrixBase d = DenseMatrix(n, n)             # <<<<<<<<<<<<<<
 *     symengine.eye(deref(symengine.static_cast_DenseMatrix(d.thisptr)), 0)
 *     return d
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_DenseMatrix); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4226, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_n, __pyx_v_n};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4226, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase))))) __PYX_ERR(0, 4226, __pyx_L1_error)
  __pyx_v_d = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4227
 * def eye(n):
 *     cdef DenseMatrixBase d = DenseMatrix(n, n)
 *     symengine.eye(deref(symengine.static_cast_DenseMatrix(d.thisptr)), 0)             # <<<<<<<<<<<<<<
 *     return d
 * 
*/
  SymEngine::eye((*static_cast<SymEngine::DenseMatrix*>(__pyx_v_d->__pyx_base.thisptr)), 0);

  /* "symengine/lib/symengine_wrapper.pyx":4228
 *     cdef DenseMatrixBase d = DenseMatrix(n, n)
 *     symengine.eye(deref(symengine.static_cast_DenseMatrix(d.thisptr)), 0)
 *     return d             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_d);
  __pyx_r = ((PyObject *)__pyx_v_d);
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4225
 * 
 * 
 * def eye(n):             # <<<<<<<<<<<<<<
 *     cdef DenseMatrixBase d = DenseMatrix(n, n)
 *     symengine.eye(deref(symengine.static_cast_DenseMatrix(d.thisptr)), 0)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.eye", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_d);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4231
 * 
 * 
 * cdef symengine.vec_basic iter_to_vec_basic(iter):             # <<<<<<<<<<<<<<
 *     cdef Basic B
 *     cdef symengine.vec_basic V
*/

static SymEngine::vec_basic __pyx_f_9symengine_3lib_17symengine_wrapper_iter_to_vec_basic(PyObject *__pyx_v_iter) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_B = 0;
  SymEngine::vec_basic __pyx_v_V;
  PyObject *__pyx_v_b = NULL;
  SymEngine::vec_basic __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  size_t __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("iter_to_vec_basic", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4234
 *     cdef Basic B
 *     cdef symengine.vec_basic V
 *     for b in iter:             # <<<<<<<<<<<<<<
 *         B = sympify(b)
 *         V.push_back(B.thisptr)
*/
  if (likely(PyList_CheckExact(__pyx_v_iter)) || PyTuple_CheckExact(__pyx_v_iter)) {
    __pyx_t_1 = __pyx_v_iter; __Pyx_INCREF(__pyx_t_1);
    __pyx_t_2 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_iter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4234, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4234, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_3)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
          #if !CYTHON_ASSUME_SAFE_SIZE
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 4234, __pyx_L1_error)
          #endif
          if (__pyx_t_2 >= __pyx_temp) break;
        }
        __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_2, __Pyx_ReferenceSharing_OwnStrongReference);
        ++__pyx_t_2;
      } else {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
          #if !CYTHON_ASSUME_SAFE_SIZE
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 4234, __pyx_L1_error)
          #endif
          if (__pyx_t_2 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2));
        #else
        __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2);
        #endif
        ++__pyx_t_2;
      }
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4234, __pyx_L1_error)
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 4234, __pyx_L1_error)
          PyErr_Clear();
        }
        break;
      }
    }
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_XDECREF_SET(__pyx_v_b, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":4235
 *     cdef symengine.vec_basic V
 *     for b in iter:
 *         B = sympify(b)             # <<<<<<<<<<<<<<
 *         V.push_back(B.thisptr)
 *     return V
*/
    __pyx_t_5 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4235, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
      assert(__pyx_t_5);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
      __pyx_t_7 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_b};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4235, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 4235, __pyx_L1_error)
    __Pyx_XDECREF_SET(__pyx_v_B, ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":4236
 *     for b in iter:
 *         B = sympify(b)
 *         V.push_back(B.thisptr)             # <<<<<<<<<<<<<<
 *     return V
 * 
*/
    try {
      __pyx_v_V.push_back(__pyx_v_B->thisptr);
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(0, 4236, __pyx_L1_error)
    }

    /* "symengine/lib/symengine_wrapper.pyx":4234
 *     cdef Basic B
 *     cdef symengine.vec_basic V
 *     for b in iter:             # <<<<<<<<<<<<<<
 *         B = sympify(b)
 *         V.push_back(B.thisptr)
*/
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4237
 *         B = sympify(b)
 *         V.push_back(B.thisptr)
 *     return V             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_r = __pyx_v_V;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4231
 * 
 * 
 * cdef symengine.vec_basic iter_to_vec_basic(iter):             # <<<<<<<<<<<<<<
 *     cdef Basic B
 *     cdef symengine.vec_basic V
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.iter_to_vec_basic", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_pretend_to_initialize(&__pyx_r);
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_B);
  __Pyx_XDECREF(__pyx_v_b);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4240
 * 
 * 
 * def diag(*values):             # <<<<<<<<<<<<<<
 *     cdef DenseMatrixBase d = DenseMatrix(len(values), len(values))
 *     cdef symengine.vec_basic V = iter_to_vec_basic(values)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_31diag(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_31diag = {"diag", (PyCFunction)(void(*)(void))(PyCFunctionWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_31diag, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_31diag(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_values = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("diag (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("diag", __pyx_kwds); return NULL;}
  __Pyx_INCREF(__pyx_args);
  __pyx_v_values = __pyx_args;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_30diag(__pyx_self, __pyx_v_values);

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_30diag(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_values) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_d = 0;
  SymEngine::vec_basic __pyx_v_V;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  size_t __pyx_t_7;
  SymEngine::vec_basic __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("diag", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4241
 * 
 * def diag(*values):
 *     cdef DenseMatrixBase d = DenseMatrix(len(values), len(values))             # <<<<<<<<<<<<<<
 *     cdef symengine.vec_basic V = iter_to_vec_basic(values)
 *     symengine.diag(deref(symengine.static_cast_DenseMatrix(d.thisptr)), V, 0)
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_DenseMatrix); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4241, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyTuple_GET_SIZE(__pyx_v_values); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 4241, __pyx_L1_error)
  __pyx_t_5 = PyLong_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4241, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyTuple_GET_SIZE(__pyx_v_values); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 4241, __pyx_L1_error)
  __pyx_t_6 = PyLong_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4241, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_7 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_t_5, __pyx_t_6};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4241, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase))))) __PYX_ERR(0, 4241, __pyx_L1_error)
  __pyx_v_d = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4242
 * def diag(*values):
 *     cdef DenseMatrixBase d = DenseMatrix(len(values), len(values))
 *     cdef symengine.vec_basic V = iter_to_vec_basic(values)             # <<<<<<<<<<<<<<
 *     symengine.diag(deref(symengine.static_cast_DenseMatrix(d.thisptr)), V, 0)
 *     return d
*/
  __pyx_t_8 = __pyx_f_9symengine_3lib_17symengine_wrapper_iter_to_vec_basic(__pyx_v_values); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4242, __pyx_L1_error)
  __pyx_v_V = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_8);

  /* "symengine/lib/symengine_wrapper.pyx":4243
 *     cdef DenseMatrixBase d = DenseMatrix(len(values), len(values))
 *     cdef symengine.vec_basic V = iter_to_vec_basic(values)
 *     symengine.diag(deref(symengine.static_cast_DenseMatrix(d.thisptr)), V, 0)             # <<<<<<<<<<<<<<
 *     return d
 * 
*/
  SymEngine::diag((*static_cast<SymEngine::DenseMatrix*>(__pyx_v_d->__pyx_base.thisptr)), __pyx_v_V, 0);

  /* "symengine/lib/symengine_wrapper.pyx":4244
 *     cdef symengine.vec_basic V = iter_to_vec_basic(values)
 *     symengine.diag(deref(symengine.static_cast_DenseMatrix(d.thisptr)), V, 0)
 *     return d             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_d);
  __pyx_r = ((PyObject *)__pyx_v_d);
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4240
 * 
 * 
 * def diag(*values):             # <<<<<<<<<<<<<<
 *     cdef DenseMatrixBase d = DenseMatrix(len(values), len(values))
 *     cdef symengine.vec_basic V = iter_to_vec_basic(values)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.diag", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_d);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4247
 * 
 * 
 * def ones(r, c = None):             # <<<<<<<<<<<<<<
 *     if c is None:
 *         c = r
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_33ones(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_33ones = {"ones", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_33ones, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_33ones(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_r = 0;
  PyObject *__pyx_v_c = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ones (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_r,&__pyx_mstate_global->__pyx_n_u_c,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 4247, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4247, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4247, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "ones", 0) < (0)) __PYX_ERR(0, 4247, __pyx_L3_error)
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("ones", 0, 1, 2, i); __PYX_ERR(0, 4247, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4247, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4247, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_r = values[0];
    __pyx_v_c = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("ones", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 4247, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.ones", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_32ones(__pyx_self, __pyx_v_r, __pyx_v_c);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_32ones(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_r, PyObject *__pyx_v_c) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_d = 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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("ones", 0);
  __Pyx_INCREF(__pyx_v_c);

  /* "symengine/lib/symengine_wrapper.pyx":4248
 * 
 * def ones(r, c = None):
 *     if c is None:             # <<<<<<<<<<<<<<
 *         c = r
 *     cdef DenseMatrixBase d = DenseMatrix(r, c)
*/
  __pyx_t_1 = (__pyx_v_c == Py_None);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":4249
 * def ones(r, c = None):
 *     if c is None:
 *         c = r             # <<<<<<<<<<<<<<
 *     cdef DenseMatrixBase d = DenseMatrix(r, c)
 *     symengine.ones(deref(symengine.static_cast_DenseMatrix(d.thisptr)))
*/
    __Pyx_INCREF(__pyx_v_r);
    __Pyx_DECREF_SET(__pyx_v_c, __pyx_v_r);

    /* "symengine/lib/symengine_wrapper.pyx":4248
 * 
 * def ones(r, c = None):
 *     if c is None:             # <<<<<<<<<<<<<<
 *         c = r
 *     cdef DenseMatrixBase d = DenseMatrix(r, c)
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":4250
 *     if c is None:
 *         c = r
 *     cdef DenseMatrixBase d = DenseMatrix(r, c)             # <<<<<<<<<<<<<<
 *     symengine.ones(deref(symengine.static_cast_DenseMatrix(d.thisptr)))
 *     return d
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_DenseMatrix); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4250, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_r, __pyx_v_c};
    __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4250, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase))))) __PYX_ERR(0, 4250, __pyx_L1_error)
  __pyx_v_d = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4251
 *         c = r
 *     cdef DenseMatrixBase d = DenseMatrix(r, c)
 *     symengine.ones(deref(symengine.static_cast_DenseMatrix(d.thisptr)))             # <<<<<<<<<<<<<<
 *     return d
 * 
*/
  SymEngine::ones((*static_cast<SymEngine::DenseMatrix*>(__pyx_v_d->__pyx_base.thisptr)));

  /* "symengine/lib/symengine_wrapper.pyx":4252
 *     cdef DenseMatrixBase d = DenseMatrix(r, c)
 *     symengine.ones(deref(symengine.static_cast_DenseMatrix(d.thisptr)))
 *     return d             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_d);
  __pyx_r = ((PyObject *)__pyx_v_d);
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4247
 * 
 * 
 * def ones(r, c = None):             # <<<<<<<<<<<<<<
 *     if c is None:
 *         c = r
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.ones", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_d);
  __Pyx_XDECREF(__pyx_v_c);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4255
 * 
 * 
 * def zeros(r, c = None):             # <<<<<<<<<<<<<<
 *     if c is None:
 *         c = r
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_35zeros(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_35zeros = {"zeros", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_35zeros, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_35zeros(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_r = 0;
  PyObject *__pyx_v_c = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("zeros (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_r,&__pyx_mstate_global->__pyx_n_u_c,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 4255, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4255, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4255, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "zeros", 0) < (0)) __PYX_ERR(0, 4255, __pyx_L3_error)
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("zeros", 0, 1, 2, i); __PYX_ERR(0, 4255, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4255, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4255, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_r = values[0];
    __pyx_v_c = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("zeros", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 4255, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.zeros", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_34zeros(__pyx_self, __pyx_v_r, __pyx_v_c);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_34zeros(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_r, PyObject *__pyx_v_c) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_d = 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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("zeros", 0);
  __Pyx_INCREF(__pyx_v_c);

  /* "symengine/lib/symengine_wrapper.pyx":4256
 * 
 * def zeros(r, c = None):
 *     if c is None:             # <<<<<<<<<<<<<<
 *         c = r
 *     cdef DenseMatrixBase d = DenseMatrix(r, c)
*/
  __pyx_t_1 = (__pyx_v_c == Py_None);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":4257
 * def zeros(r, c = None):
 *     if c is None:
 *         c = r             # <<<<<<<<<<<<<<
 *     cdef DenseMatrixBase d = DenseMatrix(r, c)
 *     symengine.zeros(deref(symengine.static_cast_DenseMatrix(d.thisptr)))
*/
    __Pyx_INCREF(__pyx_v_r);
    __Pyx_DECREF_SET(__pyx_v_c, __pyx_v_r);

    /* "symengine/lib/symengine_wrapper.pyx":4256
 * 
 * def zeros(r, c = None):
 *     if c is None:             # <<<<<<<<<<<<<<
 *         c = r
 *     cdef DenseMatrixBase d = DenseMatrix(r, c)
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":4258
 *     if c is None:
 *         c = r
 *     cdef DenseMatrixBase d = DenseMatrix(r, c)             # <<<<<<<<<<<<<<
 *     symengine.zeros(deref(symengine.static_cast_DenseMatrix(d.thisptr)))
 *     return d
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_DenseMatrix); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4258, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_r, __pyx_v_c};
    __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4258, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase))))) __PYX_ERR(0, 4258, __pyx_L1_error)
  __pyx_v_d = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4259
 *         c = r
 *     cdef DenseMatrixBase d = DenseMatrix(r, c)
 *     symengine.zeros(deref(symengine.static_cast_DenseMatrix(d.thisptr)))             # <<<<<<<<<<<<<<
 *     return d
 * 
*/
  SymEngine::zeros((*static_cast<SymEngine::DenseMatrix*>(__pyx_v_d->__pyx_base.thisptr)));

  /* "symengine/lib/symengine_wrapper.pyx":4260
 *     cdef DenseMatrixBase d = DenseMatrix(r, c)
 *     symengine.zeros(deref(symengine.static_cast_DenseMatrix(d.thisptr)))
 *     return d             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_d);
  __pyx_r = ((PyObject *)__pyx_v_d);
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4255
 * 
 * 
 * def zeros(r, c = None):             # <<<<<<<<<<<<<<
 *     if c is None:
 *         c = r
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.zeros", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_d);
  __Pyx_XDECREF(__pyx_v_c);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4264
 * 
 * cdef class Sieve:
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def generate_primes(n):
 *         cdef symengine.vector[unsigned] primes
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Sieve_1generate_primes(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_5Sieve_1generate_primes = {"generate_primes", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_5Sieve_1generate_primes, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Sieve_1generate_primes(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_n = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("generate_primes (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_n,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 4264, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4264, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "generate_primes", 0) < (0)) __PYX_ERR(0, 4264, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("generate_primes", 1, 1, 1, i); __PYX_ERR(0, 4264, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4264, __pyx_L3_error)
    }
    __pyx_v_n = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("generate_primes", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4264, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Sieve.generate_primes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Sieve_generate_primes(__pyx_v_n);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Sieve_generate_primes(PyObject *__pyx_v_n) {
  std::vector<unsigned int>  __pyx_v_primes;
  PyObject *__pyx_v_s = NULL;
  std::vector<unsigned int> ::size_type __pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  unsigned int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  std::vector<unsigned int> ::size_type __pyx_t_3;
  std::vector<unsigned int> ::size_type __pyx_t_4;
  std::vector<unsigned int> ::size_type __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("generate_primes", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4267
 *     def generate_primes(n):
 *         cdef symengine.vector[unsigned] primes
 *         symengine.sieve_generate_primes(primes, n)             # <<<<<<<<<<<<<<
 *         s = []
 *         for i in range(primes.size()):
*/
  __pyx_t_1 = __Pyx_PyLong_As_unsigned_int(__pyx_v_n); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4267, __pyx_L1_error)
  SymEngine::Sieve::generate_primes(__pyx_v_primes, __pyx_t_1);

  /* "symengine/lib/symengine_wrapper.pyx":4268
 *         cdef symengine.vector[unsigned] primes
 *         symengine.sieve_generate_primes(primes, n)
 *         s = []             # <<<<<<<<<<<<<<
 *         for i in range(primes.size()):
 *             s.append(primes[i])
*/
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4268, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_s = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4269
 *         symengine.sieve_generate_primes(primes, n)
 *         s = []
 *         for i in range(primes.size()):             # <<<<<<<<<<<<<<
 *             s.append(primes[i])
 *         return s
*/
  __pyx_t_3 = __pyx_v_primes.size();
  __pyx_t_4 = __pyx_t_3;
  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
    __pyx_v_i = __pyx_t_5;

    /* "symengine/lib/symengine_wrapper.pyx":4270
 *         s = []
 *         for i in range(primes.size()):
 *             s.append(primes[i])             # <<<<<<<<<<<<<<
 *         return s
 * 
*/
    __pyx_t_2 = __Pyx_PyLong_From_unsigned_int((__pyx_v_primes[__pyx_v_i])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4270, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_s, __pyx_t_2); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 4270, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }

  /* "symengine/lib/symengine_wrapper.pyx":4271
 *         for i in range(primes.size()):
 *             s.append(primes[i])
 *         return s             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_s);
  __pyx_r = __pyx_v_s;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4264
 * 
 * cdef class Sieve:
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def generate_primes(n):
 *         cdef symengine.vector[unsigned] primes
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Sieve.generate_primes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_s);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Sieve_3__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_5Sieve_3__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_5Sieve_3__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Sieve_3__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Sieve_2__reduce_cython__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Sieve *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Sieve_2__reduce_cython__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Sieve *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = ()             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None and _dict:
*/
  __Pyx_INCREF(__pyx_mstate_global->__pyx_empty_tuple);
  __pyx_v_state = __pyx_mstate_global->__pyx_empty_tuple;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = ()
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None and _dict:
 *         state += (_dict,)
*/
  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":7
 *     state = ()
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None and _dict:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
*/
  __pyx_t_3 = (__pyx_v__dict != Py_None);
  if (__pyx_t_3) {
  } else {
    __pyx_t_2 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(1, 7, __pyx_L1_error)
  __pyx_t_2 = __pyx_t_3;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None and _dict:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
*/
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict) != (0)) __PYX_ERR(1, 8, __pyx_L1_error);
    __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None and _dict:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = False
*/
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = ()
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None and _dict:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
*/
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = False             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_Sieve, (type(self), 0xe3b0c44, None), state
*/
  /*else*/ {
    __pyx_v_use_setstate = 0;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = False
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_Sieve, (type(self), 0xe3b0c44, None), state
 *     else:
*/
  if (__pyx_v_use_setstate) {

    /* "(tree fragment)":13
 *         use_setstate = False
 *     if use_setstate:
 *         return __pyx_unpickle_Sieve, (type(self), 0xe3b0c44, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_Sieve, (type(self), 0xe3b0c44, state)
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_Sieve); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 13, __pyx_L1_error);
    __Pyx_INCREF(__pyx_mstate_global->__pyx_int_238750788);
    __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_238750788);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_238750788) != (0)) __PYX_ERR(1, 13, __pyx_L1_error);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None) != (0)) __PYX_ERR(1, 13, __pyx_L1_error);
    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_4);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4) != (0)) __PYX_ERR(1, 13, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_1);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1) != (0)) __PYX_ERR(1, 13, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 13, __pyx_L1_error);
    __pyx_t_4 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = False
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_Sieve, (type(self), 0xe3b0c44, None), state
 *     else:
*/
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_Sieve, (type(self), 0xe3b0c44, None), state
 *     else:
 *         return __pyx_unpickle_Sieve, (type(self), 0xe3b0c44, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_Sieve__set_state(self, __pyx_state)
*/
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_Sieve); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 15, __pyx_L1_error);
    __Pyx_INCREF(__pyx_mstate_global->__pyx_int_238750788);
    __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_238750788);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_238750788) != (0)) __PYX_ERR(1, 15, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 15, __pyx_L1_error);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5) != (0)) __PYX_ERR(1, 15, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_1);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1) != (0)) __PYX_ERR(1, 15, __pyx_L1_error);
    __pyx_t_5 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Sieve.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_Sieve, (type(self), 0xe3b0c44, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_Sieve__set_state(self, __pyx_state)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Sieve_5__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_5Sieve_5__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_5Sieve_5__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_5Sieve_5__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(1, 16, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 16, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 16, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error)
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 16, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Sieve.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_5Sieve_4__setstate_cython__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Sieve *)__pyx_v_self), __pyx_v___pyx_state);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_5Sieve_4__setstate_cython__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Sieve *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_Sieve, (type(self), 0xe3b0c44, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_Sieve__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
*/
  __pyx_t_1 = __pyx_v___pyx_state;
  __Pyx_INCREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 17, __pyx_L1_error)
  if (unlikely(__pyx_t_1 == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'");
    __PYX_ERR(1, 17, __pyx_L1_error)
  }
  __pyx_t_2 = __pyx_f_9symengine_3lib_17symengine_wrapper___pyx_unpickle_Sieve__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 17, __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;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_Sieve, (type(self), 0xe3b0c44, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_Sieve__set_state(self, __pyx_state)
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Sieve.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4277
 *     cdef symengine.sieve_iterator *thisptr
 *     cdef unsigned limit
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self.thisptr = new symengine.sieve_iterator()
 *         self.limit = 0
*/

/* Python wrapper */
static int __pyx_pw_9symengine_3lib_17symengine_wrapper_14Sieve_iterator_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_9symengine_3lib_17symengine_wrapper_14Sieve_iterator_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, __pyx_nargs); return -1; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return -1;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__cinit__", __pyx_kwds); return -1;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_14Sieve_iterator___cinit__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Sieve_iterator *)__pyx_v_self));

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

static int __pyx_pf_9symengine_3lib_17symengine_wrapper_14Sieve_iterator___cinit__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Sieve_iterator *__pyx_v_self) {
  int __pyx_r;

  /* "symengine/lib/symengine_wrapper.pyx":4278
 *     cdef unsigned limit
 *     def __cinit__(self):
 *         self.thisptr = new symengine.sieve_iterator()             # <<<<<<<<<<<<<<
 *         self.limit = 0
 * 
*/
  __pyx_v_self->thisptr = new SymEngine::Sieve::iterator();

  /* "symengine/lib/symengine_wrapper.pyx":4279
 *     def __cinit__(self):
 *         self.thisptr = new symengine.sieve_iterator()
 *         self.limit = 0             # <<<<<<<<<<<<<<
 * 
 *     def __cinit__(self, n):
*/
  __pyx_v_self->limit = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4277
 *     cdef symengine.sieve_iterator *thisptr
 *     cdef unsigned limit
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self.thisptr = new symengine.sieve_iterator()
 *         self.limit = 0
*/

  /* function exit code */
  __pyx_r = 0;
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4281
 *         self.limit = 0
 * 
 *     def __cinit__(self, n):             # <<<<<<<<<<<<<<
 *         self.thisptr = new symengine.sieve_iterator(n)
 *         self.limit = n
*/

/* Python wrapper */
static int __pyx_pw_9symengine_3lib_17symengine_wrapper_14Sieve_iterator_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_9symengine_3lib_17symengine_wrapper_14Sieve_iterator_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_n = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_n,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 4281, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4281, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__cinit__", 0) < (0)) __PYX_ERR(0, 4281, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, i); __PYX_ERR(0, 4281, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4281, __pyx_L3_error)
    }
    __pyx_v_n = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4281, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Sieve_iterator.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_14Sieve_iterator_2__cinit__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Sieve_iterator *)__pyx_v_self), __pyx_v_n);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_9symengine_3lib_17symengine_wrapper_14Sieve_iterator_2__cinit__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Sieve_iterator *__pyx_v_self, PyObject *__pyx_v_n) {
  int __pyx_r;
  unsigned int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4282
 * 
 *     def __cinit__(self, n):
 *         self.thisptr = new symengine.sieve_iterator(n)             # <<<<<<<<<<<<<<
 *         self.limit = n
 * 
*/
  __pyx_t_1 = __Pyx_PyLong_As_unsigned_int(__pyx_v_n); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4282, __pyx_L1_error)
  __pyx_v_self->thisptr = new SymEngine::Sieve::iterator(__pyx_t_1);

  /* "symengine/lib/symengine_wrapper.pyx":4283
 *     def __cinit__(self, n):
 *         self.thisptr = new symengine.sieve_iterator(n)
 *         self.limit = n             # <<<<<<<<<<<<<<
 * 
 *     def __iter__(self):
*/
  __pyx_t_1 = __Pyx_PyLong_As_unsigned_int(__pyx_v_n); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4283, __pyx_L1_error)
  __pyx_v_self->limit = __pyx_t_1;

  /* "symengine/lib/symengine_wrapper.pyx":4281
 *         self.limit = 0
 * 
 *     def __cinit__(self, n):             # <<<<<<<<<<<<<<
 *         self.thisptr = new symengine.sieve_iterator(n)
 *         self.limit = n
*/

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Sieve_iterator.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4285
 *         self.limit = n
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_14Sieve_iterator_5__iter__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_14Sieve_iterator_5__iter__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_14Sieve_iterator_4__iter__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Sieve_iterator *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_14Sieve_iterator_4__iter__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Sieve_iterator *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4286
 * 
 *     def __iter__(self):
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def __next__(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_self);
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4285
 *         self.limit = n
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
*/

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

/* "symengine/lib/symengine_wrapper.pyx":4288
 *         return self
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         n = deref(self.thisptr).next_prime()
 *         if self.limit > 0 and n > self.limit:
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_14Sieve_iterator_7__next__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_14Sieve_iterator_7__next__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_14Sieve_iterator_6__next__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Sieve_iterator *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_14Sieve_iterator_6__next__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Sieve_iterator *__pyx_v_self) {
  unsigned int __pyx_v_n;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_error_without_exception = 0; /* StopIteration */
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__next__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4289
 * 
 *     def __next__(self):
 *         n = deref(self.thisptr).next_prime()             # <<<<<<<<<<<<<<
 *         if self.limit > 0 and n > self.limit:
 *             raise StopIteration
*/
  __pyx_v_n = (*__pyx_v_self->thisptr).next_prime();

  /* "symengine/lib/symengine_wrapper.pyx":4290
 *     def __next__(self):
 *         n = deref(self.thisptr).next_prime()
 *         if self.limit > 0 and n > self.limit:             # <<<<<<<<<<<<<<
 *             raise StopIteration
 *         else:
*/
  __pyx_t_2 = (__pyx_v_self->limit > 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_n > __pyx_v_self->limit);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (unlikely(__pyx_t_1)) {

    /* "symengine/lib/symengine_wrapper.pyx":4291
 *         n = deref(self.thisptr).next_prime()
 *         if self.limit > 0 and n > self.limit:
 *             raise StopIteration             # <<<<<<<<<<<<<<
 *         else:
 *             return n
*/
    __pyx_error_without_exception = 1;
    goto __pyx_L1_error;;

    /* "symengine/lib/symengine_wrapper.pyx":4290
 *     def __next__(self):
 *         n = deref(self.thisptr).next_prime()
 *         if self.limit > 0 and n > self.limit:             # <<<<<<<<<<<<<<
 *             raise StopIteration
 *         else:
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":4293
 *             raise StopIteration
 *         else:
 *             return n             # <<<<<<<<<<<<<<
 * 
 * 
*/
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyLong_From_unsigned_int(__pyx_v_n); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4293, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
  }

  /* "symengine/lib/symengine_wrapper.pyx":4288
 *         return self
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         n = deref(self.thisptr).next_prime()
 *         if self.limit > 0 and n > self.limit:
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  if (!__pyx_error_without_exception) {
    __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Sieve_iterator.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  }
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_14Sieve_iterator_9__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_14Sieve_iterator_9__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_14Sieve_iterator_9__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_14Sieve_iterator_9__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_14Sieve_iterator_8__reduce_cython__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Sieve_iterator *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_14Sieve_iterator_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Sieve_iterator *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Sieve_iterator.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_14Sieve_iterator_11__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_14Sieve_iterator_11__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_14Sieve_iterator_11__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_14Sieve_iterator_11__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(1, 3, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 3, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 3, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3, __pyx_L3_error)
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Sieve_iterator.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_14Sieve_iterator_10__setstate_cython__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Sieve_iterator *)__pyx_v_self), __pyx_v___pyx_state);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_14Sieve_iterator_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Sieve_iterator *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Sieve_iterator.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4296
 * 
 * 
 * def module_cleanup():             # <<<<<<<<<<<<<<
 *     global I, E, pi, oo, minus_oo, zoo, nan, true, false, golden_ratio, \
 *            catalan, eulergamma, sympy_module, sage_module, half, one, \
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_37module_cleanup(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_37module_cleanup = {"module_cleanup", (PyCFunction)__pyx_pw_9symengine_3lib_17symengine_wrapper_37module_cleanup, METH_NOARGS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_37module_cleanup(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("module_cleanup (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_36module_cleanup(__pyx_self);

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_36module_cleanup(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("module_cleanup", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4300
 *            catalan, eulergamma, sympy_module, sage_module, half, one, \
 *            minus_one, zero
 *     funcs.clear()             # <<<<<<<<<<<<<<
 *     del    I, E, pi, oo, minus_oo, zoo, nan, true, false, golden_ratio, \
 *            catalan, eulergamma, sympy_module, sage_module, half, one, \
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_funcs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4300, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_clear); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4300, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4300, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4301
 *            minus_one, zero
 *     funcs.clear()
 *     del    I, E, pi, oo, minus_oo, zoo, nan, true, false, golden_ratio, \             # <<<<<<<<<<<<<<
 *            catalan, eulergamma, sympy_module, sage_module, half, one, \
 *            minus_one, zero
*/
  if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_mstate_global->__pyx_n_u_I) < (0)) __PYX_ERR(0, 4301, __pyx_L1_error)
  if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_mstate_global->__pyx_n_u_E) < (0)) __PYX_ERR(0, 4301, __pyx_L1_error)
  if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_mstate_global->__pyx_n_u_pi) < (0)) __PYX_ERR(0, 4301, __pyx_L1_error)
  if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_mstate_global->__pyx_n_u_oo) < (0)) __PYX_ERR(0, 4301, __pyx_L1_error)
  if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_mstate_global->__pyx_n_u_minus_oo) < (0)) __PYX_ERR(0, 4301, __pyx_L1_error)
  if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_mstate_global->__pyx_n_u_zoo) < (0)) __PYX_ERR(0, 4301, __pyx_L1_error)
  if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_mstate_global->__pyx_n_u_nan) < (0)) __PYX_ERR(0, 4301, __pyx_L1_error)
  if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_mstate_global->__pyx_n_u_true) < (0)) __PYX_ERR(0, 4301, __pyx_L1_error)
  if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_mstate_global->__pyx_n_u_false) < (0)) __PYX_ERR(0, 4301, __pyx_L1_error)
  if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_mstate_global->__pyx_n_u_golden_ratio) < (0)) __PYX_ERR(0, 4301, __pyx_L1_error)
  if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_mstate_global->__pyx_n_u_catalan) < (0)) __PYX_ERR(0, 4302, __pyx_L1_error)
  if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_mstate_global->__pyx_n_u_eulergamma) < (0)) __PYX_ERR(0, 4302, __pyx_L1_error)
  if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_mstate_global->__pyx_n_u_sympy_module) < (0)) __PYX_ERR(0, 4302, __pyx_L1_error)
  if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_mstate_global->__pyx_n_u_sage_module) < (0)) __PYX_ERR(0, 4302, __pyx_L1_error)
  if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_mstate_global->__pyx_n_u_half) < (0)) __PYX_ERR(0, 4302, __pyx_L1_error)
  if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_mstate_global->__pyx_n_u_one) < (0)) __PYX_ERR(0, 4302, __pyx_L1_error)
  if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_mstate_global->__pyx_n_u_minus_one) < (0)) __PYX_ERR(0, 4303, __pyx_L1_error)
  if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_mstate_global->__pyx_n_u_zero) < (0)) __PYX_ERR(0, 4303, __pyx_L1_error)

  /* "symengine/lib/symengine_wrapper.pyx":4296
 * 
 * 
 * def module_cleanup():             # <<<<<<<<<<<<<<
 *     global I, E, pi, oo, minus_oo, zoo, nan, true, false, golden_ratio, \
 *            catalan, eulergamma, sympy_module, sage_module, half, one, \
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.module_cleanup", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4309
 * 
 * 
 * def diff(expr, *args):             # <<<<<<<<<<<<<<
 *     if isinstance(expr, MatrixBase):
 *         # Don't sympify matrices so that mutable matrices
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_39diff(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_39diff = {"diff", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_39diff, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_39diff(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_expr = 0;
  PyObject *__pyx_v_args = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("diff (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  __pyx_v_args = __Pyx_ArgsSlice_FASTCALL(__pyx_args, 1, __pyx_nargs);
  if (unlikely(!__pyx_v_args)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_v_args);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_expr,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 4309, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        default:
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4309, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      const Py_ssize_t used_pos_args = (kwd_pos_args < 1) ? kwd_pos_args : 1;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, used_pos_args, __pyx_kwds_len, "diff", 0) < (0)) __PYX_ERR(0, 4309, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("diff", 0, 1, 1, i); __PYX_ERR(0, 4309, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs < 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4309, __pyx_L3_error)
    }
    __pyx_v_expr = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("diff", 0, 1, 1, __pyx_nargs); __PYX_ERR(0, 4309, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.diff", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_38diff(__pyx_self, __pyx_v_expr, __pyx_v_args);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_args);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_38diff(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_expr, PyObject *__pyx_v_args) {
  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;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("diff", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4310
 * 
 * def diff(expr, *args):
 *     if isinstance(expr, MatrixBase):             # <<<<<<<<<<<<<<
 *         # Don't sympify matrices so that mutable matrices
 *         # return mutable matrices
*/
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_expr, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_MatrixBase); 
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":4313
 *         # Don't sympify matrices so that mutable matrices
 *         # return mutable matrices
 *         return _diff(expr, *args)             # <<<<<<<<<<<<<<
 *     return _diff(sympify(expr), *args)
 * 
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_diff); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4313, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4313, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_expr);
    __Pyx_GIVEREF(__pyx_v_expr);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_expr) != (0)) __PYX_ERR(0, 4313, __pyx_L1_error);
    __pyx_t_4 = PyNumber_Add(__pyx_t_3, __pyx_v_args); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4313, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4313, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":4310
 * 
 * def diff(expr, *args):
 *     if isinstance(expr, MatrixBase):             # <<<<<<<<<<<<<<
 *         # Don't sympify matrices so that mutable matrices
 *         # return mutable matrices
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":4314
 *         # return mutable matrices
 *         return _diff(expr, *args)
 *     return _diff(sympify(expr), *args)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_diff); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4314, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4314, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_expr};
    __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4314, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4314, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_4);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4) != (0)) __PYX_ERR(0, 4314, __pyx_L1_error);
  __pyx_t_4 = 0;
  __pyx_t_4 = PyNumber_Add(__pyx_t_5, __pyx_v_args); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4314, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4314, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4309
 * 
 * 
 * def diff(expr, *args):             # <<<<<<<<<<<<<<
 *     if isinstance(expr, MatrixBase):
 *         # Don't sympify matrices so that mutable matrices
*/

  /* 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("symengine.lib.symengine_wrapper.diff", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4317
 * 
 * 
 * def _diff(expr, *args):             # <<<<<<<<<<<<<<
 *     cdef Basic prev
 *     cdef Basic b
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_41_diff(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_41_diff = {"_diff", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_41_diff, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_41_diff(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_expr = 0;
  PyObject *__pyx_v_args = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_diff (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  __pyx_v_args = __Pyx_ArgsSlice_FASTCALL(__pyx_args, 1, __pyx_nargs);
  if (unlikely(!__pyx_v_args)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_v_args);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_expr,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 4317, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        default:
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4317, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      const Py_ssize_t used_pos_args = (kwd_pos_args < 1) ? kwd_pos_args : 1;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, used_pos_args, __pyx_kwds_len, "_diff", 0) < (0)) __PYX_ERR(0, 4317, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_diff", 0, 1, 1, i); __PYX_ERR(0, 4317, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs < 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4317, __pyx_L3_error)
    }
    __pyx_v_expr = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_diff", 0, 1, 1, __pyx_nargs); __PYX_ERR(0, 4317, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper._diff", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_40_diff(__pyx_self, __pyx_v_expr, __pyx_v_args);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_args);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_40_diff(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_expr, PyObject *__pyx_v_args) {
  size_t __pyx_v_i;
  size_t __pyx_v_length;
  size_t __pyx_v_l;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_cur_arg = 0;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_next_arg = 0;
  CYTHON_UNUSED size_t __pyx_v__;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __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;
  size_t __pyx_t_7;
  size_t __pyx_t_8;
  size_t __pyx_t_9;
  size_t __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_diff", 0);
  __Pyx_INCREF(__pyx_v_expr);

  /* "symengine/lib/symengine_wrapper.pyx":4321
 *     cdef Basic b
 *     cdef size_t i
 *     cdef size_t length = len(args)             # <<<<<<<<<<<<<<
 * 
 *     if not length:
*/
  __pyx_t_1 = __Pyx_PyTuple_GET_SIZE(__pyx_v_args); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 4321, __pyx_L1_error)
  __pyx_v_length = __pyx_t_1;

  /* "symengine/lib/symengine_wrapper.pyx":4323
 *     cdef size_t length = len(args)
 * 
 *     if not length:             # <<<<<<<<<<<<<<
 *         return expr
 * 
*/
  __pyx_t_2 = (!(__pyx_v_length != 0));
  if (__pyx_t_2) {

    /* "symengine/lib/symengine_wrapper.pyx":4324
 * 
 *     if not length:
 *         return expr             # <<<<<<<<<<<<<<
 * 
 *     cdef size_t l = 0
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_expr);
    __pyx_r = __pyx_v_expr;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":4323
 *     cdef size_t length = len(args)
 * 
 *     if not length:             # <<<<<<<<<<<<<<
 *         return expr
 * 
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":4326
 *         return expr
 * 
 *     cdef size_t l = 0             # <<<<<<<<<<<<<<
 *     cdef Basic cur_arg, next_arg
 *     cur_arg = sympify(args[l])
*/
  __pyx_v_l = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4328
 *     cdef size_t l = 0
 *     cdef Basic cur_arg, next_arg
 *     cur_arg = sympify(args[l])             # <<<<<<<<<<<<<<
 * 
 *     while l < length:
*/
  __pyx_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4328, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v_args, __pyx_v_l, size_t, 0, __Pyx_PyLong_FromSize_t, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4328, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_7 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_6};
    __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4328, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 4328, __pyx_L1_error)
  __pyx_v_cur_arg = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4330
 *     cur_arg = sympify(args[l])
 * 
 *     while l < length:             # <<<<<<<<<<<<<<
 *         if isinstance(cur_arg, Integer):
 *             raise ValueError("Unexpected integer argument")
*/
  while (1) {
    __pyx_t_2 = (__pyx_v_l < __pyx_v_length);
    if (!__pyx_t_2) break;

    /* "symengine/lib/symengine_wrapper.pyx":4331
 * 
 *     while l < length:
 *         if isinstance(cur_arg, Integer):             # <<<<<<<<<<<<<<
 *             raise ValueError("Unexpected integer argument")
 * 
*/
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Integer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4331, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = PyObject_IsInstance(((PyObject *)__pyx_v_cur_arg), __pyx_t_3); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 4331, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(__pyx_t_2)) {

      /* "symengine/lib/symengine_wrapper.pyx":4332
 *     while l < length:
 *         if isinstance(cur_arg, Integer):
 *             raise ValueError("Unexpected integer argument")             # <<<<<<<<<<<<<<
 * 
 *         if l + 1 == length:
*/
      __pyx_t_5 = NULL;
      __pyx_t_7 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_Unexpected_integer_argument};
        __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4332, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __Pyx_Raise(__pyx_t_3, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __PYX_ERR(0, 4332, __pyx_L1_error)

      /* "symengine/lib/symengine_wrapper.pyx":4331
 * 
 *     while l < length:
 *         if isinstance(cur_arg, Integer):             # <<<<<<<<<<<<<<
 *             raise ValueError("Unexpected integer argument")
 * 
*/
    }

    /* "symengine/lib/symengine_wrapper.pyx":4334
 *             raise ValueError("Unexpected integer argument")
 * 
 *         if l + 1 == length:             # <<<<<<<<<<<<<<
 *             # No next argument, differentiate with no integer argument
 *             return expr._diff(cur_arg)
*/
    __pyx_t_2 = ((__pyx_v_l + 1) == __pyx_v_length);
    if (__pyx_t_2) {

      /* "symengine/lib/symengine_wrapper.pyx":4336
 *         if l + 1 == length:
 *             # No next argument, differentiate with no integer argument
 *             return expr._diff(cur_arg)             # <<<<<<<<<<<<<<
 * 
 *         next_arg = sympify(args[l + 1])
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_5 = __pyx_v_expr;
      __Pyx_INCREF(__pyx_t_5);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_5, ((PyObject *)__pyx_v_cur_arg)};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_diff, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4336, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "symengine/lib/symengine_wrapper.pyx":4334
 *             raise ValueError("Unexpected integer argument")
 * 
 *         if l + 1 == length:             # <<<<<<<<<<<<<<
 *             # No next argument, differentiate with no integer argument
 *             return expr._diff(cur_arg)
*/
    }

    /* "symengine/lib/symengine_wrapper.pyx":4338
 *             return expr._diff(cur_arg)
 * 
 *         next_arg = sympify(args[l + 1])             # <<<<<<<<<<<<<<
 *         # Check if the next arg was derivative order
 *         if isinstance(next_arg, Integer):
*/
    __pyx_t_5 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4338, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = (__pyx_v_l + 1);
    __pyx_t_4 = __Pyx_GetItemInt_Tuple(__pyx_v_args, __pyx_t_7, size_t, 0, __Pyx_PyLong_FromSize_t, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4338, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_7 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
      assert(__pyx_t_5);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
      __pyx_t_7 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_4};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__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;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4338, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 4338, __pyx_L1_error)
    __Pyx_XDECREF_SET(__pyx_v_next_arg, ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":4340
 *         next_arg = sympify(args[l + 1])
 *         # Check if the next arg was derivative order
 *         if isinstance(next_arg, Integer):             # <<<<<<<<<<<<<<
 *             i = int(next_arg)
 *             for _ in range(i):
*/
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Integer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4340, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = PyObject_IsInstance(((PyObject *)__pyx_v_next_arg), __pyx_t_3); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 4340, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_2) {

      /* "symengine/lib/symengine_wrapper.pyx":4341
 *         # Check if the next arg was derivative order
 *         if isinstance(next_arg, Integer):
 *             i = int(next_arg)             # <<<<<<<<<<<<<<
 *             for _ in range(i):
 *                 expr = expr._diff(cur_arg)
*/
      __pyx_t_3 = __Pyx_PyNumber_Int(((PyObject *)__pyx_v_next_arg)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4341, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_7 = __Pyx_PyLong_As_size_t(__pyx_t_3); if (unlikely((__pyx_t_7 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4341, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_v_i = __pyx_t_7;

      /* "symengine/lib/symengine_wrapper.pyx":4342
 *         if isinstance(next_arg, Integer):
 *             i = int(next_arg)
 *             for _ in range(i):             # <<<<<<<<<<<<<<
 *                 expr = expr._diff(cur_arg)
 *             l += 2
*/
      __pyx_t_7 = __pyx_v_i;
      __pyx_t_8 = __pyx_t_7;
      for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
        __pyx_v__ = __pyx_t_9;

        /* "symengine/lib/symengine_wrapper.pyx":4343
 *             i = int(next_arg)
 *             for _ in range(i):
 *                 expr = expr._diff(cur_arg)             # <<<<<<<<<<<<<<
 *             l += 2
 *             if l == length:
*/
        __pyx_t_6 = __pyx_v_expr;
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_10 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, ((PyObject *)__pyx_v_cur_arg)};
          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_diff, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4343, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        __Pyx_DECREF_SET(__pyx_v_expr, __pyx_t_3);
        __pyx_t_3 = 0;
      }

      /* "symengine/lib/symengine_wrapper.pyx":4344
 *             for _ in range(i):
 *                 expr = expr._diff(cur_arg)
 *             l += 2             # <<<<<<<<<<<<<<
 *             if l == length:
 *                 return expr
*/
      __pyx_v_l = (__pyx_v_l + 2);

      /* "symengine/lib/symengine_wrapper.pyx":4345
 *                 expr = expr._diff(cur_arg)
 *             l += 2
 *             if l == length:             # <<<<<<<<<<<<<<
 *                 return expr
 *             cur_arg = sympify(args[l])
*/
      __pyx_t_2 = (__pyx_v_l == __pyx_v_length);
      if (__pyx_t_2) {

        /* "symengine/lib/symengine_wrapper.pyx":4346
 *             l += 2
 *             if l == length:
 *                 return expr             # <<<<<<<<<<<<<<
 *             cur_arg = sympify(args[l])
 *         else:
*/
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_v_expr);
        __pyx_r = __pyx_v_expr;
        goto __pyx_L0;

        /* "symengine/lib/symengine_wrapper.pyx":4345
 *                 expr = expr._diff(cur_arg)
 *             l += 2
 *             if l == length:             # <<<<<<<<<<<<<<
 *                 return expr
 *             cur_arg = sympify(args[l])
*/
      }

      /* "symengine/lib/symengine_wrapper.pyx":4347
 *             if l == length:
 *                 return expr
 *             cur_arg = sympify(args[l])             # <<<<<<<<<<<<<<
 *         else:
 *             expr = expr._diff(cur_arg)
*/
      __pyx_t_6 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4347, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_GetItemInt_Tuple(__pyx_v_args, __pyx_v_l, size_t, 0, __Pyx_PyLong_FromSize_t, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4347, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_7 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
        assert(__pyx_t_6);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
        __pyx_t_7 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_5};
        __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4347, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 4347, __pyx_L1_error)
      __Pyx_DECREF_SET(__pyx_v_cur_arg, ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "symengine/lib/symengine_wrapper.pyx":4340
 *         next_arg = sympify(args[l + 1])
 *         # Check if the next arg was derivative order
 *         if isinstance(next_arg, Integer):             # <<<<<<<<<<<<<<
 *             i = int(next_arg)
 *             for _ in range(i):
*/
      goto __pyx_L8;
    }

    /* "symengine/lib/symengine_wrapper.pyx":4349
 *             cur_arg = sympify(args[l])
 *         else:
 *             expr = expr._diff(cur_arg)             # <<<<<<<<<<<<<<
 *             l += 1
 *             cur_arg = next_arg
*/
    /*else*/ {
      __pyx_t_4 = __pyx_v_expr;
      __Pyx_INCREF(__pyx_t_4);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, ((PyObject *)__pyx_v_cur_arg)};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_diff, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4349, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __Pyx_DECREF_SET(__pyx_v_expr, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "symengine/lib/symengine_wrapper.pyx":4350
 *         else:
 *             expr = expr._diff(cur_arg)
 *             l += 1             # <<<<<<<<<<<<<<
 *             cur_arg = next_arg
 * 
*/
      __pyx_v_l = (__pyx_v_l + 1);

      /* "symengine/lib/symengine_wrapper.pyx":4351
 *             expr = expr._diff(cur_arg)
 *             l += 1
 *             cur_arg = next_arg             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_INCREF((PyObject *)__pyx_v_next_arg);
      __Pyx_DECREF_SET(__pyx_v_cur_arg, __pyx_v_next_arg);
    }
    __pyx_L8:;
  }

  /* "symengine/lib/symengine_wrapper.pyx":4317
 * 
 * 
 * def _diff(expr, *args):             # <<<<<<<<<<<<<<
 *     cdef Basic prev
 *     cdef Basic b
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper._diff", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_cur_arg);
  __Pyx_XDECREF((PyObject *)__pyx_v_next_arg);
  __Pyx_XDECREF(__pyx_v_expr);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4354
 * 
 * 
 * def expand(x, deep=True):             # <<<<<<<<<<<<<<
 *     return sympify(x).expand(deep)
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_43expand(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_43expand = {"expand", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_43expand, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_43expand(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_x = 0;
  PyObject *__pyx_v_deep = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("expand (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_x,&__pyx_mstate_global->__pyx_n_u_deep,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 4354, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4354, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4354, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "expand", 0) < (0)) __PYX_ERR(0, 4354, __pyx_L3_error)
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_True)));
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("expand", 0, 1, 2, i); __PYX_ERR(0, 4354, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4354, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4354, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_True)));
    }
    __pyx_v_x = values[0];
    __pyx_v_deep = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("expand", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 4354, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.expand", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_42expand(__pyx_self, __pyx_v_x, __pyx_v_deep);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_42expand(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x, PyObject *__pyx_v_deep) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("expand", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4355
 * 
 * def expand(x, deep=True):
 *     return sympify(x).expand(deep)             # <<<<<<<<<<<<<<
 * 
 * expand_mul = expand
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4355, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_x};
    __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4355, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __pyx_t_2 = __pyx_t_3;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_6 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_deep};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_expand, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4355, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4354
 * 
 * 
 * def expand(x, deep=True):             # <<<<<<<<<<<<<<
 *     return sympify(x).expand(deep)
 * 
*/

  /* 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("symengine.lib.symengine_wrapper.expand", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4359
 * expand_mul = expand
 * 
 * def function_symbol(name, *args):             # <<<<<<<<<<<<<<
 *     cdef symengine.vec_basic v
 *     cdef Basic e_
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_45function_symbol(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_45function_symbol = {"function_symbol", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_45function_symbol, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_45function_symbol(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_name = 0;
  PyObject *__pyx_v_args = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("function_symbol (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  __pyx_v_args = __Pyx_ArgsSlice_FASTCALL(__pyx_args, 1, __pyx_nargs);
  if (unlikely(!__pyx_v_args)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_v_args);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_name,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 4359, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        default:
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4359, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      const Py_ssize_t used_pos_args = (kwd_pos_args < 1) ? kwd_pos_args : 1;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, used_pos_args, __pyx_kwds_len, "function_symbol", 0) < (0)) __PYX_ERR(0, 4359, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("function_symbol", 0, 1, 1, i); __PYX_ERR(0, 4359, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs < 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4359, __pyx_L3_error)
    }
    __pyx_v_name = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("function_symbol", 0, 1, 1, __pyx_nargs); __PYX_ERR(0, 4359, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.function_symbol", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_44function_symbol(__pyx_self, __pyx_v_name, __pyx_v_args);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_args);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_44function_symbol(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name, PyObject *__pyx_v_args) {
  SymEngine::vec_basic __pyx_v_v;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_e_ = 0;
  PyObject *__pyx_v_e = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_t_7;
  std::string __pyx_t_8;
  SymEngine::RCP<const SymEngine::Basic> __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("function_symbol", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4362
 *     cdef symengine.vec_basic v
 *     cdef Basic e_
 *     for e in args:             # <<<<<<<<<<<<<<
 *         e_ = sympify(e)
 *         if e_ is not None:
*/
  __pyx_t_1 = __pyx_v_args; __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = 0;
  for (;;) {
    {
      Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
      #if !CYTHON_ASSUME_SAFE_SIZE
      if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 4362, __pyx_L1_error)
      #endif
      if (__pyx_t_2 >= __pyx_temp) break;
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_3 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2));
    #else
    __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2);
    #endif
    ++__pyx_t_2;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4362, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_XDECREF_SET(__pyx_v_e, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":4363
 *     cdef Basic e_
 *     for e in args:
 *         e_ = sympify(e)             # <<<<<<<<<<<<<<
 *         if e_ is not None:
 *             v.push_back(e_.thisptr)
*/
    __pyx_t_4 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4363, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
      assert(__pyx_t_4);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
      __pyx_t_6 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_e};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4363, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 4363, __pyx_L1_error)
    __Pyx_XDECREF_SET(__pyx_v_e_, ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":4364
 *     for e in args:
 *         e_ = sympify(e)
 *         if e_ is not None:             # <<<<<<<<<<<<<<
 *             v.push_back(e_.thisptr)
 *     return c2py(symengine.function_symbol(name.encode("utf-8"), v))
*/
    __pyx_t_7 = (((PyObject *)__pyx_v_e_) != Py_None);
    if (__pyx_t_7) {

      /* "symengine/lib/symengine_wrapper.pyx":4365
 *         e_ = sympify(e)
 *         if e_ is not None:
 *             v.push_back(e_.thisptr)             # <<<<<<<<<<<<<<
 *     return c2py(symengine.function_symbol(name.encode("utf-8"), v))
 * 
*/
      try {
        __pyx_v_v.push_back(__pyx_v_e_->thisptr);
      } catch(...) {
        __Pyx_CppExn2PyErr();
        __PYX_ERR(0, 4365, __pyx_L1_error)
      }

      /* "symengine/lib/symengine_wrapper.pyx":4364
 *     for e in args:
 *         e_ = sympify(e)
 *         if e_ is not None:             # <<<<<<<<<<<<<<
 *             v.push_back(e_.thisptr)
 *     return c2py(symengine.function_symbol(name.encode("utf-8"), v))
*/
    }

    /* "symengine/lib/symengine_wrapper.pyx":4362
 *     cdef symengine.vec_basic v
 *     cdef Basic e_
 *     for e in args:             # <<<<<<<<<<<<<<
 *         e_ = sympify(e)
 *         if e_ is not None:
*/
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4366
 *         if e_ is not None:
 *             v.push_back(e_.thisptr)
 *     return c2py(symengine.function_symbol(name.encode("utf-8"), v))             # <<<<<<<<<<<<<<
 * 
 * def sqrt(x):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __pyx_v_name;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_6 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_utf_8};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_encode, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4366, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_t_8 = __pyx_convert_string_from_py_6libcpp_6string_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4366, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  try {
    __pyx_t_9 = SymEngine::function_symbol(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_8), __pyx_v_v);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 4366, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_9)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4366, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4359
 * expand_mul = expand
 * 
 * def function_symbol(name, *args):             # <<<<<<<<<<<<<<
 *     cdef symengine.vec_basic v
 *     cdef Basic e_
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.function_symbol", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_e_);
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4368
 *     return c2py(symengine.function_symbol(name.encode("utf-8"), v))
 * 
 * def sqrt(x):             # <<<<<<<<<<<<<<
 *     cdef Basic X = sympify(x)
 *     return c2py(symengine.sqrt(X.thisptr))
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_47sqrt(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_47sqrt = {"sqrt", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_47sqrt, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_47sqrt(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_x = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("sqrt (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_x,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 4368, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4368, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "sqrt", 0) < (0)) __PYX_ERR(0, 4368, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("sqrt", 1, 1, 1, i); __PYX_ERR(0, 4368, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4368, __pyx_L3_error)
    }
    __pyx_v_x = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("sqrt", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4368, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.sqrt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_46sqrt(__pyx_self, __pyx_v_x);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_46sqrt(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_X = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  SymEngine::RCP<const SymEngine::Basic> __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("sqrt", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4369
 * 
 * def sqrt(x):
 *     cdef Basic X = sympify(x)             # <<<<<<<<<<<<<<
 *     return c2py(symengine.sqrt(X.thisptr))
 * 
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4369, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_x};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4369, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 4369, __pyx_L1_error)
  __pyx_v_X = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4370
 * def sqrt(x):
 *     cdef Basic X = sympify(x)
 *     return c2py(symengine.sqrt(X.thisptr))             # <<<<<<<<<<<<<<
 * 
 * def exp(x):
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_5 = SymEngine::sqrt(__pyx_v_X->thisptr);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 4370, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4370, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4368
 *     return c2py(symengine.function_symbol(name.encode("utf-8"), v))
 * 
 * def sqrt(x):             # <<<<<<<<<<<<<<
 *     cdef Basic X = sympify(x)
 *     return c2py(symengine.sqrt(X.thisptr))
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.sqrt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_X);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4372
 *     return c2py(symengine.sqrt(X.thisptr))
 * 
 * def exp(x):             # <<<<<<<<<<<<<<
 *     cdef Basic X = sympify(x)
 *     return c2py(symengine.exp(X.thisptr))
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_49exp(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_49exp = {"exp", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_49exp, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_49exp(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_x = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("exp (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_x,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 4372, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4372, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "exp", 0) < (0)) __PYX_ERR(0, 4372, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("exp", 1, 1, 1, i); __PYX_ERR(0, 4372, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4372, __pyx_L3_error)
    }
    __pyx_v_x = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("exp", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4372, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.exp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_48exp(__pyx_self, __pyx_v_x);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_48exp(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_X = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  SymEngine::RCP<const SymEngine::Basic> __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("exp", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4373
 * 
 * def exp(x):
 *     cdef Basic X = sympify(x)             # <<<<<<<<<<<<<<
 *     return c2py(symengine.exp(X.thisptr))
 * 
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4373, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_x};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4373, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 4373, __pyx_L1_error)
  __pyx_v_X = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4374
 * def exp(x):
 *     cdef Basic X = sympify(x)
 *     return c2py(symengine.exp(X.thisptr))             # <<<<<<<<<<<<<<
 * 
 * def perfect_power(n):
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_5 = SymEngine::exp(__pyx_v_X->thisptr);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 4374, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4374, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4372
 *     return c2py(symengine.sqrt(X.thisptr))
 * 
 * def exp(x):             # <<<<<<<<<<<<<<
 *     cdef Basic X = sympify(x)
 *     return c2py(symengine.exp(X.thisptr))
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.exp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_X);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4376
 *     return c2py(symengine.exp(X.thisptr))
 * 
 * def perfect_power(n):             # <<<<<<<<<<<<<<
 *     cdef Basic _n = sympify(n)
 *     require(_n, Integer)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_51perfect_power(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_51perfect_power = {"perfect_power", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_51perfect_power, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_51perfect_power(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_n = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("perfect_power (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_n,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 4376, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4376, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "perfect_power", 0) < (0)) __PYX_ERR(0, 4376, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("perfect_power", 1, 1, 1, i); __PYX_ERR(0, 4376, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4376, __pyx_L3_error)
    }
    __pyx_v_n = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("perfect_power", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4376, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.perfect_power", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_50perfect_power(__pyx_self, __pyx_v_n);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_50perfect_power(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_n) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v__n = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("perfect_power", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4377
 * 
 * def perfect_power(n):
 *     cdef Basic _n = sympify(n)             # <<<<<<<<<<<<<<
 *     require(_n, Integer)
 *     return symengine.perfect_power(deref(symengine.rcp_static_cast_Integer(_n.thisptr)))
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4377, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_n};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4377, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 4377, __pyx_L1_error)
  __pyx_v__n = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4378
 * def perfect_power(n):
 *     cdef Basic _n = sympify(n)
 *     require(_n, Integer)             # <<<<<<<<<<<<<<
 *     return symengine.perfect_power(deref(symengine.rcp_static_cast_Integer(_n.thisptr)))
 * 
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_require); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4378, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_Integer); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4378, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, ((PyObject *)__pyx_v__n), __pyx_t_5};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4378, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4379
 *     cdef Basic _n = sympify(n)
 *     require(_n, Integer)
 *     return symengine.perfect_power(deref(symengine.rcp_static_cast_Integer(_n.thisptr)))             # <<<<<<<<<<<<<<
 * 
 * def is_square(n):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(SymEngine::perfect_power((*SymEngine::rcp_static_cast<const SymEngine::Integer>(__pyx_v__n->thisptr)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4379, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4376
 *     return c2py(symengine.exp(X.thisptr))
 * 
 * def perfect_power(n):             # <<<<<<<<<<<<<<
 *     cdef Basic _n = sympify(n)
 *     require(_n, Integer)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.perfect_power", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v__n);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4381
 *     return symengine.perfect_power(deref(symengine.rcp_static_cast_Integer(_n.thisptr)))
 * 
 * def is_square(n):             # <<<<<<<<<<<<<<
 *     cdef Basic _n = sympify(n)
 *     require(_n, Integer)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_53is_square(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_53is_square = {"is_square", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_53is_square, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_53is_square(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_n = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_square (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_n,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 4381, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4381, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "is_square", 0) < (0)) __PYX_ERR(0, 4381, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("is_square", 1, 1, 1, i); __PYX_ERR(0, 4381, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4381, __pyx_L3_error)
    }
    __pyx_v_n = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_square", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4381, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.is_square", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_52is_square(__pyx_self, __pyx_v_n);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_52is_square(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_n) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v__n = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_square", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4382
 * 
 * def is_square(n):
 *     cdef Basic _n = sympify(n)             # <<<<<<<<<<<<<<
 *     require(_n, Integer)
 *     return symengine.perfect_square(deref(symengine.rcp_static_cast_Integer(_n.thisptr)))
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4382, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_n};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4382, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 4382, __pyx_L1_error)
  __pyx_v__n = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4383
 * def is_square(n):
 *     cdef Basic _n = sympify(n)
 *     require(_n, Integer)             # <<<<<<<<<<<<<<
 *     return symengine.perfect_square(deref(symengine.rcp_static_cast_Integer(_n.thisptr)))
 * 
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_require); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4383, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_Integer); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4383, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, ((PyObject *)__pyx_v__n), __pyx_t_5};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4383, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4384
 *     cdef Basic _n = sympify(n)
 *     require(_n, Integer)
 *     return symengine.perfect_square(deref(symengine.rcp_static_cast_Integer(_n.thisptr)))             # <<<<<<<<<<<<<<
 * 
 * def integer_nthroot(a, n):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(SymEngine::perfect_square((*SymEngine::rcp_static_cast<const SymEngine::Integer>(__pyx_v__n->thisptr)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4384, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4381
 *     return symengine.perfect_power(deref(symengine.rcp_static_cast_Integer(_n.thisptr)))
 * 
 * def is_square(n):             # <<<<<<<<<<<<<<
 *     cdef Basic _n = sympify(n)
 *     require(_n, Integer)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.is_square", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v__n);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4386
 *     return symengine.perfect_square(deref(symengine.rcp_static_cast_Integer(_n.thisptr)))
 * 
 * def integer_nthroot(a, n):             # <<<<<<<<<<<<<<
 *     cdef Basic _a = sympify(a)
 *     require(_a, Integer)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_55integer_nthroot(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_55integer_nthroot = {"integer_nthroot", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_55integer_nthroot, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_55integer_nthroot(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_a = 0;
  PyObject *__pyx_v_n = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("integer_nthroot (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_a,&__pyx_mstate_global->__pyx_n_u_n,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 4386, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4386, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4386, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "integer_nthroot", 0) < (0)) __PYX_ERR(0, 4386, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("integer_nthroot", 1, 2, 2, i); __PYX_ERR(0, 4386, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4386, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4386, __pyx_L3_error)
    }
    __pyx_v_a = values[0];
    __pyx_v_n = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("integer_nthroot", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 4386, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.integer_nthroot", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_54integer_nthroot(__pyx_self, __pyx_v_a, __pyx_v_n);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_54integer_nthroot(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_a, PyObject *__pyx_v_n) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v__a = 0;
  SymEngine::RCP<SymEngine::Integer const >  __pyx_v__r;
  int __pyx_v_ret_val;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  unsigned long __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("integer_nthroot", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4387
 * 
 * def integer_nthroot(a, n):
 *     cdef Basic _a = sympify(a)             # <<<<<<<<<<<<<<
 *     require(_a, Integer)
 *     cdef RCP[const symengine.Integer] _r
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4387, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_a};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4387, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 4387, __pyx_L1_error)
  __pyx_v__a = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4388
 * def integer_nthroot(a, n):
 *     cdef Basic _a = sympify(a)
 *     require(_a, Integer)             # <<<<<<<<<<<<<<
 *     cdef RCP[const symengine.Integer] _r
 *     cdef int ret_val = symengine.i_nth_root(symengine.outArg_Integer(_r), deref(symengine.rcp_static_cast_Integer(_a.thisptr)), n)
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_require); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4388, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_Integer); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4388, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, ((PyObject *)__pyx_v__a), __pyx_t_5};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4388, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4390
 *     require(_a, Integer)
 *     cdef RCP[const symengine.Integer] _r
 *     cdef int ret_val = symengine.i_nth_root(symengine.outArg_Integer(_r), deref(symengine.rcp_static_cast_Integer(_a.thisptr)), n)             # <<<<<<<<<<<<<<
 *     return (c2py(<rcp_const_basic>_r), ret_val == 1)
 * 
*/
  __pyx_t_6 = __Pyx_PyLong_As_unsigned_long(__pyx_v_n); if (unlikely((__pyx_t_6 == (unsigned long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4390, __pyx_L1_error)
  __pyx_v_ret_val = SymEngine::i_nth_root(SymEngine::outArg<SymEngine::RCP<const SymEngine::Integer>>(__pyx_v__r), (*SymEngine::rcp_static_cast<const SymEngine::Integer>(__pyx_v__a->thisptr)), __pyx_t_6);

  /* "symengine/lib/symengine_wrapper.pyx":4391
 *     cdef RCP[const symengine.Integer] _r
 *     cdef int ret_val = symengine.i_nth_root(symengine.outArg_Integer(_r), deref(symengine.rcp_static_cast_Integer(_a.thisptr)), n)
 *     return (c2py(<rcp_const_basic>_r), ret_val == 1)             # <<<<<<<<<<<<<<
 * 
 * def _max(*args):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)__pyx_v__r)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4391, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyBool_FromLong((__pyx_v_ret_val == 1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4391, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4391, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 4391, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2) != (0)) __PYX_ERR(0, 4391, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4386
 *     return symengine.perfect_square(deref(symengine.rcp_static_cast_Integer(_n.thisptr)))
 * 
 * def integer_nthroot(a, n):             # <<<<<<<<<<<<<<
 *     cdef Basic _a = sympify(a)
 *     require(_a, Integer)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.integer_nthroot", __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;
}

/* "symengine/lib/symengine_wrapper.pyx":4393
 *     return (c2py(<rcp_const_basic>_r), ret_val == 1)
 * 
 * def _max(*args):             # <<<<<<<<<<<<<<
 *     cdef symengine.vec_basic v
 *     cdef Basic e_
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_57_max(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_57_max = {"_max", (PyCFunction)(void(*)(void))(PyCFunctionWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_57_max, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_57_max(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_args = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_max (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("_max", __pyx_kwds); return NULL;}
  __Pyx_INCREF(__pyx_args);
  __pyx_v_args = __pyx_args;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_56_max(__pyx_self, __pyx_v_args);

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_56_max(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_args) {
  SymEngine::vec_basic __pyx_v_v;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_e_ = 0;
  PyObject *__pyx_v_e = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  SymEngine::RCP<const SymEngine::Basic> __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_max", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4396
 *     cdef symengine.vec_basic v
 *     cdef Basic e_
 *     for e in args:             # <<<<<<<<<<<<<<
 *         e_ = sympify(e)
 *         v.push_back(e_.thisptr)
*/
  __pyx_t_1 = __pyx_v_args; __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = 0;
  for (;;) {
    {
      Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
      #if !CYTHON_ASSUME_SAFE_SIZE
      if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 4396, __pyx_L1_error)
      #endif
      if (__pyx_t_2 >= __pyx_temp) break;
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_3 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2));
    #else
    __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2);
    #endif
    ++__pyx_t_2;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4396, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_XDECREF_SET(__pyx_v_e, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":4397
 *     cdef Basic e_
 *     for e in args:
 *         e_ = sympify(e)             # <<<<<<<<<<<<<<
 *         v.push_back(e_.thisptr)
 *     return c2py(symengine.max(v))
*/
    __pyx_t_4 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4397, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
      assert(__pyx_t_4);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
      __pyx_t_6 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_e};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4397, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 4397, __pyx_L1_error)
    __Pyx_XDECREF_SET(__pyx_v_e_, ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":4398
 *     for e in args:
 *         e_ = sympify(e)
 *         v.push_back(e_.thisptr)             # <<<<<<<<<<<<<<
 *     return c2py(symengine.max(v))
 * 
*/
    try {
      __pyx_v_v.push_back(__pyx_v_e_->thisptr);
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(0, 4398, __pyx_L1_error)
    }

    /* "symengine/lib/symengine_wrapper.pyx":4396
 *     cdef symengine.vec_basic v
 *     cdef Basic e_
 *     for e in args:             # <<<<<<<<<<<<<<
 *         e_ = sympify(e)
 *         v.push_back(e_.thisptr)
*/
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4399
 *         e_ = sympify(e)
 *         v.push_back(e_.thisptr)
 *     return c2py(symengine.max(v))             # <<<<<<<<<<<<<<
 * 
 * def _min(*args):
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_7 = SymEngine::max(__pyx_v_v);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 4399, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_7)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4399, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4393
 *     return (c2py(<rcp_const_basic>_r), ret_val == 1)
 * 
 * def _max(*args):             # <<<<<<<<<<<<<<
 *     cdef symengine.vec_basic v
 *     cdef Basic e_
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper._max", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_e_);
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4401
 *     return c2py(symengine.max(v))
 * 
 * def _min(*args):             # <<<<<<<<<<<<<<
 *     cdef symengine.vec_basic v
 *     cdef Basic e_
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_59_min(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_59_min = {"_min", (PyCFunction)(void(*)(void))(PyCFunctionWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_59_min, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_59_min(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_args = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_min (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("_min", __pyx_kwds); return NULL;}
  __Pyx_INCREF(__pyx_args);
  __pyx_v_args = __pyx_args;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_58_min(__pyx_self, __pyx_v_args);

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_58_min(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_args) {
  SymEngine::vec_basic __pyx_v_v;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_e_ = 0;
  PyObject *__pyx_v_e = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  SymEngine::RCP<const SymEngine::Basic> __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_min", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4404
 *     cdef symengine.vec_basic v
 *     cdef Basic e_
 *     for e in args:             # <<<<<<<<<<<<<<
 *         e_ = sympify(e)
 *         v.push_back(e_.thisptr)
*/
  __pyx_t_1 = __pyx_v_args; __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = 0;
  for (;;) {
    {
      Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
      #if !CYTHON_ASSUME_SAFE_SIZE
      if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 4404, __pyx_L1_error)
      #endif
      if (__pyx_t_2 >= __pyx_temp) break;
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_3 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2));
    #else
    __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2);
    #endif
    ++__pyx_t_2;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4404, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_XDECREF_SET(__pyx_v_e, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":4405
 *     cdef Basic e_
 *     for e in args:
 *         e_ = sympify(e)             # <<<<<<<<<<<<<<
 *         v.push_back(e_.thisptr)
 *     return c2py(symengine.min(v))
*/
    __pyx_t_4 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4405, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
      assert(__pyx_t_4);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
      __pyx_t_6 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_e};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4405, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 4405, __pyx_L1_error)
    __Pyx_XDECREF_SET(__pyx_v_e_, ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":4406
 *     for e in args:
 *         e_ = sympify(e)
 *         v.push_back(e_.thisptr)             # <<<<<<<<<<<<<<
 *     return c2py(symengine.min(v))
 * 
*/
    try {
      __pyx_v_v.push_back(__pyx_v_e_->thisptr);
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(0, 4406, __pyx_L1_error)
    }

    /* "symengine/lib/symengine_wrapper.pyx":4404
 *     cdef symengine.vec_basic v
 *     cdef Basic e_
 *     for e in args:             # <<<<<<<<<<<<<<
 *         e_ = sympify(e)
 *         v.push_back(e_.thisptr)
*/
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4407
 *         e_ = sympify(e)
 *         v.push_back(e_.thisptr)
 *     return c2py(symengine.min(v))             # <<<<<<<<<<<<<<
 * 
 * def gamma(x):
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_7 = SymEngine::min(__pyx_v_v);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 4407, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_7)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4407, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4401
 *     return c2py(symengine.max(v))
 * 
 * def _min(*args):             # <<<<<<<<<<<<<<
 *     cdef symengine.vec_basic v
 *     cdef Basic e_
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper._min", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_e_);
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4409
 *     return c2py(symengine.min(v))
 * 
 * def gamma(x):             # <<<<<<<<<<<<<<
 *     cdef Basic X = sympify(x)
 *     return c2py(symengine.gamma(X.thisptr))
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_61gamma(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_61gamma = {"gamma", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_61gamma, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_61gamma(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_x = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("gamma (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_x,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 4409, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4409, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "gamma", 0) < (0)) __PYX_ERR(0, 4409, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("gamma", 1, 1, 1, i); __PYX_ERR(0, 4409, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4409, __pyx_L3_error)
    }
    __pyx_v_x = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("gamma", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4409, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.gamma", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_60gamma(__pyx_self, __pyx_v_x);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_60gamma(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_X = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  SymEngine::RCP<const SymEngine::Basic> __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("gamma", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4410
 * 
 * def gamma(x):
 *     cdef Basic X = sympify(x)             # <<<<<<<<<<<<<<
 *     return c2py(symengine.gamma(X.thisptr))
 * 
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4410, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_x};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4410, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 4410, __pyx_L1_error)
  __pyx_v_X = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4411
 * def gamma(x):
 *     cdef Basic X = sympify(x)
 *     return c2py(symengine.gamma(X.thisptr))             # <<<<<<<<<<<<<<
 * 
 * def eq(lhs, rhs = None):
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_5 = SymEngine::gamma(__pyx_v_X->thisptr);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 4411, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4411, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4409
 *     return c2py(symengine.min(v))
 * 
 * def gamma(x):             # <<<<<<<<<<<<<<
 *     cdef Basic X = sympify(x)
 *     return c2py(symengine.gamma(X.thisptr))
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.gamma", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_X);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4413
 *     return c2py(symengine.gamma(X.thisptr))
 * 
 * def eq(lhs, rhs = None):             # <<<<<<<<<<<<<<
 *     cdef Basic X = sympify(lhs)
 *     if rhs is None:
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_63eq(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_63eq = {"eq", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_63eq, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_63eq(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_lhs = 0;
  PyObject *__pyx_v_rhs = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("eq (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_lhs,&__pyx_mstate_global->__pyx_n_u_rhs,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 4413, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4413, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4413, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "eq", 0) < (0)) __PYX_ERR(0, 4413, __pyx_L3_error)
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("eq", 0, 1, 2, i); __PYX_ERR(0, 4413, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4413, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4413, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_lhs = values[0];
    __pyx_v_rhs = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("eq", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 4413, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.eq", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_62eq(__pyx_self, __pyx_v_lhs, __pyx_v_rhs);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_62eq(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_X = 0;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_Y = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_t_5;
  SymEngine::RCP<SymEngine::Boolean const >  __pyx_t_6;
  SymEngine::RCP<SymEngine::Boolean const >  __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("eq", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4414
 * 
 * def eq(lhs, rhs = None):
 *     cdef Basic X = sympify(lhs)             # <<<<<<<<<<<<<<
 *     if rhs is None:
 *         return c2py(<rcp_const_basic>(symengine.Eq(X.thisptr)))
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4414, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_lhs};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4414, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 4414, __pyx_L1_error)
  __pyx_v_X = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4415
 * def eq(lhs, rhs = None):
 *     cdef Basic X = sympify(lhs)
 *     if rhs is None:             # <<<<<<<<<<<<<<
 *         return c2py(<rcp_const_basic>(symengine.Eq(X.thisptr)))
 *     cdef Basic Y = sympify(rhs)
*/
  __pyx_t_5 = (__pyx_v_rhs == Py_None);
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":4416
 *     cdef Basic X = sympify(lhs)
 *     if rhs is None:
 *         return c2py(<rcp_const_basic>(symengine.Eq(X.thisptr)))             # <<<<<<<<<<<<<<
 *     cdef Basic Y = sympify(rhs)
 *     return c2py(<rcp_const_basic>(symengine.Eq(X.thisptr, Y.thisptr)))
*/
    __Pyx_XDECREF(__pyx_r);
    try {
      __pyx_t_6 = SymEngine::Eq(__pyx_v_X->thisptr);
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(0, 4416, __pyx_L1_error)
    }
    __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)__pyx_t_6)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4416, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":4415
 * def eq(lhs, rhs = None):
 *     cdef Basic X = sympify(lhs)
 *     if rhs is None:             # <<<<<<<<<<<<<<
 *         return c2py(<rcp_const_basic>(symengine.Eq(X.thisptr)))
 *     cdef Basic Y = sympify(rhs)
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":4417
 *     if rhs is None:
 *         return c2py(<rcp_const_basic>(symengine.Eq(X.thisptr)))
 *     cdef Basic Y = sympify(rhs)             # <<<<<<<<<<<<<<
 *     return c2py(<rcp_const_basic>(symengine.Eq(X.thisptr, Y.thisptr)))
 * 
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4417, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_rhs};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4417, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 4417, __pyx_L1_error)
  __pyx_v_Y = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4418
 *         return c2py(<rcp_const_basic>(symengine.Eq(X.thisptr)))
 *     cdef Basic Y = sympify(rhs)
 *     return c2py(<rcp_const_basic>(symengine.Eq(X.thisptr, Y.thisptr)))             # <<<<<<<<<<<<<<
 * 
 * def ne(lhs, rhs):
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_7 = SymEngine::Eq(__pyx_v_X->thisptr, __pyx_v_Y->thisptr);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 4418, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)__pyx_t_7)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4418, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4413
 *     return c2py(symengine.gamma(X.thisptr))
 * 
 * def eq(lhs, rhs = None):             # <<<<<<<<<<<<<<
 *     cdef Basic X = sympify(lhs)
 *     if rhs is None:
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.eq", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_X);
  __Pyx_XDECREF((PyObject *)__pyx_v_Y);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4420
 *     return c2py(<rcp_const_basic>(symengine.Eq(X.thisptr, Y.thisptr)))
 * 
 * def ne(lhs, rhs):             # <<<<<<<<<<<<<<
 *     cdef Basic X = sympify(lhs)
 *     cdef Basic Y = sympify(rhs)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_65ne(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_65ne = {"ne", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_65ne, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_65ne(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_lhs = 0;
  PyObject *__pyx_v_rhs = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ne (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_lhs,&__pyx_mstate_global->__pyx_n_u_rhs,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 4420, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4420, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4420, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "ne", 0) < (0)) __PYX_ERR(0, 4420, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("ne", 1, 2, 2, i); __PYX_ERR(0, 4420, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4420, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4420, __pyx_L3_error)
    }
    __pyx_v_lhs = values[0];
    __pyx_v_rhs = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("ne", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 4420, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.ne", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_64ne(__pyx_self, __pyx_v_lhs, __pyx_v_rhs);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_64ne(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_X = 0;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_Y = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  SymEngine::RCP<SymEngine::Boolean const >  __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("ne", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4421
 * 
 * def ne(lhs, rhs):
 *     cdef Basic X = sympify(lhs)             # <<<<<<<<<<<<<<
 *     cdef Basic Y = sympify(rhs)
 *     return c2py(<rcp_const_basic>(symengine.Ne(X.thisptr, Y.thisptr)))
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4421, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_lhs};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4421, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 4421, __pyx_L1_error)
  __pyx_v_X = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4422
 * def ne(lhs, rhs):
 *     cdef Basic X = sympify(lhs)
 *     cdef Basic Y = sympify(rhs)             # <<<<<<<<<<<<<<
 *     return c2py(<rcp_const_basic>(symengine.Ne(X.thisptr, Y.thisptr)))
 * 
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4422, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_rhs};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4422, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 4422, __pyx_L1_error)
  __pyx_v_Y = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4423
 *     cdef Basic X = sympify(lhs)
 *     cdef Basic Y = sympify(rhs)
 *     return c2py(<rcp_const_basic>(symengine.Ne(X.thisptr, Y.thisptr)))             # <<<<<<<<<<<<<<
 * 
 * def ge(lhs, rhs):
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_5 = SymEngine::Ne(__pyx_v_X->thisptr, __pyx_v_Y->thisptr);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 4423, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)__pyx_t_5)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4423, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4420
 *     return c2py(<rcp_const_basic>(symengine.Eq(X.thisptr, Y.thisptr)))
 * 
 * def ne(lhs, rhs):             # <<<<<<<<<<<<<<
 *     cdef Basic X = sympify(lhs)
 *     cdef Basic Y = sympify(rhs)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.ne", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_X);
  __Pyx_XDECREF((PyObject *)__pyx_v_Y);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4425
 *     return c2py(<rcp_const_basic>(symengine.Ne(X.thisptr, Y.thisptr)))
 * 
 * def ge(lhs, rhs):             # <<<<<<<<<<<<<<
 *     cdef Basic X = sympify(lhs)
 *     cdef Basic Y = sympify(rhs)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_67ge(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_67ge = {"ge", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_67ge, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_67ge(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_lhs = 0;
  PyObject *__pyx_v_rhs = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ge (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_lhs,&__pyx_mstate_global->__pyx_n_u_rhs,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 4425, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4425, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4425, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "ge", 0) < (0)) __PYX_ERR(0, 4425, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("ge", 1, 2, 2, i); __PYX_ERR(0, 4425, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4425, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4425, __pyx_L3_error)
    }
    __pyx_v_lhs = values[0];
    __pyx_v_rhs = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("ge", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 4425, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.ge", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_66ge(__pyx_self, __pyx_v_lhs, __pyx_v_rhs);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_66ge(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_X = 0;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_Y = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  SymEngine::RCP<SymEngine::Boolean const >  __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("ge", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4426
 * 
 * def ge(lhs, rhs):
 *     cdef Basic X = sympify(lhs)             # <<<<<<<<<<<<<<
 *     cdef Basic Y = sympify(rhs)
 *     return c2py(<rcp_const_basic>(symengine.Ge(X.thisptr, Y.thisptr)))
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4426, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_lhs};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4426, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 4426, __pyx_L1_error)
  __pyx_v_X = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4427
 * def ge(lhs, rhs):
 *     cdef Basic X = sympify(lhs)
 *     cdef Basic Y = sympify(rhs)             # <<<<<<<<<<<<<<
 *     return c2py(<rcp_const_basic>(symengine.Ge(X.thisptr, Y.thisptr)))
 * 
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4427, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_rhs};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4427, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 4427, __pyx_L1_error)
  __pyx_v_Y = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4428
 *     cdef Basic X = sympify(lhs)
 *     cdef Basic Y = sympify(rhs)
 *     return c2py(<rcp_const_basic>(symengine.Ge(X.thisptr, Y.thisptr)))             # <<<<<<<<<<<<<<
 * 
 * Ge = GreaterThan = ge
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_5 = SymEngine::Ge(__pyx_v_X->thisptr, __pyx_v_Y->thisptr);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 4428, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)__pyx_t_5)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4428, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4425
 *     return c2py(<rcp_const_basic>(symengine.Ne(X.thisptr, Y.thisptr)))
 * 
 * def ge(lhs, rhs):             # <<<<<<<<<<<<<<
 *     cdef Basic X = sympify(lhs)
 *     cdef Basic Y = sympify(rhs)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.ge", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_X);
  __Pyx_XDECREF((PyObject *)__pyx_v_Y);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4432
 * Ge = GreaterThan = ge
 * 
 * def gt(lhs, rhs):             # <<<<<<<<<<<<<<
 *     cdef Basic X = sympify(lhs)
 *     cdef Basic Y = sympify(rhs)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_69gt(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_69gt = {"gt", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_69gt, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_69gt(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_lhs = 0;
  PyObject *__pyx_v_rhs = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("gt (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_lhs,&__pyx_mstate_global->__pyx_n_u_rhs,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 4432, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4432, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4432, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "gt", 0) < (0)) __PYX_ERR(0, 4432, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("gt", 1, 2, 2, i); __PYX_ERR(0, 4432, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4432, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4432, __pyx_L3_error)
    }
    __pyx_v_lhs = values[0];
    __pyx_v_rhs = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("gt", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 4432, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.gt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_68gt(__pyx_self, __pyx_v_lhs, __pyx_v_rhs);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_68gt(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_X = 0;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_Y = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  SymEngine::RCP<SymEngine::Boolean const >  __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("gt", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4433
 * 
 * def gt(lhs, rhs):
 *     cdef Basic X = sympify(lhs)             # <<<<<<<<<<<<<<
 *     cdef Basic Y = sympify(rhs)
 *     return c2py(<rcp_const_basic>(symengine.Gt(X.thisptr, Y.thisptr)))
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4433, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_lhs};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4433, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 4433, __pyx_L1_error)
  __pyx_v_X = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4434
 * def gt(lhs, rhs):
 *     cdef Basic X = sympify(lhs)
 *     cdef Basic Y = sympify(rhs)             # <<<<<<<<<<<<<<
 *     return c2py(<rcp_const_basic>(symengine.Gt(X.thisptr, Y.thisptr)))
 * 
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4434, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_rhs};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4434, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 4434, __pyx_L1_error)
  __pyx_v_Y = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4435
 *     cdef Basic X = sympify(lhs)
 *     cdef Basic Y = sympify(rhs)
 *     return c2py(<rcp_const_basic>(symengine.Gt(X.thisptr, Y.thisptr)))             # <<<<<<<<<<<<<<
 * 
 * Gt = StrictGreaterThan = gt
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_5 = SymEngine::Gt(__pyx_v_X->thisptr, __pyx_v_Y->thisptr);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 4435, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)__pyx_t_5)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4435, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4432
 * Ge = GreaterThan = ge
 * 
 * def gt(lhs, rhs):             # <<<<<<<<<<<<<<
 *     cdef Basic X = sympify(lhs)
 *     cdef Basic Y = sympify(rhs)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.gt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_X);
  __Pyx_XDECREF((PyObject *)__pyx_v_Y);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4439
 * Gt = StrictGreaterThan = gt
 * 
 * def le(lhs, rhs):             # <<<<<<<<<<<<<<
 *     cdef Basic X = sympify(lhs)
 *     cdef Basic Y = sympify(rhs)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_71le(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_71le = {"le", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_71le, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_71le(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_lhs = 0;
  PyObject *__pyx_v_rhs = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("le (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_lhs,&__pyx_mstate_global->__pyx_n_u_rhs,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 4439, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4439, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4439, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "le", 0) < (0)) __PYX_ERR(0, 4439, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("le", 1, 2, 2, i); __PYX_ERR(0, 4439, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4439, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4439, __pyx_L3_error)
    }
    __pyx_v_lhs = values[0];
    __pyx_v_rhs = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("le", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 4439, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.le", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_70le(__pyx_self, __pyx_v_lhs, __pyx_v_rhs);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_70le(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_X = 0;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_Y = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  SymEngine::RCP<SymEngine::Boolean const >  __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("le", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4440
 * 
 * def le(lhs, rhs):
 *     cdef Basic X = sympify(lhs)             # <<<<<<<<<<<<<<
 *     cdef Basic Y = sympify(rhs)
 *     return c2py(<rcp_const_basic>(symengine.Le(X.thisptr, Y.thisptr)))
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4440, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_lhs};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4440, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 4440, __pyx_L1_error)
  __pyx_v_X = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4441
 * def le(lhs, rhs):
 *     cdef Basic X = sympify(lhs)
 *     cdef Basic Y = sympify(rhs)             # <<<<<<<<<<<<<<
 *     return c2py(<rcp_const_basic>(symengine.Le(X.thisptr, Y.thisptr)))
 * 
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4441, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_rhs};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4441, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 4441, __pyx_L1_error)
  __pyx_v_Y = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4442
 *     cdef Basic X = sympify(lhs)
 *     cdef Basic Y = sympify(rhs)
 *     return c2py(<rcp_const_basic>(symengine.Le(X.thisptr, Y.thisptr)))             # <<<<<<<<<<<<<<
 * 
 * def lt(lhs, rhs):
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_5 = SymEngine::Le(__pyx_v_X->thisptr, __pyx_v_Y->thisptr);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 4442, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)__pyx_t_5)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4442, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4439
 * Gt = StrictGreaterThan = gt
 * 
 * def le(lhs, rhs):             # <<<<<<<<<<<<<<
 *     cdef Basic X = sympify(lhs)
 *     cdef Basic Y = sympify(rhs)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.le", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_X);
  __Pyx_XDECREF((PyObject *)__pyx_v_Y);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4444
 *     return c2py(<rcp_const_basic>(symengine.Le(X.thisptr, Y.thisptr)))
 * 
 * def lt(lhs, rhs):             # <<<<<<<<<<<<<<
 *     cdef Basic X = sympify(lhs)
 *     cdef Basic Y = sympify(rhs)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_73lt(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_73lt = {"lt", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_73lt, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_73lt(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_lhs = 0;
  PyObject *__pyx_v_rhs = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lt (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_lhs,&__pyx_mstate_global->__pyx_n_u_rhs,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 4444, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4444, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4444, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "lt", 0) < (0)) __PYX_ERR(0, 4444, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("lt", 1, 2, 2, i); __PYX_ERR(0, 4444, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4444, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4444, __pyx_L3_error)
    }
    __pyx_v_lhs = values[0];
    __pyx_v_rhs = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("lt", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 4444, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.lt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_72lt(__pyx_self, __pyx_v_lhs, __pyx_v_rhs);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_72lt(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_X = 0;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_Y = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  SymEngine::RCP<SymEngine::Boolean const >  __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("lt", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4445
 * 
 * def lt(lhs, rhs):
 *     cdef Basic X = sympify(lhs)             # <<<<<<<<<<<<<<
 *     cdef Basic Y = sympify(rhs)
 *     return c2py(<rcp_const_basic>(symengine.Lt(X.thisptr, Y.thisptr)))
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4445, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_lhs};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4445, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 4445, __pyx_L1_error)
  __pyx_v_X = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4446
 * def lt(lhs, rhs):
 *     cdef Basic X = sympify(lhs)
 *     cdef Basic Y = sympify(rhs)             # <<<<<<<<<<<<<<
 *     return c2py(<rcp_const_basic>(symengine.Lt(X.thisptr, Y.thisptr)))
 * 
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4446, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_rhs};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4446, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 4446, __pyx_L1_error)
  __pyx_v_Y = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4447
 *     cdef Basic X = sympify(lhs)
 *     cdef Basic Y = sympify(rhs)
 *     return c2py(<rcp_const_basic>(symengine.Lt(X.thisptr, Y.thisptr)))             # <<<<<<<<<<<<<<
 * 
 * def digamma(x):
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_5 = SymEngine::Lt(__pyx_v_X->thisptr, __pyx_v_Y->thisptr);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 4447, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)__pyx_t_5)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4447, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4444
 *     return c2py(<rcp_const_basic>(symengine.Le(X.thisptr, Y.thisptr)))
 * 
 * def lt(lhs, rhs):             # <<<<<<<<<<<<<<
 *     cdef Basic X = sympify(lhs)
 *     cdef Basic Y = sympify(rhs)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.lt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_X);
  __Pyx_XDECREF((PyObject *)__pyx_v_Y);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4449
 *     return c2py(<rcp_const_basic>(symengine.Lt(X.thisptr, Y.thisptr)))
 * 
 * def digamma(x):             # <<<<<<<<<<<<<<
 *     cdef Basic X = sympify(x)
 *     return c2py(symengine.digamma(X.thisptr))
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_75digamma(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_75digamma = {"digamma", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_75digamma, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_75digamma(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_x = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("digamma (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_x,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 4449, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4449, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "digamma", 0) < (0)) __PYX_ERR(0, 4449, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("digamma", 1, 1, 1, i); __PYX_ERR(0, 4449, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4449, __pyx_L3_error)
    }
    __pyx_v_x = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("digamma", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4449, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.digamma", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_74digamma(__pyx_self, __pyx_v_x);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_74digamma(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_X = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  SymEngine::RCP<const SymEngine::Basic> __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("digamma", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4450
 * 
 * def digamma(x):
 *     cdef Basic X = sympify(x)             # <<<<<<<<<<<<<<
 *     return c2py(symengine.digamma(X.thisptr))
 * 
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4450, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_x};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4450, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 4450, __pyx_L1_error)
  __pyx_v_X = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4451
 * def digamma(x):
 *     cdef Basic X = sympify(x)
 *     return c2py(symengine.digamma(X.thisptr))             # <<<<<<<<<<<<<<
 * 
 * def trigamma(x):
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_5 = SymEngine::digamma(__pyx_v_X->thisptr);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 4451, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4451, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4449
 *     return c2py(<rcp_const_basic>(symengine.Lt(X.thisptr, Y.thisptr)))
 * 
 * def digamma(x):             # <<<<<<<<<<<<<<
 *     cdef Basic X = sympify(x)
 *     return c2py(symengine.digamma(X.thisptr))
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.digamma", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_X);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4453
 *     return c2py(symengine.digamma(X.thisptr))
 * 
 * def trigamma(x):             # <<<<<<<<<<<<<<
 *     cdef Basic X = sympify(x)
 *     return c2py(symengine.trigamma(X.thisptr))
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_77trigamma(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_77trigamma = {"trigamma", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_77trigamma, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_77trigamma(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_x = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("trigamma (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_x,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 4453, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4453, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "trigamma", 0) < (0)) __PYX_ERR(0, 4453, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("trigamma", 1, 1, 1, i); __PYX_ERR(0, 4453, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4453, __pyx_L3_error)
    }
    __pyx_v_x = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("trigamma", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4453, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.trigamma", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_76trigamma(__pyx_self, __pyx_v_x);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_76trigamma(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_X = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  SymEngine::RCP<const SymEngine::Basic> __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("trigamma", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4454
 * 
 * def trigamma(x):
 *     cdef Basic X = sympify(x)             # <<<<<<<<<<<<<<
 *     return c2py(symengine.trigamma(X.thisptr))
 * 
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4454, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_x};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4454, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 4454, __pyx_L1_error)
  __pyx_v_X = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4455
 * def trigamma(x):
 *     cdef Basic X = sympify(x)
 *     return c2py(symengine.trigamma(X.thisptr))             # <<<<<<<<<<<<<<
 * 
 * def logical_and(*args):
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_5 = SymEngine::trigamma(__pyx_v_X->thisptr);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 4455, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4455, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4453
 *     return c2py(symengine.digamma(X.thisptr))
 * 
 * def trigamma(x):             # <<<<<<<<<<<<<<
 *     cdef Basic X = sympify(x)
 *     return c2py(symengine.trigamma(X.thisptr))
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.trigamma", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_X);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4457
 *     return c2py(symengine.trigamma(X.thisptr))
 * 
 * def logical_and(*args):             # <<<<<<<<<<<<<<
 *     cdef symengine.set_boolean s
 *     cdef Boolean e_
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_79logical_and(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_79logical_and = {"logical_and", (PyCFunction)(void(*)(void))(PyCFunctionWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_79logical_and, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_79logical_and(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_args = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("logical_and (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("logical_and", __pyx_kwds); return NULL;}
  __Pyx_INCREF(__pyx_args);
  __pyx_v_args = __pyx_args;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_78logical_and(__pyx_self, __pyx_v_args);

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_78logical_and(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_args) {
  SymEngine::set_boolean __pyx_v_s;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Boolean *__pyx_v_e_ = 0;
  PyObject *__pyx_v_e = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  SymEngine::RCP<SymEngine::Boolean const >  __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("logical_and", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4460
 *     cdef symengine.set_boolean s
 *     cdef Boolean e_
 *     for e in args:             # <<<<<<<<<<<<<<
 *         e_ = sympify(e)
 *         s.insert(symengine.rcp_static_cast_Boolean(e_.thisptr))
*/
  __pyx_t_1 = __pyx_v_args; __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = 0;
  for (;;) {
    {
      Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
      #if !CYTHON_ASSUME_SAFE_SIZE
      if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 4460, __pyx_L1_error)
      #endif
      if (__pyx_t_2 >= __pyx_temp) break;
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_3 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2));
    #else
    __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2);
    #endif
    ++__pyx_t_2;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4460, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_XDECREF_SET(__pyx_v_e, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":4461
 *     cdef Boolean e_
 *     for e in args:
 *         e_ = sympify(e)             # <<<<<<<<<<<<<<
 *         s.insert(symengine.rcp_static_cast_Boolean(e_.thisptr))
 *     return c2py(<rcp_const_basic>(symengine.logical_and(s)))
*/
    __pyx_t_4 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4461, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
      assert(__pyx_t_4);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
      __pyx_t_6 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_e};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4461, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Boolean))))) __PYX_ERR(0, 4461, __pyx_L1_error)
    __Pyx_XDECREF_SET(__pyx_v_e_, ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Boolean *)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":4462
 *     for e in args:
 *         e_ = sympify(e)
 *         s.insert(symengine.rcp_static_cast_Boolean(e_.thisptr))             # <<<<<<<<<<<<<<
 *     return c2py(<rcp_const_basic>(symengine.logical_and(s)))
 * 
*/
    try {
      __pyx_v_s.insert(SymEngine::rcp_static_cast<const SymEngine::Boolean>(__pyx_v_e_->__pyx_base.__pyx_base.thisptr));
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(0, 4462, __pyx_L1_error)
    }

    /* "symengine/lib/symengine_wrapper.pyx":4460
 *     cdef symengine.set_boolean s
 *     cdef Boolean e_
 *     for e in args:             # <<<<<<<<<<<<<<
 *         e_ = sympify(e)
 *         s.insert(symengine.rcp_static_cast_Boolean(e_.thisptr))
*/
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4463
 *         e_ = sympify(e)
 *         s.insert(symengine.rcp_static_cast_Boolean(e_.thisptr))
 *     return c2py(<rcp_const_basic>(symengine.logical_and(s)))             # <<<<<<<<<<<<<<
 * 
 * def logical_or(*args):
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_7 = SymEngine::logical_and(__pyx_v_s);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 4463, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)__pyx_t_7)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4463, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4457
 *     return c2py(symengine.trigamma(X.thisptr))
 * 
 * def logical_and(*args):             # <<<<<<<<<<<<<<
 *     cdef symengine.set_boolean s
 *     cdef Boolean e_
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.logical_and", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_e_);
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4465
 *     return c2py(<rcp_const_basic>(symengine.logical_and(s)))
 * 
 * def logical_or(*args):             # <<<<<<<<<<<<<<
 *     cdef symengine.set_boolean s
 *     cdef Boolean e_
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_81logical_or(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_81logical_or = {"logical_or", (PyCFunction)(void(*)(void))(PyCFunctionWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_81logical_or, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_81logical_or(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_args = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("logical_or (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("logical_or", __pyx_kwds); return NULL;}
  __Pyx_INCREF(__pyx_args);
  __pyx_v_args = __pyx_args;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_80logical_or(__pyx_self, __pyx_v_args);

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_80logical_or(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_args) {
  SymEngine::set_boolean __pyx_v_s;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Boolean *__pyx_v_e_ = 0;
  PyObject *__pyx_v_e = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  SymEngine::RCP<SymEngine::Boolean const >  __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("logical_or", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4468
 *     cdef symengine.set_boolean s
 *     cdef Boolean e_
 *     for e in args:             # <<<<<<<<<<<<<<
 *         e_ = sympify(e)
 *         s.insert(symengine.rcp_static_cast_Boolean(e_.thisptr))
*/
  __pyx_t_1 = __pyx_v_args; __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = 0;
  for (;;) {
    {
      Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
      #if !CYTHON_ASSUME_SAFE_SIZE
      if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 4468, __pyx_L1_error)
      #endif
      if (__pyx_t_2 >= __pyx_temp) break;
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_3 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2));
    #else
    __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2);
    #endif
    ++__pyx_t_2;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4468, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_XDECREF_SET(__pyx_v_e, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":4469
 *     cdef Boolean e_
 *     for e in args:
 *         e_ = sympify(e)             # <<<<<<<<<<<<<<
 *         s.insert(symengine.rcp_static_cast_Boolean(e_.thisptr))
 *     return c2py(<rcp_const_basic>(symengine.logical_or(s)))
*/
    __pyx_t_4 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4469, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
      assert(__pyx_t_4);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
      __pyx_t_6 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_e};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4469, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Boolean))))) __PYX_ERR(0, 4469, __pyx_L1_error)
    __Pyx_XDECREF_SET(__pyx_v_e_, ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Boolean *)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":4470
 *     for e in args:
 *         e_ = sympify(e)
 *         s.insert(symengine.rcp_static_cast_Boolean(e_.thisptr))             # <<<<<<<<<<<<<<
 *     return c2py(<rcp_const_basic>(symengine.logical_or(s)))
 * 
*/
    try {
      __pyx_v_s.insert(SymEngine::rcp_static_cast<const SymEngine::Boolean>(__pyx_v_e_->__pyx_base.__pyx_base.thisptr));
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(0, 4470, __pyx_L1_error)
    }

    /* "symengine/lib/symengine_wrapper.pyx":4468
 *     cdef symengine.set_boolean s
 *     cdef Boolean e_
 *     for e in args:             # <<<<<<<<<<<<<<
 *         e_ = sympify(e)
 *         s.insert(symengine.rcp_static_cast_Boolean(e_.thisptr))
*/
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4471
 *         e_ = sympify(e)
 *         s.insert(symengine.rcp_static_cast_Boolean(e_.thisptr))
 *     return c2py(<rcp_const_basic>(symengine.logical_or(s)))             # <<<<<<<<<<<<<<
 * 
 * def Nor(*args):
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_7 = SymEngine::logical_or(__pyx_v_s);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 4471, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)__pyx_t_7)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4471, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4465
 *     return c2py(<rcp_const_basic>(symengine.logical_and(s)))
 * 
 * def logical_or(*args):             # <<<<<<<<<<<<<<
 *     cdef symengine.set_boolean s
 *     cdef Boolean e_
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.logical_or", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_e_);
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4473
 *     return c2py(<rcp_const_basic>(symengine.logical_or(s)))
 * 
 * def Nor(*args):             # <<<<<<<<<<<<<<
 *     cdef symengine.set_boolean s
 *     cdef Boolean e_
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_83Nor(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_83Nor = {"Nor", (PyCFunction)(void(*)(void))(PyCFunctionWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_83Nor, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_83Nor(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_args = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Nor (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("Nor", __pyx_kwds); return NULL;}
  __Pyx_INCREF(__pyx_args);
  __pyx_v_args = __pyx_args;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_82Nor(__pyx_self, __pyx_v_args);

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_82Nor(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_args) {
  SymEngine::set_boolean __pyx_v_s;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Boolean *__pyx_v_e_ = 0;
  PyObject *__pyx_v_e = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  SymEngine::RCP<SymEngine::Boolean const >  __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("Nor", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4476
 *     cdef symengine.set_boolean s
 *     cdef Boolean e_
 *     for e in args:             # <<<<<<<<<<<<<<
 *         e_ = sympify(e)
 *         s.insert(symengine.rcp_static_cast_Boolean(e_.thisptr))
*/
  __pyx_t_1 = __pyx_v_args; __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = 0;
  for (;;) {
    {
      Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
      #if !CYTHON_ASSUME_SAFE_SIZE
      if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 4476, __pyx_L1_error)
      #endif
      if (__pyx_t_2 >= __pyx_temp) break;
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_3 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2));
    #else
    __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2);
    #endif
    ++__pyx_t_2;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4476, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_XDECREF_SET(__pyx_v_e, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":4477
 *     cdef Boolean e_
 *     for e in args:
 *         e_ = sympify(e)             # <<<<<<<<<<<<<<
 *         s.insert(symengine.rcp_static_cast_Boolean(e_.thisptr))
 *     return c2py(<rcp_const_basic>(symengine.logical_nor(s)))
*/
    __pyx_t_4 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4477, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
      assert(__pyx_t_4);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
      __pyx_t_6 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_e};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4477, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Boolean))))) __PYX_ERR(0, 4477, __pyx_L1_error)
    __Pyx_XDECREF_SET(__pyx_v_e_, ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Boolean *)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":4478
 *     for e in args:
 *         e_ = sympify(e)
 *         s.insert(symengine.rcp_static_cast_Boolean(e_.thisptr))             # <<<<<<<<<<<<<<
 *     return c2py(<rcp_const_basic>(symengine.logical_nor(s)))
 * 
*/
    try {
      __pyx_v_s.insert(SymEngine::rcp_static_cast<const SymEngine::Boolean>(__pyx_v_e_->__pyx_base.__pyx_base.thisptr));
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(0, 4478, __pyx_L1_error)
    }

    /* "symengine/lib/symengine_wrapper.pyx":4476
 *     cdef symengine.set_boolean s
 *     cdef Boolean e_
 *     for e in args:             # <<<<<<<<<<<<<<
 *         e_ = sympify(e)
 *         s.insert(symengine.rcp_static_cast_Boolean(e_.thisptr))
*/
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4479
 *         e_ = sympify(e)
 *         s.insert(symengine.rcp_static_cast_Boolean(e_.thisptr))
 *     return c2py(<rcp_const_basic>(symengine.logical_nor(s)))             # <<<<<<<<<<<<<<
 * 
 * def Nand(*args):
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_7 = SymEngine::logical_nor(__pyx_v_s);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 4479, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)__pyx_t_7)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4479, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4473
 *     return c2py(<rcp_const_basic>(symengine.logical_or(s)))
 * 
 * def Nor(*args):             # <<<<<<<<<<<<<<
 *     cdef symengine.set_boolean s
 *     cdef Boolean e_
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Nor", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_e_);
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4481
 *     return c2py(<rcp_const_basic>(symengine.logical_nor(s)))
 * 
 * def Nand(*args):             # <<<<<<<<<<<<<<
 *     cdef symengine.set_boolean s
 *     cdef Boolean e_
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_85Nand(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_85Nand = {"Nand", (PyCFunction)(void(*)(void))(PyCFunctionWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_85Nand, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_85Nand(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_args = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Nand (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("Nand", __pyx_kwds); return NULL;}
  __Pyx_INCREF(__pyx_args);
  __pyx_v_args = __pyx_args;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_84Nand(__pyx_self, __pyx_v_args);

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_84Nand(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_args) {
  SymEngine::set_boolean __pyx_v_s;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Boolean *__pyx_v_e_ = 0;
  PyObject *__pyx_v_e = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  SymEngine::RCP<SymEngine::Boolean const >  __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("Nand", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4484
 *     cdef symengine.set_boolean s
 *     cdef Boolean e_
 *     for e in args:             # <<<<<<<<<<<<<<
 *         e_ = sympify(e)
 *         s.insert(symengine.rcp_static_cast_Boolean(e_.thisptr))
*/
  __pyx_t_1 = __pyx_v_args; __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = 0;
  for (;;) {
    {
      Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
      #if !CYTHON_ASSUME_SAFE_SIZE
      if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 4484, __pyx_L1_error)
      #endif
      if (__pyx_t_2 >= __pyx_temp) break;
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_3 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2));
    #else
    __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2);
    #endif
    ++__pyx_t_2;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4484, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_XDECREF_SET(__pyx_v_e, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":4485
 *     cdef Boolean e_
 *     for e in args:
 *         e_ = sympify(e)             # <<<<<<<<<<<<<<
 *         s.insert(symengine.rcp_static_cast_Boolean(e_.thisptr))
 *     return c2py(<rcp_const_basic>(symengine.logical_nand(s)))
*/
    __pyx_t_4 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4485, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
      assert(__pyx_t_4);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
      __pyx_t_6 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_e};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4485, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Boolean))))) __PYX_ERR(0, 4485, __pyx_L1_error)
    __Pyx_XDECREF_SET(__pyx_v_e_, ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Boolean *)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":4486
 *     for e in args:
 *         e_ = sympify(e)
 *         s.insert(symengine.rcp_static_cast_Boolean(e_.thisptr))             # <<<<<<<<<<<<<<
 *     return c2py(<rcp_const_basic>(symengine.logical_nand(s)))
 * 
*/
    try {
      __pyx_v_s.insert(SymEngine::rcp_static_cast<const SymEngine::Boolean>(__pyx_v_e_->__pyx_base.__pyx_base.thisptr));
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(0, 4486, __pyx_L1_error)
    }

    /* "symengine/lib/symengine_wrapper.pyx":4484
 *     cdef symengine.set_boolean s
 *     cdef Boolean e_
 *     for e in args:             # <<<<<<<<<<<<<<
 *         e_ = sympify(e)
 *         s.insert(symengine.rcp_static_cast_Boolean(e_.thisptr))
*/
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4487
 *         e_ = sympify(e)
 *         s.insert(symengine.rcp_static_cast_Boolean(e_.thisptr))
 *     return c2py(<rcp_const_basic>(symengine.logical_nand(s)))             # <<<<<<<<<<<<<<
 * 
 * def logical_not(x):
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_7 = SymEngine::logical_nand(__pyx_v_s);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 4487, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)__pyx_t_7)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4487, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4481
 *     return c2py(<rcp_const_basic>(symengine.logical_nor(s)))
 * 
 * def Nand(*args):             # <<<<<<<<<<<<<<
 *     cdef symengine.set_boolean s
 *     cdef Boolean e_
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Nand", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_e_);
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4489
 *     return c2py(<rcp_const_basic>(symengine.logical_nand(s)))
 * 
 * def logical_not(x):             # <<<<<<<<<<<<<<
 *     cdef Basic x_ = sympify(x)
 *     require(x_, Boolean)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_87logical_not(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_87logical_not = {"logical_not", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_87logical_not, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_87logical_not(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_x = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("logical_not (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_x,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 4489, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4489, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "logical_not", 0) < (0)) __PYX_ERR(0, 4489, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("logical_not", 1, 1, 1, i); __PYX_ERR(0, 4489, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4489, __pyx_L3_error)
    }
    __pyx_v_x = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("logical_not", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4489, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.logical_not", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_86logical_not(__pyx_self, __pyx_v_x);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_86logical_not(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_x_ = 0;
  SymEngine::RCP<SymEngine::Boolean const >  __pyx_v__x;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  SymEngine::RCP<SymEngine::Boolean const >  __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("logical_not", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4490
 * 
 * def logical_not(x):
 *     cdef Basic x_ = sympify(x)             # <<<<<<<<<<<<<<
 *     require(x_, Boolean)
 *     cdef RCP[const symengine.Boolean] _x = symengine.rcp_static_cast_Boolean(x_.thisptr)
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4490, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_x};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4490, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 4490, __pyx_L1_error)
  __pyx_v_x_ = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4491
 * def logical_not(x):
 *     cdef Basic x_ = sympify(x)
 *     require(x_, Boolean)             # <<<<<<<<<<<<<<
 *     cdef RCP[const symengine.Boolean] _x = symengine.rcp_static_cast_Boolean(x_.thisptr)
 *     return c2py(<rcp_const_basic>(symengine.logical_not(_x)))
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_require); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4491, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, ((PyObject *)__pyx_v_x_), ((PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Boolean)};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4491, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4492
 *     cdef Basic x_ = sympify(x)
 *     require(x_, Boolean)
 *     cdef RCP[const symengine.Boolean] _x = symengine.rcp_static_cast_Boolean(x_.thisptr)             # <<<<<<<<<<<<<<
 *     return c2py(<rcp_const_basic>(symengine.logical_not(_x)))
 * 
*/
  __pyx_v__x = SymEngine::rcp_static_cast<const SymEngine::Boolean>(__pyx_v_x_->thisptr);

  /* "symengine/lib/symengine_wrapper.pyx":4493
 *     require(x_, Boolean)
 *     cdef RCP[const symengine.Boolean] _x = symengine.rcp_static_cast_Boolean(x_.thisptr)
 *     return c2py(<rcp_const_basic>(symengine.logical_not(_x)))             # <<<<<<<<<<<<<<
 * 
 * def logical_xor(*args):
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_5 = SymEngine::logical_not(__pyx_v__x);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 4493, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)__pyx_t_5)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4493, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4489
 *     return c2py(<rcp_const_basic>(symengine.logical_nand(s)))
 * 
 * def logical_not(x):             # <<<<<<<<<<<<<<
 *     cdef Basic x_ = sympify(x)
 *     require(x_, Boolean)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.logical_not", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_x_);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4495
 *     return c2py(<rcp_const_basic>(symengine.logical_not(_x)))
 * 
 * def logical_xor(*args):             # <<<<<<<<<<<<<<
 *     cdef symengine.vec_boolean v
 *     cdef Boolean e_
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_89logical_xor(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_89logical_xor = {"logical_xor", (PyCFunction)(void(*)(void))(PyCFunctionWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_89logical_xor, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_89logical_xor(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_args = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("logical_xor (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("logical_xor", __pyx_kwds); return NULL;}
  __Pyx_INCREF(__pyx_args);
  __pyx_v_args = __pyx_args;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_88logical_xor(__pyx_self, __pyx_v_args);

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_88logical_xor(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_args) {
  SymEngine::vec_boolean __pyx_v_v;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Boolean *__pyx_v_e_ = 0;
  PyObject *__pyx_v_e = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  SymEngine::RCP<SymEngine::Boolean const >  __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("logical_xor", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4498
 *     cdef symengine.vec_boolean v
 *     cdef Boolean e_
 *     for e in args:             # <<<<<<<<<<<<<<
 *         e_ = sympify(e)
 *         v.push_back(symengine.rcp_static_cast_Boolean(e_.thisptr))
*/
  __pyx_t_1 = __pyx_v_args; __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = 0;
  for (;;) {
    {
      Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
      #if !CYTHON_ASSUME_SAFE_SIZE
      if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 4498, __pyx_L1_error)
      #endif
      if (__pyx_t_2 >= __pyx_temp) break;
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_3 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2));
    #else
    __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2);
    #endif
    ++__pyx_t_2;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4498, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_XDECREF_SET(__pyx_v_e, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":4499
 *     cdef Boolean e_
 *     for e in args:
 *         e_ = sympify(e)             # <<<<<<<<<<<<<<
 *         v.push_back(symengine.rcp_static_cast_Boolean(e_.thisptr))
 *     return c2py(<rcp_const_basic>(symengine.logical_xor(v)))
*/
    __pyx_t_4 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4499, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
      assert(__pyx_t_4);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
      __pyx_t_6 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_e};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4499, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Boolean))))) __PYX_ERR(0, 4499, __pyx_L1_error)
    __Pyx_XDECREF_SET(__pyx_v_e_, ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Boolean *)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":4500
 *     for e in args:
 *         e_ = sympify(e)
 *         v.push_back(symengine.rcp_static_cast_Boolean(e_.thisptr))             # <<<<<<<<<<<<<<
 *     return c2py(<rcp_const_basic>(symengine.logical_xor(v)))
 * 
*/
    try {
      __pyx_v_v.push_back(SymEngine::rcp_static_cast<const SymEngine::Boolean>(__pyx_v_e_->__pyx_base.__pyx_base.thisptr));
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(0, 4500, __pyx_L1_error)
    }

    /* "symengine/lib/symengine_wrapper.pyx":4498
 *     cdef symengine.vec_boolean v
 *     cdef Boolean e_
 *     for e in args:             # <<<<<<<<<<<<<<
 *         e_ = sympify(e)
 *         v.push_back(symengine.rcp_static_cast_Boolean(e_.thisptr))
*/
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4501
 *         e_ = sympify(e)
 *         v.push_back(symengine.rcp_static_cast_Boolean(e_.thisptr))
 *     return c2py(<rcp_const_basic>(symengine.logical_xor(v)))             # <<<<<<<<<<<<<<
 * 
 * def Xnor(*args):
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_7 = SymEngine::logical_xor(__pyx_v_v);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 4501, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)__pyx_t_7)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4501, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4495
 *     return c2py(<rcp_const_basic>(symengine.logical_not(_x)))
 * 
 * def logical_xor(*args):             # <<<<<<<<<<<<<<
 *     cdef symengine.vec_boolean v
 *     cdef Boolean e_
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.logical_xor", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_e_);
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4503
 *     return c2py(<rcp_const_basic>(symengine.logical_xor(v)))
 * 
 * def Xnor(*args):             # <<<<<<<<<<<<<<
 *     cdef symengine.vec_boolean v
 *     cdef Boolean e_
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_91Xnor(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_91Xnor = {"Xnor", (PyCFunction)(void(*)(void))(PyCFunctionWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_91Xnor, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_91Xnor(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_args = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Xnor (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("Xnor", __pyx_kwds); return NULL;}
  __Pyx_INCREF(__pyx_args);
  __pyx_v_args = __pyx_args;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_90Xnor(__pyx_self, __pyx_v_args);

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_90Xnor(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_args) {
  SymEngine::vec_boolean __pyx_v_v;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Boolean *__pyx_v_e_ = 0;
  PyObject *__pyx_v_e = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  SymEngine::RCP<SymEngine::Boolean const >  __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("Xnor", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4506
 *     cdef symengine.vec_boolean v
 *     cdef Boolean e_
 *     for e in args:             # <<<<<<<<<<<<<<
 *         e_ = sympify(e)
 *         v.push_back(symengine.rcp_static_cast_Boolean(e_.thisptr))
*/
  __pyx_t_1 = __pyx_v_args; __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = 0;
  for (;;) {
    {
      Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
      #if !CYTHON_ASSUME_SAFE_SIZE
      if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 4506, __pyx_L1_error)
      #endif
      if (__pyx_t_2 >= __pyx_temp) break;
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_3 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2));
    #else
    __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2);
    #endif
    ++__pyx_t_2;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4506, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_XDECREF_SET(__pyx_v_e, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":4507
 *     cdef Boolean e_
 *     for e in args:
 *         e_ = sympify(e)             # <<<<<<<<<<<<<<
 *         v.push_back(symengine.rcp_static_cast_Boolean(e_.thisptr))
 *     return c2py(<rcp_const_basic>(symengine.logical_xnor(v)))
*/
    __pyx_t_4 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4507, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
      assert(__pyx_t_4);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
      __pyx_t_6 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_e};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4507, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Boolean))))) __PYX_ERR(0, 4507, __pyx_L1_error)
    __Pyx_XDECREF_SET(__pyx_v_e_, ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Boolean *)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":4508
 *     for e in args:
 *         e_ = sympify(e)
 *         v.push_back(symengine.rcp_static_cast_Boolean(e_.thisptr))             # <<<<<<<<<<<<<<
 *     return c2py(<rcp_const_basic>(symengine.logical_xnor(v)))
 * 
*/
    try {
      __pyx_v_v.push_back(SymEngine::rcp_static_cast<const SymEngine::Boolean>(__pyx_v_e_->__pyx_base.__pyx_base.thisptr));
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(0, 4508, __pyx_L1_error)
    }

    /* "symengine/lib/symengine_wrapper.pyx":4506
 *     cdef symengine.vec_boolean v
 *     cdef Boolean e_
 *     for e in args:             # <<<<<<<<<<<<<<
 *         e_ = sympify(e)
 *         v.push_back(symengine.rcp_static_cast_Boolean(e_.thisptr))
*/
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4509
 *         e_ = sympify(e)
 *         v.push_back(symengine.rcp_static_cast_Boolean(e_.thisptr))
 *     return c2py(<rcp_const_basic>(symengine.logical_xnor(v)))             # <<<<<<<<<<<<<<
 * 
 * def evalf(x, unsigned long bits=53, real=None):
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_7 = SymEngine::logical_xnor(__pyx_v_v);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 4509, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)__pyx_t_7)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4509, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4503
 *     return c2py(<rcp_const_basic>(symengine.logical_xor(v)))
 * 
 * def Xnor(*args):             # <<<<<<<<<<<<<<
 *     cdef symengine.vec_boolean v
 *     cdef Boolean e_
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Xnor", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_e_);
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4511
 *     return c2py(<rcp_const_basic>(symengine.logical_xnor(v)))
 * 
 * def evalf(x, unsigned long bits=53, real=None):             # <<<<<<<<<<<<<<
 *     cdef Basic X = sympify(x)
 *     cdef symengine.EvalfDomain d
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_93evalf(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_93evalf = {"evalf", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_93evalf, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_93evalf(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_x = 0;
  unsigned long __pyx_v_bits;
  PyObject *__pyx_v_real = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("evalf (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_x,&__pyx_mstate_global->__pyx_n_u_bits,&__pyx_mstate_global->__pyx_n_u_real,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 4511, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 4511, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4511, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4511, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "evalf", 0) < (0)) __PYX_ERR(0, 4511, __pyx_L3_error)
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("evalf", 0, 1, 3, i); __PYX_ERR(0, 4511, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 4511, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4511, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4511, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_x = values[0];
    if (values[1]) {
      __pyx_v_bits = __Pyx_PyLong_As_unsigned_long(values[1]); if (unlikely((__pyx_v_bits == (unsigned long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4511, __pyx_L3_error)
    } else {
      __pyx_v_bits = ((unsigned long)((unsigned long)53));
    }
    __pyx_v_real = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("evalf", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 4511, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.evalf", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_92evalf(__pyx_self, __pyx_v_x, __pyx_v_bits, __pyx_v_real);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_92evalf(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x, unsigned long __pyx_v_bits, PyObject *__pyx_v_real) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_X = 0;
  SymEngine::EvalfDomain __pyx_v_d;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_t_5;
  SymEngine::RCP<const SymEngine::Basic> __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("evalf", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4512
 * 
 * def evalf(x, unsigned long bits=53, real=None):
 *     cdef Basic X = sympify(x)             # <<<<<<<<<<<<<<
 *     cdef symengine.EvalfDomain d
 *     if real is None:
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4512, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_x};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4512, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 4512, __pyx_L1_error)
  __pyx_v_X = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4514
 *     cdef Basic X = sympify(x)
 *     cdef symengine.EvalfDomain d
 *     if real is None:             # <<<<<<<<<<<<<<
 *         d = symengine.EvalfSymbolic
 *     elif real:
*/
  __pyx_t_5 = (__pyx_v_real == Py_None);
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":4515
 *     cdef symengine.EvalfDomain d
 *     if real is None:
 *         d = symengine.EvalfSymbolic             # <<<<<<<<<<<<<<
 *     elif real:
 *         d = symengine.EvalfReal
*/
    __pyx_v_d = SymEngine::EvalfDomain::Symbolic;

    /* "symengine/lib/symengine_wrapper.pyx":4514
 *     cdef Basic X = sympify(x)
 *     cdef symengine.EvalfDomain d
 *     if real is None:             # <<<<<<<<<<<<<<
 *         d = symengine.EvalfSymbolic
 *     elif real:
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":4516
 *     if real is None:
 *         d = symengine.EvalfSymbolic
 *     elif real:             # <<<<<<<<<<<<<<
 *         d = symengine.EvalfReal
 *     else:
*/
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_real); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 4516, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":4517
 *         d = symengine.EvalfSymbolic
 *     elif real:
 *         d = symengine.EvalfReal             # <<<<<<<<<<<<<<
 *     else:
 *         d = symengine.EvalfComplex
*/
    __pyx_v_d = SymEngine::EvalfDomain::Real;

    /* "symengine/lib/symengine_wrapper.pyx":4516
 *     if real is None:
 *         d = symengine.EvalfSymbolic
 *     elif real:             # <<<<<<<<<<<<<<
 *         d = symengine.EvalfReal
 *     else:
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":4519
 *         d = symengine.EvalfReal
 *     else:
 *         d = symengine.EvalfComplex             # <<<<<<<<<<<<<<
 *     return c2py(<rcp_const_basic>(symengine.evalf(deref(X.thisptr), bits, d)))
 * 
*/
  /*else*/ {
    __pyx_v_d = SymEngine::EvalfDomain::Complex;
  }
  __pyx_L3:;

  /* "symengine/lib/symengine_wrapper.pyx":4520
 *     else:
 *         d = symengine.EvalfComplex
 *     return c2py(<rcp_const_basic>(symengine.evalf(deref(X.thisptr), bits, d)))             # <<<<<<<<<<<<<<
 * 
 * def eval_double(x):
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_6 = SymEngine::evalf((*__pyx_v_X->thisptr), __pyx_v_bits, __pyx_v_d);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 4520, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)__pyx_t_6)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4520, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4511
 *     return c2py(<rcp_const_basic>(symengine.logical_xnor(v)))
 * 
 * def evalf(x, unsigned long bits=53, real=None):             # <<<<<<<<<<<<<<
 *     cdef Basic X = sympify(x)
 *     cdef symengine.EvalfDomain d
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.evalf", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_X);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4522
 *     return c2py(<rcp_const_basic>(symengine.evalf(deref(X.thisptr), bits, d)))
 * 
 * def eval_double(x):             # <<<<<<<<<<<<<<
 *     warnings.warn("eval_double is deprecated. Use evalf(..., real=True)", DeprecationWarning)
 *     return evalf(x, 53, real=True)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_95eval_double(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_95eval_double = {"eval_double", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_95eval_double, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_95eval_double(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_x = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("eval_double (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_x,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 4522, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4522, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "eval_double", 0) < (0)) __PYX_ERR(0, 4522, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("eval_double", 1, 1, 1, i); __PYX_ERR(0, 4522, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4522, __pyx_L3_error)
    }
    __pyx_v_x = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("eval_double", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4522, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.eval_double", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_94eval_double(__pyx_self, __pyx_v_x);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_94eval_double(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x) {
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("eval_double", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4523
 * 
 * def eval_double(x):
 *     warnings.warn("eval_double is deprecated. Use evalf(..., real=True)", DeprecationWarning)             # <<<<<<<<<<<<<<
 *     return evalf(x, 53, real=True)
 * 
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_warnings); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4523, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_warn); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4523, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_eval_double_is_deprecated_Use_ev, ((PyObject *)(((PyTypeObject*)PyExc_DeprecationWarning)))};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4523, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4524
 * def eval_double(x):
 *     warnings.warn("eval_double is deprecated. Use evalf(..., real=True)", DeprecationWarning)
 *     return evalf(x, 53, real=True)             # <<<<<<<<<<<<<<
 * 
 * def eval_complex_double(x):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_evalf); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4524, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_4, __pyx_v_x, __pyx_mstate_global->__pyx_int_53};
    __pyx_t_3 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4524, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_real, Py_True, __pyx_t_3, __pyx_callargs+3, 0) < (0)) __PYX_ERR(0, 4524, __pyx_L1_error)
    __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_3);
    __Pyx_XDECREF(__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;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4524, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4522
 *     return c2py(<rcp_const_basic>(symengine.evalf(deref(X.thisptr), bits, d)))
 * 
 * def eval_double(x):             # <<<<<<<<<<<<<<
 *     warnings.warn("eval_double is deprecated. Use evalf(..., real=True)", DeprecationWarning)
 *     return evalf(x, 53, real=True)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.eval_double", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4526
 *     return evalf(x, 53, real=True)
 * 
 * def eval_complex_double(x):             # <<<<<<<<<<<<<<
 *     warnings.warn("eval_complex_double is deprecated. Use evalf(..., real=False)", DeprecationWarning)
 *     return evalf(x, 53, real=False)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_97eval_complex_double(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_97eval_complex_double = {"eval_complex_double", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_97eval_complex_double, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_97eval_complex_double(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_x = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("eval_complex_double (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_x,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 4526, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4526, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "eval_complex_double", 0) < (0)) __PYX_ERR(0, 4526, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("eval_complex_double", 1, 1, 1, i); __PYX_ERR(0, 4526, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4526, __pyx_L3_error)
    }
    __pyx_v_x = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("eval_complex_double", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4526, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.eval_complex_double", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_96eval_complex_double(__pyx_self, __pyx_v_x);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_96eval_complex_double(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x) {
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("eval_complex_double", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4527
 * 
 * def eval_complex_double(x):
 *     warnings.warn("eval_complex_double is deprecated. Use evalf(..., real=False)", DeprecationWarning)             # <<<<<<<<<<<<<<
 *     return evalf(x, 53, real=False)
 * 
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_warnings); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4527, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_warn); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4527, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_eval_complex_double_is_deprecate, ((PyObject *)(((PyTypeObject*)PyExc_DeprecationWarning)))};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4527, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4528
 * def eval_complex_double(x):
 *     warnings.warn("eval_complex_double is deprecated. Use evalf(..., real=False)", DeprecationWarning)
 *     return evalf(x, 53, real=False)             # <<<<<<<<<<<<<<
 * 
 * have_mpfr = False
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_evalf); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4528, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_4, __pyx_v_x, __pyx_mstate_global->__pyx_int_53};
    __pyx_t_3 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4528, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_real, Py_False, __pyx_t_3, __pyx_callargs+3, 0) < (0)) __PYX_ERR(0, 4528, __pyx_L1_error)
    __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_3);
    __Pyx_XDECREF(__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;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4528, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4526
 *     return evalf(x, 53, real=True)
 * 
 * def eval_complex_double(x):             # <<<<<<<<<<<<<<
 *     warnings.warn("eval_complex_double is deprecated. Use evalf(..., real=False)", DeprecationWarning)
 *     return evalf(x, 53, real=False)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.eval_complex_double", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4538
 * 
 * have_mpfr = True
 * def eval_mpfr(x, unsigned long prec):             # <<<<<<<<<<<<<<
 *     warnings.warn("eval_mpfr is deprecated. Use evalf(..., real=True)", DeprecationWarning)
 *     return evalf(x, prec, real=True)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_99eval_mpfr(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_99eval_mpfr = {"eval_mpfr", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_99eval_mpfr, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_99eval_mpfr(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_x = 0;
  unsigned long __pyx_v_prec;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("eval_mpfr (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_x,&__pyx_mstate_global->__pyx_n_u_prec_2,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 4538, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4538, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4538, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "eval_mpfr", 0) < (0)) __PYX_ERR(0, 4538, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("eval_mpfr", 1, 2, 2, i); __PYX_ERR(0, 4538, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4538, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4538, __pyx_L3_error)
    }
    __pyx_v_x = values[0];
    __pyx_v_prec = __Pyx_PyLong_As_unsigned_long(values[1]); if (unlikely((__pyx_v_prec == (unsigned long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4538, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("eval_mpfr", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 4538, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.eval_mpfr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_98eval_mpfr(__pyx_self, __pyx_v_x, __pyx_v_prec);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_98eval_mpfr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x, unsigned long __pyx_v_prec) {
  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;
  size_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("eval_mpfr", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4539
 * have_mpfr = True
 * def eval_mpfr(x, unsigned long prec):
 *     warnings.warn("eval_mpfr is deprecated. Use evalf(..., real=True)", DeprecationWarning)             # <<<<<<<<<<<<<<
 *     return evalf(x, prec, real=True)
 * 
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_warnings); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4539, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_warn); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4539, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_eval_mpfr_is_deprecated_Use_eval, ((PyObject *)(((PyTypeObject*)PyExc_DeprecationWarning)))};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4539, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4540
 * def eval_mpfr(x, unsigned long prec):
 *     warnings.warn("eval_mpfr is deprecated. Use evalf(..., real=True)", DeprecationWarning)
 *     return evalf(x, prec, real=True)             # <<<<<<<<<<<<<<
 * 
 * have_mpc = True
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_evalf); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4540, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyLong_From_unsigned_long(__pyx_v_prec); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4540, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_4, __pyx_v_x, __pyx_t_3};
    __pyx_t_6 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4540, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_real, Py_True, __pyx_t_6, __pyx_callargs+3, 0) < (0)) __PYX_ERR(0, 4540, __pyx_L1_error)
    __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_6);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4540, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4538
 * 
 * have_mpfr = True
 * def eval_mpfr(x, unsigned long prec):             # <<<<<<<<<<<<<<
 *     warnings.warn("eval_mpfr is deprecated. Use evalf(..., real=True)", DeprecationWarning)
 *     return evalf(x, prec, real=True)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.eval_mpfr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4543
 * 
 * have_mpc = True
 * def eval_mpc(x, unsigned long prec):             # <<<<<<<<<<<<<<
 *     warnings.warn("eval_mpc is deprecated. Use evalf(..., real=False)", DeprecationWarning)
 *     return evalf(x, prec, real=False)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_101eval_mpc(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_101eval_mpc = {"eval_mpc", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_101eval_mpc, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_101eval_mpc(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_x = 0;
  unsigned long __pyx_v_prec;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("eval_mpc (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_x,&__pyx_mstate_global->__pyx_n_u_prec_2,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 4543, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4543, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4543, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "eval_mpc", 0) < (0)) __PYX_ERR(0, 4543, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("eval_mpc", 1, 2, 2, i); __PYX_ERR(0, 4543, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4543, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4543, __pyx_L3_error)
    }
    __pyx_v_x = values[0];
    __pyx_v_prec = __Pyx_PyLong_As_unsigned_long(values[1]); if (unlikely((__pyx_v_prec == (unsigned long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4543, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("eval_mpc", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 4543, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.eval_mpc", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_100eval_mpc(__pyx_self, __pyx_v_x, __pyx_v_prec);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_100eval_mpc(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x, unsigned long __pyx_v_prec) {
  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;
  size_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("eval_mpc", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4544
 * have_mpc = True
 * def eval_mpc(x, unsigned long prec):
 *     warnings.warn("eval_mpc is deprecated. Use evalf(..., real=False)", DeprecationWarning)             # <<<<<<<<<<<<<<
 *     return evalf(x, prec, real=False)
 * 
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_warnings); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4544, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_warn); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4544, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_eval_mpc_is_deprecated_Use_evalf, ((PyObject *)(((PyTypeObject*)PyExc_DeprecationWarning)))};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4544, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4545
 * def eval_mpc(x, unsigned long prec):
 *     warnings.warn("eval_mpc is deprecated. Use evalf(..., real=False)", DeprecationWarning)
 *     return evalf(x, prec, real=False)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_evalf); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4545, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyLong_From_unsigned_long(__pyx_v_prec); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4545, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_4, __pyx_v_x, __pyx_t_3};
    __pyx_t_6 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4545, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_real, Py_False, __pyx_t_6, __pyx_callargs+3, 0) < (0)) __PYX_ERR(0, 4545, __pyx_L1_error)
    __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_6);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4545, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4543
 * 
 * have_mpc = True
 * def eval_mpc(x, unsigned long prec):             # <<<<<<<<<<<<<<
 *     warnings.warn("eval_mpc is deprecated. Use evalf(..., real=False)", DeprecationWarning)
 *     return evalf(x, prec, real=False)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.eval_mpc", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4554
 * have_llvm_long_double = True
 * 
 * def require(obj, t):             # <<<<<<<<<<<<<<
 *     if not isinstance(obj, t):
 *         raise TypeError("{} required. {} is of type {}".format(t, obj, type(obj)))
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_103require(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_103require = {"require", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_103require, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_103require(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_obj = 0;
  PyObject *__pyx_v_t = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("require (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_obj,&__pyx_mstate_global->__pyx_n_u_t,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 4554, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4554, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4554, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "require", 0) < (0)) __PYX_ERR(0, 4554, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("require", 1, 2, 2, i); __PYX_ERR(0, 4554, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4554, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4554, __pyx_L3_error)
    }
    __pyx_v_obj = values[0];
    __pyx_v_t = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("require", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 4554, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.require", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_102require(__pyx_self, __pyx_v_obj, __pyx_v_t);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_102require(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_t) {
  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;
  size_t __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("require", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4555
 * 
 * def require(obj, t):
 *     if not isinstance(obj, t):             # <<<<<<<<<<<<<<
 *         raise TypeError("{} required. {} is of type {}".format(t, obj, type(obj)))
 * 
*/
  __pyx_t_1 = PyObject_IsInstance(__pyx_v_obj, __pyx_v_t); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4555, __pyx_L1_error)
  __pyx_t_2 = (!__pyx_t_1);
  if (unlikely(__pyx_t_2)) {

    /* "symengine/lib/symengine_wrapper.pyx":4556
 * def require(obj, t):
 *     if not isinstance(obj, t):
 *         raise TypeError("{} required. {} is of type {}".format(t, obj, type(obj)))             # <<<<<<<<<<<<<<
 * 
 * def eval(x, long prec):
*/
    __pyx_t_4 = NULL;
    __pyx_t_6 = __pyx_mstate_global->__pyx_kp_u_required_is_of_type;
    __Pyx_INCREF(__pyx_t_6);
    __pyx_t_7 = 0;
    {
      PyObject *__pyx_callargs[4] = {__pyx_t_6, __pyx_v_t, __pyx_v_obj, ((PyObject *)Py_TYPE(__pyx_v_obj))};
      __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_7, (4-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4556, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
    }
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_5};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4556, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 4556, __pyx_L1_error)

    /* "symengine/lib/symengine_wrapper.pyx":4555
 * 
 * def require(obj, t):
 *     if not isinstance(obj, t):             # <<<<<<<<<<<<<<
 *         raise TypeError("{} required. {} is of type {}".format(t, obj, type(obj)))
 * 
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":4554
 * have_llvm_long_double = True
 * 
 * def require(obj, t):             # <<<<<<<<<<<<<<
 *     if not isinstance(obj, t):
 *         raise TypeError("{} required. {} is of type {}".format(t, obj, type(obj)))
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.require", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4558
 *         raise TypeError("{} required. {} is of type {}".format(t, obj, type(obj)))
 * 
 * def eval(x, long prec):             # <<<<<<<<<<<<<<
 *     warnings.warn("eval is deprecated. Use evalf(..., real=False)", DeprecationWarning)
 *     return evalf(x, prec, real=False)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_105eval(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_105eval = {"eval", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_105eval, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_105eval(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_x = 0;
  long __pyx_v_prec;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("eval (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_x,&__pyx_mstate_global->__pyx_n_u_prec_2,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 4558, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4558, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4558, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "eval", 0) < (0)) __PYX_ERR(0, 4558, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("eval", 1, 2, 2, i); __PYX_ERR(0, 4558, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4558, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4558, __pyx_L3_error)
    }
    __pyx_v_x = values[0];
    __pyx_v_prec = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v_prec == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4558, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("eval", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 4558, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.eval", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_104eval(__pyx_self, __pyx_v_x, __pyx_v_prec);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_104eval(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x, long __pyx_v_prec) {
  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;
  size_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("eval", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4559
 * 
 * def eval(x, long prec):
 *     warnings.warn("eval is deprecated. Use evalf(..., real=False)", DeprecationWarning)             # <<<<<<<<<<<<<<
 *     return evalf(x, prec, real=False)
 * 
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_warnings); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4559, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_warn); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4559, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_eval_is_deprecated_Use_evalf_rea, ((PyObject *)(((PyTypeObject*)PyExc_DeprecationWarning)))};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4559, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4560
 * def eval(x, long prec):
 *     warnings.warn("eval is deprecated. Use evalf(..., real=False)", DeprecationWarning)
 *     return evalf(x, prec, real=False)             # <<<<<<<<<<<<<<
 * 
 * def eval_real(x, long prec):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_evalf); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4560, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyLong_From_long(__pyx_v_prec); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4560, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_4, __pyx_v_x, __pyx_t_3};
    __pyx_t_6 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4560, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_real, Py_False, __pyx_t_6, __pyx_callargs+3, 0) < (0)) __PYX_ERR(0, 4560, __pyx_L1_error)
    __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_6);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4560, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4558
 *         raise TypeError("{} required. {} is of type {}".format(t, obj, type(obj)))
 * 
 * def eval(x, long prec):             # <<<<<<<<<<<<<<
 *     warnings.warn("eval is deprecated. Use evalf(..., real=False)", DeprecationWarning)
 *     return evalf(x, prec, real=False)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.eval", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4562
 *     return evalf(x, prec, real=False)
 * 
 * def eval_real(x, long prec):             # <<<<<<<<<<<<<<
 *     warnings.warn("eval_real is deprecated. Use evalf(..., real=True)", DeprecationWarning)
 *     return evalf(x, prec, real=True)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_107eval_real(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_107eval_real = {"eval_real", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_107eval_real, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_107eval_real(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_x = 0;
  long __pyx_v_prec;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("eval_real (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_x,&__pyx_mstate_global->__pyx_n_u_prec_2,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 4562, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4562, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4562, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "eval_real", 0) < (0)) __PYX_ERR(0, 4562, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("eval_real", 1, 2, 2, i); __PYX_ERR(0, 4562, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4562, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4562, __pyx_L3_error)
    }
    __pyx_v_x = values[0];
    __pyx_v_prec = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v_prec == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4562, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("eval_real", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 4562, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.eval_real", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_106eval_real(__pyx_self, __pyx_v_x, __pyx_v_prec);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_106eval_real(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x, long __pyx_v_prec) {
  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;
  size_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("eval_real", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4563
 * 
 * def eval_real(x, long prec):
 *     warnings.warn("eval_real is deprecated. Use evalf(..., real=True)", DeprecationWarning)             # <<<<<<<<<<<<<<
 *     return evalf(x, prec, real=True)
 * 
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_warnings); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4563, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_warn); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4563, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_eval_real_is_deprecated_Use_eval, ((PyObject *)(((PyTypeObject*)PyExc_DeprecationWarning)))};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4563, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4564
 * def eval_real(x, long prec):
 *     warnings.warn("eval_real is deprecated. Use evalf(..., real=True)", DeprecationWarning)
 *     return evalf(x, prec, real=True)             # <<<<<<<<<<<<<<
 * 
 * def probab_prime_p(n, reps = 25):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_evalf); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4564, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyLong_From_long(__pyx_v_prec); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4564, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_4, __pyx_v_x, __pyx_t_3};
    __pyx_t_6 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4564, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_real, Py_True, __pyx_t_6, __pyx_callargs+3, 0) < (0)) __PYX_ERR(0, 4564, __pyx_L1_error)
    __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_6);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4564, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4562
 *     return evalf(x, prec, real=False)
 * 
 * def eval_real(x, long prec):             # <<<<<<<<<<<<<<
 *     warnings.warn("eval_real is deprecated. Use evalf(..., real=True)", DeprecationWarning)
 *     return evalf(x, prec, real=True)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.eval_real", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4566
 *     return evalf(x, prec, real=True)
 * 
 * def probab_prime_p(n, reps = 25):             # <<<<<<<<<<<<<<
 *     cdef Basic _n = sympify(n)
 *     require(_n, Integer)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_109probab_prime_p(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_109probab_prime_p = {"probab_prime_p", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_109probab_prime_p, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_109probab_prime_p(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_n = 0;
  PyObject *__pyx_v_reps = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("probab_prime_p (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_n,&__pyx_mstate_global->__pyx_n_u_reps,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 4566, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4566, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4566, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "probab_prime_p", 0) < (0)) __PYX_ERR(0, 4566, __pyx_L3_error)
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_int_25)));
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("probab_prime_p", 0, 1, 2, i); __PYX_ERR(0, 4566, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4566, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4566, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_int_25)));
    }
    __pyx_v_n = values[0];
    __pyx_v_reps = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("probab_prime_p", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 4566, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.probab_prime_p", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_108probab_prime_p(__pyx_self, __pyx_v_n, __pyx_v_reps);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_108probab_prime_p(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_n, PyObject *__pyx_v_reps) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v__n = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("probab_prime_p", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4567
 * 
 * def probab_prime_p(n, reps = 25):
 *     cdef Basic _n = sympify(n)             # <<<<<<<<<<<<<<
 *     require(_n, Integer)
 *     return symengine.probab_prime_p(deref(symengine.rcp_static_cast_Integer(_n.thisptr)), reps) >= 1
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4567, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_n};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4567, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 4567, __pyx_L1_error)
  __pyx_v__n = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4568
 * def probab_prime_p(n, reps = 25):
 *     cdef Basic _n = sympify(n)
 *     require(_n, Integer)             # <<<<<<<<<<<<<<
 *     return symengine.probab_prime_p(deref(symengine.rcp_static_cast_Integer(_n.thisptr)), reps) >= 1
 * 
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_require); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4568, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_Integer); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4568, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, ((PyObject *)__pyx_v__n), __pyx_t_5};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4568, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4569
 *     cdef Basic _n = sympify(n)
 *     require(_n, Integer)
 *     return symengine.probab_prime_p(deref(symengine.rcp_static_cast_Integer(_n.thisptr)), reps) >= 1             # <<<<<<<<<<<<<<
 * 
 * isprime = probab_prime_p
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_6 = __Pyx_PyLong_As_int(__pyx_v_reps); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4569, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyBool_FromLong((SymEngine::probab_prime_p((*SymEngine::rcp_static_cast<const SymEngine::Integer>(__pyx_v__n->thisptr)), __pyx_t_6) >= 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4569, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4566
 *     return evalf(x, prec, real=True)
 * 
 * def probab_prime_p(n, reps = 25):             # <<<<<<<<<<<<<<
 *     cdef Basic _n = sympify(n)
 *     require(_n, Integer)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.probab_prime_p", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v__n);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4573
 * isprime = probab_prime_p
 * 
 * def nextprime(n):             # <<<<<<<<<<<<<<
 *     cdef Basic _n = sympify(n)
 *     require(_n, Integer)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_111nextprime(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_111nextprime = {"nextprime", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_111nextprime, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_111nextprime(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_n = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("nextprime (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_n,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 4573, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4573, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "nextprime", 0) < (0)) __PYX_ERR(0, 4573, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("nextprime", 1, 1, 1, i); __PYX_ERR(0, 4573, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4573, __pyx_L3_error)
    }
    __pyx_v_n = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("nextprime", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4573, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.nextprime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_110nextprime(__pyx_self, __pyx_v_n);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_110nextprime(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_n) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v__n = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("nextprime", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4574
 * 
 * def nextprime(n):
 *     cdef Basic _n = sympify(n)             # <<<<<<<<<<<<<<
 *     require(_n, Integer)
 *     return c2py(<rcp_const_basic>(symengine.nextprime(deref(symengine.rcp_static_cast_Integer(_n.thisptr)))))
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4574, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_n};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4574, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 4574, __pyx_L1_error)
  __pyx_v__n = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4575
 * def nextprime(n):
 *     cdef Basic _n = sympify(n)
 *     require(_n, Integer)             # <<<<<<<<<<<<<<
 *     return c2py(<rcp_const_basic>(symengine.nextprime(deref(symengine.rcp_static_cast_Integer(_n.thisptr)))))
 * 
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_require); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4575, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_Integer); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4575, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, ((PyObject *)__pyx_v__n), __pyx_t_5};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4575, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4576
 *     cdef Basic _n = sympify(n)
 *     require(_n, Integer)
 *     return c2py(<rcp_const_basic>(symengine.nextprime(deref(symengine.rcp_static_cast_Integer(_n.thisptr)))))             # <<<<<<<<<<<<<<
 * 
 * def gcd(a, b):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)SymEngine::nextprime((*SymEngine::rcp_static_cast<const SymEngine::Integer>(__pyx_v__n->thisptr))))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4576, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4573
 * isprime = probab_prime_p
 * 
 * def nextprime(n):             # <<<<<<<<<<<<<<
 *     cdef Basic _n = sympify(n)
 *     require(_n, Integer)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.nextprime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v__n);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4578
 *     return c2py(<rcp_const_basic>(symengine.nextprime(deref(symengine.rcp_static_cast_Integer(_n.thisptr)))))
 * 
 * def gcd(a, b):             # <<<<<<<<<<<<<<
 *     cdef Basic _a = sympify(a)
 *     cdef Basic _b = sympify(b)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_113gcd(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_113gcd = {"gcd", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_113gcd, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_113gcd(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_a = 0;
  PyObject *__pyx_v_b = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("gcd (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_a,&__pyx_mstate_global->__pyx_n_u_b,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 4578, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4578, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4578, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "gcd", 0) < (0)) __PYX_ERR(0, 4578, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("gcd", 1, 2, 2, i); __PYX_ERR(0, 4578, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4578, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4578, __pyx_L3_error)
    }
    __pyx_v_a = values[0];
    __pyx_v_b = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("gcd", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 4578, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.gcd", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_112gcd(__pyx_self, __pyx_v_a, __pyx_v_b);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_112gcd(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_a, PyObject *__pyx_v_b) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v__a = 0;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v__b = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("gcd", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4579
 * 
 * def gcd(a, b):
 *     cdef Basic _a = sympify(a)             # <<<<<<<<<<<<<<
 *     cdef Basic _b = sympify(b)
 *     require(_a, Integer)
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4579, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_a};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4579, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 4579, __pyx_L1_error)
  __pyx_v__a = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4580
 * def gcd(a, b):
 *     cdef Basic _a = sympify(a)
 *     cdef Basic _b = sympify(b)             # <<<<<<<<<<<<<<
 *     require(_a, Integer)
 *     require(_b, Integer)
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4580, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_b};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4580, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 4580, __pyx_L1_error)
  __pyx_v__b = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4581
 *     cdef Basic _a = sympify(a)
 *     cdef Basic _b = sympify(b)
 *     require(_a, Integer)             # <<<<<<<<<<<<<<
 *     require(_b, Integer)
 *     return c2py(<rcp_const_basic>(symengine.gcd(deref(symengine.rcp_static_cast_Integer(_a.thisptr)),
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_require); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4581, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_Integer); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4581, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, ((PyObject *)__pyx_v__a), __pyx_t_5};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4581, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4582
 *     cdef Basic _b = sympify(b)
 *     require(_a, Integer)
 *     require(_b, Integer)             # <<<<<<<<<<<<<<
 *     return c2py(<rcp_const_basic>(symengine.gcd(deref(symengine.rcp_static_cast_Integer(_a.thisptr)),
 *         deref(symengine.rcp_static_cast_Integer(_b.thisptr)))))
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_require); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4582, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Integer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4582, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, ((PyObject *)__pyx_v__b), __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4582, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4583
 *     require(_a, Integer)
 *     require(_b, Integer)
 *     return c2py(<rcp_const_basic>(symengine.gcd(deref(symengine.rcp_static_cast_Integer(_a.thisptr)),             # <<<<<<<<<<<<<<
 *         deref(symengine.rcp_static_cast_Integer(_b.thisptr)))))
 * 
*/
  __Pyx_XDECREF(__pyx_r);

  /* "symengine/lib/symengine_wrapper.pyx":4584
 *     require(_b, Integer)
 *     return c2py(<rcp_const_basic>(symengine.gcd(deref(symengine.rcp_static_cast_Integer(_a.thisptr)),
 *         deref(symengine.rcp_static_cast_Integer(_b.thisptr)))))             # <<<<<<<<<<<<<<
 * 
 * def lcm(a, b):
*/
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)SymEngine::gcd((*SymEngine::rcp_static_cast<const SymEngine::Integer>(__pyx_v__a->thisptr)), (*SymEngine::rcp_static_cast<const SymEngine::Integer>(__pyx_v__b->thisptr))))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4583, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4578
 *     return c2py(<rcp_const_basic>(symengine.nextprime(deref(symengine.rcp_static_cast_Integer(_n.thisptr)))))
 * 
 * def gcd(a, b):             # <<<<<<<<<<<<<<
 *     cdef Basic _a = sympify(a)
 *     cdef Basic _b = sympify(b)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.gcd", __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;
}

/* "symengine/lib/symengine_wrapper.pyx":4586
 *         deref(symengine.rcp_static_cast_Integer(_b.thisptr)))))
 * 
 * def lcm(a, b):             # <<<<<<<<<<<<<<
 *     cdef Basic _a = sympify(a)
 *     cdef Basic _b = sympify(b)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_115lcm(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_115lcm = {"lcm", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_115lcm, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_115lcm(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_a = 0;
  PyObject *__pyx_v_b = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lcm (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_a,&__pyx_mstate_global->__pyx_n_u_b,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 4586, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4586, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4586, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "lcm", 0) < (0)) __PYX_ERR(0, 4586, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("lcm", 1, 2, 2, i); __PYX_ERR(0, 4586, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4586, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4586, __pyx_L3_error)
    }
    __pyx_v_a = values[0];
    __pyx_v_b = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("lcm", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 4586, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.lcm", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_114lcm(__pyx_self, __pyx_v_a, __pyx_v_b);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_114lcm(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_a, PyObject *__pyx_v_b) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v__a = 0;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v__b = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("lcm", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4587
 * 
 * def lcm(a, b):
 *     cdef Basic _a = sympify(a)             # <<<<<<<<<<<<<<
 *     cdef Basic _b = sympify(b)
 *     require(_a, Integer)
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4587, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_a};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4587, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 4587, __pyx_L1_error)
  __pyx_v__a = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4588
 * def lcm(a, b):
 *     cdef Basic _a = sympify(a)
 *     cdef Basic _b = sympify(b)             # <<<<<<<<<<<<<<
 *     require(_a, Integer)
 *     require(_b, Integer)
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4588, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_b};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4588, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 4588, __pyx_L1_error)
  __pyx_v__b = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4589
 *     cdef Basic _a = sympify(a)
 *     cdef Basic _b = sympify(b)
 *     require(_a, Integer)             # <<<<<<<<<<<<<<
 *     require(_b, Integer)
 *     return c2py(<rcp_const_basic>(symengine.lcm(deref(symengine.rcp_static_cast_Integer(_a.thisptr)),
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_require); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4589, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_Integer); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4589, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, ((PyObject *)__pyx_v__a), __pyx_t_5};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4589, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4590
 *     cdef Basic _b = sympify(b)
 *     require(_a, Integer)
 *     require(_b, Integer)             # <<<<<<<<<<<<<<
 *     return c2py(<rcp_const_basic>(symengine.lcm(deref(symengine.rcp_static_cast_Integer(_a.thisptr)),
 *         deref(symengine.rcp_static_cast_Integer(_b.thisptr)))))
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_require); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4590, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Integer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4590, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, ((PyObject *)__pyx_v__b), __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4590, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4591
 *     require(_a, Integer)
 *     require(_b, Integer)
 *     return c2py(<rcp_const_basic>(symengine.lcm(deref(symengine.rcp_static_cast_Integer(_a.thisptr)),             # <<<<<<<<<<<<<<
 *         deref(symengine.rcp_static_cast_Integer(_b.thisptr)))))
 * 
*/
  __Pyx_XDECREF(__pyx_r);

  /* "symengine/lib/symengine_wrapper.pyx":4592
 *     require(_b, Integer)
 *     return c2py(<rcp_const_basic>(symengine.lcm(deref(symengine.rcp_static_cast_Integer(_a.thisptr)),
 *         deref(symengine.rcp_static_cast_Integer(_b.thisptr)))))             # <<<<<<<<<<<<<<
 * 
 * def gcd_ext(a, b):
*/
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)SymEngine::lcm((*SymEngine::rcp_static_cast<const SymEngine::Integer>(__pyx_v__a->thisptr)), (*SymEngine::rcp_static_cast<const SymEngine::Integer>(__pyx_v__b->thisptr))))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4591, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4586
 *         deref(symengine.rcp_static_cast_Integer(_b.thisptr)))))
 * 
 * def lcm(a, b):             # <<<<<<<<<<<<<<
 *     cdef Basic _a = sympify(a)
 *     cdef Basic _b = sympify(b)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.lcm", __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;
}

/* "symengine/lib/symengine_wrapper.pyx":4594
 *         deref(symengine.rcp_static_cast_Integer(_b.thisptr)))))
 * 
 * def gcd_ext(a, b):             # <<<<<<<<<<<<<<
 *     cdef Basic _a = sympify(a)
 *     cdef Basic _b = sympify(b)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_117gcd_ext(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_117gcd_ext = {"gcd_ext", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_117gcd_ext, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_117gcd_ext(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_a = 0;
  PyObject *__pyx_v_b = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("gcd_ext (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_a,&__pyx_mstate_global->__pyx_n_u_b,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 4594, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4594, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4594, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "gcd_ext", 0) < (0)) __PYX_ERR(0, 4594, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("gcd_ext", 1, 2, 2, i); __PYX_ERR(0, 4594, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4594, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4594, __pyx_L3_error)
    }
    __pyx_v_a = values[0];
    __pyx_v_b = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("gcd_ext", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 4594, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.gcd_ext", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_116gcd_ext(__pyx_self, __pyx_v_a, __pyx_v_b);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_116gcd_ext(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_a, PyObject *__pyx_v_b) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v__a = 0;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v__b = 0;
  SymEngine::RCP<SymEngine::Integer const >  __pyx_v_g;
  SymEngine::RCP<SymEngine::Integer const >  __pyx_v_s;
  SymEngine::RCP<SymEngine::Integer const >  __pyx_v_t;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("gcd_ext", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4595
 * 
 * def gcd_ext(a, b):
 *     cdef Basic _a = sympify(a)             # <<<<<<<<<<<<<<
 *     cdef Basic _b = sympify(b)
 *     require(_a, Integer)
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4595, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_a};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4595, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 4595, __pyx_L1_error)
  __pyx_v__a = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4596
 * def gcd_ext(a, b):
 *     cdef Basic _a = sympify(a)
 *     cdef Basic _b = sympify(b)             # <<<<<<<<<<<<<<
 *     require(_a, Integer)
 *     require(_b, Integer)
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4596, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_b};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4596, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 4596, __pyx_L1_error)
  __pyx_v__b = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4597
 *     cdef Basic _a = sympify(a)
 *     cdef Basic _b = sympify(b)
 *     require(_a, Integer)             # <<<<<<<<<<<<<<
 *     require(_b, Integer)
 *     cdef RCP[const symengine.Integer] g, s, t
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_require); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4597, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_Integer); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4597, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, ((PyObject *)__pyx_v__a), __pyx_t_5};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4597, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4598
 *     cdef Basic _b = sympify(b)
 *     require(_a, Integer)
 *     require(_b, Integer)             # <<<<<<<<<<<<<<
 *     cdef RCP[const symengine.Integer] g, s, t
 *     symengine.gcd_ext(symengine.outArg_Integer(g), symengine.outArg_Integer(s), symengine.outArg_Integer(t),
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_require); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4598, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Integer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4598, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, ((PyObject *)__pyx_v__b), __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4598, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4600
 *     require(_b, Integer)
 *     cdef RCP[const symengine.Integer] g, s, t
 *     symengine.gcd_ext(symengine.outArg_Integer(g), symengine.outArg_Integer(s), symengine.outArg_Integer(t),             # <<<<<<<<<<<<<<
 *         deref(symengine.rcp_static_cast_Integer(_a.thisptr)), deref(symengine.rcp_static_cast_Integer(_b.thisptr)))
 *     return (c2py(<rcp_const_basic>s), c2py(<rcp_const_basic>t), c2py(<rcp_const_basic>g))
*/
  SymEngine::gcd_ext(SymEngine::outArg<SymEngine::RCP<const SymEngine::Integer>>(__pyx_v_g), SymEngine::outArg<SymEngine::RCP<const SymEngine::Integer>>(__pyx_v_s), SymEngine::outArg<SymEngine::RCP<const SymEngine::Integer>>(__pyx_v_t), (*SymEngine::rcp_static_cast<const SymEngine::Integer>(__pyx_v__a->thisptr)), (*SymEngine::rcp_static_cast<const SymEngine::Integer>(__pyx_v__b->thisptr)));

  /* "symengine/lib/symengine_wrapper.pyx":4602
 *     symengine.gcd_ext(symengine.outArg_Integer(g), symengine.outArg_Integer(s), symengine.outArg_Integer(t),
 *         deref(symengine.rcp_static_cast_Integer(_a.thisptr)), deref(symengine.rcp_static_cast_Integer(_b.thisptr)))
 *     return (c2py(<rcp_const_basic>s), c2py(<rcp_const_basic>t), c2py(<rcp_const_basic>g))             # <<<<<<<<<<<<<<
 * 
 * igcdex = gcd_ext
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)__pyx_v_s)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4602, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)__pyx_v_t)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4602, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)__pyx_v_g)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4602, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4602, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 4602, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_5);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5) != (0)) __PYX_ERR(0, 4602, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2) != (0)) __PYX_ERR(0, 4602, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_5 = 0;
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4594
 *         deref(symengine.rcp_static_cast_Integer(_b.thisptr)))))
 * 
 * def gcd_ext(a, b):             # <<<<<<<<<<<<<<
 *     cdef Basic _a = sympify(a)
 *     cdef Basic _b = sympify(b)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.gcd_ext", __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;
}

/* "symengine/lib/symengine_wrapper.pyx":4606
 * igcdex = gcd_ext
 * 
 * def mod(a, b):             # <<<<<<<<<<<<<<
 *     if b == 0:
 *         raise ZeroDivisionError
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_119mod(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_119mod = {"mod", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_119mod, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_119mod(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_a = 0;
  PyObject *__pyx_v_b = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("mod (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_a,&__pyx_mstate_global->__pyx_n_u_b,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 4606, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4606, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4606, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "mod", 0) < (0)) __PYX_ERR(0, 4606, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("mod", 1, 2, 2, i); __PYX_ERR(0, 4606, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4606, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4606, __pyx_L3_error)
    }
    __pyx_v_a = values[0];
    __pyx_v_b = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("mod", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 4606, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.mod", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_118mod(__pyx_self, __pyx_v_a, __pyx_v_b);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_118mod(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_a, PyObject *__pyx_v_b) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v__a = 0;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v__b = 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;
  size_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  SymEngine::RCP<SymEngine::Integer const >  __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("mod", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4607
 * 
 * def mod(a, b):
 *     if b == 0:             # <<<<<<<<<<<<<<
 *         raise ZeroDivisionError
 *     cdef Basic _a = sympify(a)
*/
  __pyx_t_1 = (__Pyx_PyLong_BoolEqObjC(__pyx_v_b, __pyx_mstate_global->__pyx_int_0, 0, 0)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 4607, __pyx_L1_error)
  if (unlikely(__pyx_t_1)) {

    /* "symengine/lib/symengine_wrapper.pyx":4608
 * def mod(a, b):
 *     if b == 0:
 *         raise ZeroDivisionError             # <<<<<<<<<<<<<<
 *     cdef Basic _a = sympify(a)
 *     cdef Basic _b = sympify(b)
*/
    __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_ZeroDivisionError))), 0, 0, 0);
    __PYX_ERR(0, 4608, __pyx_L1_error)

    /* "symengine/lib/symengine_wrapper.pyx":4607
 * 
 * def mod(a, b):
 *     if b == 0:             # <<<<<<<<<<<<<<
 *         raise ZeroDivisionError
 *     cdef Basic _a = sympify(a)
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":4609
 *     if b == 0:
 *         raise ZeroDivisionError
 *     cdef Basic _a = sympify(a)             # <<<<<<<<<<<<<<
 *     cdef Basic _b = sympify(b)
 *     require(_a, Integer)
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4609, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_a};
    __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4609, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 4609, __pyx_L1_error)
  __pyx_v__a = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4610
 *         raise ZeroDivisionError
 *     cdef Basic _a = sympify(a)
 *     cdef Basic _b = sympify(b)             # <<<<<<<<<<<<<<
 *     require(_a, Integer)
 *     require(_b, Integer)
*/
  __pyx_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4610, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_b};
    __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4610, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 4610, __pyx_L1_error)
  __pyx_v__b = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4611
 *     cdef Basic _a = sympify(a)
 *     cdef Basic _b = sympify(b)
 *     require(_a, Integer)             # <<<<<<<<<<<<<<
 *     require(_b, Integer)
 *     return c2py(<rcp_const_basic>(symengine.mod(deref(symengine.rcp_static_cast_Integer(_a.thisptr)),
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_require); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4611, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_Integer); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4611, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, ((PyObject *)__pyx_v__a), __pyx_t_6};
    __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4611, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4612
 *     cdef Basic _b = sympify(b)
 *     require(_a, Integer)
 *     require(_b, Integer)             # <<<<<<<<<<<<<<
 *     return c2py(<rcp_const_basic>(symengine.mod(deref(symengine.rcp_static_cast_Integer(_a.thisptr)),
 *         deref(symengine.rcp_static_cast_Integer(_b.thisptr)))))
*/
  __pyx_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_require); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4612, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Integer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4612, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_4, ((PyObject *)__pyx_v__b), __pyx_t_3};
    __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4612, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4613
 *     require(_a, Integer)
 *     require(_b, Integer)
 *     return c2py(<rcp_const_basic>(symengine.mod(deref(symengine.rcp_static_cast_Integer(_a.thisptr)),             # <<<<<<<<<<<<<<
 *         deref(symengine.rcp_static_cast_Integer(_b.thisptr)))))
 * 
*/
  __Pyx_XDECREF(__pyx_r);

  /* "symengine/lib/symengine_wrapper.pyx":4614
 *     require(_b, Integer)
 *     return c2py(<rcp_const_basic>(symengine.mod(deref(symengine.rcp_static_cast_Integer(_a.thisptr)),
 *         deref(symengine.rcp_static_cast_Integer(_b.thisptr)))))             # <<<<<<<<<<<<<<
 * 
 * def quotient(a, b):
*/
  try {
    __pyx_t_7 = SymEngine::mod_f((*SymEngine::rcp_static_cast<const SymEngine::Integer>(__pyx_v__a->thisptr)), (*SymEngine::rcp_static_cast<const SymEngine::Integer>(__pyx_v__b->thisptr)));
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 4613, __pyx_L1_error)
  }

  /* "symengine/lib/symengine_wrapper.pyx":4613
 *     require(_a, Integer)
 *     require(_b, Integer)
 *     return c2py(<rcp_const_basic>(symengine.mod(deref(symengine.rcp_static_cast_Integer(_a.thisptr)),             # <<<<<<<<<<<<<<
 *         deref(symengine.rcp_static_cast_Integer(_b.thisptr)))))
 * 
*/
  __pyx_t_2 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)__pyx_t_7)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4613, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4606
 * igcdex = gcd_ext
 * 
 * def mod(a, b):             # <<<<<<<<<<<<<<
 *     if b == 0:
 *         raise ZeroDivisionError
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.mod", __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;
}

/* "symengine/lib/symengine_wrapper.pyx":4616
 *         deref(symengine.rcp_static_cast_Integer(_b.thisptr)))))
 * 
 * def quotient(a, b):             # <<<<<<<<<<<<<<
 *     if b == 0:
 *         raise ZeroDivisionError
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_121quotient(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_121quotient = {"quotient", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_121quotient, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_121quotient(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_a = 0;
  PyObject *__pyx_v_b = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("quotient (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_a,&__pyx_mstate_global->__pyx_n_u_b,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 4616, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4616, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4616, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "quotient", 0) < (0)) __PYX_ERR(0, 4616, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("quotient", 1, 2, 2, i); __PYX_ERR(0, 4616, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4616, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4616, __pyx_L3_error)
    }
    __pyx_v_a = values[0];
    __pyx_v_b = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("quotient", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 4616, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.quotient", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_120quotient(__pyx_self, __pyx_v_a, __pyx_v_b);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_120quotient(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_a, PyObject *__pyx_v_b) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v__a = 0;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v__b = 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;
  size_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  SymEngine::RCP<SymEngine::Integer const >  __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("quotient", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4617
 * 
 * def quotient(a, b):
 *     if b == 0:             # <<<<<<<<<<<<<<
 *         raise ZeroDivisionError
 *     cdef Basic _a = sympify(a)
*/
  __pyx_t_1 = (__Pyx_PyLong_BoolEqObjC(__pyx_v_b, __pyx_mstate_global->__pyx_int_0, 0, 0)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 4617, __pyx_L1_error)
  if (unlikely(__pyx_t_1)) {

    /* "symengine/lib/symengine_wrapper.pyx":4618
 * def quotient(a, b):
 *     if b == 0:
 *         raise ZeroDivisionError             # <<<<<<<<<<<<<<
 *     cdef Basic _a = sympify(a)
 *     cdef Basic _b = sympify(b)
*/
    __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_ZeroDivisionError))), 0, 0, 0);
    __PYX_ERR(0, 4618, __pyx_L1_error)

    /* "symengine/lib/symengine_wrapper.pyx":4617
 * 
 * def quotient(a, b):
 *     if b == 0:             # <<<<<<<<<<<<<<
 *         raise ZeroDivisionError
 *     cdef Basic _a = sympify(a)
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":4619
 *     if b == 0:
 *         raise ZeroDivisionError
 *     cdef Basic _a = sympify(a)             # <<<<<<<<<<<<<<
 *     cdef Basic _b = sympify(b)
 *     require(_a, Integer)
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4619, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_a};
    __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4619, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 4619, __pyx_L1_error)
  __pyx_v__a = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4620
 *         raise ZeroDivisionError
 *     cdef Basic _a = sympify(a)
 *     cdef Basic _b = sympify(b)             # <<<<<<<<<<<<<<
 *     require(_a, Integer)
 *     require(_b, Integer)
*/
  __pyx_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4620, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_b};
    __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4620, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 4620, __pyx_L1_error)
  __pyx_v__b = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4621
 *     cdef Basic _a = sympify(a)
 *     cdef Basic _b = sympify(b)
 *     require(_a, Integer)             # <<<<<<<<<<<<<<
 *     require(_b, Integer)
 *     return c2py(<rcp_const_basic>(symengine.quotient(deref(symengine.rcp_static_cast_Integer(_a.thisptr)),
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_require); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4621, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_Integer); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4621, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, ((PyObject *)__pyx_v__a), __pyx_t_6};
    __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4621, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4622
 *     cdef Basic _b = sympify(b)
 *     require(_a, Integer)
 *     require(_b, Integer)             # <<<<<<<<<<<<<<
 *     return c2py(<rcp_const_basic>(symengine.quotient(deref(symengine.rcp_static_cast_Integer(_a.thisptr)),
 *         deref(symengine.rcp_static_cast_Integer(_b.thisptr)))))
*/
  __pyx_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_require); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4622, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Integer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4622, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_4, ((PyObject *)__pyx_v__b), __pyx_t_3};
    __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4622, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4623
 *     require(_a, Integer)
 *     require(_b, Integer)
 *     return c2py(<rcp_const_basic>(symengine.quotient(deref(symengine.rcp_static_cast_Integer(_a.thisptr)),             # <<<<<<<<<<<<<<
 *         deref(symengine.rcp_static_cast_Integer(_b.thisptr)))))
 * 
*/
  __Pyx_XDECREF(__pyx_r);

  /* "symengine/lib/symengine_wrapper.pyx":4624
 *     require(_b, Integer)
 *     return c2py(<rcp_const_basic>(symengine.quotient(deref(symengine.rcp_static_cast_Integer(_a.thisptr)),
 *         deref(symengine.rcp_static_cast_Integer(_b.thisptr)))))             # <<<<<<<<<<<<<<
 * 
 * def quotient_mod(a, b):
*/
  try {
    __pyx_t_7 = SymEngine::quotient_f((*SymEngine::rcp_static_cast<const SymEngine::Integer>(__pyx_v__a->thisptr)), (*SymEngine::rcp_static_cast<const SymEngine::Integer>(__pyx_v__b->thisptr)));
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 4623, __pyx_L1_error)
  }

  /* "symengine/lib/symengine_wrapper.pyx":4623
 *     require(_a, Integer)
 *     require(_b, Integer)
 *     return c2py(<rcp_const_basic>(symengine.quotient(deref(symengine.rcp_static_cast_Integer(_a.thisptr)),             # <<<<<<<<<<<<<<
 *         deref(symengine.rcp_static_cast_Integer(_b.thisptr)))))
 * 
*/
  __pyx_t_2 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)__pyx_t_7)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4623, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4616
 *         deref(symengine.rcp_static_cast_Integer(_b.thisptr)))))
 * 
 * def quotient(a, b):             # <<<<<<<<<<<<<<
 *     if b == 0:
 *         raise ZeroDivisionError
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.quotient", __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;
}

/* "symengine/lib/symengine_wrapper.pyx":4626
 *         deref(symengine.rcp_static_cast_Integer(_b.thisptr)))))
 * 
 * def quotient_mod(a, b):             # <<<<<<<<<<<<<<
 *     if b == 0:
 *         raise ZeroDivisionError
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_123quotient_mod(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_123quotient_mod = {"quotient_mod", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_123quotient_mod, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_123quotient_mod(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_a = 0;
  PyObject *__pyx_v_b = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("quotient_mod (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_a,&__pyx_mstate_global->__pyx_n_u_b,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 4626, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4626, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4626, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "quotient_mod", 0) < (0)) __PYX_ERR(0, 4626, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("quotient_mod", 1, 2, 2, i); __PYX_ERR(0, 4626, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4626, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4626, __pyx_L3_error)
    }
    __pyx_v_a = values[0];
    __pyx_v_b = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("quotient_mod", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 4626, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.quotient_mod", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_122quotient_mod(__pyx_self, __pyx_v_a, __pyx_v_b);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_122quotient_mod(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_a, PyObject *__pyx_v_b) {
  SymEngine::RCP<SymEngine::Integer const >  __pyx_v_q;
  SymEngine::RCP<SymEngine::Integer const >  __pyx_v_r;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v__a = 0;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v__b = 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;
  size_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("quotient_mod", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4627
 * 
 * def quotient_mod(a, b):
 *     if b == 0:             # <<<<<<<<<<<<<<
 *         raise ZeroDivisionError
 *     cdef RCP[const symengine.Integer] q, r
*/
  __pyx_t_1 = (__Pyx_PyLong_BoolEqObjC(__pyx_v_b, __pyx_mstate_global->__pyx_int_0, 0, 0)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 4627, __pyx_L1_error)
  if (unlikely(__pyx_t_1)) {

    /* "symengine/lib/symengine_wrapper.pyx":4628
 * def quotient_mod(a, b):
 *     if b == 0:
 *         raise ZeroDivisionError             # <<<<<<<<<<<<<<
 *     cdef RCP[const symengine.Integer] q, r
 *     cdef Basic _a = sympify(a)
*/
    __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_ZeroDivisionError))), 0, 0, 0);
    __PYX_ERR(0, 4628, __pyx_L1_error)

    /* "symengine/lib/symengine_wrapper.pyx":4627
 * 
 * def quotient_mod(a, b):
 *     if b == 0:             # <<<<<<<<<<<<<<
 *         raise ZeroDivisionError
 *     cdef RCP[const symengine.Integer] q, r
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":4630
 *         raise ZeroDivisionError
 *     cdef RCP[const symengine.Integer] q, r
 *     cdef Basic _a = sympify(a)             # <<<<<<<<<<<<<<
 *     cdef Basic _b = sympify(b)
 *     require(_a, Integer)
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4630, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_a};
    __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4630, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 4630, __pyx_L1_error)
  __pyx_v__a = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4631
 *     cdef RCP[const symengine.Integer] q, r
 *     cdef Basic _a = sympify(a)
 *     cdef Basic _b = sympify(b)             # <<<<<<<<<<<<<<
 *     require(_a, Integer)
 *     require(_b, Integer)
*/
  __pyx_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4631, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_b};
    __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4631, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 4631, __pyx_L1_error)
  __pyx_v__b = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4632
 *     cdef Basic _a = sympify(a)
 *     cdef Basic _b = sympify(b)
 *     require(_a, Integer)             # <<<<<<<<<<<<<<
 *     require(_b, Integer)
 *     symengine.quotient_mod(symengine.outArg_Integer(q), symengine.outArg_Integer(r),
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_require); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4632, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_Integer); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4632, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, ((PyObject *)__pyx_v__a), __pyx_t_6};
    __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4632, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4633
 *     cdef Basic _b = sympify(b)
 *     require(_a, Integer)
 *     require(_b, Integer)             # <<<<<<<<<<<<<<
 *     symengine.quotient_mod(symengine.outArg_Integer(q), symengine.outArg_Integer(r),
 *         deref(symengine.rcp_static_cast_Integer(_a.thisptr)), deref(symengine.rcp_static_cast_Integer(_b.thisptr)))
*/
  __pyx_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_require); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4633, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Integer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4633, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_4, ((PyObject *)__pyx_v__b), __pyx_t_3};
    __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4633, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4634
 *     require(_a, Integer)
 *     require(_b, Integer)
 *     symengine.quotient_mod(symengine.outArg_Integer(q), symengine.outArg_Integer(r),             # <<<<<<<<<<<<<<
 *         deref(symengine.rcp_static_cast_Integer(_a.thisptr)), deref(symengine.rcp_static_cast_Integer(_b.thisptr)))
 *     return (c2py(<rcp_const_basic>q), c2py(<rcp_const_basic>r))
*/
  try {
    SymEngine::quotient_mod_f(SymEngine::outArg<SymEngine::RCP<const SymEngine::Integer>>(__pyx_v_q), SymEngine::outArg<SymEngine::RCP<const SymEngine::Integer>>(__pyx_v_r), (*SymEngine::rcp_static_cast<const SymEngine::Integer>(__pyx_v__a->thisptr)), (*SymEngine::rcp_static_cast<const SymEngine::Integer>(__pyx_v__b->thisptr)));
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 4634, __pyx_L1_error)
  }

  /* "symengine/lib/symengine_wrapper.pyx":4636
 *     symengine.quotient_mod(symengine.outArg_Integer(q), symengine.outArg_Integer(r),
 *         deref(symengine.rcp_static_cast_Integer(_a.thisptr)), deref(symengine.rcp_static_cast_Integer(_b.thisptr)))
 *     return (c2py(<rcp_const_basic>q), c2py(<rcp_const_basic>r))             # <<<<<<<<<<<<<<
 * 
 * def mod_inverse(a, b):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)__pyx_v_q)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4636, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)__pyx_v_r)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4636, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4636, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2) != (0)) __PYX_ERR(0, 4636, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_6);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_6) != (0)) __PYX_ERR(0, 4636, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_t_6 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4626
 *         deref(symengine.rcp_static_cast_Integer(_b.thisptr)))))
 * 
 * def quotient_mod(a, b):             # <<<<<<<<<<<<<<
 *     if b == 0:
 *         raise ZeroDivisionError
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.quotient_mod", __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;
}

/* "symengine/lib/symengine_wrapper.pyx":4638
 *     return (c2py(<rcp_const_basic>q), c2py(<rcp_const_basic>r))
 * 
 * def mod_inverse(a, b):             # <<<<<<<<<<<<<<
 *     cdef RCP[const symengine.Integer] inv
 *     cdef Basic _a = sympify(a)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_125mod_inverse(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_125mod_inverse = {"mod_inverse", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_125mod_inverse, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_125mod_inverse(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_a = 0;
  PyObject *__pyx_v_b = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("mod_inverse (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_a,&__pyx_mstate_global->__pyx_n_u_b,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 4638, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4638, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4638, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "mod_inverse", 0) < (0)) __PYX_ERR(0, 4638, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("mod_inverse", 1, 2, 2, i); __PYX_ERR(0, 4638, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4638, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4638, __pyx_L3_error)
    }
    __pyx_v_a = values[0];
    __pyx_v_b = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("mod_inverse", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 4638, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.mod_inverse", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_124mod_inverse(__pyx_self, __pyx_v_a, __pyx_v_b);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_124mod_inverse(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_a, PyObject *__pyx_v_b) {
  SymEngine::RCP<SymEngine::Integer const >  __pyx_v_inv;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v__a = 0;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v__b = 0;
  int __pyx_v_ret_val;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("mod_inverse", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4640
 * def mod_inverse(a, b):
 *     cdef RCP[const symengine.Integer] inv
 *     cdef Basic _a = sympify(a)             # <<<<<<<<<<<<<<
 *     cdef Basic _b = sympify(b)
 *     require(_a, Integer)
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4640, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_a};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4640, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 4640, __pyx_L1_error)
  __pyx_v__a = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4641
 *     cdef RCP[const symengine.Integer] inv
 *     cdef Basic _a = sympify(a)
 *     cdef Basic _b = sympify(b)             # <<<<<<<<<<<<<<
 *     require(_a, Integer)
 *     require(_b, Integer)
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4641, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_b};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4641, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 4641, __pyx_L1_error)
  __pyx_v__b = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4642
 *     cdef Basic _a = sympify(a)
 *     cdef Basic _b = sympify(b)
 *     require(_a, Integer)             # <<<<<<<<<<<<<<
 *     require(_b, Integer)
 *     cdef int ret_val = symengine.mod_inverse(symengine.outArg_Integer(inv),
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_require); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4642, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_Integer); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4642, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, ((PyObject *)__pyx_v__a), __pyx_t_5};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4642, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4643
 *     cdef Basic _b = sympify(b)
 *     require(_a, Integer)
 *     require(_b, Integer)             # <<<<<<<<<<<<<<
 *     cdef int ret_val = symengine.mod_inverse(symengine.outArg_Integer(inv),
 *         deref(symengine.rcp_static_cast_Integer(_a.thisptr)), deref(symengine.rcp_static_cast_Integer(_b.thisptr)))
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_require); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4643, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Integer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4643, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, ((PyObject *)__pyx_v__b), __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4643, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4644
 *     require(_a, Integer)
 *     require(_b, Integer)
 *     cdef int ret_val = symengine.mod_inverse(symengine.outArg_Integer(inv),             # <<<<<<<<<<<<<<
 *         deref(symengine.rcp_static_cast_Integer(_a.thisptr)), deref(symengine.rcp_static_cast_Integer(_b.thisptr)))
 *     if ret_val == 0:
*/
  __pyx_v_ret_val = SymEngine::mod_inverse(SymEngine::outArg<SymEngine::RCP<const SymEngine::Integer>>(__pyx_v_inv), (*SymEngine::rcp_static_cast<const SymEngine::Integer>(__pyx_v__a->thisptr)), (*SymEngine::rcp_static_cast<const SymEngine::Integer>(__pyx_v__b->thisptr)));

  /* "symengine/lib/symengine_wrapper.pyx":4646
 *     cdef int ret_val = symengine.mod_inverse(symengine.outArg_Integer(inv),
 *         deref(symengine.rcp_static_cast_Integer(_a.thisptr)), deref(symengine.rcp_static_cast_Integer(_b.thisptr)))
 *     if ret_val == 0:             # <<<<<<<<<<<<<<
 *         return None
 *     return c2py(<rcp_const_basic>inv)
*/
  __pyx_t_6 = (__pyx_v_ret_val == 0);
  if (__pyx_t_6) {

    /* "symengine/lib/symengine_wrapper.pyx":4647
 *         deref(symengine.rcp_static_cast_Integer(_a.thisptr)), deref(symengine.rcp_static_cast_Integer(_b.thisptr)))
 *     if ret_val == 0:
 *         return None             # <<<<<<<<<<<<<<
 *     return c2py(<rcp_const_basic>inv)
 * 
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":4646
 *     cdef int ret_val = symengine.mod_inverse(symengine.outArg_Integer(inv),
 *         deref(symengine.rcp_static_cast_Integer(_a.thisptr)), deref(symengine.rcp_static_cast_Integer(_b.thisptr)))
 *     if ret_val == 0:             # <<<<<<<<<<<<<<
 *         return None
 *     return c2py(<rcp_const_basic>inv)
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":4648
 *     if ret_val == 0:
 *         return None
 *     return c2py(<rcp_const_basic>inv)             # <<<<<<<<<<<<<<
 * 
 * def crt(rem, mod):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)__pyx_v_inv)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4648, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4638
 *     return (c2py(<rcp_const_basic>q), c2py(<rcp_const_basic>r))
 * 
 * def mod_inverse(a, b):             # <<<<<<<<<<<<<<
 *     cdef RCP[const symengine.Integer] inv
 *     cdef Basic _a = sympify(a)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.mod_inverse", __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;
}

/* "symengine/lib/symengine_wrapper.pyx":4650
 *     return c2py(<rcp_const_basic>inv)
 * 
 * def crt(rem, mod):             # <<<<<<<<<<<<<<
 *     cdef symengine.vec_integer _rem, _mod
 *     cdef Basic _a
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_127crt(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_127crt = {"crt", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_127crt, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_127crt(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_rem = 0;
  PyObject *__pyx_v_mod = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("crt (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_rem,&__pyx_mstate_global->__pyx_n_u_mod,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 4650, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4650, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4650, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "crt", 0) < (0)) __PYX_ERR(0, 4650, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("crt", 1, 2, 2, i); __PYX_ERR(0, 4650, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4650, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4650, __pyx_L3_error)
    }
    __pyx_v_rem = values[0];
    __pyx_v_mod = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("crt", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 4650, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.crt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_126crt(__pyx_self, __pyx_v_rem, __pyx_v_mod);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_126crt(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_rem, PyObject *__pyx_v_mod) {
  SymEngine::vec_integer __pyx_v__rem;
  SymEngine::vec_integer __pyx_v__mod;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v__a = 0;
  bool __pyx_v_ret_val;
  Py_ssize_t __pyx_v_i;
  SymEngine::RCP<SymEngine::Integer const >  __pyx_v_c;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("crt", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4654
 *     cdef Basic _a
 *     cdef cppbool ret_val
 *     for i in range(len(rem)):             # <<<<<<<<<<<<<<
 *         _a = sympify(rem[i])
 *         require(_a, Integer)
*/
  __pyx_t_1 = PyObject_Length(__pyx_v_rem); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 4654, __pyx_L1_error)
  __pyx_t_2 = __pyx_t_1;
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
    __pyx_v_i = __pyx_t_3;

    /* "symengine/lib/symengine_wrapper.pyx":4655
 *     cdef cppbool ret_val
 *     for i in range(len(rem)):
 *         _a = sympify(rem[i])             # <<<<<<<<<<<<<<
 *         require(_a, Integer)
 *         _rem.push_back(symengine.rcp_static_cast_Integer(_a.thisptr))
*/
    __pyx_t_5 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4655, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_rem, __pyx_v_i, Py_ssize_t, 1, PyLong_FromSsize_t, 0, 1, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4655, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
      assert(__pyx_t_5);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
      __pyx_t_8 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_7};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4655, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 4655, __pyx_L1_error)
    __Pyx_XDECREF_SET(__pyx_v__a, ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":4656
 *     for i in range(len(rem)):
 *         _a = sympify(rem[i])
 *         require(_a, Integer)             # <<<<<<<<<<<<<<
 *         _rem.push_back(symengine.rcp_static_cast_Integer(_a.thisptr))
 *         _a = sympify(mod[i])
*/
    __pyx_t_6 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_require); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4656, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_Integer); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4656, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_8 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
      assert(__pyx_t_6);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
      __pyx_t_8 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_6, ((PyObject *)__pyx_v__a), __pyx_t_5};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (3-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4656, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":4657
 *         _a = sympify(rem[i])
 *         require(_a, Integer)
 *         _rem.push_back(symengine.rcp_static_cast_Integer(_a.thisptr))             # <<<<<<<<<<<<<<
 *         _a = sympify(mod[i])
 *         require(_a, Integer)
*/
    try {
      __pyx_v__rem.push_back(SymEngine::rcp_static_cast<const SymEngine::Integer>(__pyx_v__a->thisptr));
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(0, 4657, __pyx_L1_error)
    }

    /* "symengine/lib/symengine_wrapper.pyx":4658
 *         require(_a, Integer)
 *         _rem.push_back(symengine.rcp_static_cast_Integer(_a.thisptr))
 *         _a = sympify(mod[i])             # <<<<<<<<<<<<<<
 *         require(_a, Integer)
 *         _mod.push_back(symengine.rcp_static_cast_Integer(_a.thisptr))
*/
    __pyx_t_7 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4658, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_mod, __pyx_v_i, Py_ssize_t, 1, PyLong_FromSsize_t, 0, 1, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4658, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
      assert(__pyx_t_7);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
      __pyx_t_8 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_6};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4658, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 4658, __pyx_L1_error)
    __Pyx_DECREF_SET(__pyx_v__a, ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":4659
 *         _rem.push_back(symengine.rcp_static_cast_Integer(_a.thisptr))
 *         _a = sympify(mod[i])
 *         require(_a, Integer)             # <<<<<<<<<<<<<<
 *         _mod.push_back(symengine.rcp_static_cast_Integer(_a.thisptr))
 * 
*/
    __pyx_t_5 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_require); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4659, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_Integer); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4659, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
      assert(__pyx_t_5);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
      __pyx_t_8 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_5, ((PyObject *)__pyx_v__a), __pyx_t_7};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_8, (3-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4659, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":4660
 *         _a = sympify(mod[i])
 *         require(_a, Integer)
 *         _mod.push_back(symengine.rcp_static_cast_Integer(_a.thisptr))             # <<<<<<<<<<<<<<
 * 
 *     cdef RCP[const symengine.Integer] c
*/
    try {
      __pyx_v__mod.push_back(SymEngine::rcp_static_cast<const SymEngine::Integer>(__pyx_v__a->thisptr));
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(0, 4660, __pyx_L1_error)
    }
  }

  /* "symengine/lib/symengine_wrapper.pyx":4663
 * 
 *     cdef RCP[const symengine.Integer] c
 *     ret_val = symengine.crt(symengine.outArg_Integer(c), _rem, _mod)             # <<<<<<<<<<<<<<
 *     if not ret_val:
 *         return None
*/
  __pyx_v_ret_val = SymEngine::crt(SymEngine::outArg<SymEngine::RCP<const SymEngine::Integer>>(__pyx_v_c), __pyx_v__rem, __pyx_v__mod);

  /* "symengine/lib/symengine_wrapper.pyx":4664
 *     cdef RCP[const symengine.Integer] c
 *     ret_val = symengine.crt(symengine.outArg_Integer(c), _rem, _mod)
 *     if not ret_val:             # <<<<<<<<<<<<<<
 *         return None
 *     return c2py(<rcp_const_basic>c)
*/
  __pyx_t_9 = (!(__pyx_v_ret_val != 0));
  if (__pyx_t_9) {

    /* "symengine/lib/symengine_wrapper.pyx":4665
 *     ret_val = symengine.crt(symengine.outArg_Integer(c), _rem, _mod)
 *     if not ret_val:
 *         return None             # <<<<<<<<<<<<<<
 *     return c2py(<rcp_const_basic>c)
 * 
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":4664
 *     cdef RCP[const symengine.Integer] c
 *     ret_val = symengine.crt(symengine.outArg_Integer(c), _rem, _mod)
 *     if not ret_val:             # <<<<<<<<<<<<<<
 *         return None
 *     return c2py(<rcp_const_basic>c)
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":4666
 *     if not ret_val:
 *         return None
 *     return c2py(<rcp_const_basic>c)             # <<<<<<<<<<<<<<
 * 
 * def fibonacci(n):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)__pyx_v_c)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4666, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4650
 *     return c2py(<rcp_const_basic>inv)
 * 
 * def crt(rem, mod):             # <<<<<<<<<<<<<<
 *     cdef symengine.vec_integer _rem, _mod
 *     cdef Basic _a
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.crt", __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;
}

/* "symengine/lib/symengine_wrapper.pyx":4668
 *     return c2py(<rcp_const_basic>c)
 * 
 * def fibonacci(n):             # <<<<<<<<<<<<<<
 *     if n < 0 :
 *         raise NotImplementedError
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_129fibonacci(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_129fibonacci = {"fibonacci", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_129fibonacci, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_129fibonacci(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_n = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("fibonacci (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_n,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 4668, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4668, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "fibonacci", 0) < (0)) __PYX_ERR(0, 4668, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("fibonacci", 1, 1, 1, i); __PYX_ERR(0, 4668, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4668, __pyx_L3_error)
    }
    __pyx_v_n = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("fibonacci", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4668, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.fibonacci", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_128fibonacci(__pyx_self, __pyx_v_n);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_128fibonacci(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_n) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  unsigned long __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("fibonacci", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4669
 * 
 * def fibonacci(n):
 *     if n < 0 :             # <<<<<<<<<<<<<<
 *         raise NotImplementedError
 *     return c2py(<rcp_const_basic>(symengine.fibonacci(n)))
*/
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_n, __pyx_mstate_global->__pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4669, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 4669, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(__pyx_t_2)) {

    /* "symengine/lib/symengine_wrapper.pyx":4670
 * def fibonacci(n):
 *     if n < 0 :
 *         raise NotImplementedError             # <<<<<<<<<<<<<<
 *     return c2py(<rcp_const_basic>(symengine.fibonacci(n)))
 * 
*/
    __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_NotImplementedError))), 0, 0, 0);
    __PYX_ERR(0, 4670, __pyx_L1_error)

    /* "symengine/lib/symengine_wrapper.pyx":4669
 * 
 * def fibonacci(n):
 *     if n < 0 :             # <<<<<<<<<<<<<<
 *         raise NotImplementedError
 *     return c2py(<rcp_const_basic>(symengine.fibonacci(n)))
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":4671
 *     if n < 0 :
 *         raise NotImplementedError
 *     return c2py(<rcp_const_basic>(symengine.fibonacci(n)))             # <<<<<<<<<<<<<<
 * 
 * def fibonacci2(n):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyLong_As_unsigned_long(__pyx_v_n); if (unlikely((__pyx_t_3 == (unsigned long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4671, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)SymEngine::fibonacci(__pyx_t_3))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4671, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4668
 *     return c2py(<rcp_const_basic>c)
 * 
 * def fibonacci(n):             # <<<<<<<<<<<<<<
 *     if n < 0 :
 *         raise NotImplementedError
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.fibonacci", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4673
 *     return c2py(<rcp_const_basic>(symengine.fibonacci(n)))
 * 
 * def fibonacci2(n):             # <<<<<<<<<<<<<<
 *     if n < 0 :
 *         raise NotImplementedError
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_131fibonacci2(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_131fibonacci2 = {"fibonacci2", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_131fibonacci2, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_131fibonacci2(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_n = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("fibonacci2 (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_n,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 4673, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4673, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "fibonacci2", 0) < (0)) __PYX_ERR(0, 4673, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("fibonacci2", 1, 1, 1, i); __PYX_ERR(0, 4673, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4673, __pyx_L3_error)
    }
    __pyx_v_n = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("fibonacci2", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4673, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.fibonacci2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_130fibonacci2(__pyx_self, __pyx_v_n);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_130fibonacci2(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_n) {
  SymEngine::RCP<SymEngine::Integer const >  __pyx_v_f1;
  SymEngine::RCP<SymEngine::Integer const >  __pyx_v_f2;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  unsigned long __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("fibonacci2", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4674
 * 
 * def fibonacci2(n):
 *     if n < 0 :             # <<<<<<<<<<<<<<
 *         raise NotImplementedError
 *     cdef RCP[const symengine.Integer] f1, f2
*/
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_n, __pyx_mstate_global->__pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4674, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 4674, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(__pyx_t_2)) {

    /* "symengine/lib/symengine_wrapper.pyx":4675
 * def fibonacci2(n):
 *     if n < 0 :
 *         raise NotImplementedError             # <<<<<<<<<<<<<<
 *     cdef RCP[const symengine.Integer] f1, f2
 *     symengine.fibonacci2(symengine.outArg_Integer(f1), symengine.outArg_Integer(f2), n)
*/
    __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_NotImplementedError))), 0, 0, 0);
    __PYX_ERR(0, 4675, __pyx_L1_error)

    /* "symengine/lib/symengine_wrapper.pyx":4674
 * 
 * def fibonacci2(n):
 *     if n < 0 :             # <<<<<<<<<<<<<<
 *         raise NotImplementedError
 *     cdef RCP[const symengine.Integer] f1, f2
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":4677
 *         raise NotImplementedError
 *     cdef RCP[const symengine.Integer] f1, f2
 *     symengine.fibonacci2(symengine.outArg_Integer(f1), symengine.outArg_Integer(f2), n)             # <<<<<<<<<<<<<<
 *     return [c2py(<rcp_const_basic>f1), c2py(<rcp_const_basic>f2)]
 * 
*/
  __pyx_t_3 = __Pyx_PyLong_As_unsigned_long(__pyx_v_n); if (unlikely((__pyx_t_3 == (unsigned long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4677, __pyx_L1_error)
  SymEngine::fibonacci2(SymEngine::outArg<SymEngine::RCP<const SymEngine::Integer>>(__pyx_v_f1), SymEngine::outArg<SymEngine::RCP<const SymEngine::Integer>>(__pyx_v_f2), __pyx_t_3);

  /* "symengine/lib/symengine_wrapper.pyx":4678
 *     cdef RCP[const symengine.Integer] f1, f2
 *     symengine.fibonacci2(symengine.outArg_Integer(f1), symengine.outArg_Integer(f2), n)
 *     return [c2py(<rcp_const_basic>f1), c2py(<rcp_const_basic>f2)]             # <<<<<<<<<<<<<<
 * 
 * def lucas(n):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)__pyx_v_f1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4678, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)__pyx_v_f2)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4678, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyList_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4678, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 4678, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_4);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 1, __pyx_t_4) != (0)) __PYX_ERR(0, 4678, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_4 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4673
 *     return c2py(<rcp_const_basic>(symengine.fibonacci(n)))
 * 
 * def fibonacci2(n):             # <<<<<<<<<<<<<<
 *     if n < 0 :
 *         raise NotImplementedError
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.fibonacci2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4680
 *     return [c2py(<rcp_const_basic>f1), c2py(<rcp_const_basic>f2)]
 * 
 * def lucas(n):             # <<<<<<<<<<<<<<
 *     if n < 0 :
 *         raise NotImplementedError
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_133lucas(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_133lucas = {"lucas", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_133lucas, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_133lucas(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_n = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lucas (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_n,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 4680, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4680, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "lucas", 0) < (0)) __PYX_ERR(0, 4680, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("lucas", 1, 1, 1, i); __PYX_ERR(0, 4680, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4680, __pyx_L3_error)
    }
    __pyx_v_n = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("lucas", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4680, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.lucas", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_132lucas(__pyx_self, __pyx_v_n);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_132lucas(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_n) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  unsigned long __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("lucas", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4681
 * 
 * def lucas(n):
 *     if n < 0 :             # <<<<<<<<<<<<<<
 *         raise NotImplementedError
 *     return c2py(<rcp_const_basic>(symengine.lucas(n)))
*/
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_n, __pyx_mstate_global->__pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4681, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 4681, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(__pyx_t_2)) {

    /* "symengine/lib/symengine_wrapper.pyx":4682
 * def lucas(n):
 *     if n < 0 :
 *         raise NotImplementedError             # <<<<<<<<<<<<<<
 *     return c2py(<rcp_const_basic>(symengine.lucas(n)))
 * 
*/
    __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_NotImplementedError))), 0, 0, 0);
    __PYX_ERR(0, 4682, __pyx_L1_error)

    /* "symengine/lib/symengine_wrapper.pyx":4681
 * 
 * def lucas(n):
 *     if n < 0 :             # <<<<<<<<<<<<<<
 *         raise NotImplementedError
 *     return c2py(<rcp_const_basic>(symengine.lucas(n)))
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":4683
 *     if n < 0 :
 *         raise NotImplementedError
 *     return c2py(<rcp_const_basic>(symengine.lucas(n)))             # <<<<<<<<<<<<<<
 * 
 * def lucas2(n):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyLong_As_unsigned_long(__pyx_v_n); if (unlikely((__pyx_t_3 == (unsigned long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4683, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)SymEngine::lucas(__pyx_t_3))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4683, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4680
 *     return [c2py(<rcp_const_basic>f1), c2py(<rcp_const_basic>f2)]
 * 
 * def lucas(n):             # <<<<<<<<<<<<<<
 *     if n < 0 :
 *         raise NotImplementedError
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.lucas", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4685
 *     return c2py(<rcp_const_basic>(symengine.lucas(n)))
 * 
 * def lucas2(n):             # <<<<<<<<<<<<<<
 *     if n < 0 :
 *         raise NotImplementedError
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_135lucas2(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_135lucas2 = {"lucas2", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_135lucas2, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_135lucas2(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_n = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lucas2 (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_n,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 4685, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4685, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "lucas2", 0) < (0)) __PYX_ERR(0, 4685, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("lucas2", 1, 1, 1, i); __PYX_ERR(0, 4685, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4685, __pyx_L3_error)
    }
    __pyx_v_n = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("lucas2", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4685, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.lucas2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_134lucas2(__pyx_self, __pyx_v_n);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_134lucas2(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_n) {
  SymEngine::RCP<SymEngine::Integer const >  __pyx_v_f1;
  SymEngine::RCP<SymEngine::Integer const >  __pyx_v_f2;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  unsigned long __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("lucas2", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4686
 * 
 * def lucas2(n):
 *     if n < 0 :             # <<<<<<<<<<<<<<
 *         raise NotImplementedError
 *     cdef RCP[const symengine.Integer] f1, f2
*/
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_n, __pyx_mstate_global->__pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4686, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 4686, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(__pyx_t_2)) {

    /* "symengine/lib/symengine_wrapper.pyx":4687
 * def lucas2(n):
 *     if n < 0 :
 *         raise NotImplementedError             # <<<<<<<<<<<<<<
 *     cdef RCP[const symengine.Integer] f1, f2
 *     symengine.lucas2(symengine.outArg_Integer(f1), symengine.outArg_Integer(f2), n)
*/
    __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_NotImplementedError))), 0, 0, 0);
    __PYX_ERR(0, 4687, __pyx_L1_error)

    /* "symengine/lib/symengine_wrapper.pyx":4686
 * 
 * def lucas2(n):
 *     if n < 0 :             # <<<<<<<<<<<<<<
 *         raise NotImplementedError
 *     cdef RCP[const symengine.Integer] f1, f2
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":4689
 *         raise NotImplementedError
 *     cdef RCP[const symengine.Integer] f1, f2
 *     symengine.lucas2(symengine.outArg_Integer(f1), symengine.outArg_Integer(f2), n)             # <<<<<<<<<<<<<<
 *     return [c2py(<rcp_const_basic>f1), c2py(<rcp_const_basic>f2)]
 * 
*/
  __pyx_t_3 = __Pyx_PyLong_As_unsigned_long(__pyx_v_n); if (unlikely((__pyx_t_3 == (unsigned long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4689, __pyx_L1_error)
  SymEngine::lucas2(SymEngine::outArg<SymEngine::RCP<const SymEngine::Integer>>(__pyx_v_f1), SymEngine::outArg<SymEngine::RCP<const SymEngine::Integer>>(__pyx_v_f2), __pyx_t_3);

  /* "symengine/lib/symengine_wrapper.pyx":4690
 *     cdef RCP[const symengine.Integer] f1, f2
 *     symengine.lucas2(symengine.outArg_Integer(f1), symengine.outArg_Integer(f2), n)
 *     return [c2py(<rcp_const_basic>f1), c2py(<rcp_const_basic>f2)]             # <<<<<<<<<<<<<<
 * 
 * def binomial(n, k):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)__pyx_v_f1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4690, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)__pyx_v_f2)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4690, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyList_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4690, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 4690, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_4);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 1, __pyx_t_4) != (0)) __PYX_ERR(0, 4690, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_4 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4685
 *     return c2py(<rcp_const_basic>(symengine.lucas(n)))
 * 
 * def lucas2(n):             # <<<<<<<<<<<<<<
 *     if n < 0 :
 *         raise NotImplementedError
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.lucas2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4692
 *     return [c2py(<rcp_const_basic>f1), c2py(<rcp_const_basic>f2)]
 * 
 * def binomial(n, k):             # <<<<<<<<<<<<<<
 *     if k < 0:
 *         raise ArithmeticError
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_137binomial(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_137binomial = {"binomial", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_137binomial, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_137binomial(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_n = 0;
  PyObject *__pyx_v_k = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("binomial (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_n,&__pyx_mstate_global->__pyx_n_u_k,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 4692, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4692, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4692, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "binomial", 0) < (0)) __PYX_ERR(0, 4692, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("binomial", 1, 2, 2, i); __PYX_ERR(0, 4692, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4692, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4692, __pyx_L3_error)
    }
    __pyx_v_n = values[0];
    __pyx_v_k = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("binomial", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 4692, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.binomial", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_136binomial(__pyx_self, __pyx_v_n, __pyx_v_k);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_136binomial(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_n, PyObject *__pyx_v_k) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v__n = 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;
  size_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  unsigned long __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("binomial", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4693
 * 
 * def binomial(n, k):
 *     if k < 0:             # <<<<<<<<<<<<<<
 *         raise ArithmeticError
 *     cdef Basic _n = sympify(n)
*/
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_k, __pyx_mstate_global->__pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4693, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 4693, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(__pyx_t_2)) {

    /* "symengine/lib/symengine_wrapper.pyx":4694
 * def binomial(n, k):
 *     if k < 0:
 *         raise ArithmeticError             # <<<<<<<<<<<<<<
 *     cdef Basic _n = sympify(n)
 *     require(_n, Integer)
*/
    __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_ArithmeticError))), 0, 0, 0);
    __PYX_ERR(0, 4694, __pyx_L1_error)

    /* "symengine/lib/symengine_wrapper.pyx":4693
 * 
 * def binomial(n, k):
 *     if k < 0:             # <<<<<<<<<<<<<<
 *         raise ArithmeticError
 *     cdef Basic _n = sympify(n)
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":4695
 *     if k < 0:
 *         raise ArithmeticError
 *     cdef Basic _n = sympify(n)             # <<<<<<<<<<<<<<
 *     require(_n, Integer)
 *     return c2py(<rcp_const_basic>symengine.binomial(deref(symengine.rcp_static_cast_Integer(_n.thisptr)), k))
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4695, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_n};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4695, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 4695, __pyx_L1_error)
  __pyx_v__n = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4696
 *         raise ArithmeticError
 *     cdef Basic _n = sympify(n)
 *     require(_n, Integer)             # <<<<<<<<<<<<<<
 *     return c2py(<rcp_const_basic>symengine.binomial(deref(symengine.rcp_static_cast_Integer(_n.thisptr)), k))
 * 
*/
  __pyx_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_require); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4696, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_Integer); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4696, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_4, ((PyObject *)__pyx_v__n), __pyx_t_6};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4696, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4697
 *     cdef Basic _n = sympify(n)
 *     require(_n, Integer)
 *     return c2py(<rcp_const_basic>symengine.binomial(deref(symengine.rcp_static_cast_Integer(_n.thisptr)), k))             # <<<<<<<<<<<<<<
 * 
 * def factorial(n):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_7 = __Pyx_PyLong_As_unsigned_long(__pyx_v_k); if (unlikely((__pyx_t_7 == (unsigned long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4697, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)SymEngine::binomial((*SymEngine::rcp_static_cast<const SymEngine::Integer>(__pyx_v__n->thisptr)), __pyx_t_7))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4697, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4692
 *     return [c2py(<rcp_const_basic>f1), c2py(<rcp_const_basic>f2)]
 * 
 * def binomial(n, k):             # <<<<<<<<<<<<<<
 *     if k < 0:
 *         raise ArithmeticError
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.binomial", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v__n);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4699
 *     return c2py(<rcp_const_basic>symengine.binomial(deref(symengine.rcp_static_cast_Integer(_n.thisptr)), k))
 * 
 * def factorial(n):             # <<<<<<<<<<<<<<
 *     if n < 0:
 *         raise ArithmeticError
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_139factorial(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_139factorial = {"factorial", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_139factorial, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_139factorial(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_n = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("factorial (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_n,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 4699, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4699, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "factorial", 0) < (0)) __PYX_ERR(0, 4699, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("factorial", 1, 1, 1, i); __PYX_ERR(0, 4699, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4699, __pyx_L3_error)
    }
    __pyx_v_n = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("factorial", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4699, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.factorial", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_138factorial(__pyx_self, __pyx_v_n);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_138factorial(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_n) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  unsigned long __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("factorial", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4700
 * 
 * def factorial(n):
 *     if n < 0:             # <<<<<<<<<<<<<<
 *         raise ArithmeticError
 *     return c2py(<rcp_const_basic>(symengine.factorial(n)))
*/
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_n, __pyx_mstate_global->__pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4700, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 4700, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(__pyx_t_2)) {

    /* "symengine/lib/symengine_wrapper.pyx":4701
 * def factorial(n):
 *     if n < 0:
 *         raise ArithmeticError             # <<<<<<<<<<<<<<
 *     return c2py(<rcp_const_basic>(symengine.factorial(n)))
 * 
*/
    __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_ArithmeticError))), 0, 0, 0);
    __PYX_ERR(0, 4701, __pyx_L1_error)

    /* "symengine/lib/symengine_wrapper.pyx":4700
 * 
 * def factorial(n):
 *     if n < 0:             # <<<<<<<<<<<<<<
 *         raise ArithmeticError
 *     return c2py(<rcp_const_basic>(symengine.factorial(n)))
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":4702
 *     if n < 0:
 *         raise ArithmeticError
 *     return c2py(<rcp_const_basic>(symengine.factorial(n)))             # <<<<<<<<<<<<<<
 * 
 * def divides(a, b):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyLong_As_unsigned_long(__pyx_v_n); if (unlikely((__pyx_t_3 == (unsigned long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4702, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)SymEngine::factorial(__pyx_t_3))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4702, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4699
 *     return c2py(<rcp_const_basic>symengine.binomial(deref(symengine.rcp_static_cast_Integer(_n.thisptr)), k))
 * 
 * def factorial(n):             # <<<<<<<<<<<<<<
 *     if n < 0:
 *         raise ArithmeticError
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.factorial", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4704
 *     return c2py(<rcp_const_basic>(symengine.factorial(n)))
 * 
 * def divides(a, b):             # <<<<<<<<<<<<<<
 *     cdef Basic _a = sympify(a)
 *     cdef Basic _b = sympify(b)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_141divides(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_141divides = {"divides", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_141divides, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_141divides(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_a = 0;
  PyObject *__pyx_v_b = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("divides (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_a,&__pyx_mstate_global->__pyx_n_u_b,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 4704, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4704, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4704, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "divides", 0) < (0)) __PYX_ERR(0, 4704, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("divides", 1, 2, 2, i); __PYX_ERR(0, 4704, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4704, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4704, __pyx_L3_error)
    }
    __pyx_v_a = values[0];
    __pyx_v_b = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("divides", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 4704, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.divides", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_140divides(__pyx_self, __pyx_v_a, __pyx_v_b);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_140divides(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_a, PyObject *__pyx_v_b) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v__a = 0;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v__b = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("divides", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4705
 * 
 * def divides(a, b):
 *     cdef Basic _a = sympify(a)             # <<<<<<<<<<<<<<
 *     cdef Basic _b = sympify(b)
 *     require(_a, Integer)
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4705, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_a};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4705, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 4705, __pyx_L1_error)
  __pyx_v__a = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4706
 * def divides(a, b):
 *     cdef Basic _a = sympify(a)
 *     cdef Basic _b = sympify(b)             # <<<<<<<<<<<<<<
 *     require(_a, Integer)
 *     require(_b, Integer)
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4706, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_b};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4706, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 4706, __pyx_L1_error)
  __pyx_v__b = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4707
 *     cdef Basic _a = sympify(a)
 *     cdef Basic _b = sympify(b)
 *     require(_a, Integer)             # <<<<<<<<<<<<<<
 *     require(_b, Integer)
 *     return symengine.divides(deref(symengine.rcp_static_cast_Integer(_a.thisptr)),
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_require); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4707, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_Integer); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4707, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, ((PyObject *)__pyx_v__a), __pyx_t_5};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4707, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4708
 *     cdef Basic _b = sympify(b)
 *     require(_a, Integer)
 *     require(_b, Integer)             # <<<<<<<<<<<<<<
 *     return symengine.divides(deref(symengine.rcp_static_cast_Integer(_a.thisptr)),
 *         deref(symengine.rcp_static_cast_Integer(_b.thisptr)))
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_require); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4708, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Integer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4708, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, ((PyObject *)__pyx_v__b), __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4708, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4709
 *     require(_a, Integer)
 *     require(_b, Integer)
 *     return symengine.divides(deref(symengine.rcp_static_cast_Integer(_a.thisptr)),             # <<<<<<<<<<<<<<
 *         deref(symengine.rcp_static_cast_Integer(_b.thisptr)))
 * 
*/
  __Pyx_XDECREF(__pyx_r);

  /* "symengine/lib/symengine_wrapper.pyx":4710
 *     require(_b, Integer)
 *     return symengine.divides(deref(symengine.rcp_static_cast_Integer(_a.thisptr)),
 *         deref(symengine.rcp_static_cast_Integer(_b.thisptr)))             # <<<<<<<<<<<<<<
 * 
 * def factor(n, B1 = 1.0):
*/
  __pyx_t_1 = __Pyx_PyBool_FromLong(SymEngine::divides((*SymEngine::rcp_static_cast<const SymEngine::Integer>(__pyx_v__a->thisptr)), (*SymEngine::rcp_static_cast<const SymEngine::Integer>(__pyx_v__b->thisptr)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4709, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4704
 *     return c2py(<rcp_const_basic>(symengine.factorial(n)))
 * 
 * def divides(a, b):             # <<<<<<<<<<<<<<
 *     cdef Basic _a = sympify(a)
 *     cdef Basic _b = sympify(b)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.divides", __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;
}

/* "symengine/lib/symengine_wrapper.pyx":4712
 *         deref(symengine.rcp_static_cast_Integer(_b.thisptr)))
 * 
 * def factor(n, B1 = 1.0):             # <<<<<<<<<<<<<<
 *     cdef Basic _n = sympify(n)
 *     require(_n, Integer)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_143factor(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_143factor = {"factor", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_143factor, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_143factor(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_n = 0;
  PyObject *__pyx_v_B1 = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("factor (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_n,&__pyx_mstate_global->__pyx_n_u_B1,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 4712, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4712, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4712, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "factor", 0) < (0)) __PYX_ERR(0, 4712, __pyx_L3_error)
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_float_1_0)));
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("factor", 0, 1, 2, i); __PYX_ERR(0, 4712, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4712, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4712, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_float_1_0)));
    }
    __pyx_v_n = values[0];
    __pyx_v_B1 = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("factor", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 4712, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.factor", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_142factor(__pyx_self, __pyx_v_n, __pyx_v_B1);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_142factor(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_n, PyObject *__pyx_v_B1) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v__n = 0;
  SymEngine::RCP<SymEngine::Integer const >  __pyx_v_f;
  int __pyx_v_ret_val;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  double __pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("factor", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4713
 * 
 * def factor(n, B1 = 1.0):
 *     cdef Basic _n = sympify(n)             # <<<<<<<<<<<<<<
 *     require(_n, Integer)
 *     cdef RCP[const symengine.Integer] f
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4713, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_n};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4713, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 4713, __pyx_L1_error)
  __pyx_v__n = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4714
 * def factor(n, B1 = 1.0):
 *     cdef Basic _n = sympify(n)
 *     require(_n, Integer)             # <<<<<<<<<<<<<<
 *     cdef RCP[const symengine.Integer] f
 *     cdef int ret_val = symengine.factor(symengine.outArg_Integer(f),
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_require); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4714, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_Integer); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4714, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, ((PyObject *)__pyx_v__n), __pyx_t_5};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4714, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4717
 *     cdef RCP[const symengine.Integer] f
 *     cdef int ret_val = symengine.factor(symengine.outArg_Integer(f),
 *         deref(symengine.rcp_static_cast_Integer(_n.thisptr)), B1)             # <<<<<<<<<<<<<<
 *     if (ret_val == 1):
 *         return c2py(<rcp_const_basic>f)
*/
  __pyx_t_6 = __Pyx_PyFloat_AsDouble(__pyx_v_B1); if (unlikely((__pyx_t_6 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 4717, __pyx_L1_error)

  /* "symengine/lib/symengine_wrapper.pyx":4716
 *     require(_n, Integer)
 *     cdef RCP[const symengine.Integer] f
 *     cdef int ret_val = symengine.factor(symengine.outArg_Integer(f),             # <<<<<<<<<<<<<<
 *         deref(symengine.rcp_static_cast_Integer(_n.thisptr)), B1)
 *     if (ret_val == 1):
*/
  __pyx_v_ret_val = SymEngine::factor(SymEngine::outArg<SymEngine::RCP<const SymEngine::Integer>>(__pyx_v_f), (*SymEngine::rcp_static_cast<const SymEngine::Integer>(__pyx_v__n->thisptr)), __pyx_t_6);

  /* "symengine/lib/symengine_wrapper.pyx":4718
 *     cdef int ret_val = symengine.factor(symengine.outArg_Integer(f),
 *         deref(symengine.rcp_static_cast_Integer(_n.thisptr)), B1)
 *     if (ret_val == 1):             # <<<<<<<<<<<<<<
 *         return c2py(<rcp_const_basic>f)
 *     else:
*/
  __pyx_t_7 = (__pyx_v_ret_val == 1);
  if (__pyx_t_7) {

    /* "symengine/lib/symengine_wrapper.pyx":4719
 *         deref(symengine.rcp_static_cast_Integer(_n.thisptr)), B1)
 *     if (ret_val == 1):
 *         return c2py(<rcp_const_basic>f)             # <<<<<<<<<<<<<<
 *     else:
 *         return None
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)__pyx_v_f)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4719, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":4718
 *     cdef int ret_val = symengine.factor(symengine.outArg_Integer(f),
 *         deref(symengine.rcp_static_cast_Integer(_n.thisptr)), B1)
 *     if (ret_val == 1):             # <<<<<<<<<<<<<<
 *         return c2py(<rcp_const_basic>f)
 *     else:
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":4721
 *         return c2py(<rcp_const_basic>f)
 *     else:
 *         return None             # <<<<<<<<<<<<<<
 * 
 * def factor_lehman_method(n):
*/
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;
  }

  /* "symengine/lib/symengine_wrapper.pyx":4712
 *         deref(symengine.rcp_static_cast_Integer(_b.thisptr)))
 * 
 * def factor(n, B1 = 1.0):             # <<<<<<<<<<<<<<
 *     cdef Basic _n = sympify(n)
 *     require(_n, Integer)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.factor", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v__n);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4723
 *         return None
 * 
 * def factor_lehman_method(n):             # <<<<<<<<<<<<<<
 *     cdef Basic _n = sympify(n)
 *     require(_n, Integer)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_145factor_lehman_method(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_145factor_lehman_method = {"factor_lehman_method", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_145factor_lehman_method, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_145factor_lehman_method(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_n = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("factor_lehman_method (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_n,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 4723, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4723, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "factor_lehman_method", 0) < (0)) __PYX_ERR(0, 4723, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("factor_lehman_method", 1, 1, 1, i); __PYX_ERR(0, 4723, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4723, __pyx_L3_error)
    }
    __pyx_v_n = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("factor_lehman_method", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4723, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.factor_lehman_method", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_144factor_lehman_method(__pyx_self, __pyx_v_n);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_144factor_lehman_method(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_n) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v__n = 0;
  SymEngine::RCP<SymEngine::Integer const >  __pyx_v_f;
  int __pyx_v_ret_val;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("factor_lehman_method", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4724
 * 
 * def factor_lehman_method(n):
 *     cdef Basic _n = sympify(n)             # <<<<<<<<<<<<<<
 *     require(_n, Integer)
 *     cdef RCP[const symengine.Integer] f
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4724, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_n};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4724, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 4724, __pyx_L1_error)
  __pyx_v__n = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4725
 * def factor_lehman_method(n):
 *     cdef Basic _n = sympify(n)
 *     require(_n, Integer)             # <<<<<<<<<<<<<<
 *     cdef RCP[const symengine.Integer] f
 *     cdef int ret_val = symengine.factor_lehman_method(symengine.outArg_Integer(f),
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_require); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4725, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_Integer); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4725, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, ((PyObject *)__pyx_v__n), __pyx_t_5};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4725, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4727
 *     require(_n, Integer)
 *     cdef RCP[const symengine.Integer] f
 *     cdef int ret_val = symengine.factor_lehman_method(symengine.outArg_Integer(f),             # <<<<<<<<<<<<<<
 *         deref(symengine.rcp_static_cast_Integer(_n.thisptr)))
 *     if (ret_val == 1):
*/
  __pyx_v_ret_val = SymEngine::factor_lehman_method(SymEngine::outArg<SymEngine::RCP<const SymEngine::Integer>>(__pyx_v_f), (*SymEngine::rcp_static_cast<const SymEngine::Integer>(__pyx_v__n->thisptr)));

  /* "symengine/lib/symengine_wrapper.pyx":4729
 *     cdef int ret_val = symengine.factor_lehman_method(symengine.outArg_Integer(f),
 *         deref(symengine.rcp_static_cast_Integer(_n.thisptr)))
 *     if (ret_val == 1):             # <<<<<<<<<<<<<<
 *         return c2py(<rcp_const_basic>f)
 *     else:
*/
  __pyx_t_6 = (__pyx_v_ret_val == 1);
  if (__pyx_t_6) {

    /* "symengine/lib/symengine_wrapper.pyx":4730
 *         deref(symengine.rcp_static_cast_Integer(_n.thisptr)))
 *     if (ret_val == 1):
 *         return c2py(<rcp_const_basic>f)             # <<<<<<<<<<<<<<
 *     else:
 *         return None
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)__pyx_v_f)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4730, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":4729
 *     cdef int ret_val = symengine.factor_lehman_method(symengine.outArg_Integer(f),
 *         deref(symengine.rcp_static_cast_Integer(_n.thisptr)))
 *     if (ret_val == 1):             # <<<<<<<<<<<<<<
 *         return c2py(<rcp_const_basic>f)
 *     else:
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":4732
 *         return c2py(<rcp_const_basic>f)
 *     else:
 *         return None             # <<<<<<<<<<<<<<
 * 
 * def factor_pollard_pm1_method(n, B = 10, retries = 5):
*/
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;
  }

  /* "symengine/lib/symengine_wrapper.pyx":4723
 *         return None
 * 
 * def factor_lehman_method(n):             # <<<<<<<<<<<<<<
 *     cdef Basic _n = sympify(n)
 *     require(_n, Integer)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.factor_lehman_method", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v__n);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4734
 *         return None
 * 
 * def factor_pollard_pm1_method(n, B = 10, retries = 5):             # <<<<<<<<<<<<<<
 *     cdef Basic _n = sympify(n)
 *     require(_n, Integer)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_147factor_pollard_pm1_method(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_147factor_pollard_pm1_method = {"factor_pollard_pm1_method", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_147factor_pollard_pm1_method, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_147factor_pollard_pm1_method(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_n = 0;
  PyObject *__pyx_v_B = 0;
  PyObject *__pyx_v_retries = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("factor_pollard_pm1_method (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_n,&__pyx_mstate_global->__pyx_n_u_B,&__pyx_mstate_global->__pyx_n_u_retries,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 4734, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 4734, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4734, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4734, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "factor_pollard_pm1_method", 0) < (0)) __PYX_ERR(0, 4734, __pyx_L3_error)
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_int_10)));
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_int_5)));
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("factor_pollard_pm1_method", 0, 1, 3, i); __PYX_ERR(0, 4734, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 4734, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4734, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4734, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_int_10)));
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_int_5)));
    }
    __pyx_v_n = values[0];
    __pyx_v_B = values[1];
    __pyx_v_retries = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("factor_pollard_pm1_method", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 4734, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.factor_pollard_pm1_method", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_146factor_pollard_pm1_method(__pyx_self, __pyx_v_n, __pyx_v_B, __pyx_v_retries);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_146factor_pollard_pm1_method(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_n, PyObject *__pyx_v_B, PyObject *__pyx_v_retries) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v__n = 0;
  SymEngine::RCP<SymEngine::Integer const >  __pyx_v_f;
  int __pyx_v_ret_val;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  unsigned int __pyx_t_6;
  unsigned int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("factor_pollard_pm1_method", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4735
 * 
 * def factor_pollard_pm1_method(n, B = 10, retries = 5):
 *     cdef Basic _n = sympify(n)             # <<<<<<<<<<<<<<
 *     require(_n, Integer)
 *     cdef RCP[const symengine.Integer] f
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4735, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_n};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4735, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 4735, __pyx_L1_error)
  __pyx_v__n = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4736
 * def factor_pollard_pm1_method(n, B = 10, retries = 5):
 *     cdef Basic _n = sympify(n)
 *     require(_n, Integer)             # <<<<<<<<<<<<<<
 *     cdef RCP[const symengine.Integer] f
 *     cdef int ret_val = symengine.factor_pollard_pm1_method(symengine.outArg_Integer(f),
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_require); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4736, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_Integer); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4736, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, ((PyObject *)__pyx_v__n), __pyx_t_5};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4736, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4739
 *     cdef RCP[const symengine.Integer] f
 *     cdef int ret_val = symengine.factor_pollard_pm1_method(symengine.outArg_Integer(f),
 *         deref(symengine.rcp_static_cast_Integer(_n.thisptr)), B, retries)             # <<<<<<<<<<<<<<
 *     if (ret_val == 1):
 *         return c2py(<rcp_const_basic>f)
*/
  __pyx_t_6 = __Pyx_PyLong_As_unsigned_int(__pyx_v_B); if (unlikely((__pyx_t_6 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4739, __pyx_L1_error)
  __pyx_t_7 = __Pyx_PyLong_As_unsigned_int(__pyx_v_retries); if (unlikely((__pyx_t_7 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4739, __pyx_L1_error)

  /* "symengine/lib/symengine_wrapper.pyx":4738
 *     require(_n, Integer)
 *     cdef RCP[const symengine.Integer] f
 *     cdef int ret_val = symengine.factor_pollard_pm1_method(symengine.outArg_Integer(f),             # <<<<<<<<<<<<<<
 *         deref(symengine.rcp_static_cast_Integer(_n.thisptr)), B, retries)
 *     if (ret_val == 1):
*/
  __pyx_v_ret_val = SymEngine::factor_pollard_pm1_method(SymEngine::outArg<SymEngine::RCP<const SymEngine::Integer>>(__pyx_v_f), (*SymEngine::rcp_static_cast<const SymEngine::Integer>(__pyx_v__n->thisptr)), __pyx_t_6, __pyx_t_7);

  /* "symengine/lib/symengine_wrapper.pyx":4740
 *     cdef int ret_val = symengine.factor_pollard_pm1_method(symengine.outArg_Integer(f),
 *         deref(symengine.rcp_static_cast_Integer(_n.thisptr)), B, retries)
 *     if (ret_val == 1):             # <<<<<<<<<<<<<<
 *         return c2py(<rcp_const_basic>f)
 *     else:
*/
  __pyx_t_8 = (__pyx_v_ret_val == 1);
  if (__pyx_t_8) {

    /* "symengine/lib/symengine_wrapper.pyx":4741
 *         deref(symengine.rcp_static_cast_Integer(_n.thisptr)), B, retries)
 *     if (ret_val == 1):
 *         return c2py(<rcp_const_basic>f)             # <<<<<<<<<<<<<<
 *     else:
 *         return None
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)__pyx_v_f)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4741, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":4740
 *     cdef int ret_val = symengine.factor_pollard_pm1_method(symengine.outArg_Integer(f),
 *         deref(symengine.rcp_static_cast_Integer(_n.thisptr)), B, retries)
 *     if (ret_val == 1):             # <<<<<<<<<<<<<<
 *         return c2py(<rcp_const_basic>f)
 *     else:
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":4743
 *         return c2py(<rcp_const_basic>f)
 *     else:
 *         return None             # <<<<<<<<<<<<<<
 * 
 * def factor_pollard_rho_method(n, retries = 5):
*/
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;
  }

  /* "symengine/lib/symengine_wrapper.pyx":4734
 *         return None
 * 
 * def factor_pollard_pm1_method(n, B = 10, retries = 5):             # <<<<<<<<<<<<<<
 *     cdef Basic _n = sympify(n)
 *     require(_n, Integer)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.factor_pollard_pm1_method", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v__n);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4745
 *         return None
 * 
 * def factor_pollard_rho_method(n, retries = 5):             # <<<<<<<<<<<<<<
 *     cdef Basic _n = sympify(n)
 *     require(_n, Integer)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_149factor_pollard_rho_method(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_149factor_pollard_rho_method = {"factor_pollard_rho_method", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_149factor_pollard_rho_method, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_149factor_pollard_rho_method(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_n = 0;
  PyObject *__pyx_v_retries = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("factor_pollard_rho_method (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_n,&__pyx_mstate_global->__pyx_n_u_retries,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 4745, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4745, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4745, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "factor_pollard_rho_method", 0) < (0)) __PYX_ERR(0, 4745, __pyx_L3_error)
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_int_5)));
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("factor_pollard_rho_method", 0, 1, 2, i); __PYX_ERR(0, 4745, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4745, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4745, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_int_5)));
    }
    __pyx_v_n = values[0];
    __pyx_v_retries = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("factor_pollard_rho_method", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 4745, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.factor_pollard_rho_method", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_148factor_pollard_rho_method(__pyx_self, __pyx_v_n, __pyx_v_retries);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_148factor_pollard_rho_method(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_n, PyObject *__pyx_v_retries) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v__n = 0;
  SymEngine::RCP<SymEngine::Integer const >  __pyx_v_f;
  int __pyx_v_ret_val;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  unsigned int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("factor_pollard_rho_method", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4746
 * 
 * def factor_pollard_rho_method(n, retries = 5):
 *     cdef Basic _n = sympify(n)             # <<<<<<<<<<<<<<
 *     require(_n, Integer)
 *     cdef RCP[const symengine.Integer] f
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4746, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_n};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4746, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 4746, __pyx_L1_error)
  __pyx_v__n = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4747
 * def factor_pollard_rho_method(n, retries = 5):
 *     cdef Basic _n = sympify(n)
 *     require(_n, Integer)             # <<<<<<<<<<<<<<
 *     cdef RCP[const symengine.Integer] f
 *     cdef int ret_val = symengine.factor_pollard_rho_method(symengine.outArg_Integer(f),
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_require); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4747, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_Integer); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4747, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, ((PyObject *)__pyx_v__n), __pyx_t_5};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4747, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4750
 *     cdef RCP[const symengine.Integer] f
 *     cdef int ret_val = symengine.factor_pollard_rho_method(symengine.outArg_Integer(f),
 *         deref(symengine.rcp_static_cast_Integer(_n.thisptr)), retries)             # <<<<<<<<<<<<<<
 *     if (ret_val == 1):
 *         return c2py(<rcp_const_basic>f)
*/
  __pyx_t_6 = __Pyx_PyLong_As_unsigned_int(__pyx_v_retries); if (unlikely((__pyx_t_6 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4750, __pyx_L1_error)

  /* "symengine/lib/symengine_wrapper.pyx":4749
 *     require(_n, Integer)
 *     cdef RCP[const symengine.Integer] f
 *     cdef int ret_val = symengine.factor_pollard_rho_method(symengine.outArg_Integer(f),             # <<<<<<<<<<<<<<
 *         deref(symengine.rcp_static_cast_Integer(_n.thisptr)), retries)
 *     if (ret_val == 1):
*/
  __pyx_v_ret_val = SymEngine::factor_pollard_rho_method(SymEngine::outArg<SymEngine::RCP<const SymEngine::Integer>>(__pyx_v_f), (*SymEngine::rcp_static_cast<const SymEngine::Integer>(__pyx_v__n->thisptr)), __pyx_t_6);

  /* "symengine/lib/symengine_wrapper.pyx":4751
 *     cdef int ret_val = symengine.factor_pollard_rho_method(symengine.outArg_Integer(f),
 *         deref(symengine.rcp_static_cast_Integer(_n.thisptr)), retries)
 *     if (ret_val == 1):             # <<<<<<<<<<<<<<
 *         return c2py(<rcp_const_basic>f)
 *     else:
*/
  __pyx_t_7 = (__pyx_v_ret_val == 1);
  if (__pyx_t_7) {

    /* "symengine/lib/symengine_wrapper.pyx":4752
 *         deref(symengine.rcp_static_cast_Integer(_n.thisptr)), retries)
 *     if (ret_val == 1):
 *         return c2py(<rcp_const_basic>f)             # <<<<<<<<<<<<<<
 *     else:
 *         return None
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)__pyx_v_f)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4752, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":4751
 *     cdef int ret_val = symengine.factor_pollard_rho_method(symengine.outArg_Integer(f),
 *         deref(symengine.rcp_static_cast_Integer(_n.thisptr)), retries)
 *     if (ret_val == 1):             # <<<<<<<<<<<<<<
 *         return c2py(<rcp_const_basic>f)
 *     else:
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":4754
 *         return c2py(<rcp_const_basic>f)
 *     else:
 *         return None             # <<<<<<<<<<<<<<
 * 
 * def prime_factors(n):
*/
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;
  }

  /* "symengine/lib/symengine_wrapper.pyx":4745
 *         return None
 * 
 * def factor_pollard_rho_method(n, retries = 5):             # <<<<<<<<<<<<<<
 *     cdef Basic _n = sympify(n)
 *     require(_n, Integer)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.factor_pollard_rho_method", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v__n);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4756
 *         return None
 * 
 * def prime_factors(n):             # <<<<<<<<<<<<<<
 *     cdef symengine.vec_integer factors
 *     cdef Basic _n = sympify(n)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_151prime_factors(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_151prime_factors = {"prime_factors", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_151prime_factors, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_151prime_factors(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_n = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("prime_factors (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_n,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 4756, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4756, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "prime_factors", 0) < (0)) __PYX_ERR(0, 4756, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("prime_factors", 1, 1, 1, i); __PYX_ERR(0, 4756, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4756, __pyx_L3_error)
    }
    __pyx_v_n = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("prime_factors", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4756, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.prime_factors", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_150prime_factors(__pyx_self, __pyx_v_n);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_150prime_factors(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_n) {
  SymEngine::vec_integer __pyx_v_factors;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v__n = 0;
  PyObject *__pyx_v_s = NULL;
  std::vector<SymEngine::RCP<SymEngine::Integer> > ::size_type __pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  std::vector<SymEngine::RCP<SymEngine::Integer> > ::size_type __pyx_t_6;
  std::vector<SymEngine::RCP<SymEngine::Integer> > ::size_type __pyx_t_7;
  std::vector<SymEngine::RCP<SymEngine::Integer> > ::size_type __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("prime_factors", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4758
 * def prime_factors(n):
 *     cdef symengine.vec_integer factors
 *     cdef Basic _n = sympify(n)             # <<<<<<<<<<<<<<
 *     require(_n, Integer)
 *     symengine.prime_factors(factors, deref(symengine.rcp_static_cast_Integer(_n.thisptr)))
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4758, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_n};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4758, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 4758, __pyx_L1_error)
  __pyx_v__n = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4759
 *     cdef symengine.vec_integer factors
 *     cdef Basic _n = sympify(n)
 *     require(_n, Integer)             # <<<<<<<<<<<<<<
 *     symengine.prime_factors(factors, deref(symengine.rcp_static_cast_Integer(_n.thisptr)))
 *     s = []
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_require); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4759, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_Integer); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4759, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, ((PyObject *)__pyx_v__n), __pyx_t_5};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4759, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4760
 *     cdef Basic _n = sympify(n)
 *     require(_n, Integer)
 *     symengine.prime_factors(factors, deref(symengine.rcp_static_cast_Integer(_n.thisptr)))             # <<<<<<<<<<<<<<
 *     s = []
 *     for i in range(factors.size()):
*/
  try {
    SymEngine::prime_factors(__pyx_v_factors, (*SymEngine::rcp_static_cast<const SymEngine::Integer>(__pyx_v__n->thisptr)));
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 4760, __pyx_L1_error)
  }

  /* "symengine/lib/symengine_wrapper.pyx":4761
 *     require(_n, Integer)
 *     symengine.prime_factors(factors, deref(symengine.rcp_static_cast_Integer(_n.thisptr)))
 *     s = []             # <<<<<<<<<<<<<<
 *     for i in range(factors.size()):
 *         s.append(c2py(<rcp_const_basic>(factors[i])))
*/
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4761, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_s = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4762
 *     symengine.prime_factors(factors, deref(symengine.rcp_static_cast_Integer(_n.thisptr)))
 *     s = []
 *     for i in range(factors.size()):             # <<<<<<<<<<<<<<
 *         s.append(c2py(<rcp_const_basic>(factors[i])))
 *     return s
*/
  __pyx_t_6 = __pyx_v_factors.size();
  __pyx_t_7 = __pyx_t_6;
  for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) {
    __pyx_v_i = __pyx_t_8;

    /* "symengine/lib/symengine_wrapper.pyx":4763
 *     s = []
 *     for i in range(factors.size()):
 *         s.append(c2py(<rcp_const_basic>(factors[i])))             # <<<<<<<<<<<<<<
 *     return s
 * 
*/
    __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)(__pyx_v_factors[__pyx_v_i]))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4763, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_s, __pyx_t_1); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 4763, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "symengine/lib/symengine_wrapper.pyx":4764
 *     for i in range(factors.size()):
 *         s.append(c2py(<rcp_const_basic>(factors[i])))
 *     return s             # <<<<<<<<<<<<<<
 * 
 * def prime_factor_multiplicities(n):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_s);
  __pyx_r = __pyx_v_s;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4756
 *         return None
 * 
 * def prime_factors(n):             # <<<<<<<<<<<<<<
 *     cdef symengine.vec_integer factors
 *     cdef Basic _n = sympify(n)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.prime_factors", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v__n);
  __Pyx_XDECREF(__pyx_v_s);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4766
 *     return s
 * 
 * def prime_factor_multiplicities(n):             # <<<<<<<<<<<<<<
 *     cdef symengine.vec_integer factors
 *     cdef Basic _n = sympify(n)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_153prime_factor_multiplicities(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_153prime_factor_multiplicities = {"prime_factor_multiplicities", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_153prime_factor_multiplicities, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_153prime_factor_multiplicities(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_n = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("prime_factor_multiplicities (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_n,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 4766, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4766, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "prime_factor_multiplicities", 0) < (0)) __PYX_ERR(0, 4766, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("prime_factor_multiplicities", 1, 1, 1, i); __PYX_ERR(0, 4766, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4766, __pyx_L3_error)
    }
    __pyx_v_n = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("prime_factor_multiplicities", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4766, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.prime_factor_multiplicities", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_152prime_factor_multiplicities(__pyx_self, __pyx_v_n);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_152prime_factor_multiplicities(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_n) {
  SymEngine::vec_integer __pyx_v_factors;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v__n = 0;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_r = 0;
  PyObject *__pyx_v_dict = NULL;
  std::vector<SymEngine::RCP<SymEngine::Integer> > ::size_type __pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  std::vector<SymEngine::RCP<SymEngine::Integer> > ::size_type __pyx_t_6;
  std::vector<SymEngine::RCP<SymEngine::Integer> > ::size_type __pyx_t_7;
  std::vector<SymEngine::RCP<SymEngine::Integer> > ::size_type __pyx_t_8;
  int __pyx_t_9;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_t_10 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("prime_factor_multiplicities", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4768
 * def prime_factor_multiplicities(n):
 *     cdef symengine.vec_integer factors
 *     cdef Basic _n = sympify(n)             # <<<<<<<<<<<<<<
 *     require(_n, Integer)
 *     symengine.prime_factors(factors, deref(symengine.rcp_static_cast_Integer(_n.thisptr)))
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4768, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_n};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4768, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 4768, __pyx_L1_error)
  __pyx_v__n = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4769
 *     cdef symengine.vec_integer factors
 *     cdef Basic _n = sympify(n)
 *     require(_n, Integer)             # <<<<<<<<<<<<<<
 *     symengine.prime_factors(factors, deref(symengine.rcp_static_cast_Integer(_n.thisptr)))
 *     cdef Basic r
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_require); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4769, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_Integer); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4769, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, ((PyObject *)__pyx_v__n), __pyx_t_5};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4769, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4770
 *     cdef Basic _n = sympify(n)
 *     require(_n, Integer)
 *     symengine.prime_factors(factors, deref(symengine.rcp_static_cast_Integer(_n.thisptr)))             # <<<<<<<<<<<<<<
 *     cdef Basic r
 *     dict = {}
*/
  try {
    SymEngine::prime_factors(__pyx_v_factors, (*SymEngine::rcp_static_cast<const SymEngine::Integer>(__pyx_v__n->thisptr)));
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 4770, __pyx_L1_error)
  }

  /* "symengine/lib/symengine_wrapper.pyx":4772
 *     symengine.prime_factors(factors, deref(symengine.rcp_static_cast_Integer(_n.thisptr)))
 *     cdef Basic r
 *     dict = {}             # <<<<<<<<<<<<<<
 *     for i in range(factors.size()):
 *         r = c2py(<rcp_const_basic>(factors[i]))
*/
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4772, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_dict = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4773
 *     cdef Basic r
 *     dict = {}
 *     for i in range(factors.size()):             # <<<<<<<<<<<<<<
 *         r = c2py(<rcp_const_basic>(factors[i]))
 *         if (r not in dict):
*/
  __pyx_t_6 = __pyx_v_factors.size();
  __pyx_t_7 = __pyx_t_6;
  for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) {
    __pyx_v_i = __pyx_t_8;

    /* "symengine/lib/symengine_wrapper.pyx":4774
 *     dict = {}
 *     for i in range(factors.size()):
 *         r = c2py(<rcp_const_basic>(factors[i]))             # <<<<<<<<<<<<<<
 *         if (r not in dict):
 *             dict[r] = 1
*/
    __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)(__pyx_v_factors[__pyx_v_i]))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4774, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 4774, __pyx_L1_error)
    __Pyx_XDECREF_SET(__pyx_v_r, ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":4775
 *     for i in range(factors.size()):
 *         r = c2py(<rcp_const_basic>(factors[i]))
 *         if (r not in dict):             # <<<<<<<<<<<<<<
 *             dict[r] = 1
 *         else:
*/
    __pyx_t_9 = (__Pyx_PyDict_ContainsTF(((PyObject *)__pyx_v_r), __pyx_v_dict, Py_NE)); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 4775, __pyx_L1_error)
    if (__pyx_t_9) {

      /* "symengine/lib/symengine_wrapper.pyx":4776
 *         r = c2py(<rcp_const_basic>(factors[i]))
 *         if (r not in dict):
 *             dict[r] = 1             # <<<<<<<<<<<<<<
 *         else:
 *             dict[r] += 1
*/
      if (unlikely((PyDict_SetItem(__pyx_v_dict, ((PyObject *)__pyx_v_r), __pyx_mstate_global->__pyx_int_1) < 0))) __PYX_ERR(0, 4776, __pyx_L1_error)

      /* "symengine/lib/symengine_wrapper.pyx":4775
 *     for i in range(factors.size()):
 *         r = c2py(<rcp_const_basic>(factors[i]))
 *         if (r not in dict):             # <<<<<<<<<<<<<<
 *             dict[r] = 1
 *         else:
*/
      goto __pyx_L5;
    }

    /* "symengine/lib/symengine_wrapper.pyx":4778
 *             dict[r] = 1
 *         else:
 *             dict[r] += 1             # <<<<<<<<<<<<<<
 *     return dict
 * 
*/
    /*else*/ {
      __Pyx_INCREF((PyObject *)__pyx_v_r);
      __pyx_t_10 = __pyx_v_r;
      __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_dict, ((PyObject *)__pyx_t_10)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4778, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyLong_AddObjC(__pyx_t_1, __pyx_mstate_global->__pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4778, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely((PyDict_SetItem(__pyx_v_dict, ((PyObject *)__pyx_t_10), __pyx_t_2) < 0))) __PYX_ERR(0, 4778, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF((PyObject *)__pyx_t_10); __pyx_t_10 = 0;
    }
    __pyx_L5:;
  }

  /* "symengine/lib/symengine_wrapper.pyx":4779
 *         else:
 *             dict[r] += 1
 *     return dict             # <<<<<<<<<<<<<<
 * 
 * def bernoulli(n):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_dict);
  __pyx_r = __pyx_v_dict;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4766
 *     return s
 * 
 * def prime_factor_multiplicities(n):             # <<<<<<<<<<<<<<
 *     cdef symengine.vec_integer factors
 *     cdef Basic _n = sympify(n)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF((PyObject *)__pyx_t_10);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.prime_factor_multiplicities", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v__n);
  __Pyx_XDECREF((PyObject *)__pyx_v_r);
  __Pyx_XDECREF(__pyx_v_dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4781
 *     return dict
 * 
 * def bernoulli(n):             # <<<<<<<<<<<<<<
 *     if n < 0:
 *         raise ArithmeticError
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_155bernoulli(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_155bernoulli = {"bernoulli", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_155bernoulli, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_155bernoulli(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_n = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("bernoulli (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_n,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 4781, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4781, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "bernoulli", 0) < (0)) __PYX_ERR(0, 4781, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("bernoulli", 1, 1, 1, i); __PYX_ERR(0, 4781, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4781, __pyx_L3_error)
    }
    __pyx_v_n = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("bernoulli", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4781, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.bernoulli", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_154bernoulli(__pyx_self, __pyx_v_n);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_154bernoulli(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_n) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  unsigned long __pyx_t_3;
  SymEngine::RCP<SymEngine::Number const >  __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("bernoulli", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4782
 * 
 * def bernoulli(n):
 *     if n < 0:             # <<<<<<<<<<<<<<
 *         raise ArithmeticError
 *     return c2py(<rcp_const_basic>(symengine.bernoulli(n)))
*/
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_n, __pyx_mstate_global->__pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4782, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 4782, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(__pyx_t_2)) {

    /* "symengine/lib/symengine_wrapper.pyx":4783
 * def bernoulli(n):
 *     if n < 0:
 *         raise ArithmeticError             # <<<<<<<<<<<<<<
 *     return c2py(<rcp_const_basic>(symengine.bernoulli(n)))
 * 
*/
    __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_ArithmeticError))), 0, 0, 0);
    __PYX_ERR(0, 4783, __pyx_L1_error)

    /* "symengine/lib/symengine_wrapper.pyx":4782
 * 
 * def bernoulli(n):
 *     if n < 0:             # <<<<<<<<<<<<<<
 *         raise ArithmeticError
 *     return c2py(<rcp_const_basic>(symengine.bernoulli(n)))
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":4784
 *     if n < 0:
 *         raise ArithmeticError
 *     return c2py(<rcp_const_basic>(symengine.bernoulli(n)))             # <<<<<<<<<<<<<<
 * 
 * def primitive_root(n):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyLong_As_unsigned_long(__pyx_v_n); if (unlikely((__pyx_t_3 == (unsigned long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4784, __pyx_L1_error)
  try {
    __pyx_t_4 = SymEngine::bernoulli(__pyx_t_3);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 4784, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)__pyx_t_4)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4784, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4781
 *     return dict
 * 
 * def bernoulli(n):             # <<<<<<<<<<<<<<
 *     if n < 0:
 *         raise ArithmeticError
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.bernoulli", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4786
 *     return c2py(<rcp_const_basic>(symengine.bernoulli(n)))
 * 
 * def primitive_root(n):             # <<<<<<<<<<<<<<
 *     cdef RCP[const symengine.Integer] g
 *     cdef Basic _n = sympify(n)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_157primitive_root(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_157primitive_root = {"primitive_root", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_157primitive_root, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_157primitive_root(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_n = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("primitive_root (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_n,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 4786, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4786, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "primitive_root", 0) < (0)) __PYX_ERR(0, 4786, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("primitive_root", 1, 1, 1, i); __PYX_ERR(0, 4786, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4786, __pyx_L3_error)
    }
    __pyx_v_n = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("primitive_root", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4786, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.primitive_root", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_156primitive_root(__pyx_self, __pyx_v_n);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_156primitive_root(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_n) {
  SymEngine::RCP<SymEngine::Integer const >  __pyx_v_g;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v__n = 0;
  bool __pyx_v_ret_val;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("primitive_root", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4788
 * def primitive_root(n):
 *     cdef RCP[const symengine.Integer] g
 *     cdef Basic _n = sympify(n)             # <<<<<<<<<<<<<<
 *     require(_n, Integer)
 *     cdef cppbool ret_val = symengine.primitive_root(symengine.outArg_Integer(g),
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4788, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_n};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4788, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 4788, __pyx_L1_error)
  __pyx_v__n = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4789
 *     cdef RCP[const symengine.Integer] g
 *     cdef Basic _n = sympify(n)
 *     require(_n, Integer)             # <<<<<<<<<<<<<<
 *     cdef cppbool ret_val = symengine.primitive_root(symengine.outArg_Integer(g),
 *         deref(symengine.rcp_static_cast_Integer(_n.thisptr)))
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_require); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4789, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_Integer); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4789, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, ((PyObject *)__pyx_v__n), __pyx_t_5};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4789, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4790
 *     cdef Basic _n = sympify(n)
 *     require(_n, Integer)
 *     cdef cppbool ret_val = symengine.primitive_root(symengine.outArg_Integer(g),             # <<<<<<<<<<<<<<
 *         deref(symengine.rcp_static_cast_Integer(_n.thisptr)))
 *     if ret_val == 0:
*/
  __pyx_v_ret_val = SymEngine::primitive_root(SymEngine::outArg<SymEngine::RCP<const SymEngine::Integer>>(__pyx_v_g), (*SymEngine::rcp_static_cast<const SymEngine::Integer>(__pyx_v__n->thisptr)));

  /* "symengine/lib/symengine_wrapper.pyx":4792
 *     cdef cppbool ret_val = symengine.primitive_root(symengine.outArg_Integer(g),
 *         deref(symengine.rcp_static_cast_Integer(_n.thisptr)))
 *     if ret_val == 0:             # <<<<<<<<<<<<<<
 *         return None
 *     return c2py(<rcp_const_basic>g)
*/
  __pyx_t_6 = (__pyx_v_ret_val == 0);
  if (__pyx_t_6) {

    /* "symengine/lib/symengine_wrapper.pyx":4793
 *         deref(symengine.rcp_static_cast_Integer(_n.thisptr)))
 *     if ret_val == 0:
 *         return None             # <<<<<<<<<<<<<<
 *     return c2py(<rcp_const_basic>g)
 * 
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":4792
 *     cdef cppbool ret_val = symengine.primitive_root(symengine.outArg_Integer(g),
 *         deref(symengine.rcp_static_cast_Integer(_n.thisptr)))
 *     if ret_val == 0:             # <<<<<<<<<<<<<<
 *         return None
 *     return c2py(<rcp_const_basic>g)
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":4794
 *     if ret_val == 0:
 *         return None
 *     return c2py(<rcp_const_basic>g)             # <<<<<<<<<<<<<<
 * 
 * def primitive_root_list(n):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)__pyx_v_g)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4794, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4786
 *     return c2py(<rcp_const_basic>(symengine.bernoulli(n)))
 * 
 * def primitive_root(n):             # <<<<<<<<<<<<<<
 *     cdef RCP[const symengine.Integer] g
 *     cdef Basic _n = sympify(n)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.primitive_root", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v__n);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4796
 *     return c2py(<rcp_const_basic>g)
 * 
 * def primitive_root_list(n):             # <<<<<<<<<<<<<<
 *     cdef symengine.vec_integer root_list
 *     cdef Basic _n = sympify(n)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_159primitive_root_list(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_159primitive_root_list = {"primitive_root_list", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_159primitive_root_list, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_159primitive_root_list(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_n = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("primitive_root_list (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_n,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 4796, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4796, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "primitive_root_list", 0) < (0)) __PYX_ERR(0, 4796, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("primitive_root_list", 1, 1, 1, i); __PYX_ERR(0, 4796, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4796, __pyx_L3_error)
    }
    __pyx_v_n = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("primitive_root_list", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4796, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.primitive_root_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_158primitive_root_list(__pyx_self, __pyx_v_n);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_158primitive_root_list(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_n) {
  SymEngine::vec_integer __pyx_v_root_list;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v__n = 0;
  PyObject *__pyx_v_s = NULL;
  std::vector<SymEngine::RCP<SymEngine::Integer> > ::size_type __pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  std::vector<SymEngine::RCP<SymEngine::Integer> > ::size_type __pyx_t_6;
  std::vector<SymEngine::RCP<SymEngine::Integer> > ::size_type __pyx_t_7;
  std::vector<SymEngine::RCP<SymEngine::Integer> > ::size_type __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("primitive_root_list", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4798
 * def primitive_root_list(n):
 *     cdef symengine.vec_integer root_list
 *     cdef Basic _n = sympify(n)             # <<<<<<<<<<<<<<
 *     require(_n, Integer)
 *     symengine.primitive_root_list(root_list,
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4798, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_n};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4798, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 4798, __pyx_L1_error)
  __pyx_v__n = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4799
 *     cdef symengine.vec_integer root_list
 *     cdef Basic _n = sympify(n)
 *     require(_n, Integer)             # <<<<<<<<<<<<<<
 *     symengine.primitive_root_list(root_list,
 *         deref(symengine.rcp_static_cast_Integer(_n.thisptr)))
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_require); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4799, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_Integer); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4799, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, ((PyObject *)__pyx_v__n), __pyx_t_5};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4799, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4800
 *     cdef Basic _n = sympify(n)
 *     require(_n, Integer)
 *     symengine.primitive_root_list(root_list,             # <<<<<<<<<<<<<<
 *         deref(symengine.rcp_static_cast_Integer(_n.thisptr)))
 *     s = []
*/
  SymEngine::primitive_root_list(__pyx_v_root_list, (*SymEngine::rcp_static_cast<const SymEngine::Integer>(__pyx_v__n->thisptr)));

  /* "symengine/lib/symengine_wrapper.pyx":4802
 *     symengine.primitive_root_list(root_list,
 *         deref(symengine.rcp_static_cast_Integer(_n.thisptr)))
 *     s = []             # <<<<<<<<<<<<<<
 *     for i in range(root_list.size()):
 *         s.append(c2py(<rcp_const_basic>(root_list[i])))
*/
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4802, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_s = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4803
 *         deref(symengine.rcp_static_cast_Integer(_n.thisptr)))
 *     s = []
 *     for i in range(root_list.size()):             # <<<<<<<<<<<<<<
 *         s.append(c2py(<rcp_const_basic>(root_list[i])))
 *     return s
*/
  __pyx_t_6 = __pyx_v_root_list.size();
  __pyx_t_7 = __pyx_t_6;
  for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) {
    __pyx_v_i = __pyx_t_8;

    /* "symengine/lib/symengine_wrapper.pyx":4804
 *     s = []
 *     for i in range(root_list.size()):
 *         s.append(c2py(<rcp_const_basic>(root_list[i])))             # <<<<<<<<<<<<<<
 *     return s
 * 
*/
    __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)(__pyx_v_root_list[__pyx_v_i]))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4804, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_s, __pyx_t_1); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 4804, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "symengine/lib/symengine_wrapper.pyx":4805
 *     for i in range(root_list.size()):
 *         s.append(c2py(<rcp_const_basic>(root_list[i])))
 *     return s             # <<<<<<<<<<<<<<
 * 
 * def totient(n):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_s);
  __pyx_r = __pyx_v_s;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4796
 *     return c2py(<rcp_const_basic>g)
 * 
 * def primitive_root_list(n):             # <<<<<<<<<<<<<<
 *     cdef symengine.vec_integer root_list
 *     cdef Basic _n = sympify(n)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.primitive_root_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v__n);
  __Pyx_XDECREF(__pyx_v_s);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4807
 *     return s
 * 
 * def totient(n):             # <<<<<<<<<<<<<<
 *     cdef Basic _n = sympify(n)
 *     require(_n, Integer)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_161totient(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_161totient = {"totient", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_161totient, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_161totient(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_n = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("totient (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_n,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 4807, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4807, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "totient", 0) < (0)) __PYX_ERR(0, 4807, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("totient", 1, 1, 1, i); __PYX_ERR(0, 4807, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4807, __pyx_L3_error)
    }
    __pyx_v_n = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("totient", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4807, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.totient", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_160totient(__pyx_self, __pyx_v_n);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_160totient(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_n) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v__n = 0;
  SymEngine::RCP<SymEngine::Integer const >  __pyx_v_m;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("totient", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4808
 * 
 * def totient(n):
 *     cdef Basic _n = sympify(n)             # <<<<<<<<<<<<<<
 *     require(_n, Integer)
 *     cdef RCP[const symengine.Integer] m = symengine.rcp_static_cast_Integer(_n.thisptr)
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4808, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_n};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4808, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 4808, __pyx_L1_error)
  __pyx_v__n = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4809
 * def totient(n):
 *     cdef Basic _n = sympify(n)
 *     require(_n, Integer)             # <<<<<<<<<<<<<<
 *     cdef RCP[const symengine.Integer] m = symengine.rcp_static_cast_Integer(_n.thisptr)
 *     return c2py(<rcp_const_basic>symengine.totient(m))
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_require); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4809, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_Integer); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4809, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, ((PyObject *)__pyx_v__n), __pyx_t_5};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4809, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4810
 *     cdef Basic _n = sympify(n)
 *     require(_n, Integer)
 *     cdef RCP[const symengine.Integer] m = symengine.rcp_static_cast_Integer(_n.thisptr)             # <<<<<<<<<<<<<<
 *     return c2py(<rcp_const_basic>symengine.totient(m))
 * 
*/
  __pyx_v_m = SymEngine::rcp_static_cast<const SymEngine::Integer>(__pyx_v__n->thisptr);

  /* "symengine/lib/symengine_wrapper.pyx":4811
 *     require(_n, Integer)
 *     cdef RCP[const symengine.Integer] m = symengine.rcp_static_cast_Integer(_n.thisptr)
 *     return c2py(<rcp_const_basic>symengine.totient(m))             # <<<<<<<<<<<<<<
 * 
 * def carmichael(n):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)SymEngine::totient(__pyx_v_m))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4811, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4807
 *     return s
 * 
 * def totient(n):             # <<<<<<<<<<<<<<
 *     cdef Basic _n = sympify(n)
 *     require(_n, Integer)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.totient", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v__n);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4813
 *     return c2py(<rcp_const_basic>symengine.totient(m))
 * 
 * def carmichael(n):             # <<<<<<<<<<<<<<
 *     cdef Basic _n = sympify(n)
 *     require(_n, Integer)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_163carmichael(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_163carmichael = {"carmichael", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_163carmichael, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_163carmichael(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_n = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("carmichael (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_n,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 4813, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4813, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "carmichael", 0) < (0)) __PYX_ERR(0, 4813, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("carmichael", 1, 1, 1, i); __PYX_ERR(0, 4813, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4813, __pyx_L3_error)
    }
    __pyx_v_n = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("carmichael", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4813, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.carmichael", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_162carmichael(__pyx_self, __pyx_v_n);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_162carmichael(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_n) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v__n = 0;
  SymEngine::RCP<SymEngine::Integer const >  __pyx_v_m;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("carmichael", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4814
 * 
 * def carmichael(n):
 *     cdef Basic _n = sympify(n)             # <<<<<<<<<<<<<<
 *     require(_n, Integer)
 *     cdef RCP[const symengine.Integer] m = symengine.rcp_static_cast_Integer(_n.thisptr)
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4814, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_n};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4814, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 4814, __pyx_L1_error)
  __pyx_v__n = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4815
 * def carmichael(n):
 *     cdef Basic _n = sympify(n)
 *     require(_n, Integer)             # <<<<<<<<<<<<<<
 *     cdef RCP[const symengine.Integer] m = symengine.rcp_static_cast_Integer(_n.thisptr)
 *     return c2py(<rcp_const_basic>symengine.carmichael(m))
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_require); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4815, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_Integer); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4815, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, ((PyObject *)__pyx_v__n), __pyx_t_5};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4815, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4816
 *     cdef Basic _n = sympify(n)
 *     require(_n, Integer)
 *     cdef RCP[const symengine.Integer] m = symengine.rcp_static_cast_Integer(_n.thisptr)             # <<<<<<<<<<<<<<
 *     return c2py(<rcp_const_basic>symengine.carmichael(m))
 * 
*/
  __pyx_v_m = SymEngine::rcp_static_cast<const SymEngine::Integer>(__pyx_v__n->thisptr);

  /* "symengine/lib/symengine_wrapper.pyx":4817
 *     require(_n, Integer)
 *     cdef RCP[const symengine.Integer] m = symengine.rcp_static_cast_Integer(_n.thisptr)
 *     return c2py(<rcp_const_basic>symengine.carmichael(m))             # <<<<<<<<<<<<<<
 * 
 * def multiplicative_order(a, n):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)SymEngine::carmichael(__pyx_v_m))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4817, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4813
 *     return c2py(<rcp_const_basic>symengine.totient(m))
 * 
 * def carmichael(n):             # <<<<<<<<<<<<<<
 *     cdef Basic _n = sympify(n)
 *     require(_n, Integer)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.carmichael", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v__n);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4819
 *     return c2py(<rcp_const_basic>symengine.carmichael(m))
 * 
 * def multiplicative_order(a, n):             # <<<<<<<<<<<<<<
 *     cdef Basic _n = sympify(n)
 *     cdef Basic _a = sympify(a)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_165multiplicative_order(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_165multiplicative_order = {"multiplicative_order", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_165multiplicative_order, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_165multiplicative_order(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_a = 0;
  PyObject *__pyx_v_n = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("multiplicative_order (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_a,&__pyx_mstate_global->__pyx_n_u_n,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 4819, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4819, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4819, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "multiplicative_order", 0) < (0)) __PYX_ERR(0, 4819, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("multiplicative_order", 1, 2, 2, i); __PYX_ERR(0, 4819, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4819, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4819, __pyx_L3_error)
    }
    __pyx_v_a = values[0];
    __pyx_v_n = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("multiplicative_order", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 4819, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.multiplicative_order", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_164multiplicative_order(__pyx_self, __pyx_v_a, __pyx_v_n);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_164multiplicative_order(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_a, PyObject *__pyx_v_n) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v__n = 0;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v__a = 0;
  SymEngine::RCP<SymEngine::Integer const >  __pyx_v_n1;
  SymEngine::RCP<SymEngine::Integer const >  __pyx_v_a1;
  SymEngine::RCP<SymEngine::Integer const >  __pyx_v_o;
  bool __pyx_v_c;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("multiplicative_order", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4820
 * 
 * def multiplicative_order(a, n):
 *     cdef Basic _n = sympify(n)             # <<<<<<<<<<<<<<
 *     cdef Basic _a = sympify(a)
 *     require(_n, Integer)
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4820, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_n};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4820, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 4820, __pyx_L1_error)
  __pyx_v__n = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4821
 * def multiplicative_order(a, n):
 *     cdef Basic _n = sympify(n)
 *     cdef Basic _a = sympify(a)             # <<<<<<<<<<<<<<
 *     require(_n, Integer)
 *     require(_a, Integer)
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4821, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_a};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4821, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 4821, __pyx_L1_error)
  __pyx_v__a = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4822
 *     cdef Basic _n = sympify(n)
 *     cdef Basic _a = sympify(a)
 *     require(_n, Integer)             # <<<<<<<<<<<<<<
 *     require(_a, Integer)
 *     cdef RCP[const symengine.Integer] n1 = symengine.rcp_static_cast_Integer(_n.thisptr)
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_require); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4822, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_Integer); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4822, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, ((PyObject *)__pyx_v__n), __pyx_t_5};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4822, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4823
 *     cdef Basic _a = sympify(a)
 *     require(_n, Integer)
 *     require(_a, Integer)             # <<<<<<<<<<<<<<
 *     cdef RCP[const symengine.Integer] n1 = symengine.rcp_static_cast_Integer(_n.thisptr)
 *     cdef RCP[const symengine.Integer] a1 = symengine.rcp_static_cast_Integer(_a.thisptr)
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_require); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4823, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Integer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4823, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, ((PyObject *)__pyx_v__a), __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4823, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4824
 *     require(_n, Integer)
 *     require(_a, Integer)
 *     cdef RCP[const symengine.Integer] n1 = symengine.rcp_static_cast_Integer(_n.thisptr)             # <<<<<<<<<<<<<<
 *     cdef RCP[const symengine.Integer] a1 = symengine.rcp_static_cast_Integer(_a.thisptr)
 *     cdef RCP[const symengine.Integer] o
*/
  __pyx_v_n1 = SymEngine::rcp_static_cast<const SymEngine::Integer>(__pyx_v__n->thisptr);

  /* "symengine/lib/symengine_wrapper.pyx":4825
 *     require(_a, Integer)
 *     cdef RCP[const symengine.Integer] n1 = symengine.rcp_static_cast_Integer(_n.thisptr)
 *     cdef RCP[const symengine.Integer] a1 = symengine.rcp_static_cast_Integer(_a.thisptr)             # <<<<<<<<<<<<<<
 *     cdef RCP[const symengine.Integer] o
 *     cdef cppbool c = symengine.multiplicative_order(symengine.outArg_Integer(o),
*/
  __pyx_v_a1 = SymEngine::rcp_static_cast<const SymEngine::Integer>(__pyx_v__a->thisptr);

  /* "symengine/lib/symengine_wrapper.pyx":4827
 *     cdef RCP[const symengine.Integer] a1 = symengine.rcp_static_cast_Integer(_a.thisptr)
 *     cdef RCP[const symengine.Integer] o
 *     cdef cppbool c = symengine.multiplicative_order(symengine.outArg_Integer(o),             # <<<<<<<<<<<<<<
 *         a1, n1)
 *     if not c:
*/
  __pyx_v_c = SymEngine::multiplicative_order(SymEngine::outArg<SymEngine::RCP<const SymEngine::Integer>>(__pyx_v_o), __pyx_v_a1, __pyx_v_n1);

  /* "symengine/lib/symengine_wrapper.pyx":4829
 *     cdef cppbool c = symengine.multiplicative_order(symengine.outArg_Integer(o),
 *         a1, n1)
 *     if not c:             # <<<<<<<<<<<<<<
 *         return None
 *     return c2py(<rcp_const_basic>o)
*/
  __pyx_t_6 = (!(__pyx_v_c != 0));
  if (__pyx_t_6) {

    /* "symengine/lib/symengine_wrapper.pyx":4830
 *         a1, n1)
 *     if not c:
 *         return None             # <<<<<<<<<<<<<<
 *     return c2py(<rcp_const_basic>o)
 * 
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":4829
 *     cdef cppbool c = symengine.multiplicative_order(symengine.outArg_Integer(o),
 *         a1, n1)
 *     if not c:             # <<<<<<<<<<<<<<
 *         return None
 *     return c2py(<rcp_const_basic>o)
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":4831
 *     if not c:
 *         return None
 *     return c2py(<rcp_const_basic>o)             # <<<<<<<<<<<<<<
 * 
 * def legendre(a, n):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)__pyx_v_o)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4831, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4819
 *     return c2py(<rcp_const_basic>symengine.carmichael(m))
 * 
 * def multiplicative_order(a, n):             # <<<<<<<<<<<<<<
 *     cdef Basic _n = sympify(n)
 *     cdef Basic _a = sympify(a)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.multiplicative_order", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v__n);
  __Pyx_XDECREF((PyObject *)__pyx_v__a);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4833
 *     return c2py(<rcp_const_basic>o)
 * 
 * def legendre(a, n):             # <<<<<<<<<<<<<<
 *     cdef Basic _n = sympify(n)
 *     cdef Basic _a = sympify(a)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_167legendre(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_167legendre = {"legendre", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_167legendre, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_167legendre(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_a = 0;
  PyObject *__pyx_v_n = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("legendre (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_a,&__pyx_mstate_global->__pyx_n_u_n,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 4833, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4833, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4833, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "legendre", 0) < (0)) __PYX_ERR(0, 4833, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("legendre", 1, 2, 2, i); __PYX_ERR(0, 4833, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4833, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4833, __pyx_L3_error)
    }
    __pyx_v_a = values[0];
    __pyx_v_n = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("legendre", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 4833, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.legendre", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_166legendre(__pyx_self, __pyx_v_a, __pyx_v_n);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_166legendre(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_a, PyObject *__pyx_v_n) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v__n = 0;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v__a = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("legendre", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4834
 * 
 * def legendre(a, n):
 *     cdef Basic _n = sympify(n)             # <<<<<<<<<<<<<<
 *     cdef Basic _a = sympify(a)
 *     require(_n, Integer)
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4834, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_n};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4834, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 4834, __pyx_L1_error)
  __pyx_v__n = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4835
 * def legendre(a, n):
 *     cdef Basic _n = sympify(n)
 *     cdef Basic _a = sympify(a)             # <<<<<<<<<<<<<<
 *     require(_n, Integer)
 *     require(_a, Integer)
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4835, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_a};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4835, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 4835, __pyx_L1_error)
  __pyx_v__a = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4836
 *     cdef Basic _n = sympify(n)
 *     cdef Basic _a = sympify(a)
 *     require(_n, Integer)             # <<<<<<<<<<<<<<
 *     require(_a, Integer)
 *     return symengine.legendre(deref(symengine.rcp_static_cast_Integer(_a.thisptr)),
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_require); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4836, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_Integer); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4836, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, ((PyObject *)__pyx_v__n), __pyx_t_5};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4836, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4837
 *     cdef Basic _a = sympify(a)
 *     require(_n, Integer)
 *     require(_a, Integer)             # <<<<<<<<<<<<<<
 *     return symengine.legendre(deref(symengine.rcp_static_cast_Integer(_a.thisptr)),
 *         deref(symengine.rcp_static_cast_Integer(_n.thisptr)))
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_require); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4837, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Integer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4837, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, ((PyObject *)__pyx_v__a), __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4837, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4838
 *     require(_n, Integer)
 *     require(_a, Integer)
 *     return symengine.legendre(deref(symengine.rcp_static_cast_Integer(_a.thisptr)),             # <<<<<<<<<<<<<<
 *         deref(symengine.rcp_static_cast_Integer(_n.thisptr)))
 * 
*/
  __Pyx_XDECREF(__pyx_r);

  /* "symengine/lib/symengine_wrapper.pyx":4839
 *     require(_a, Integer)
 *     return symengine.legendre(deref(symengine.rcp_static_cast_Integer(_a.thisptr)),
 *         deref(symengine.rcp_static_cast_Integer(_n.thisptr)))             # <<<<<<<<<<<<<<
 * 
 * def jacobi(a, n):
*/
  __pyx_t_1 = __Pyx_PyLong_From_int(SymEngine::legendre((*SymEngine::rcp_static_cast<const SymEngine::Integer>(__pyx_v__a->thisptr)), (*SymEngine::rcp_static_cast<const SymEngine::Integer>(__pyx_v__n->thisptr)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4838, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4833
 *     return c2py(<rcp_const_basic>o)
 * 
 * def legendre(a, n):             # <<<<<<<<<<<<<<
 *     cdef Basic _n = sympify(n)
 *     cdef Basic _a = sympify(a)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.legendre", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v__n);
  __Pyx_XDECREF((PyObject *)__pyx_v__a);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4841
 *         deref(symengine.rcp_static_cast_Integer(_n.thisptr)))
 * 
 * def jacobi(a, n):             # <<<<<<<<<<<<<<
 *     cdef Basic _n = sympify(n)
 *     cdef Basic _a = sympify(a)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_169jacobi(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_169jacobi = {"jacobi", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_169jacobi, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_169jacobi(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_a = 0;
  PyObject *__pyx_v_n = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("jacobi (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_a,&__pyx_mstate_global->__pyx_n_u_n,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 4841, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4841, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4841, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "jacobi", 0) < (0)) __PYX_ERR(0, 4841, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("jacobi", 1, 2, 2, i); __PYX_ERR(0, 4841, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4841, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4841, __pyx_L3_error)
    }
    __pyx_v_a = values[0];
    __pyx_v_n = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("jacobi", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 4841, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.jacobi", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_168jacobi(__pyx_self, __pyx_v_a, __pyx_v_n);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_168jacobi(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_a, PyObject *__pyx_v_n) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v__n = 0;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v__a = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("jacobi", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4842
 * 
 * def jacobi(a, n):
 *     cdef Basic _n = sympify(n)             # <<<<<<<<<<<<<<
 *     cdef Basic _a = sympify(a)
 *     require(_n, Integer)
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4842, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_n};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4842, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 4842, __pyx_L1_error)
  __pyx_v__n = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4843
 * def jacobi(a, n):
 *     cdef Basic _n = sympify(n)
 *     cdef Basic _a = sympify(a)             # <<<<<<<<<<<<<<
 *     require(_n, Integer)
 *     require(_a, Integer)
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4843, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_a};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4843, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 4843, __pyx_L1_error)
  __pyx_v__a = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4844
 *     cdef Basic _n = sympify(n)
 *     cdef Basic _a = sympify(a)
 *     require(_n, Integer)             # <<<<<<<<<<<<<<
 *     require(_a, Integer)
 *     return symengine.jacobi(deref(symengine.rcp_static_cast_Integer(_a.thisptr)),
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_require); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4844, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_Integer); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4844, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, ((PyObject *)__pyx_v__n), __pyx_t_5};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4844, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4845
 *     cdef Basic _a = sympify(a)
 *     require(_n, Integer)
 *     require(_a, Integer)             # <<<<<<<<<<<<<<
 *     return symengine.jacobi(deref(symengine.rcp_static_cast_Integer(_a.thisptr)),
 *         deref(symengine.rcp_static_cast_Integer(_n.thisptr)))
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_require); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4845, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Integer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4845, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, ((PyObject *)__pyx_v__a), __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4845, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4846
 *     require(_n, Integer)
 *     require(_a, Integer)
 *     return symengine.jacobi(deref(symengine.rcp_static_cast_Integer(_a.thisptr)),             # <<<<<<<<<<<<<<
 *         deref(symengine.rcp_static_cast_Integer(_n.thisptr)))
 * 
*/
  __Pyx_XDECREF(__pyx_r);

  /* "symengine/lib/symengine_wrapper.pyx":4847
 *     require(_a, Integer)
 *     return symengine.jacobi(deref(symengine.rcp_static_cast_Integer(_a.thisptr)),
 *         deref(symengine.rcp_static_cast_Integer(_n.thisptr)))             # <<<<<<<<<<<<<<
 * 
 * def kronecker(a, n):
*/
  __pyx_t_1 = __Pyx_PyLong_From_int(SymEngine::jacobi((*SymEngine::rcp_static_cast<const SymEngine::Integer>(__pyx_v__a->thisptr)), (*SymEngine::rcp_static_cast<const SymEngine::Integer>(__pyx_v__n->thisptr)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4846, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4841
 *         deref(symengine.rcp_static_cast_Integer(_n.thisptr)))
 * 
 * def jacobi(a, n):             # <<<<<<<<<<<<<<
 *     cdef Basic _n = sympify(n)
 *     cdef Basic _a = sympify(a)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.jacobi", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v__n);
  __Pyx_XDECREF((PyObject *)__pyx_v__a);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4849
 *         deref(symengine.rcp_static_cast_Integer(_n.thisptr)))
 * 
 * def kronecker(a, n):             # <<<<<<<<<<<<<<
 *     cdef Basic _n = sympify(n)
 *     cdef Basic _a = sympify(a)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_171kronecker(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_171kronecker = {"kronecker", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_171kronecker, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_171kronecker(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_a = 0;
  PyObject *__pyx_v_n = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("kronecker (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_a,&__pyx_mstate_global->__pyx_n_u_n,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 4849, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4849, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4849, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "kronecker", 0) < (0)) __PYX_ERR(0, 4849, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("kronecker", 1, 2, 2, i); __PYX_ERR(0, 4849, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4849, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4849, __pyx_L3_error)
    }
    __pyx_v_a = values[0];
    __pyx_v_n = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("kronecker", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 4849, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.kronecker", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_170kronecker(__pyx_self, __pyx_v_a, __pyx_v_n);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_170kronecker(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_a, PyObject *__pyx_v_n) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v__n = 0;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v__a = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("kronecker", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4850
 * 
 * def kronecker(a, n):
 *     cdef Basic _n = sympify(n)             # <<<<<<<<<<<<<<
 *     cdef Basic _a = sympify(a)
 *     require(_n, Integer)
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4850, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_n};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4850, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 4850, __pyx_L1_error)
  __pyx_v__n = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4851
 * def kronecker(a, n):
 *     cdef Basic _n = sympify(n)
 *     cdef Basic _a = sympify(a)             # <<<<<<<<<<<<<<
 *     require(_n, Integer)
 *     require(_a, Integer)
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4851, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_a};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4851, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 4851, __pyx_L1_error)
  __pyx_v__a = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4852
 *     cdef Basic _n = sympify(n)
 *     cdef Basic _a = sympify(a)
 *     require(_n, Integer)             # <<<<<<<<<<<<<<
 *     require(_a, Integer)
 *     return symengine.kronecker(deref(symengine.rcp_static_cast_Integer(_a.thisptr)),
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_require); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4852, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_Integer); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4852, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, ((PyObject *)__pyx_v__n), __pyx_t_5};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4852, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4853
 *     cdef Basic _a = sympify(a)
 *     require(_n, Integer)
 *     require(_a, Integer)             # <<<<<<<<<<<<<<
 *     return symengine.kronecker(deref(symengine.rcp_static_cast_Integer(_a.thisptr)),
 *         deref(symengine.rcp_static_cast_Integer(_n.thisptr)))
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_require); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4853, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Integer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4853, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, ((PyObject *)__pyx_v__a), __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4853, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4854
 *     require(_n, Integer)
 *     require(_a, Integer)
 *     return symengine.kronecker(deref(symengine.rcp_static_cast_Integer(_a.thisptr)),             # <<<<<<<<<<<<<<
 *         deref(symengine.rcp_static_cast_Integer(_n.thisptr)))
 * 
*/
  __Pyx_XDECREF(__pyx_r);

  /* "symengine/lib/symengine_wrapper.pyx":4855
 *     require(_a, Integer)
 *     return symengine.kronecker(deref(symengine.rcp_static_cast_Integer(_a.thisptr)),
 *         deref(symengine.rcp_static_cast_Integer(_n.thisptr)))             # <<<<<<<<<<<<<<
 * 
 * def nthroot_mod(a, n, m):
*/
  __pyx_t_1 = __Pyx_PyLong_From_int(SymEngine::kronecker((*SymEngine::rcp_static_cast<const SymEngine::Integer>(__pyx_v__a->thisptr)), (*SymEngine::rcp_static_cast<const SymEngine::Integer>(__pyx_v__n->thisptr)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4854, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4849
 *         deref(symengine.rcp_static_cast_Integer(_n.thisptr)))
 * 
 * def kronecker(a, n):             # <<<<<<<<<<<<<<
 *     cdef Basic _n = sympify(n)
 *     cdef Basic _a = sympify(a)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.kronecker", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v__n);
  __Pyx_XDECREF((PyObject *)__pyx_v__a);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4857
 *         deref(symengine.rcp_static_cast_Integer(_n.thisptr)))
 * 
 * def nthroot_mod(a, n, m):             # <<<<<<<<<<<<<<
 *     cdef RCP[const symengine.Integer] root
 *     cdef Basic _n = sympify(n)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_173nthroot_mod(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_173nthroot_mod = {"nthroot_mod", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_173nthroot_mod, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_173nthroot_mod(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_a = 0;
  PyObject *__pyx_v_n = 0;
  PyObject *__pyx_v_m = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("nthroot_mod (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_a,&__pyx_mstate_global->__pyx_n_u_n,&__pyx_mstate_global->__pyx_n_u_m,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 4857, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 4857, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4857, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4857, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "nthroot_mod", 0) < (0)) __PYX_ERR(0, 4857, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("nthroot_mod", 1, 3, 3, i); __PYX_ERR(0, 4857, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4857, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4857, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 4857, __pyx_L3_error)
    }
    __pyx_v_a = values[0];
    __pyx_v_n = values[1];
    __pyx_v_m = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("nthroot_mod", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 4857, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.nthroot_mod", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_172nthroot_mod(__pyx_self, __pyx_v_a, __pyx_v_n, __pyx_v_m);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_172nthroot_mod(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_a, PyObject *__pyx_v_n, PyObject *__pyx_v_m) {
  SymEngine::RCP<SymEngine::Integer const >  __pyx_v_root;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v__n = 0;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v__a = 0;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v__m = 0;
  SymEngine::RCP<SymEngine::Integer const >  __pyx_v_n1;
  SymEngine::RCP<SymEngine::Integer const >  __pyx_v_a1;
  SymEngine::RCP<SymEngine::Integer const >  __pyx_v_m1;
  bool __pyx_v_ret_val;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("nthroot_mod", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4859
 * def nthroot_mod(a, n, m):
 *     cdef RCP[const symengine.Integer] root
 *     cdef Basic _n = sympify(n)             # <<<<<<<<<<<<<<
 *     cdef Basic _a = sympify(a)
 *     cdef Basic _m = sympify(m)
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4859, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_n};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4859, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 4859, __pyx_L1_error)
  __pyx_v__n = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4860
 *     cdef RCP[const symengine.Integer] root
 *     cdef Basic _n = sympify(n)
 *     cdef Basic _a = sympify(a)             # <<<<<<<<<<<<<<
 *     cdef Basic _m = sympify(m)
 *     require(_n, Integer)
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4860, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_a};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4860, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 4860, __pyx_L1_error)
  __pyx_v__a = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4861
 *     cdef Basic _n = sympify(n)
 *     cdef Basic _a = sympify(a)
 *     cdef Basic _m = sympify(m)             # <<<<<<<<<<<<<<
 *     require(_n, Integer)
 *     require(_a, Integer)
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4861, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_m};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4861, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 4861, __pyx_L1_error)
  __pyx_v__m = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4862
 *     cdef Basic _a = sympify(a)
 *     cdef Basic _m = sympify(m)
 *     require(_n, Integer)             # <<<<<<<<<<<<<<
 *     require(_a, Integer)
 *     require(_m, Integer)
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_require); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4862, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_Integer); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4862, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, ((PyObject *)__pyx_v__n), __pyx_t_5};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4862, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4863
 *     cdef Basic _m = sympify(m)
 *     require(_n, Integer)
 *     require(_a, Integer)             # <<<<<<<<<<<<<<
 *     require(_m, Integer)
 *     cdef RCP[const symengine.Integer] n1 = symengine.rcp_static_cast_Integer(_n.thisptr)
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_require); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4863, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Integer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4863, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, ((PyObject *)__pyx_v__a), __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4863, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4864
 *     require(_n, Integer)
 *     require(_a, Integer)
 *     require(_m, Integer)             # <<<<<<<<<<<<<<
 *     cdef RCP[const symengine.Integer] n1 = symengine.rcp_static_cast_Integer(_n.thisptr)
 *     cdef RCP[const symengine.Integer] a1 = symengine.rcp_static_cast_Integer(_a.thisptr)
*/
  __pyx_t_5 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_require); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4864, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Integer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4864, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_5, ((PyObject *)__pyx_v__m), __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4864, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4865
 *     require(_a, Integer)
 *     require(_m, Integer)
 *     cdef RCP[const symengine.Integer] n1 = symengine.rcp_static_cast_Integer(_n.thisptr)             # <<<<<<<<<<<<<<
 *     cdef RCP[const symengine.Integer] a1 = symengine.rcp_static_cast_Integer(_a.thisptr)
 *     cdef RCP[const symengine.Integer] m1 = symengine.rcp_static_cast_Integer(_m.thisptr)
*/
  __pyx_v_n1 = SymEngine::rcp_static_cast<const SymEngine::Integer>(__pyx_v__n->thisptr);

  /* "symengine/lib/symengine_wrapper.pyx":4866
 *     require(_m, Integer)
 *     cdef RCP[const symengine.Integer] n1 = symengine.rcp_static_cast_Integer(_n.thisptr)
 *     cdef RCP[const symengine.Integer] a1 = symengine.rcp_static_cast_Integer(_a.thisptr)             # <<<<<<<<<<<<<<
 *     cdef RCP[const symengine.Integer] m1 = symengine.rcp_static_cast_Integer(_m.thisptr)
 *     cdef cppbool ret_val = symengine.nthroot_mod(symengine.outArg_Integer(root), a1, n1, m1)
*/
  __pyx_v_a1 = SymEngine::rcp_static_cast<const SymEngine::Integer>(__pyx_v__a->thisptr);

  /* "symengine/lib/symengine_wrapper.pyx":4867
 *     cdef RCP[const symengine.Integer] n1 = symengine.rcp_static_cast_Integer(_n.thisptr)
 *     cdef RCP[const symengine.Integer] a1 = symengine.rcp_static_cast_Integer(_a.thisptr)
 *     cdef RCP[const symengine.Integer] m1 = symengine.rcp_static_cast_Integer(_m.thisptr)             # <<<<<<<<<<<<<<
 *     cdef cppbool ret_val = symengine.nthroot_mod(symengine.outArg_Integer(root), a1, n1, m1)
 *     if not ret_val:
*/
  __pyx_v_m1 = SymEngine::rcp_static_cast<const SymEngine::Integer>(__pyx_v__m->thisptr);

  /* "symengine/lib/symengine_wrapper.pyx":4868
 *     cdef RCP[const symengine.Integer] a1 = symengine.rcp_static_cast_Integer(_a.thisptr)
 *     cdef RCP[const symengine.Integer] m1 = symengine.rcp_static_cast_Integer(_m.thisptr)
 *     cdef cppbool ret_val = symengine.nthroot_mod(symengine.outArg_Integer(root), a1, n1, m1)             # <<<<<<<<<<<<<<
 *     if not ret_val:
 *         return None
*/
  __pyx_v_ret_val = SymEngine::nthroot_mod(SymEngine::outArg<SymEngine::RCP<const SymEngine::Integer>>(__pyx_v_root), __pyx_v_a1, __pyx_v_n1, __pyx_v_m1);

  /* "symengine/lib/symengine_wrapper.pyx":4869
 *     cdef RCP[const symengine.Integer] m1 = symengine.rcp_static_cast_Integer(_m.thisptr)
 *     cdef cppbool ret_val = symengine.nthroot_mod(symengine.outArg_Integer(root), a1, n1, m1)
 *     if not ret_val:             # <<<<<<<<<<<<<<
 *         return None
 *     return c2py(<rcp_const_basic>root)
*/
  __pyx_t_6 = (!(__pyx_v_ret_val != 0));
  if (__pyx_t_6) {

    /* "symengine/lib/symengine_wrapper.pyx":4870
 *     cdef cppbool ret_val = symengine.nthroot_mod(symengine.outArg_Integer(root), a1, n1, m1)
 *     if not ret_val:
 *         return None             # <<<<<<<<<<<<<<
 *     return c2py(<rcp_const_basic>root)
 * 
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":4869
 *     cdef RCP[const symengine.Integer] m1 = symengine.rcp_static_cast_Integer(_m.thisptr)
 *     cdef cppbool ret_val = symengine.nthroot_mod(symengine.outArg_Integer(root), a1, n1, m1)
 *     if not ret_val:             # <<<<<<<<<<<<<<
 *         return None
 *     return c2py(<rcp_const_basic>root)
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":4871
 *     if not ret_val:
 *         return None
 *     return c2py(<rcp_const_basic>root)             # <<<<<<<<<<<<<<
 * 
 * def nthroot_mod_list(a, n, m):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)__pyx_v_root)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4871, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4857
 *         deref(symengine.rcp_static_cast_Integer(_n.thisptr)))
 * 
 * def nthroot_mod(a, n, m):             # <<<<<<<<<<<<<<
 *     cdef RCP[const symengine.Integer] root
 *     cdef Basic _n = sympify(n)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.nthroot_mod", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v__n);
  __Pyx_XDECREF((PyObject *)__pyx_v__a);
  __Pyx_XDECREF((PyObject *)__pyx_v__m);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4873
 *     return c2py(<rcp_const_basic>root)
 * 
 * def nthroot_mod_list(a, n, m):             # <<<<<<<<<<<<<<
 *     cdef symengine.vec_integer root_list
 *     cdef Basic _n = sympify(n)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_175nthroot_mod_list(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_175nthroot_mod_list = {"nthroot_mod_list", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_175nthroot_mod_list, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_175nthroot_mod_list(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_a = 0;
  PyObject *__pyx_v_n = 0;
  PyObject *__pyx_v_m = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("nthroot_mod_list (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_a,&__pyx_mstate_global->__pyx_n_u_n,&__pyx_mstate_global->__pyx_n_u_m,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 4873, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 4873, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4873, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4873, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "nthroot_mod_list", 0) < (0)) __PYX_ERR(0, 4873, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("nthroot_mod_list", 1, 3, 3, i); __PYX_ERR(0, 4873, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4873, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4873, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 4873, __pyx_L3_error)
    }
    __pyx_v_a = values[0];
    __pyx_v_n = values[1];
    __pyx_v_m = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("nthroot_mod_list", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 4873, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.nthroot_mod_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_174nthroot_mod_list(__pyx_self, __pyx_v_a, __pyx_v_n, __pyx_v_m);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_174nthroot_mod_list(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_a, PyObject *__pyx_v_n, PyObject *__pyx_v_m) {
  SymEngine::vec_integer __pyx_v_root_list;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v__n = 0;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v__a = 0;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v__m = 0;
  SymEngine::RCP<SymEngine::Integer const >  __pyx_v_n1;
  SymEngine::RCP<SymEngine::Integer const >  __pyx_v_a1;
  SymEngine::RCP<SymEngine::Integer const >  __pyx_v_m1;
  PyObject *__pyx_v_s = NULL;
  std::vector<SymEngine::RCP<SymEngine::Integer> > ::size_type __pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  std::vector<SymEngine::RCP<SymEngine::Integer> > ::size_type __pyx_t_6;
  std::vector<SymEngine::RCP<SymEngine::Integer> > ::size_type __pyx_t_7;
  std::vector<SymEngine::RCP<SymEngine::Integer> > ::size_type __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("nthroot_mod_list", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4875
 * def nthroot_mod_list(a, n, m):
 *     cdef symengine.vec_integer root_list
 *     cdef Basic _n = sympify(n)             # <<<<<<<<<<<<<<
 *     cdef Basic _a = sympify(a)
 *     cdef Basic _m = sympify(m)
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4875, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_n};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4875, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 4875, __pyx_L1_error)
  __pyx_v__n = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4876
 *     cdef symengine.vec_integer root_list
 *     cdef Basic _n = sympify(n)
 *     cdef Basic _a = sympify(a)             # <<<<<<<<<<<<<<
 *     cdef Basic _m = sympify(m)
 *     require(_n, Integer)
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4876, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_a};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4876, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 4876, __pyx_L1_error)
  __pyx_v__a = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4877
 *     cdef Basic _n = sympify(n)
 *     cdef Basic _a = sympify(a)
 *     cdef Basic _m = sympify(m)             # <<<<<<<<<<<<<<
 *     require(_n, Integer)
 *     require(_a, Integer)
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4877, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_m};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4877, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 4877, __pyx_L1_error)
  __pyx_v__m = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4878
 *     cdef Basic _a = sympify(a)
 *     cdef Basic _m = sympify(m)
 *     require(_n, Integer)             # <<<<<<<<<<<<<<
 *     require(_a, Integer)
 *     require(_m, Integer)
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_require); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4878, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_Integer); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4878, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, ((PyObject *)__pyx_v__n), __pyx_t_5};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4878, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4879
 *     cdef Basic _m = sympify(m)
 *     require(_n, Integer)
 *     require(_a, Integer)             # <<<<<<<<<<<<<<
 *     require(_m, Integer)
 *     cdef RCP[const symengine.Integer] n1 = symengine.rcp_static_cast_Integer(_n.thisptr)
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_require); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4879, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Integer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4879, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, ((PyObject *)__pyx_v__a), __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4879, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4880
 *     require(_n, Integer)
 *     require(_a, Integer)
 *     require(_m, Integer)             # <<<<<<<<<<<<<<
 *     cdef RCP[const symengine.Integer] n1 = symengine.rcp_static_cast_Integer(_n.thisptr)
 *     cdef RCP[const symengine.Integer] a1 = symengine.rcp_static_cast_Integer(_a.thisptr)
*/
  __pyx_t_5 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_require); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4880, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Integer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4880, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_5);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_5, ((PyObject *)__pyx_v__m), __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4880, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4881
 *     require(_a, Integer)
 *     require(_m, Integer)
 *     cdef RCP[const symengine.Integer] n1 = symengine.rcp_static_cast_Integer(_n.thisptr)             # <<<<<<<<<<<<<<
 *     cdef RCP[const symengine.Integer] a1 = symengine.rcp_static_cast_Integer(_a.thisptr)
 *     cdef RCP[const symengine.Integer] m1 = symengine.rcp_static_cast_Integer(_m.thisptr)
*/
  __pyx_v_n1 = SymEngine::rcp_static_cast<const SymEngine::Integer>(__pyx_v__n->thisptr);

  /* "symengine/lib/symengine_wrapper.pyx":4882
 *     require(_m, Integer)
 *     cdef RCP[const symengine.Integer] n1 = symengine.rcp_static_cast_Integer(_n.thisptr)
 *     cdef RCP[const symengine.Integer] a1 = symengine.rcp_static_cast_Integer(_a.thisptr)             # <<<<<<<<<<<<<<
 *     cdef RCP[const symengine.Integer] m1 = symengine.rcp_static_cast_Integer(_m.thisptr)
 *     symengine.nthroot_mod_list(root_list, a1, n1, m1)
*/
  __pyx_v_a1 = SymEngine::rcp_static_cast<const SymEngine::Integer>(__pyx_v__a->thisptr);

  /* "symengine/lib/symengine_wrapper.pyx":4883
 *     cdef RCP[const symengine.Integer] n1 = symengine.rcp_static_cast_Integer(_n.thisptr)
 *     cdef RCP[const symengine.Integer] a1 = symengine.rcp_static_cast_Integer(_a.thisptr)
 *     cdef RCP[const symengine.Integer] m1 = symengine.rcp_static_cast_Integer(_m.thisptr)             # <<<<<<<<<<<<<<
 *     symengine.nthroot_mod_list(root_list, a1, n1, m1)
 *     s = []
*/
  __pyx_v_m1 = SymEngine::rcp_static_cast<const SymEngine::Integer>(__pyx_v__m->thisptr);

  /* "symengine/lib/symengine_wrapper.pyx":4884
 *     cdef RCP[const symengine.Integer] a1 = symengine.rcp_static_cast_Integer(_a.thisptr)
 *     cdef RCP[const symengine.Integer] m1 = symengine.rcp_static_cast_Integer(_m.thisptr)
 *     symengine.nthroot_mod_list(root_list, a1, n1, m1)             # <<<<<<<<<<<<<<
 *     s = []
 *     for i in range(root_list.size()):
*/
  SymEngine::nthroot_mod_list(__pyx_v_root_list, __pyx_v_a1, __pyx_v_n1, __pyx_v_m1);

  /* "symengine/lib/symengine_wrapper.pyx":4885
 *     cdef RCP[const symengine.Integer] m1 = symengine.rcp_static_cast_Integer(_m.thisptr)
 *     symengine.nthroot_mod_list(root_list, a1, n1, m1)
 *     s = []             # <<<<<<<<<<<<<<
 *     for i in range(root_list.size()):
 *         s.append(c2py(<rcp_const_basic>(root_list[i])))
*/
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4885, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_s = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4886
 *     symengine.nthroot_mod_list(root_list, a1, n1, m1)
 *     s = []
 *     for i in range(root_list.size()):             # <<<<<<<<<<<<<<
 *         s.append(c2py(<rcp_const_basic>(root_list[i])))
 *     return s
*/
  __pyx_t_6 = __pyx_v_root_list.size();
  __pyx_t_7 = __pyx_t_6;
  for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) {
    __pyx_v_i = __pyx_t_8;

    /* "symengine/lib/symengine_wrapper.pyx":4887
 *     s = []
 *     for i in range(root_list.size()):
 *         s.append(c2py(<rcp_const_basic>(root_list[i])))             # <<<<<<<<<<<<<<
 *     return s
 * 
*/
    __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)(__pyx_v_root_list[__pyx_v_i]))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4887, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_s, __pyx_t_1); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 4887, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "symengine/lib/symengine_wrapper.pyx":4888
 *     for i in range(root_list.size()):
 *         s.append(c2py(<rcp_const_basic>(root_list[i])))
 *     return s             # <<<<<<<<<<<<<<
 * 
 * def sqrt_mod(a, p, all_roots=False):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_s);
  __pyx_r = __pyx_v_s;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4873
 *     return c2py(<rcp_const_basic>root)
 * 
 * def nthroot_mod_list(a, n, m):             # <<<<<<<<<<<<<<
 *     cdef symengine.vec_integer root_list
 *     cdef Basic _n = sympify(n)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.nthroot_mod_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v__n);
  __Pyx_XDECREF((PyObject *)__pyx_v__a);
  __Pyx_XDECREF((PyObject *)__pyx_v__m);
  __Pyx_XDECREF(__pyx_v_s);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4890
 *     return s
 * 
 * def sqrt_mod(a, p, all_roots=False):             # <<<<<<<<<<<<<<
 *     if all_roots:
 *         return nthroot_mod_list(a, 2, p)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_177sqrt_mod(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_177sqrt_mod = {"sqrt_mod", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_177sqrt_mod, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_177sqrt_mod(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_a = 0;
  PyObject *__pyx_v_p = 0;
  PyObject *__pyx_v_all_roots = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("sqrt_mod (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_a,&__pyx_mstate_global->__pyx_n_u_p,&__pyx_mstate_global->__pyx_n_u_all_roots,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 4890, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 4890, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4890, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4890, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "sqrt_mod", 0) < (0)) __PYX_ERR(0, 4890, __pyx_L3_error)
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False)));
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("sqrt_mod", 0, 2, 3, i); __PYX_ERR(0, 4890, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 4890, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4890, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4890, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False)));
    }
    __pyx_v_a = values[0];
    __pyx_v_p = values[1];
    __pyx_v_all_roots = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("sqrt_mod", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 4890, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.sqrt_mod", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_176sqrt_mod(__pyx_self, __pyx_v_a, __pyx_v_p, __pyx_v_all_roots);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_176sqrt_mod(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_a, PyObject *__pyx_v_p, PyObject *__pyx_v_all_roots) {
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("sqrt_mod", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4891
 * 
 * def sqrt_mod(a, p, all_roots=False):
 *     if all_roots:             # <<<<<<<<<<<<<<
 *         return nthroot_mod_list(a, 2, p)
 *     return nthroot_mod(a, 2, p)
*/
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_all_roots); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 4891, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":4892
 * def sqrt_mod(a, p, all_roots=False):
 *     if all_roots:
 *         return nthroot_mod_list(a, 2, p)             # <<<<<<<<<<<<<<
 *     return nthroot_mod(a, 2, p)
 * 
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_nthroot_mod_list); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4892, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
      assert(__pyx_t_3);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
      __pyx_t_5 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_a, __pyx_mstate_global->__pyx_int_2, __pyx_v_p};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4892, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":4891
 * 
 * def sqrt_mod(a, p, all_roots=False):
 *     if all_roots:             # <<<<<<<<<<<<<<
 *         return nthroot_mod_list(a, 2, p)
 *     return nthroot_mod(a, 2, p)
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":4893
 *     if all_roots:
 *         return nthroot_mod_list(a, 2, p)
 *     return nthroot_mod(a, 2, p)             # <<<<<<<<<<<<<<
 * 
 * def powermod(a, b, m):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_nthroot_mod); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4893, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_4, __pyx_v_a, __pyx_mstate_global->__pyx_int_2, __pyx_v_p};
    __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4893, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4890
 *     return s
 * 
 * def sqrt_mod(a, p, all_roots=False):             # <<<<<<<<<<<<<<
 *     if all_roots:
 *         return nthroot_mod_list(a, 2, p)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.sqrt_mod", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4895
 *     return nthroot_mod(a, 2, p)
 * 
 * def powermod(a, b, m):             # <<<<<<<<<<<<<<
 *     cdef Basic _a = sympify(a)
 *     cdef Basic _m = sympify(m)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_179powermod(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_179powermod = {"powermod", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_179powermod, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_179powermod(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_a = 0;
  PyObject *__pyx_v_b = 0;
  PyObject *__pyx_v_m = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("powermod (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_a,&__pyx_mstate_global->__pyx_n_u_b,&__pyx_mstate_global->__pyx_n_u_m,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 4895, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 4895, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4895, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4895, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "powermod", 0) < (0)) __PYX_ERR(0, 4895, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("powermod", 1, 3, 3, i); __PYX_ERR(0, 4895, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4895, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4895, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 4895, __pyx_L3_error)
    }
    __pyx_v_a = values[0];
    __pyx_v_b = values[1];
    __pyx_v_m = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("powermod", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 4895, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.powermod", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_178powermod(__pyx_self, __pyx_v_a, __pyx_v_b, __pyx_v_m);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_178powermod(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_m) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v__a = 0;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v__m = 0;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Number *__pyx_v__b = 0;
  SymEngine::RCP<SymEngine::Integer const >  __pyx_v_a1;
  SymEngine::RCP<SymEngine::Integer const >  __pyx_v_m1;
  SymEngine::RCP<SymEngine::Number const >  __pyx_v_b1;
  SymEngine::RCP<SymEngine::Integer const >  __pyx_v_root;
  bool __pyx_v_ret_val;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("powermod", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4896
 * 
 * def powermod(a, b, m):
 *     cdef Basic _a = sympify(a)             # <<<<<<<<<<<<<<
 *     cdef Basic _m = sympify(m)
 *     cdef Number _b = sympify(b)
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4896, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_a};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4896, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 4896, __pyx_L1_error)
  __pyx_v__a = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4897
 * def powermod(a, b, m):
 *     cdef Basic _a = sympify(a)
 *     cdef Basic _m = sympify(m)             # <<<<<<<<<<<<<<
 *     cdef Number _b = sympify(b)
 *     require(_a, Integer)
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4897, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_m};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4897, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 4897, __pyx_L1_error)
  __pyx_v__m = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4898
 *     cdef Basic _a = sympify(a)
 *     cdef Basic _m = sympify(m)
 *     cdef Number _b = sympify(b)             # <<<<<<<<<<<<<<
 *     require(_a, Integer)
 *     require(_m, Integer)
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4898, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_b};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4898, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Number))))) __PYX_ERR(0, 4898, __pyx_L1_error)
  __pyx_v__b = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Number *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4899
 *     cdef Basic _m = sympify(m)
 *     cdef Number _b = sympify(b)
 *     require(_a, Integer)             # <<<<<<<<<<<<<<
 *     require(_m, Integer)
 *     cdef RCP[const symengine.Integer] a1 = symengine.rcp_static_cast_Integer(_a.thisptr)
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_require); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4899, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_Integer); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4899, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, ((PyObject *)__pyx_v__a), __pyx_t_5};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4899, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4900
 *     cdef Number _b = sympify(b)
 *     require(_a, Integer)
 *     require(_m, Integer)             # <<<<<<<<<<<<<<
 *     cdef RCP[const symengine.Integer] a1 = symengine.rcp_static_cast_Integer(_a.thisptr)
 *     cdef RCP[const symengine.Integer] m1 = symengine.rcp_static_cast_Integer(_m.thisptr)
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_require); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4900, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Integer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4900, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, ((PyObject *)__pyx_v__m), __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4900, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4901
 *     require(_a, Integer)
 *     require(_m, Integer)
 *     cdef RCP[const symengine.Integer] a1 = symengine.rcp_static_cast_Integer(_a.thisptr)             # <<<<<<<<<<<<<<
 *     cdef RCP[const symengine.Integer] m1 = symengine.rcp_static_cast_Integer(_m.thisptr)
 *     cdef RCP[const symengine.Number] b1 = symengine.rcp_static_cast_Number(_b.thisptr)
*/
  __pyx_v_a1 = SymEngine::rcp_static_cast<const SymEngine::Integer>(__pyx_v__a->thisptr);

  /* "symengine/lib/symengine_wrapper.pyx":4902
 *     require(_m, Integer)
 *     cdef RCP[const symengine.Integer] a1 = symengine.rcp_static_cast_Integer(_a.thisptr)
 *     cdef RCP[const symengine.Integer] m1 = symengine.rcp_static_cast_Integer(_m.thisptr)             # <<<<<<<<<<<<<<
 *     cdef RCP[const symengine.Number] b1 = symengine.rcp_static_cast_Number(_b.thisptr)
 *     cdef RCP[const symengine.Integer] root
*/
  __pyx_v_m1 = SymEngine::rcp_static_cast<const SymEngine::Integer>(__pyx_v__m->thisptr);

  /* "symengine/lib/symengine_wrapper.pyx":4903
 *     cdef RCP[const symengine.Integer] a1 = symengine.rcp_static_cast_Integer(_a.thisptr)
 *     cdef RCP[const symengine.Integer] m1 = symengine.rcp_static_cast_Integer(_m.thisptr)
 *     cdef RCP[const symengine.Number] b1 = symengine.rcp_static_cast_Number(_b.thisptr)             # <<<<<<<<<<<<<<
 *     cdef RCP[const symengine.Integer] root
 *     cdef cppbool ret_val = symengine.powermod(symengine.outArg_Integer(root), a1, b1, m1)
*/
  __pyx_v_b1 = SymEngine::rcp_static_cast<const SymEngine::Number>(__pyx_v__b->__pyx_base.__pyx_base.thisptr);

  /* "symengine/lib/symengine_wrapper.pyx":4905
 *     cdef RCP[const symengine.Number] b1 = symengine.rcp_static_cast_Number(_b.thisptr)
 *     cdef RCP[const symengine.Integer] root
 *     cdef cppbool ret_val = symengine.powermod(symengine.outArg_Integer(root), a1, b1, m1)             # <<<<<<<<<<<<<<
 *     if ret_val == 0:
 *         return None
*/
  __pyx_v_ret_val = SymEngine::powermod(SymEngine::outArg<SymEngine::RCP<const SymEngine::Integer>>(__pyx_v_root), __pyx_v_a1, __pyx_v_b1, __pyx_v_m1);

  /* "symengine/lib/symengine_wrapper.pyx":4906
 *     cdef RCP[const symengine.Integer] root
 *     cdef cppbool ret_val = symengine.powermod(symengine.outArg_Integer(root), a1, b1, m1)
 *     if ret_val == 0:             # <<<<<<<<<<<<<<
 *         return None
 *     return c2py(<rcp_const_basic>root)
*/
  __pyx_t_6 = (__pyx_v_ret_val == 0);
  if (__pyx_t_6) {

    /* "symengine/lib/symengine_wrapper.pyx":4907
 *     cdef cppbool ret_val = symengine.powermod(symengine.outArg_Integer(root), a1, b1, m1)
 *     if ret_val == 0:
 *         return None             # <<<<<<<<<<<<<<
 *     return c2py(<rcp_const_basic>root)
 * 
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":4906
 *     cdef RCP[const symengine.Integer] root
 *     cdef cppbool ret_val = symengine.powermod(symengine.outArg_Integer(root), a1, b1, m1)
 *     if ret_val == 0:             # <<<<<<<<<<<<<<
 *         return None
 *     return c2py(<rcp_const_basic>root)
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":4908
 *     if ret_val == 0:
 *         return None
 *     return c2py(<rcp_const_basic>root)             # <<<<<<<<<<<<<<
 * 
 * def powermod_list(a, b, m):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)__pyx_v_root)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4908, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4895
 *     return nthroot_mod(a, 2, p)
 * 
 * def powermod(a, b, m):             # <<<<<<<<<<<<<<
 *     cdef Basic _a = sympify(a)
 *     cdef Basic _m = sympify(m)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.powermod", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v__a);
  __Pyx_XDECREF((PyObject *)__pyx_v__m);
  __Pyx_XDECREF((PyObject *)__pyx_v__b);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4910
 *     return c2py(<rcp_const_basic>root)
 * 
 * def powermod_list(a, b, m):             # <<<<<<<<<<<<<<
 *     cdef Basic _a = sympify(a)
 *     cdef Basic _m = sympify(m)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_181powermod_list(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_181powermod_list = {"powermod_list", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_181powermod_list, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_181powermod_list(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_a = 0;
  PyObject *__pyx_v_b = 0;
  PyObject *__pyx_v_m = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("powermod_list (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_a,&__pyx_mstate_global->__pyx_n_u_b,&__pyx_mstate_global->__pyx_n_u_m,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 4910, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 4910, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4910, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4910, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "powermod_list", 0) < (0)) __PYX_ERR(0, 4910, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("powermod_list", 1, 3, 3, i); __PYX_ERR(0, 4910, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4910, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4910, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 4910, __pyx_L3_error)
    }
    __pyx_v_a = values[0];
    __pyx_v_b = values[1];
    __pyx_v_m = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("powermod_list", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 4910, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.powermod_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_180powermod_list(__pyx_self, __pyx_v_a, __pyx_v_b, __pyx_v_m);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_180powermod_list(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_m) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v__a = 0;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v__m = 0;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Number *__pyx_v__b = 0;
  SymEngine::RCP<SymEngine::Integer const >  __pyx_v_a1;
  SymEngine::RCP<SymEngine::Integer const >  __pyx_v_m1;
  SymEngine::RCP<SymEngine::Number const >  __pyx_v_b1;
  SymEngine::vec_integer __pyx_v_v;
  PyObject *__pyx_v_s = NULL;
  std::vector<SymEngine::RCP<SymEngine::Integer> > ::size_type __pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  std::vector<SymEngine::RCP<SymEngine::Integer> > ::size_type __pyx_t_6;
  std::vector<SymEngine::RCP<SymEngine::Integer> > ::size_type __pyx_t_7;
  std::vector<SymEngine::RCP<SymEngine::Integer> > ::size_type __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("powermod_list", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4911
 * 
 * def powermod_list(a, b, m):
 *     cdef Basic _a = sympify(a)             # <<<<<<<<<<<<<<
 *     cdef Basic _m = sympify(m)
 *     cdef Number _b = sympify(b)
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4911, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_a};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4911, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 4911, __pyx_L1_error)
  __pyx_v__a = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4912
 * def powermod_list(a, b, m):
 *     cdef Basic _a = sympify(a)
 *     cdef Basic _m = sympify(m)             # <<<<<<<<<<<<<<
 *     cdef Number _b = sympify(b)
 *     require(_a, Integer)
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4912, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_m};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4912, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 4912, __pyx_L1_error)
  __pyx_v__m = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4913
 *     cdef Basic _a = sympify(a)
 *     cdef Basic _m = sympify(m)
 *     cdef Number _b = sympify(b)             # <<<<<<<<<<<<<<
 *     require(_a, Integer)
 *     require(_m, Integer)
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4913, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_b};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4913, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Number))))) __PYX_ERR(0, 4913, __pyx_L1_error)
  __pyx_v__b = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Number *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4914
 *     cdef Basic _m = sympify(m)
 *     cdef Number _b = sympify(b)
 *     require(_a, Integer)             # <<<<<<<<<<<<<<
 *     require(_m, Integer)
 *     cdef RCP[const symengine.Integer] a1 = symengine.rcp_static_cast_Integer(_a.thisptr)
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_require); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4914, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_Integer); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4914, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, ((PyObject *)__pyx_v__a), __pyx_t_5};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4914, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4915
 *     cdef Number _b = sympify(b)
 *     require(_a, Integer)
 *     require(_m, Integer)             # <<<<<<<<<<<<<<
 *     cdef RCP[const symengine.Integer] a1 = symengine.rcp_static_cast_Integer(_a.thisptr)
 *     cdef RCP[const symengine.Integer] m1 = symengine.rcp_static_cast_Integer(_m.thisptr)
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_require); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4915, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Integer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4915, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, ((PyObject *)__pyx_v__m), __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4915, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4916
 *     require(_a, Integer)
 *     require(_m, Integer)
 *     cdef RCP[const symengine.Integer] a1 = symengine.rcp_static_cast_Integer(_a.thisptr)             # <<<<<<<<<<<<<<
 *     cdef RCP[const symengine.Integer] m1 = symengine.rcp_static_cast_Integer(_m.thisptr)
 *     cdef RCP[const symengine.Number] b1 = symengine.rcp_static_cast_Number(_b.thisptr)
*/
  __pyx_v_a1 = SymEngine::rcp_static_cast<const SymEngine::Integer>(__pyx_v__a->thisptr);

  /* "symengine/lib/symengine_wrapper.pyx":4917
 *     require(_m, Integer)
 *     cdef RCP[const symengine.Integer] a1 = symengine.rcp_static_cast_Integer(_a.thisptr)
 *     cdef RCP[const symengine.Integer] m1 = symengine.rcp_static_cast_Integer(_m.thisptr)             # <<<<<<<<<<<<<<
 *     cdef RCP[const symengine.Number] b1 = symengine.rcp_static_cast_Number(_b.thisptr)
 *     cdef symengine.vec_integer v
*/
  __pyx_v_m1 = SymEngine::rcp_static_cast<const SymEngine::Integer>(__pyx_v__m->thisptr);

  /* "symengine/lib/symengine_wrapper.pyx":4918
 *     cdef RCP[const symengine.Integer] a1 = symengine.rcp_static_cast_Integer(_a.thisptr)
 *     cdef RCP[const symengine.Integer] m1 = symengine.rcp_static_cast_Integer(_m.thisptr)
 *     cdef RCP[const symengine.Number] b1 = symengine.rcp_static_cast_Number(_b.thisptr)             # <<<<<<<<<<<<<<
 *     cdef symengine.vec_integer v
 * 
*/
  __pyx_v_b1 = SymEngine::rcp_static_cast<const SymEngine::Number>(__pyx_v__b->__pyx_base.__pyx_base.thisptr);

  /* "symengine/lib/symengine_wrapper.pyx":4921
 *     cdef symengine.vec_integer v
 * 
 *     symengine.powermod_list(v, a1, b1, m1)             # <<<<<<<<<<<<<<
 *     s = []
 *     for i in range(v.size()):
*/
  SymEngine::powermod_list(__pyx_v_v, __pyx_v_a1, __pyx_v_b1, __pyx_v_m1);

  /* "symengine/lib/symengine_wrapper.pyx":4922
 * 
 *     symengine.powermod_list(v, a1, b1, m1)
 *     s = []             # <<<<<<<<<<<<<<
 *     for i in range(v.size()):
 *         s.append(c2py(<rcp_const_basic>(v[i])))
*/
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4922, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_s = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4923
 *     symengine.powermod_list(v, a1, b1, m1)
 *     s = []
 *     for i in range(v.size()):             # <<<<<<<<<<<<<<
 *         s.append(c2py(<rcp_const_basic>(v[i])))
 *     return s
*/
  __pyx_t_6 = __pyx_v_v.size();
  __pyx_t_7 = __pyx_t_6;
  for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) {
    __pyx_v_i = __pyx_t_8;

    /* "symengine/lib/symengine_wrapper.pyx":4924
 *     s = []
 *     for i in range(v.size()):
 *         s.append(c2py(<rcp_const_basic>(v[i])))             # <<<<<<<<<<<<<<
 *     return s
 * 
*/
    __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)(__pyx_v_v[__pyx_v_i]))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4924, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_s, __pyx_t_1); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 4924, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "symengine/lib/symengine_wrapper.pyx":4925
 *     for i in range(v.size()):
 *         s.append(c2py(<rcp_const_basic>(v[i])))
 *     return s             # <<<<<<<<<<<<<<
 * 
 * def has_symbol(obj, symbol=None):
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_s);
  __pyx_r = __pyx_v_s;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":4910
 *     return c2py(<rcp_const_basic>root)
 * 
 * def powermod_list(a, b, m):             # <<<<<<<<<<<<<<
 *     cdef Basic _a = sympify(a)
 *     cdef Basic _m = sympify(m)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.powermod_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v__a);
  __Pyx_XDECREF((PyObject *)__pyx_v__m);
  __Pyx_XDECREF((PyObject *)__pyx_v__b);
  __Pyx_XDECREF(__pyx_v_s);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4927
 *     return s
 * 
 * def has_symbol(obj, symbol=None):             # <<<<<<<<<<<<<<
 *     cdef Basic b = _sympify(obj)
 *     cdef Basic s = _sympify(symbol)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_183has_symbol(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_183has_symbol = {"has_symbol", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_183has_symbol, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_183has_symbol(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_obj = 0;
  PyObject *__pyx_v_symbol = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("has_symbol (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_obj,&__pyx_mstate_global->__pyx_n_u_symbol,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 4927, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4927, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4927, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "has_symbol", 0) < (0)) __PYX_ERR(0, 4927, __pyx_L3_error)
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("has_symbol", 0, 1, 2, i); __PYX_ERR(0, 4927, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4927, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4927, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_obj = values[0];
    __pyx_v_symbol = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("has_symbol", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 4927, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.has_symbol", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_182has_symbol(__pyx_self, __pyx_v_obj, __pyx_v_symbol);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_182has_symbol(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_symbol) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_b = 0;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_s = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  bool __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("has_symbol", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4928
 * 
 * def has_symbol(obj, symbol=None):
 *     cdef Basic b = _sympify(obj)             # <<<<<<<<<<<<<<
 *     cdef Basic s = _sympify(symbol)
 *     require(s, (Symbol, FunctionSymbol))
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4928, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_obj};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4928, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 4928, __pyx_L1_error)
  __pyx_v_b = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4929
 * def has_symbol(obj, symbol=None):
 *     cdef Basic b = _sympify(obj)
 *     cdef Basic s = _sympify(symbol)             # <<<<<<<<<<<<<<
 *     require(s, (Symbol, FunctionSymbol))
 *     if (not symbol):
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_sympify_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4929, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_symbol};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4929, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 4929, __pyx_L1_error)
  __pyx_v_s = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4930
 *     cdef Basic b = _sympify(obj)
 *     cdef Basic s = _sympify(symbol)
 *     require(s, (Symbol, FunctionSymbol))             # <<<<<<<<<<<<<<
 *     if (not symbol):
 *         return not b.free_symbols.empty()
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_require); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4930, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_FunctionSymbol); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4930, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4930, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF((PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Symbol);
  __Pyx_GIVEREF((PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Symbol);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Symbol)) != (0)) __PYX_ERR(0, 4930, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_5);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5) != (0)) __PYX_ERR(0, 4930, __pyx_L1_error);
  __pyx_t_5 = 0;
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, ((PyObject *)__pyx_v_s), __pyx_t_6};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4930, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4931
 *     cdef Basic s = _sympify(symbol)
 *     require(s, (Symbol, FunctionSymbol))
 *     if (not symbol):             # <<<<<<<<<<<<<<
 *         return not b.free_symbols.empty()
 *     else:
*/
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_symbol); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 4931, __pyx_L1_error)
  __pyx_t_8 = (!__pyx_t_7);
  if (__pyx_t_8) {

    /* "symengine/lib/symengine_wrapper.pyx":4932
 *     require(s, (Symbol, FunctionSymbol))
 *     if (not symbol):
 *         return not b.free_symbols.empty()             # <<<<<<<<<<<<<<
 *     else:
 *         return symengine.has_symbol(deref(b.thisptr), deref(s.thisptr))
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_b), __pyx_mstate_global->__pyx_n_u_free_symbols); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4932, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_3 = __pyx_t_6;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_4 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
      __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_empty, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4932, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 4932, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyBool_FromLong((!__pyx_t_8)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4932, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":4931
 *     cdef Basic s = _sympify(symbol)
 *     require(s, (Symbol, FunctionSymbol))
 *     if (not symbol):             # <<<<<<<<<<<<<<
 *         return not b.free_symbols.empty()
 *     else:
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":4934
 *         return not b.free_symbols.empty()
 *     else:
 *         return symengine.has_symbol(deref(b.thisptr), deref(s.thisptr))             # <<<<<<<<<<<<<<
 * 
 * 
*/
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    try {
      __pyx_t_9 = SymEngine::has_symbol((*__pyx_v_b->thisptr), (*__pyx_v_s->thisptr));
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(0, 4934, __pyx_L1_error)
    }
    __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4934, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "symengine/lib/symengine_wrapper.pyx":4927
 *     return s
 * 
 * def has_symbol(obj, symbol=None):             # <<<<<<<<<<<<<<
 *     cdef Basic b = _sympify(obj)
 *     cdef Basic s = _sympify(symbol)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.has_symbol", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_b);
  __Pyx_XDECREF((PyObject *)__pyx_v_s);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4938
 * 
 * cdef class _Lambdify(object):
 *     def __init__(self, args, *exprs, cppbool real=True, order='C', cppbool cse=False, cppbool _load=False, dtype=None, **kwargs):             # <<<<<<<<<<<<<<
 *         cdef:
 *             Basic e_
*/

/* Python wrapper */
static int __pyx_pw_9symengine_3lib_17symengine_wrapper_9_Lambdify_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_9symengine_3lib_17symengine_wrapper_9_Lambdify_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_args = 0;
  bool __pyx_v_real;
  PyObject *__pyx_v_order = 0;
  bool __pyx_v_cse;
  bool __pyx_v__load;
  PyObject *__pyx_v_dtype = 0;
  PyObject *__pyx_v_exprs = 0;
  CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[6] = {0,0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_v_exprs = __Pyx_ArgsSlice_VARARGS(__pyx_args, 1, __pyx_nargs);
  if (unlikely(!__pyx_v_exprs)) {
    __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
    __Pyx_RefNannyFinishContext();
    return -1;
  }
  __Pyx_GOTREF(__pyx_v_exprs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_args,&__pyx_mstate_global->__pyx_n_u_real,&__pyx_mstate_global->__pyx_n_u_order,&__pyx_mstate_global->__pyx_n_u_cse,&__pyx_mstate_global->__pyx_n_u_load,&__pyx_mstate_global->__pyx_n_u_dtype,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 4938, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        default:
        case  1:
        values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4938, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      const Py_ssize_t used_pos_args = (kwd_pos_args < 1) ? kwd_pos_args : 1;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, __pyx_kwds_len, "__init__", 1) < (0)) __PYX_ERR(0, 4938, __pyx_L3_error)
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_n_u_C));
      if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)Py_None));
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 1, i); __PYX_ERR(0, 4938, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs < 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4938, __pyx_L3_error)
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_n_u_C));
      if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_args = values[0];
    if (values[1]) {
      __pyx_v_real = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_real == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4938, __pyx_L3_error)
    } else {
      __pyx_v_real = ((bool)1);
    }
    __pyx_v_order = values[2];
    if (values[3]) {
      __pyx_v_cse = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_cse == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4938, __pyx_L3_error)
    } else {
      __pyx_v_cse = ((bool)0);
    }
    if (values[4]) {
      __pyx_v__load = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v__load == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4938, __pyx_L3_error)
    } else {
      __pyx_v__load = ((bool)0);
    }
    __pyx_v_dtype = values[5];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 1, __pyx_nargs); __PYX_ERR(0, 4938, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_exprs); __pyx_v_exprs = 0;
  __Pyx_XDECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper._Lambdify.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_9_Lambdify___init__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify *)__pyx_v_self), __pyx_v_args, __pyx_v_real, __pyx_v_order, __pyx_v_cse, __pyx_v__load, __pyx_v_dtype, __pyx_v_exprs, __pyx_v_kwargs);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_exprs);
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_9symengine_3lib_17symengine_wrapper_9_Lambdify_8__init___2generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "symengine/lib/symengine_wrapper.pyx":4956
 *         args = np.asanyarray(args)
 *         self.args_size = args.size
 *         exprs = tuple(np.asanyarray(expr) for expr in exprs)             # <<<<<<<<<<<<<<
 *         self.out_shapes = [expr.shape for expr in exprs]
 *         self.n_exprs = len(exprs)
*/

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_9_Lambdify_8__init___genexpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_5_genexpr *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("genexpr", 0);
  __pyx_cur_scope = (struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_5_genexpr *)__pyx_tp_new_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_5_genexpr(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_5_genexpr, __pyx_mstate_global->__pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_5_genexpr *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 4956, __pyx_L1_error)
  } else {
    __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_genexpr_arg_0 = __pyx_genexpr_arg_0;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_genexpr_arg_0);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_genexpr_arg_0);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_9symengine_3lib_17symengine_wrapper_9_Lambdify_8__init___2generator, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[5]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_init___locals_genexpr, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper); if (unlikely(!gen)) __PYX_ERR(0, 4956, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper._Lambdify.__init__.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF((PyObject *)__pyx_cur_scope);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_9symengine_3lib_17symengine_wrapper_9_Lambdify_8__init___2generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_5_genexpr *__pyx_cur_scope = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_5_genexpr *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  size_t __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("genexpr", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L6_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(__pyx_sent_value != Py_None)) {
    if (unlikely(__pyx_sent_value)) PyErr_SetString(PyExc_TypeError, "can't send non-None value to a just-started generator");
    __PYX_ERR(0, 4956, __pyx_L1_error)
  }
  if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 4956, __pyx_L1_error) }
  __pyx_t_1 = __pyx_cur_scope->__pyx_genexpr_arg_0; __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = 0;
  for (;;) {
    {
      Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
      #if !CYTHON_ASSUME_SAFE_SIZE
      if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 4956, __pyx_L1_error)
      #endif
      if (__pyx_t_2 >= __pyx_temp) break;
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_3 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2));
    #else
    __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2);
    #endif
    ++__pyx_t_2;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4956, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_expr);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_expr, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4956, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_asanyarray); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4956, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_7 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
      assert(__pyx_t_4);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
      __pyx_t_7 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_cur_scope->__pyx_v_expr};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4956, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    __Pyx_XGIVEREF(__pyx_t_1);
    __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
    __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_RefNannyFinishContext();
    __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
    /* return from generator, yielding value */
    __pyx_generator->resume_label = 1;
    return __pyx_r;
    __pyx_L6_resume_from_yield:;
    __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
    __pyx_cur_scope->__pyx_t_0 = 0;
    __Pyx_XGOTREF(__pyx_t_1);
    __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
    if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 4956, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  if (__Pyx_PyErr_Occurred()) {
    __Pyx_Generator_Replace_StopIteration(0);
    __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  }
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4938
 * 
 * cdef class _Lambdify(object):
 *     def __init__(self, args, *exprs, cppbool real=True, order='C', cppbool cse=False, cppbool _load=False, dtype=None, **kwargs):             # <<<<<<<<<<<<<<
 *         cdef:
 *             Basic e_
*/

static int __pyx_pf_9symengine_3lib_17symengine_wrapper_9_Lambdify___init__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify *__pyx_v_self, PyObject *__pyx_v_args, bool __pyx_v_real, PyObject *__pyx_v_order, bool __pyx_v_cse, bool __pyx_v__load, PyObject *__pyx_v_dtype, PyObject *__pyx_v_exprs, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_e_ = 0;
  SymEngine::vec_basic __pyx_v_args_;
  SymEngine::vec_basic __pyx_v_outs_;
  std::vector<int>  __pyx_v_out_sizes;
  PyObject *__pyx_v_llvm_function = NULL;
  PyObject *__pyx_v_idx = NULL;
  PyObject *__pyx_v_shape = NULL;
  size_t __pyx_v_i;
  size_t __pyx_v_j;
  PyObject *__pyx_v_arg = NULL;
  PyObject *__pyx_v_curr_expr = NULL;
  PyObject *__pyx_v_e = NULL;
  PyObject *__pyx_gb_9symengine_3lib_17symengine_wrapper_9_Lambdify_8__init___2generator = 0;
  PyObject *__pyx_9genexpr18__pyx_v_expr = NULL;
  int __pyx_r;
  __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;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *(*__pyx_t_12)(PyObject *);
  size_t __pyx_t_13;
  size_t __pyx_t_14;
  size_t __pyx_t_15;
  std::vector<int>  __pyx_t_16;
  std::string __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  __pyx_ctuple_long __pyx_t_19;
  int __pyx_t_20;
  std::vector<int> ::size_type __pyx_t_21;
  size_t __pyx_t_22;
  size_t __pyx_t_23;
  size_t __pyx_t_24;
  size_t __pyx_t_25;
  PyObject *(*__pyx_t_26)(PyObject *);
  Py_ssize_t __pyx_t_27;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_INCREF(__pyx_v_args);
  __Pyx_INCREF(__pyx_v_exprs);

  /* "symengine/lib/symengine_wrapper.pyx":4947
 *             vector[int] out_sizes
 * 
 *         if _load:             # <<<<<<<<<<<<<<
 *             self.args_size, self.tot_out_size, self.out_shapes, self.real, \
 *                 self.n_exprs, self.order, self.accum_out_sizes, self.numpy_dtype, \
*/
  __pyx_t_1 = (__pyx_v__load != 0);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":4950
 *             self.args_size, self.tot_out_size, self.out_shapes, self.real, \
 *                 self.n_exprs, self.order, self.accum_out_sizes, self.numpy_dtype, \
 *                 llvm_function = args             # <<<<<<<<<<<<<<
 *             self._load(llvm_function)
 *             return
*/
    if ((likely(PyTuple_CheckExact(__pyx_v_args))) || (PyList_CheckExact(__pyx_v_args))) {
      PyObject* sequence = __pyx_v_args;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 9)) {
        if (size > 9) __Pyx_RaiseTooManyValuesError(9);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 4948, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0);
        __Pyx_INCREF(__pyx_t_2);
        __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1);
        __Pyx_INCREF(__pyx_t_3);
        __pyx_t_4 = PyTuple_GET_ITEM(sequence, 2);
        __Pyx_INCREF(__pyx_t_4);
        __pyx_t_5 = PyTuple_GET_ITEM(sequence, 3);
        __Pyx_INCREF(__pyx_t_5);
        __pyx_t_6 = PyTuple_GET_ITEM(sequence, 4);
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_7 = PyTuple_GET_ITEM(sequence, 5);
        __Pyx_INCREF(__pyx_t_7);
        __pyx_t_8 = PyTuple_GET_ITEM(sequence, 6);
        __Pyx_INCREF(__pyx_t_8);
        __pyx_t_9 = PyTuple_GET_ITEM(sequence, 7);
        __Pyx_INCREF(__pyx_t_9);
        __pyx_t_10 = PyTuple_GET_ITEM(sequence, 8);
        __Pyx_INCREF(__pyx_t_10);
      } else {
        __pyx_t_2 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference);
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4948, __pyx_L1_error)
        __Pyx_XGOTREF(__pyx_t_2);
        __pyx_t_3 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference);
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4948, __pyx_L1_error)
        __Pyx_XGOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyList_GetItemRefFast(sequence, 2, __Pyx_ReferenceSharing_SharedReference);
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4948, __pyx_L1_error)
        __Pyx_XGOTREF(__pyx_t_4);
        __pyx_t_5 = __Pyx_PyList_GetItemRefFast(sequence, 3, __Pyx_ReferenceSharing_SharedReference);
        if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4948, __pyx_L1_error)
        __Pyx_XGOTREF(__pyx_t_5);
        __pyx_t_6 = __Pyx_PyList_GetItemRefFast(sequence, 4, __Pyx_ReferenceSharing_SharedReference);
        if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4948, __pyx_L1_error)
        __Pyx_XGOTREF(__pyx_t_6);
        __pyx_t_7 = __Pyx_PyList_GetItemRefFast(sequence, 5, __Pyx_ReferenceSharing_SharedReference);
        if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4948, __pyx_L1_error)
        __Pyx_XGOTREF(__pyx_t_7);
        __pyx_t_8 = __Pyx_PyList_GetItemRefFast(sequence, 6, __Pyx_ReferenceSharing_SharedReference);
        if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4948, __pyx_L1_error)
        __Pyx_XGOTREF(__pyx_t_8);
        __pyx_t_9 = __Pyx_PyList_GetItemRefFast(sequence, 7, __Pyx_ReferenceSharing_SharedReference);
        if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4948, __pyx_L1_error)
        __Pyx_XGOTREF(__pyx_t_9);
        __pyx_t_10 = __Pyx_PyList_GetItemRefFast(sequence, 8, __Pyx_ReferenceSharing_SharedReference);
        if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4948, __pyx_L1_error)
        __Pyx_XGOTREF(__pyx_t_10);
      }
      #else
      {
        Py_ssize_t i;
        PyObject** temps[9] = {&__pyx_t_2,&__pyx_t_3,&__pyx_t_4,&__pyx_t_5,&__pyx_t_6,&__pyx_t_7,&__pyx_t_8,&__pyx_t_9,&__pyx_t_10};
        for (i=0; i < 9; i++) {
          PyObject* item = __Pyx_PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 4948, __pyx_L1_error)
          __Pyx_GOTREF(item);
          *(temps[i]) = item;
        }
      }
      #endif
    } else {
      Py_ssize_t index = -1;
      PyObject** temps[9] = {&__pyx_t_2,&__pyx_t_3,&__pyx_t_4,&__pyx_t_5,&__pyx_t_6,&__pyx_t_7,&__pyx_t_8,&__pyx_t_9,&__pyx_t_10};
      __pyx_t_11 = PyObject_GetIter(__pyx_v_args); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4948, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_12 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_11);
      for (index=0; index < 9; index++) {
        PyObject* item = __pyx_t_12(__pyx_t_11); if (unlikely(!item)) goto __pyx_L4_unpacking_failed;
        __Pyx_GOTREF(item);
        *(temps[index]) = item;
      }
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 9) < (0)) __PYX_ERR(0, 4948, __pyx_L1_error)
      __pyx_t_12 = NULL;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      goto __pyx_L5_unpacking_done;
      __pyx_L4_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_12 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 4948, __pyx_L1_error)
      __pyx_L5_unpacking_done:;
    }

    /* "symengine/lib/symengine_wrapper.pyx":4948
 * 
 *         if _load:
 *             self.args_size, self.tot_out_size, self.out_shapes, self.real, \             # <<<<<<<<<<<<<<
 *                 self.n_exprs, self.order, self.accum_out_sizes, self.numpy_dtype, \
 *                 llvm_function = args
*/
    __pyx_t_13 = __Pyx_PyLong_As_size_t(__pyx_t_2); if (unlikely((__pyx_t_13 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4948, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_14 = __Pyx_PyLong_As_size_t(__pyx_t_3); if (unlikely((__pyx_t_14 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4948, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (!(likely(PyList_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_4))) __PYX_ERR(0, 4948, __pyx_L1_error)
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4948, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_15 = __Pyx_PyLong_As_size_t(__pyx_t_6); if (unlikely((__pyx_t_15 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4948, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (!(likely(PyUnicode_CheckExact(__pyx_t_7))||((__pyx_t_7) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_7))) __PYX_ERR(0, 4948, __pyx_L1_error)
    __pyx_t_16 = __pyx_convert_vector_from_py_int(__pyx_t_8); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4948, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_v_self->args_size = __pyx_t_13;
    __pyx_v_self->tot_out_size = __pyx_t_14;
    __Pyx_GIVEREF(__pyx_t_4);
    __Pyx_GOTREF(__pyx_v_self->out_shapes);
    __Pyx_DECREF(__pyx_v_self->out_shapes);
    __pyx_v_self->out_shapes = ((PyObject*)__pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_v_self->real = __pyx_t_1;

    /* "symengine/lib/symengine_wrapper.pyx":4949
 *         if _load:
 *             self.args_size, self.tot_out_size, self.out_shapes, self.real, \
 *                 self.n_exprs, self.order, self.accum_out_sizes, self.numpy_dtype, \             # <<<<<<<<<<<<<<
 *                 llvm_function = args
 *             self._load(llvm_function)
*/
    __pyx_v_self->n_exprs = __pyx_t_15;
    __Pyx_GIVEREF(__pyx_t_7);
    __Pyx_GOTREF(__pyx_v_self->order);
    __Pyx_DECREF(__pyx_v_self->order);
    __pyx_v_self->order = ((PyObject*)__pyx_t_7);
    __pyx_t_7 = 0;
    __pyx_v_self->accum_out_sizes = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_16);
    __Pyx_GIVEREF(__pyx_t_9);
    __Pyx_GOTREF(__pyx_v_self->numpy_dtype);
    __Pyx_DECREF(__pyx_v_self->numpy_dtype);
    __pyx_v_self->numpy_dtype = __pyx_t_9;
    __pyx_t_9 = 0;
    __pyx_v_llvm_function = __pyx_t_10;
    __pyx_t_10 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":4951
 *                 self.n_exprs, self.order, self.accum_out_sizes, self.numpy_dtype, \
 *                 llvm_function = args
 *             self._load(llvm_function)             # <<<<<<<<<<<<<<
 *             return
 * 
*/
    __pyx_t_17 = __pyx_convert_string_from_py_6libcpp_6string_std__in_string(__pyx_v_llvm_function); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4951, __pyx_L1_error)
    __pyx_t_10 = ((struct __pyx_vtabstruct_9symengine_3lib_17symengine_wrapper__Lambdify *)__pyx_v_self->__pyx_vtab)->_load(__pyx_v_self, __pyx_t_17); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4951, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":4952
 *                 llvm_function = args
 *             self._load(llvm_function)
 *             return             # <<<<<<<<<<<<<<
 * 
 *         args = np.asanyarray(args)
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":4947
 *             vector[int] out_sizes
 * 
 *         if _load:             # <<<<<<<<<<<<<<
 *             self.args_size, self.tot_out_size, self.out_shapes, self.real, \
 *                 self.n_exprs, self.order, self.accum_out_sizes, self.numpy_dtype, \
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":4954
 *             return
 * 
 *         args = np.asanyarray(args)             # <<<<<<<<<<<<<<
 *         self.args_size = args.size
 *         exprs = tuple(np.asanyarray(expr) for expr in exprs)
*/
  __pyx_t_9 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4954, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_asanyarray); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4954, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_15 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7);
    assert(__pyx_t_9);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_9);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
    __pyx_t_15 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_v_args};
    __pyx_t_10 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_15, (2-__pyx_t_15) | (__pyx_t_15*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4954, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
  }
  __Pyx_DECREF_SET(__pyx_v_args, __pyx_t_10);
  __pyx_t_10 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4955
 * 
 *         args = np.asanyarray(args)
 *         self.args_size = args.size             # <<<<<<<<<<<<<<
 *         exprs = tuple(np.asanyarray(expr) for expr in exprs)
 *         self.out_shapes = [expr.shape for expr in exprs]
*/
  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_args, __pyx_mstate_global->__pyx_n_u_size); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4955, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_15 = __Pyx_PyLong_As_size_t(__pyx_t_10); if (unlikely((__pyx_t_15 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4955, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __pyx_v_self->args_size = __pyx_t_15;

  /* "symengine/lib/symengine_wrapper.pyx":4956
 *         args = np.asanyarray(args)
 *         self.args_size = args.size
 *         exprs = tuple(np.asanyarray(expr) for expr in exprs)             # <<<<<<<<<<<<<<
 *         self.out_shapes = [expr.shape for expr in exprs]
 *         self.n_exprs = len(exprs)
*/
  __pyx_t_10 = __pyx_pf_9symengine_3lib_17symengine_wrapper_9_Lambdify_8__init___genexpr(NULL, __pyx_v_exprs); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4956, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_7 = __Pyx_PySequence_Tuple(__pyx_t_10); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4956, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __Pyx_DECREF_SET(__pyx_v_exprs, ((PyObject*)__pyx_t_7));
  __pyx_t_7 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4957
 *         self.args_size = args.size
 *         exprs = tuple(np.asanyarray(expr) for expr in exprs)
 *         self.out_shapes = [expr.shape for expr in exprs]             # <<<<<<<<<<<<<<
 *         self.n_exprs = len(exprs)
 *         self.real = real
*/
  { /* enter inner scope */
    __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4957, __pyx_L8_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_10 = __pyx_v_exprs; __Pyx_INCREF(__pyx_t_10);
    __pyx_t_18 = 0;
    for (;;) {
      {
        Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_10);
        #if !CYTHON_ASSUME_SAFE_SIZE
        if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 4957, __pyx_L8_error)
        #endif
        if (__pyx_t_18 >= __pyx_temp) break;
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_9 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_10, __pyx_t_18));
      #else
      __pyx_t_9 = __Pyx_PySequence_ITEM(__pyx_t_10, __pyx_t_18);
      #endif
      ++__pyx_t_18;
      if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4957, __pyx_L8_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_XDECREF_SET(__pyx_9genexpr18__pyx_v_expr, __pyx_t_9);
      __pyx_t_9 = 0;
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_9genexpr18__pyx_v_expr, __pyx_mstate_global->__pyx_n_u_shape); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4957, __pyx_L8_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_7, (PyObject*)__pyx_t_9))) __PYX_ERR(0, 4957, __pyx_L8_error)
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_XDECREF(__pyx_9genexpr18__pyx_v_expr); __pyx_9genexpr18__pyx_v_expr = 0;
    goto __pyx_L12_exit_scope;
    __pyx_L8_error:;
    __Pyx_XDECREF(__pyx_9genexpr18__pyx_v_expr); __pyx_9genexpr18__pyx_v_expr = 0;
    goto __pyx_L1_error;
    __pyx_L12_exit_scope:;
  } /* exit inner scope */
  __Pyx_GIVEREF(__pyx_t_7);
  __Pyx_GOTREF(__pyx_v_self->out_shapes);
  __Pyx_DECREF(__pyx_v_self->out_shapes);
  __pyx_v_self->out_shapes = ((PyObject*)__pyx_t_7);
  __pyx_t_7 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4958
 *         exprs = tuple(np.asanyarray(expr) for expr in exprs)
 *         self.out_shapes = [expr.shape for expr in exprs]
 *         self.n_exprs = len(exprs)             # <<<<<<<<<<<<<<
 *         self.real = real
 *         self.order = order
*/
  __pyx_t_18 = __Pyx_PyTuple_GET_SIZE(__pyx_v_exprs); if (unlikely(__pyx_t_18 == ((Py_ssize_t)-1))) __PYX_ERR(0, 4958, __pyx_L1_error)
  __pyx_v_self->n_exprs = __pyx_t_18;

  /* "symengine/lib/symengine_wrapper.pyx":4959
 *         self.out_shapes = [expr.shape for expr in exprs]
 *         self.n_exprs = len(exprs)
 *         self.real = real             # <<<<<<<<<<<<<<
 *         self.order = order
 *         self.numpy_dtype = dtype if dtype else (np.float64 if self.real else np.complex128)
*/
  __pyx_v_self->real = __pyx_v_real;

  /* "symengine/lib/symengine_wrapper.pyx":4960
 *         self.n_exprs = len(exprs)
 *         self.real = real
 *         self.order = order             # <<<<<<<<<<<<<<
 *         self.numpy_dtype = dtype if dtype else (np.float64 if self.real else np.complex128)
 *         if self.args_size == 0:
*/
  __pyx_t_7 = __pyx_v_order;
  __Pyx_INCREF(__pyx_t_7);
  if (!(likely(PyUnicode_CheckExact(__pyx_t_7))||((__pyx_t_7) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_7))) __PYX_ERR(0, 4960, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_7);
  __Pyx_GOTREF(__pyx_v_self->order);
  __Pyx_DECREF(__pyx_v_self->order);
  __pyx_v_self->order = ((PyObject*)__pyx_t_7);
  __pyx_t_7 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4961
 *         self.real = real
 *         self.order = order
 *         self.numpy_dtype = dtype if dtype else (np.float64 if self.real else np.complex128)             # <<<<<<<<<<<<<<
 *         if self.args_size == 0:
 *             raise NotImplementedError("Support for zero arguments not yet supported")
*/
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_dtype); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 4961, __pyx_L1_error)
  if (__pyx_t_1) {
    __Pyx_INCREF(__pyx_v_dtype);
    __pyx_t_7 = __pyx_v_dtype;
  } else {
    if (__pyx_v_self->real) {
      __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4961, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_float64); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4961, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_10 = __pyx_t_8;
      __pyx_t_8 = 0;
    } else {
      __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4961, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_complex128); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4961, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_10 = __pyx_t_9;
      __pyx_t_9 = 0;
    }
    __pyx_t_7 = __pyx_t_10;
    __pyx_t_10 = 0;
  }
  __Pyx_GIVEREF(__pyx_t_7);
  __Pyx_GOTREF(__pyx_v_self->numpy_dtype);
  __Pyx_DECREF(__pyx_v_self->numpy_dtype);
  __pyx_v_self->numpy_dtype = __pyx_t_7;
  __pyx_t_7 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4962
 *         self.order = order
 *         self.numpy_dtype = dtype if dtype else (np.float64 if self.real else np.complex128)
 *         if self.args_size == 0:             # <<<<<<<<<<<<<<
 *             raise NotImplementedError("Support for zero arguments not yet supported")
 *         self.tot_out_size = 0
*/
  __pyx_t_1 = (__pyx_v_self->args_size == 0);
  if (unlikely(__pyx_t_1)) {

    /* "symengine/lib/symengine_wrapper.pyx":4963
 *         self.numpy_dtype = dtype if dtype else (np.float64 if self.real else np.complex128)
 *         if self.args_size == 0:
 *             raise NotImplementedError("Support for zero arguments not yet supported")             # <<<<<<<<<<<<<<
 *         self.tot_out_size = 0
 *         for idx, shape in enumerate(self.out_shapes):
*/
    __pyx_t_10 = NULL;
    __pyx_t_15 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_mstate_global->__pyx_kp_u_Support_for_zero_arguments_not_y};
      __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_NotImplementedError)), __pyx_callargs+__pyx_t_15, (2-__pyx_t_15) | (__pyx_t_15*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4963, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
    }
    __Pyx_Raise(__pyx_t_7, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __PYX_ERR(0, 4963, __pyx_L1_error)

    /* "symengine/lib/symengine_wrapper.pyx":4962
 *         self.order = order
 *         self.numpy_dtype = dtype if dtype else (np.float64 if self.real else np.complex128)
 *         if self.args_size == 0:             # <<<<<<<<<<<<<<
 *             raise NotImplementedError("Support for zero arguments not yet supported")
 *         self.tot_out_size = 0
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":4964
 *         if self.args_size == 0:
 *             raise NotImplementedError("Support for zero arguments not yet supported")
 *         self.tot_out_size = 0             # <<<<<<<<<<<<<<
 *         for idx, shape in enumerate(self.out_shapes):
 *             out_sizes.push_back(reduce(mul, shape or (1,)))
*/
  __pyx_v_self->tot_out_size = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4965
 *             raise NotImplementedError("Support for zero arguments not yet supported")
 *         self.tot_out_size = 0
 *         for idx, shape in enumerate(self.out_shapes):             # <<<<<<<<<<<<<<
 *             out_sizes.push_back(reduce(mul, shape or (1,)))
 *             self.tot_out_size += out_sizes[idx]
*/
  __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0);
  __pyx_t_7 = __pyx_mstate_global->__pyx_int_0;
  __pyx_t_10 = __pyx_v_self->out_shapes; __Pyx_INCREF(__pyx_t_10);
  __pyx_t_18 = 0;
  for (;;) {
    {
      Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_10);
      #if !CYTHON_ASSUME_SAFE_SIZE
      if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 4965, __pyx_L1_error)
      #endif
      if (__pyx_t_18 >= __pyx_temp) break;
    }
    __pyx_t_9 = __Pyx_PyList_GetItemRefFast(__pyx_t_10, __pyx_t_18, __Pyx_ReferenceSharing_OwnStrongReference);
    ++__pyx_t_18;
    if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4965, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_XDECREF_SET(__pyx_v_shape, __pyx_t_9);
    __pyx_t_9 = 0;
    __Pyx_INCREF(__pyx_t_7);
    __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_7);
    __pyx_t_9 = __Pyx_PyLong_AddObjC(__pyx_t_7, __pyx_mstate_global->__pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4965, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_7);
    __pyx_t_7 = __pyx_t_9;
    __pyx_t_9 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":4966
 *         self.tot_out_size = 0
 *         for idx, shape in enumerate(self.out_shapes):
 *             out_sizes.push_back(reduce(mul, shape or (1,)))             # <<<<<<<<<<<<<<
 *             self.tot_out_size += out_sizes[idx]
 *         for i in range(self.n_exprs + 1):
*/
    __pyx_t_8 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_reduce_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4966, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_mul); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4966, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_shape); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 4966, __pyx_L1_error)
    if (!__pyx_t_1) {
    } else {
      __Pyx_INCREF(__pyx_v_shape);
      __pyx_t_4 = __pyx_v_shape;
      goto __pyx_L16_bool_binop_done;
    }
    __pyx_t_19.f0 = 1;
    __pyx_t_3 = __pyx_convert__to_py___pyx_ctuple_long(__pyx_t_19); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4966, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __pyx_t_3;
    __pyx_t_3 = 0;
    __pyx_L16_bool_binop_done:;
    __pyx_t_15 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
      assert(__pyx_t_8);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
      __pyx_t_15 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_8, __pyx_t_5, __pyx_t_4};
      __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_15, (3-__pyx_t_15) | (__pyx_t_15*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4966, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
    }
    __pyx_t_20 = __Pyx_PyLong_As_int(__pyx_t_9); if (unlikely((__pyx_t_20 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4966, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    try {
      __pyx_v_out_sizes.push_back(__pyx_t_20);
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(0, 4966, __pyx_L1_error)
    }

    /* "symengine/lib/symengine_wrapper.pyx":4967
 *         for idx, shape in enumerate(self.out_shapes):
 *             out_sizes.push_back(reduce(mul, shape or (1,)))
 *             self.tot_out_size += out_sizes[idx]             # <<<<<<<<<<<<<<
 *         for i in range(self.n_exprs + 1):
 *             self.accum_out_sizes.push_back(0)
*/
    __pyx_t_21 = __Pyx_PyLong_As_size_t(__pyx_v_idx); if (unlikely((__pyx_t_21 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4967, __pyx_L1_error)
    __pyx_v_self->tot_out_size = (__pyx_v_self->tot_out_size + (__pyx_v_out_sizes[__pyx_t_21]));

    /* "symengine/lib/symengine_wrapper.pyx":4965
 *             raise NotImplementedError("Support for zero arguments not yet supported")
 *         self.tot_out_size = 0
 *         for idx, shape in enumerate(self.out_shapes):             # <<<<<<<<<<<<<<
 *             out_sizes.push_back(reduce(mul, shape or (1,)))
 *             self.tot_out_size += out_sizes[idx]
*/
  }
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4968
 *             out_sizes.push_back(reduce(mul, shape or (1,)))
 *             self.tot_out_size += out_sizes[idx]
 *         for i in range(self.n_exprs + 1):             # <<<<<<<<<<<<<<
 *             self.accum_out_sizes.push_back(0)
 *             for j in range(i):
*/
  __pyx_t_15 = (__pyx_v_self->n_exprs + 1);
  __pyx_t_14 = __pyx_t_15;
  for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_14; __pyx_t_13+=1) {
    __pyx_v_i = __pyx_t_13;

    /* "symengine/lib/symengine_wrapper.pyx":4969
 *             self.tot_out_size += out_sizes[idx]
 *         for i in range(self.n_exprs + 1):
 *             self.accum_out_sizes.push_back(0)             # <<<<<<<<<<<<<<
 *             for j in range(i):
 *                 self.accum_out_sizes[i] += out_sizes[j]
*/
    try {
      __pyx_v_self->accum_out_sizes.push_back(0);
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(0, 4969, __pyx_L1_error)
    }

    /* "symengine/lib/symengine_wrapper.pyx":4970
 *         for i in range(self.n_exprs + 1):
 *             self.accum_out_sizes.push_back(0)
 *             for j in range(i):             # <<<<<<<<<<<<<<
 *                 self.accum_out_sizes[i] += out_sizes[j]
 * 
*/
    __pyx_t_22 = __pyx_v_i;
    __pyx_t_23 = __pyx_t_22;
    for (__pyx_t_24 = 0; __pyx_t_24 < __pyx_t_23; __pyx_t_24+=1) {
      __pyx_v_j = __pyx_t_24;

      /* "symengine/lib/symengine_wrapper.pyx":4971
 *             self.accum_out_sizes.push_back(0)
 *             for j in range(i):
 *                 self.accum_out_sizes[i] += out_sizes[j]             # <<<<<<<<<<<<<<
 * 
 *         for arg in np.ravel(args, order=self.order):
*/
      __pyx_t_25 = __pyx_v_i;
      (__pyx_v_self->accum_out_sizes[__pyx_t_25]) = ((__pyx_v_self->accum_out_sizes[__pyx_t_25]) + (__pyx_v_out_sizes[__pyx_v_j]));
    }
  }

  /* "symengine/lib/symengine_wrapper.pyx":4973
 *                 self.accum_out_sizes[i] += out_sizes[j]
 * 
 *         for arg in np.ravel(args, order=self.order):             # <<<<<<<<<<<<<<
 *             e_ = _sympify(arg)
 *             args_.push_back(e_.thisptr)
*/
  __pyx_t_10 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4973, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_ravel); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4973, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_15 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_6);
    assert(__pyx_t_10);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
    __Pyx_INCREF(__pyx_t_10);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
    __pyx_t_15 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_10, __pyx_v_args};
    __pyx_t_9 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4973, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_order, __pyx_v_self->order, __pyx_t_9, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 4973, __pyx_L1_error)
    __pyx_t_7 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_15, (2-__pyx_t_15) | (__pyx_t_15*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_9);
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4973, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
  }
  if (likely(PyList_CheckExact(__pyx_t_7)) || PyTuple_CheckExact(__pyx_t_7)) {
    __pyx_t_6 = __pyx_t_7; __Pyx_INCREF(__pyx_t_6);
    __pyx_t_18 = 0;
    __pyx_t_26 = NULL;
  } else {
    __pyx_t_18 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4973, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_26 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 4973, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  for (;;) {
    if (likely(!__pyx_t_26)) {
      if (likely(PyList_CheckExact(__pyx_t_6))) {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_6);
          #if !CYTHON_ASSUME_SAFE_SIZE
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 4973, __pyx_L1_error)
          #endif
          if (__pyx_t_18 >= __pyx_temp) break;
        }
        __pyx_t_7 = __Pyx_PyList_GetItemRefFast(__pyx_t_6, __pyx_t_18, __Pyx_ReferenceSharing_OwnStrongReference);
        ++__pyx_t_18;
      } else {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_6);
          #if !CYTHON_ASSUME_SAFE_SIZE
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 4973, __pyx_L1_error)
          #endif
          if (__pyx_t_18 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_7 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_18));
        #else
        __pyx_t_7 = __Pyx_PySequence_ITEM(__pyx_t_6, __pyx_t_18);
        #endif
        ++__pyx_t_18;
      }
      if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4973, __pyx_L1_error)
    } else {
      __pyx_t_7 = __pyx_t_26(__pyx_t_6);
      if (unlikely(!__pyx_t_7)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 4973, __pyx_L1_error)
          PyErr_Clear();
        }
        break;
      }
    }
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_XDECREF_SET(__pyx_v_arg, __pyx_t_7);
    __pyx_t_7 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":4974
 * 
 *         for arg in np.ravel(args, order=self.order):
 *             e_ = _sympify(arg)             # <<<<<<<<<<<<<<
 *             args_.push_back(e_.thisptr)
 * 
*/
    __pyx_t_9 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_sympify_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4974, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_15 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_10))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_10);
      assert(__pyx_t_9);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_10);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_10, __pyx__function);
      __pyx_t_15 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_v_arg};
      __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_10, __pyx_callargs+__pyx_t_15, (2-__pyx_t_15) | (__pyx_t_15*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4974, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
    }
    if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 4974, __pyx_L1_error)
    __Pyx_XDECREF_SET(__pyx_v_e_, ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_7));
    __pyx_t_7 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":4975
 *         for arg in np.ravel(args, order=self.order):
 *             e_ = _sympify(arg)
 *             args_.push_back(e_.thisptr)             # <<<<<<<<<<<<<<
 * 
 *         for curr_expr in exprs:
*/
    try {
      __pyx_v_args_.push_back(__pyx_v_e_->thisptr);
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(0, 4975, __pyx_L1_error)
    }

    /* "symengine/lib/symengine_wrapper.pyx":4973
 *                 self.accum_out_sizes[i] += out_sizes[j]
 * 
 *         for arg in np.ravel(args, order=self.order):             # <<<<<<<<<<<<<<
 *             e_ = _sympify(arg)
 *             args_.push_back(e_.thisptr)
*/
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4977
 *             args_.push_back(e_.thisptr)
 * 
 *         for curr_expr in exprs:             # <<<<<<<<<<<<<<
 *             if curr_expr.ndim == 0:
 *                 e_ = _sympify(curr_expr.item())
*/
  __pyx_t_6 = __pyx_v_exprs; __Pyx_INCREF(__pyx_t_6);
  __pyx_t_18 = 0;
  for (;;) {
    {
      Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_6);
      #if !CYTHON_ASSUME_SAFE_SIZE
      if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 4977, __pyx_L1_error)
      #endif
      if (__pyx_t_18 >= __pyx_temp) break;
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_7 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_18));
    #else
    __pyx_t_7 = __Pyx_PySequence_ITEM(__pyx_t_6, __pyx_t_18);
    #endif
    ++__pyx_t_18;
    if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4977, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_XDECREF_SET(__pyx_v_curr_expr, __pyx_t_7);
    __pyx_t_7 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":4978
 * 
 *         for curr_expr in exprs:
 *             if curr_expr.ndim == 0:             # <<<<<<<<<<<<<<
 *                 e_ = _sympify(curr_expr.item())
 *                 outs_.push_back(e_.thisptr)
*/
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_curr_expr, __pyx_mstate_global->__pyx_n_u_ndim); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4978, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_1 = (__Pyx_PyLong_BoolEqObjC(__pyx_t_7, __pyx_mstate_global->__pyx_int_0, 0, 0)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 4978, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (__pyx_t_1) {

      /* "symengine/lib/symengine_wrapper.pyx":4979
 *         for curr_expr in exprs:
 *             if curr_expr.ndim == 0:
 *                 e_ = _sympify(curr_expr.item())             # <<<<<<<<<<<<<<
 *                 outs_.push_back(e_.thisptr)
 *             else:
*/
      __pyx_t_10 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_sympify_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4979, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_5 = __pyx_v_curr_expr;
      __Pyx_INCREF(__pyx_t_5);
      __pyx_t_15 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
        __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_item, __pyx_callargs+__pyx_t_15, (1-__pyx_t_15) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4979, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
      }
      __pyx_t_15 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_9))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
        assert(__pyx_t_10);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9);
        __Pyx_INCREF(__pyx_t_10);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_9, __pyx__function);
        __pyx_t_15 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_4};
        __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_15, (2-__pyx_t_15) | (__pyx_t_15*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4979, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
      }
      if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 4979, __pyx_L1_error)
      __Pyx_XDECREF_SET(__pyx_v_e_, ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_7));
      __pyx_t_7 = 0;

      /* "symengine/lib/symengine_wrapper.pyx":4980
 *             if curr_expr.ndim == 0:
 *                 e_ = _sympify(curr_expr.item())
 *                 outs_.push_back(e_.thisptr)             # <<<<<<<<<<<<<<
 *             else:
 *                 for e in np.ravel(curr_expr, order=self.order):
*/
      try {
        __pyx_v_outs_.push_back(__pyx_v_e_->thisptr);
      } catch(...) {
        __Pyx_CppExn2PyErr();
        __PYX_ERR(0, 4980, __pyx_L1_error)
      }

      /* "symengine/lib/symengine_wrapper.pyx":4978
 * 
 *         for curr_expr in exprs:
 *             if curr_expr.ndim == 0:             # <<<<<<<<<<<<<<
 *                 e_ = _sympify(curr_expr.item())
 *                 outs_.push_back(e_.thisptr)
*/
      goto __pyx_L28;
    }

    /* "symengine/lib/symengine_wrapper.pyx":4982
 *                 outs_.push_back(e_.thisptr)
 *             else:
 *                 for e in np.ravel(curr_expr, order=self.order):             # <<<<<<<<<<<<<<
 *                     e_ = _sympify(e)
 *                     outs_.push_back(e_.thisptr)
*/
    /*else*/ {
      __pyx_t_9 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4982, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ravel); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4982, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_15 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_10))) {
        __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_10);
        assert(__pyx_t_9);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_10);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_10, __pyx__function);
        __pyx_t_15 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_9, __pyx_v_curr_expr};
        __pyx_t_4 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4982, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_order, __pyx_v_self->order, __pyx_t_4, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 4982, __pyx_L1_error)
        __pyx_t_7 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_10, __pyx_callargs+__pyx_t_15, (2-__pyx_t_15) | (__pyx_t_15*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_4);
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4982, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
      }
      if (likely(PyList_CheckExact(__pyx_t_7)) || PyTuple_CheckExact(__pyx_t_7)) {
        __pyx_t_10 = __pyx_t_7; __Pyx_INCREF(__pyx_t_10);
        __pyx_t_27 = 0;
        __pyx_t_26 = NULL;
      } else {
        __pyx_t_27 = -1; __pyx_t_10 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4982, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_26 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_10); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 4982, __pyx_L1_error)
      }
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      for (;;) {
        if (likely(!__pyx_t_26)) {
          if (likely(PyList_CheckExact(__pyx_t_10))) {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_10);
              #if !CYTHON_ASSUME_SAFE_SIZE
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 4982, __pyx_L1_error)
              #endif
              if (__pyx_t_27 >= __pyx_temp) break;
            }
            __pyx_t_7 = __Pyx_PyList_GetItemRefFast(__pyx_t_10, __pyx_t_27, __Pyx_ReferenceSharing_OwnStrongReference);
            ++__pyx_t_27;
          } else {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_10);
              #if !CYTHON_ASSUME_SAFE_SIZE
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 4982, __pyx_L1_error)
              #endif
              if (__pyx_t_27 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_7 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_10, __pyx_t_27));
            #else
            __pyx_t_7 = __Pyx_PySequence_ITEM(__pyx_t_10, __pyx_t_27);
            #endif
            ++__pyx_t_27;
          }
          if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4982, __pyx_L1_error)
        } else {
          __pyx_t_7 = __pyx_t_26(__pyx_t_10);
          if (unlikely(!__pyx_t_7)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 4982, __pyx_L1_error)
              PyErr_Clear();
            }
            break;
          }
        }
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_XDECREF_SET(__pyx_v_e, __pyx_t_7);
        __pyx_t_7 = 0;

        /* "symengine/lib/symengine_wrapper.pyx":4983
 *             else:
 *                 for e in np.ravel(curr_expr, order=self.order):
 *                     e_ = _sympify(e)             # <<<<<<<<<<<<<<
 *                     outs_.push_back(e_.thisptr)
 *         self._init(args_, outs_, cse)
*/
        __pyx_t_4 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_sympify_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4983, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_15 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_9))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_9);
          assert(__pyx_t_4);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_9, __pyx__function);
          __pyx_t_15 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_e};
          __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_15, (2-__pyx_t_15) | (__pyx_t_15*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4983, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
        }
        if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 4983, __pyx_L1_error)
        __Pyx_XDECREF_SET(__pyx_v_e_, ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_7));
        __pyx_t_7 = 0;

        /* "symengine/lib/symengine_wrapper.pyx":4984
 *                 for e in np.ravel(curr_expr, order=self.order):
 *                     e_ = _sympify(e)
 *                     outs_.push_back(e_.thisptr)             # <<<<<<<<<<<<<<
 *         self._init(args_, outs_, cse)
 * 
*/
        try {
          __pyx_v_outs_.push_back(__pyx_v_e_->thisptr);
        } catch(...) {
          __Pyx_CppExn2PyErr();
          __PYX_ERR(0, 4984, __pyx_L1_error)
        }

        /* "symengine/lib/symengine_wrapper.pyx":4982
 *                 outs_.push_back(e_.thisptr)
 *             else:
 *                 for e in np.ravel(curr_expr, order=self.order):             # <<<<<<<<<<<<<<
 *                     e_ = _sympify(e)
 *                     outs_.push_back(e_.thisptr)
*/
      }
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    }
    __pyx_L28:;

    /* "symengine/lib/symengine_wrapper.pyx":4977
 *             args_.push_back(e_.thisptr)
 * 
 *         for curr_expr in exprs:             # <<<<<<<<<<<<<<
 *             if curr_expr.ndim == 0:
 *                 e_ = _sympify(curr_expr.item())
*/
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4985
 *                     e_ = _sympify(e)
 *                     outs_.push_back(e_.thisptr)
 *         self._init(args_, outs_, cse)             # <<<<<<<<<<<<<<
 * 
 *     cdef _init(self, symengine.vec_basic& args_, symengine.vec_basic& outs_, cppbool cse):
*/
  __pyx_t_6 = ((struct __pyx_vtabstruct_9symengine_3lib_17symengine_wrapper__Lambdify *)__pyx_v_self->__pyx_vtab)->_init(__pyx_v_self, __pyx_v_args_, __pyx_v_outs_, __pyx_v_cse); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4985, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4938
 * 
 * cdef class _Lambdify(object):
 *     def __init__(self, args, *exprs, cppbool real=True, order='C', cppbool cse=False, cppbool _load=False, dtype=None, **kwargs):             # <<<<<<<<<<<<<<
 *         cdef:
 *             Basic e_
*/

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __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_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper._Lambdify.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_exprs);
  __Pyx_XDECREF((PyObject *)__pyx_v_e_);
  __Pyx_XDECREF(__pyx_v_llvm_function);
  __Pyx_XDECREF(__pyx_v_idx);
  __Pyx_XDECREF(__pyx_v_shape);
  __Pyx_XDECREF(__pyx_v_arg);
  __Pyx_XDECREF(__pyx_v_curr_expr);
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XDECREF(__pyx_gb_9symengine_3lib_17symengine_wrapper_9_Lambdify_8__init___2generator);
  __Pyx_XDECREF(__pyx_9genexpr18__pyx_v_expr);
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4987
 *         self._init(args_, outs_, cse)
 * 
 *     cdef _init(self, symengine.vec_basic& args_, symengine.vec_basic& outs_, cppbool cse):             # <<<<<<<<<<<<<<
 *         raise ValueError("Not supported")
 * 
*/

static PyObject *__pyx_f_9symengine_3lib_17symengine_wrapper_9_Lambdify__init(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify *__pyx_v_self, CYTHON_UNUSED SymEngine::vec_basic &__pyx_v_args_, CYTHON_UNUSED SymEngine::vec_basic &__pyx_v_outs_, CYTHON_UNUSED bool __pyx_v_cse) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_init", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4988
 * 
 *     cdef _init(self, symengine.vec_basic& args_, symengine.vec_basic& outs_, cppbool cse):
 *         raise ValueError("Not supported")             # <<<<<<<<<<<<<<
 * 
 *     cdef _load(self, const string &s):
*/
  __pyx_t_2 = NULL;
  __pyx_t_3 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Not_supported};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4988, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(0, 4988, __pyx_L1_error)

  /* "symengine/lib/symengine_wrapper.pyx":4987
 *         self._init(args_, outs_, cse)
 * 
 *     cdef _init(self, symengine.vec_basic& args_, symengine.vec_basic& outs_, cppbool cse):             # <<<<<<<<<<<<<<
 *         raise ValueError("Not supported")
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper._Lambdify._init", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4990
 *         raise ValueError("Not supported")
 * 
 *     cdef _load(self, const string &s):             # <<<<<<<<<<<<<<
 *         raise ValueError("Not supported")
 * 
*/

static PyObject *__pyx_f_9symengine_3lib_17symengine_wrapper_9_Lambdify__load(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify *__pyx_v_self, CYTHON_UNUSED std::string const &__pyx_v_s) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_load", 0);

  /* "symengine/lib/symengine_wrapper.pyx":4991
 * 
 *     cdef _load(self, const string &s):
 *         raise ValueError("Not supported")             # <<<<<<<<<<<<<<
 * 
 *     cpdef eval_real(self, inp, out):
*/
  __pyx_t_2 = NULL;
  __pyx_t_3 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Not_supported};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4991, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(0, 4991, __pyx_L1_error)

  /* "symengine/lib/symengine_wrapper.pyx":4990
 *         raise ValueError("Not supported")
 * 
 *     cdef _load(self, const string &s):             # <<<<<<<<<<<<<<
 *         raise ValueError("Not supported")
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper._Lambdify._load", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":4993
 *         raise ValueError("Not supported")
 * 
 *     cpdef eval_real(self, inp, out):             # <<<<<<<<<<<<<<
 *         if inp.size != self.args_size:
 *             raise ValueError("Size of inp incompatible with number of args.")
*/

static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9_Lambdify_3eval_real(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_9symengine_3lib_17symengine_wrapper_9_Lambdify_eval_real(struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify *__pyx_v_self, PyObject *__pyx_v_inp, PyObject *__pyx_v_out, int __pyx_skip_dispatch) {
  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;
  size_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("eval_real", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper__Lambdify &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_eval_real); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4993, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_9symengine_3lib_17symengine_wrapper_9_Lambdify_3eval_real)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_inp, __pyx_v_out};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4993, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "symengine/lib/symengine_wrapper.pyx":4994
 * 
 *     cpdef eval_real(self, inp, out):
 *         if inp.size != self.args_size:             # <<<<<<<<<<<<<<
 *             raise ValueError("Size of inp incompatible with number of args.")
 *         if out.size != self.tot_out_size:
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_inp, __pyx_mstate_global->__pyx_n_u_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4994, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyLong_FromSize_t(__pyx_v_self->args_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4994, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4994, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 4994, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(__pyx_t_6)) {

    /* "symengine/lib/symengine_wrapper.pyx":4995
 *     cpdef eval_real(self, inp, out):
 *         if inp.size != self.args_size:
 *             raise ValueError("Size of inp incompatible with number of args.")             # <<<<<<<<<<<<<<
 *         if out.size != self.tot_out_size:
 *             raise ValueError("Size of out incompatible with number of exprs.")
*/
    __pyx_t_2 = NULL;
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Size_of_inp_incompatible_with_nu};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4995, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(0, 4995, __pyx_L1_error)

    /* "symengine/lib/symengine_wrapper.pyx":4994
 * 
 *     cpdef eval_real(self, inp, out):
 *         if inp.size != self.args_size:             # <<<<<<<<<<<<<<
 *             raise ValueError("Size of inp incompatible with number of args.")
 *         if out.size != self.tot_out_size:
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":4996
 *         if inp.size != self.args_size:
 *             raise ValueError("Size of inp incompatible with number of args.")
 *         if out.size != self.tot_out_size:             # <<<<<<<<<<<<<<
 *             raise ValueError("Size of out incompatible with number of exprs.")
 *         self.unsafe_real(inp, out)
*/
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_out, __pyx_mstate_global->__pyx_n_u_size); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4996, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_PyLong_FromSize_t(__pyx_v_self->tot_out_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4996, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyObject_RichCompare(__pyx_t_4, __pyx_t_2, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4996, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 4996, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(__pyx_t_6)) {

    /* "symengine/lib/symengine_wrapper.pyx":4997
 *             raise ValueError("Size of inp incompatible with number of args.")
 *         if out.size != self.tot_out_size:
 *             raise ValueError("Size of out incompatible with number of exprs.")             # <<<<<<<<<<<<<<
 *         self.unsafe_real(inp, out)
 * 
*/
    __pyx_t_2 = NULL;
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Size_of_out_incompatible_with_nu};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4997, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 4997, __pyx_L1_error)

    /* "symengine/lib/symengine_wrapper.pyx":4996
 *         if inp.size != self.args_size:
 *             raise ValueError("Size of inp incompatible with number of args.")
 *         if out.size != self.tot_out_size:             # <<<<<<<<<<<<<<
 *             raise ValueError("Size of out incompatible with number of exprs.")
 *         self.unsafe_real(inp, out)
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":4998
 *         if out.size != self.tot_out_size:
 *             raise ValueError("Size of out incompatible with number of exprs.")
 *         self.unsafe_real(inp, out)             # <<<<<<<<<<<<<<
 * 
 *     cpdef eval_complex(self, inp, out):
*/
  __pyx_t_2 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_inp, __pyx_v_out};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_unsafe_real, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4998, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4993
 *         raise ValueError("Not supported")
 * 
 *     cpdef eval_real(self, inp, out):             # <<<<<<<<<<<<<<
 *         if inp.size != self.args_size:
 *             raise ValueError("Size of inp incompatible with number of args.")
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper._Lambdify.eval_real", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9_Lambdify_3eval_real(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_9_Lambdify_3eval_real = {"eval_real", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_9_Lambdify_3eval_real, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9_Lambdify_3eval_real(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_inp = 0;
  PyObject *__pyx_v_out = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("eval_real (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_inp,&__pyx_mstate_global->__pyx_n_u_out,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 4993, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4993, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4993, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "eval_real", 0) < (0)) __PYX_ERR(0, 4993, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("eval_real", 1, 2, 2, i); __PYX_ERR(0, 4993, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4993, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4993, __pyx_L3_error)
    }
    __pyx_v_inp = values[0];
    __pyx_v_out = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("eval_real", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 4993, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper._Lambdify.eval_real", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_9_Lambdify_2eval_real(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify *)__pyx_v_self), __pyx_v_inp, __pyx_v_out);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_9_Lambdify_2eval_real(struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify *__pyx_v_self, PyObject *__pyx_v_inp, PyObject *__pyx_v_out) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("eval_real", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_9_Lambdify_eval_real(__pyx_v_self, __pyx_v_inp, __pyx_v_out, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4993, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper._Lambdify.eval_real", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":5000
 *         self.unsafe_real(inp, out)
 * 
 *     cpdef eval_complex(self, inp, out):             # <<<<<<<<<<<<<<
 *         if inp.size != self.args_size:
 *             raise ValueError("Size of inp incompatible with number of args.")
*/

static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9_Lambdify_5eval_complex(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_9symengine_3lib_17symengine_wrapper_9_Lambdify_eval_complex(struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify *__pyx_v_self, PyObject *__pyx_v_inp, PyObject *__pyx_v_out, int __pyx_skip_dispatch) {
  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;
  size_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("eval_complex", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper__Lambdify &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_eval_complex); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5000, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_9symengine_3lib_17symengine_wrapper_9_Lambdify_5eval_complex)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_inp, __pyx_v_out};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5000, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "symengine/lib/symengine_wrapper.pyx":5001
 * 
 *     cpdef eval_complex(self, inp, out):
 *         if inp.size != self.args_size:             # <<<<<<<<<<<<<<
 *             raise ValueError("Size of inp incompatible with number of args.")
 *         if out.size != self.tot_out_size:
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_inp, __pyx_mstate_global->__pyx_n_u_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5001, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyLong_FromSize_t(__pyx_v_self->args_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5001, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5001, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 5001, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(__pyx_t_6)) {

    /* "symengine/lib/symengine_wrapper.pyx":5002
 *     cpdef eval_complex(self, inp, out):
 *         if inp.size != self.args_size:
 *             raise ValueError("Size of inp incompatible with number of args.")             # <<<<<<<<<<<<<<
 *         if out.size != self.tot_out_size:
 *             raise ValueError("Size of out incompatible with number of exprs.")
*/
    __pyx_t_2 = NULL;
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Size_of_inp_incompatible_with_nu};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5002, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(0, 5002, __pyx_L1_error)

    /* "symengine/lib/symengine_wrapper.pyx":5001
 * 
 *     cpdef eval_complex(self, inp, out):
 *         if inp.size != self.args_size:             # <<<<<<<<<<<<<<
 *             raise ValueError("Size of inp incompatible with number of args.")
 *         if out.size != self.tot_out_size:
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":5003
 *         if inp.size != self.args_size:
 *             raise ValueError("Size of inp incompatible with number of args.")
 *         if out.size != self.tot_out_size:             # <<<<<<<<<<<<<<
 *             raise ValueError("Size of out incompatible with number of exprs.")
 *         self.unsafe_complex(inp, out)
*/
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_out, __pyx_mstate_global->__pyx_n_u_size); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5003, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_PyLong_FromSize_t(__pyx_v_self->tot_out_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5003, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyObject_RichCompare(__pyx_t_4, __pyx_t_2, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5003, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 5003, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(__pyx_t_6)) {

    /* "symengine/lib/symengine_wrapper.pyx":5004
 *             raise ValueError("Size of inp incompatible with number of args.")
 *         if out.size != self.tot_out_size:
 *             raise ValueError("Size of out incompatible with number of exprs.")             # <<<<<<<<<<<<<<
 *         self.unsafe_complex(inp, out)
 * 
*/
    __pyx_t_2 = NULL;
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Size_of_out_incompatible_with_nu};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5004, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 5004, __pyx_L1_error)

    /* "symengine/lib/symengine_wrapper.pyx":5003
 *         if inp.size != self.args_size:
 *             raise ValueError("Size of inp incompatible with number of args.")
 *         if out.size != self.tot_out_size:             # <<<<<<<<<<<<<<
 *             raise ValueError("Size of out incompatible with number of exprs.")
 *         self.unsafe_complex(inp, out)
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":5005
 *         if out.size != self.tot_out_size:
 *             raise ValueError("Size of out incompatible with number of exprs.")
 *         self.unsafe_complex(inp, out)             # <<<<<<<<<<<<<<
 * 
 *     cpdef unsafe_eval(self, inp, out, unsigned nbroadcast=1):
*/
  __pyx_t_2 = ((PyObject *)__pyx_v_self);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_inp, __pyx_v_out};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_unsafe_complex, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5005, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5000
 *         self.unsafe_real(inp, out)
 * 
 *     cpdef eval_complex(self, inp, out):             # <<<<<<<<<<<<<<
 *         if inp.size != self.args_size:
 *             raise ValueError("Size of inp incompatible with number of args.")
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper._Lambdify.eval_complex", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9_Lambdify_5eval_complex(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_9_Lambdify_5eval_complex = {"eval_complex", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_9_Lambdify_5eval_complex, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9_Lambdify_5eval_complex(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_inp = 0;
  PyObject *__pyx_v_out = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("eval_complex (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_inp,&__pyx_mstate_global->__pyx_n_u_out,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 5000, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5000, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5000, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "eval_complex", 0) < (0)) __PYX_ERR(0, 5000, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("eval_complex", 1, 2, 2, i); __PYX_ERR(0, 5000, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5000, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5000, __pyx_L3_error)
    }
    __pyx_v_inp = values[0];
    __pyx_v_out = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("eval_complex", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 5000, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper._Lambdify.eval_complex", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_9_Lambdify_4eval_complex(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify *)__pyx_v_self), __pyx_v_inp, __pyx_v_out);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_9_Lambdify_4eval_complex(struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify *__pyx_v_self, PyObject *__pyx_v_inp, PyObject *__pyx_v_out) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("eval_complex", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_9_Lambdify_eval_complex(__pyx_v_self, __pyx_v_inp, __pyx_v_out, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5000, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper._Lambdify.eval_complex", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":5007
 *         self.unsafe_complex(inp, out)
 * 
 *     cpdef unsafe_eval(self, inp, out, unsigned nbroadcast=1):             # <<<<<<<<<<<<<<
 *         raise ValueError("Not supported")
 * 
*/

static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9_Lambdify_7unsafe_eval(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_9symengine_3lib_17symengine_wrapper_9_Lambdify_unsafe_eval(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_inp, CYTHON_UNUSED PyObject *__pyx_v_out, int __pyx_skip_dispatch, struct __pyx_opt_args_9symengine_3lib_17symengine_wrapper_9_Lambdify_unsafe_eval *__pyx_optional_args) {
  unsigned int __pyx_v_nbroadcast = ((unsigned int)1);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("unsafe_eval", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_nbroadcast = __pyx_optional_args->nbroadcast;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper__Lambdify &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_unsafe_eval); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5007, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_9symengine_3lib_17symengine_wrapper_9_Lambdify_7unsafe_eval)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = __Pyx_PyLong_From_unsigned_int(__pyx_v_nbroadcast); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5007, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_6 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_6 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_inp, __pyx_v_out, __pyx_t_5};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (4-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5007, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "symengine/lib/symengine_wrapper.pyx":5008
 * 
 *     cpdef unsafe_eval(self, inp, out, unsigned nbroadcast=1):
 *         raise ValueError("Not supported")             # <<<<<<<<<<<<<<
 * 
 *     def __call__(self, *args, out=None):
*/
  __pyx_t_2 = NULL;
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Not_supported};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5008, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(0, 5008, __pyx_L1_error)

  /* "symengine/lib/symengine_wrapper.pyx":5007
 *         self.unsafe_complex(inp, out)
 * 
 *     cpdef unsafe_eval(self, inp, out, unsigned nbroadcast=1):             # <<<<<<<<<<<<<<
 *         raise ValueError("Not supported")
 * 
*/

  /* 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("symengine.lib.symengine_wrapper._Lambdify.unsafe_eval", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9_Lambdify_7unsafe_eval(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_9_Lambdify_7unsafe_eval = {"unsafe_eval", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_9_Lambdify_7unsafe_eval, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9_Lambdify_7unsafe_eval(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_inp = 0;
  PyObject *__pyx_v_out = 0;
  unsigned int __pyx_v_nbroadcast;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("unsafe_eval (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_inp,&__pyx_mstate_global->__pyx_n_u_out,&__pyx_mstate_global->__pyx_n_u_nbroadcast,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 5007, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 5007, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5007, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5007, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "unsafe_eval", 0) < (0)) __PYX_ERR(0, 5007, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("unsafe_eval", 0, 2, 3, i); __PYX_ERR(0, 5007, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 5007, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5007, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5007, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_inp = values[0];
    __pyx_v_out = values[1];
    if (values[2]) {
      __pyx_v_nbroadcast = __Pyx_PyLong_As_unsigned_int(values[2]); if (unlikely((__pyx_v_nbroadcast == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5007, __pyx_L3_error)
    } else {
      __pyx_v_nbroadcast = ((unsigned int)1);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("unsafe_eval", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 5007, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper._Lambdify.unsafe_eval", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_9_Lambdify_6unsafe_eval(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify *)__pyx_v_self), __pyx_v_inp, __pyx_v_out, __pyx_v_nbroadcast);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_9_Lambdify_6unsafe_eval(struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify *__pyx_v_self, PyObject *__pyx_v_inp, PyObject *__pyx_v_out, unsigned int __pyx_v_nbroadcast) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_9symengine_3lib_17symengine_wrapper_9_Lambdify_unsafe_eval __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("unsafe_eval", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.nbroadcast = __pyx_v_nbroadcast;
  __pyx_t_1 = __pyx_vtabptr_9symengine_3lib_17symengine_wrapper__Lambdify->unsafe_eval(__pyx_v_self, __pyx_v_inp, __pyx_v_out, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5007, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper._Lambdify.unsafe_eval", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":5010
 *         raise ValueError("Not supported")
 * 
 *     def __call__(self, *args, out=None):             # <<<<<<<<<<<<<<
 *         """
 *         Parameters
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9_Lambdify_9__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
PyDoc_STRVAR(__pyx_doc_9symengine_3lib_17symengine_wrapper_9_Lambdify_8__call__, "\n        Parameters\n        ----------\n        inp: array_like\n            last dimension must be equal to number of arguments.\n        out: array_like or None (default)\n            Allows for low-overhead use (output argument, must be contiguous).\n            If ``None``: an output container will be allocated (NumPy ndarray).\n            If ``len(exprs) > 0`` output is found in the corresponding\n            order.\n\n        Returns\n        -------\n        If ``len(exprs) == 1``: ``numpy.ndarray``, otherwise a tuple of such.\n\n        ");
#if CYTHON_UPDATE_DESCRIPTOR_DOC
struct wrapperbase __pyx_wrapperbase_9symengine_3lib_17symengine_wrapper_9_Lambdify_8__call__;
#endif
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9_Lambdify_9__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_out = 0;
  PyObject *__pyx_v_args = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__call__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __Pyx_INCREF(__pyx_args);
  __pyx_v_args = __pyx_args;
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_out,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 5010, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        default:
        case  0: break;
      }
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, 0, __pyx_kwds_len, "__call__", 0) < (0)) __PYX_ERR(0, 5010, __pyx_L3_error)
      if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
    } else if (unlikely(__pyx_nargs < 0)) {
      goto __pyx_L5_argtuple_error;
    } else {
      if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_out = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__call__", 0, 0, 0, __pyx_nargs); __PYX_ERR(0, 5010, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper._Lambdify.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_9_Lambdify_8__call__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify *)__pyx_v_self), __pyx_v_out, __pyx_v_args);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_args);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_9_Lambdify_8__call__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify *__pyx_v_self, PyObject *__pyx_v_out, PyObject *__pyx_v_args) {
  size_t __pyx_v_new_tot_out_size;
  size_t __pyx_v_nbroadcast;
  PyObject *__pyx_v_inp = NULL;
  PyObject *__pyx_v_extra_dim = NULL;
  PyObject *__pyx_v_extra_left = NULL;
  PyObject *__pyx_v_extra_right = NULL;
  PyObject *__pyx_v_new_out_shapes = NULL;
  PyObject *__pyx_v_out_shape = NULL;
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_9genexpr19__pyx_v_out_shape = NULL;
  size_t __pyx_9genexpr20__pyx_v_idx;
  size_t __pyx_9genexpr21__pyx_v_idx;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_t_13;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17[5];
  struct __pyx_opt_args_9symengine_3lib_17symengine_wrapper_9_Lambdify_unsafe_eval __pyx_t_18;
  size_t __pyx_t_19;
  size_t __pyx_t_20;
  size_t __pyx_t_21;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__call__", 0);
  __Pyx_INCREF(__pyx_v_out);
  __Pyx_INCREF(__pyx_v_args);

  /* "symengine/lib/symengine_wrapper.pyx":5028
 *         """
 *         cdef:
 *             size_t idx, new_tot_out_size, nbroadcast = 1             # <<<<<<<<<<<<<<
 *         if self.order not in ('C', 'F'):
 *             raise NotImplementedError("Only C & F order supported for now.")
*/
  __pyx_v_nbroadcast = 1;

  /* "symengine/lib/symengine_wrapper.pyx":5029
 *         cdef:
 *             size_t idx, new_tot_out_size, nbroadcast = 1
 *         if self.order not in ('C', 'F'):             # <<<<<<<<<<<<<<
 *             raise NotImplementedError("Only C & F order supported for now.")
 * 
*/
  __Pyx_INCREF(__pyx_v_self->order);
  __pyx_t_1 = __pyx_v_self->order;
  __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_C, Py_NE)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 5029, __pyx_L1_error)
  if (__pyx_t_3) {
  } else {
    __pyx_t_2 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_F, Py_NE)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 5029, __pyx_L1_error)
  __pyx_t_2 = __pyx_t_3;
  __pyx_L4_bool_binop_done:;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __pyx_t_2;
  if (unlikely(__pyx_t_3)) {

    /* "symengine/lib/symengine_wrapper.pyx":5030
 *             size_t idx, new_tot_out_size, nbroadcast = 1
 *         if self.order not in ('C', 'F'):
 *             raise NotImplementedError("Only C & F order supported for now.")             # <<<<<<<<<<<<<<
 * 
 *         if len(args) == 1:
*/
    __pyx_t_5 = NULL;
    __pyx_t_6 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_Only_C_F_order_supported_for_now};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_NotImplementedError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5030, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(0, 5030, __pyx_L1_error)

    /* "symengine/lib/symengine_wrapper.pyx":5029
 *         cdef:
 *             size_t idx, new_tot_out_size, nbroadcast = 1
 *         if self.order not in ('C', 'F'):             # <<<<<<<<<<<<<<
 *             raise NotImplementedError("Only C & F order supported for now.")
 * 
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":5032
 *             raise NotImplementedError("Only C & F order supported for now.")
 * 
 *         if len(args) == 1:             # <<<<<<<<<<<<<<
 *             args = args[0]
 * 
*/
  __pyx_t_7 = PyObject_Length(__pyx_v_args); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 5032, __pyx_L1_error)
  __pyx_t_3 = (__pyx_t_7 == 1);
  if (__pyx_t_3) {

    /* "symengine/lib/symengine_wrapper.pyx":5033
 * 
 *         if len(args) == 1:
 *             args = args[0]             # <<<<<<<<<<<<<<
 * 
 *         try:
*/
    __pyx_t_4 = __Pyx_GetItemInt_Tuple(__pyx_v_args, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5033, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF_SET(__pyx_v_args, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":5032
 *             raise NotImplementedError("Only C & F order supported for now.")
 * 
 *         if len(args) == 1:             # <<<<<<<<<<<<<<
 *             args = args[0]
 * 
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":5035
 *             args = args[0]
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             inp = np.asanyarray(args, dtype=self.numpy_dtype)
 *         except TypeError:
*/
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
    __Pyx_XGOTREF(__pyx_t_8);
    __Pyx_XGOTREF(__pyx_t_9);
    __Pyx_XGOTREF(__pyx_t_10);
    /*try:*/ {

      /* "symengine/lib/symengine_wrapper.pyx":5036
 * 
 *         try:
 *             inp = np.asanyarray(args, dtype=self.numpy_dtype)             # <<<<<<<<<<<<<<
 *         except TypeError:
 *             inp = np.fromiter(args, dtype=self.numpy_dtype)
*/
      __pyx_t_5 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5036, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_asanyarray); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 5036, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_6 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_12))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_12);
        assert(__pyx_t_5);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_12);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_12, __pyx__function);
        __pyx_t_6 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_5, __pyx_v_args};
        __pyx_t_11 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5036, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_11);
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dtype, __pyx_v_self->numpy_dtype, __pyx_t_11, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 5036, __pyx_L7_error)
        __pyx_t_4 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_12, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_11);
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5036, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_4);
      }
      __pyx_v_inp = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "symengine/lib/symengine_wrapper.pyx":5035
 *             args = args[0]
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             inp = np.asanyarray(args, dtype=self.numpy_dtype)
 *         except TypeError:
*/
    }
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    goto __pyx_L12_try_end;
    __pyx_L7_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":5037
 *         try:
 *             inp = np.asanyarray(args, dtype=self.numpy_dtype)
 *         except TypeError:             # <<<<<<<<<<<<<<
 *             inp = np.fromiter(args, dtype=self.numpy_dtype)
 * 
*/
    __pyx_t_13 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_TypeError))));
    if (__pyx_t_13) {
      __Pyx_AddTraceback("symengine.lib.symengine_wrapper._Lambdify.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_12, &__pyx_t_11) < 0) __PYX_ERR(0, 5037, __pyx_L9_except_error)
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_12);
      __Pyx_XGOTREF(__pyx_t_11);

      /* "symengine/lib/symengine_wrapper.pyx":5038
 *             inp = np.asanyarray(args, dtype=self.numpy_dtype)
 *         except TypeError:
 *             inp = np.fromiter(args, dtype=self.numpy_dtype)             # <<<<<<<<<<<<<<
 * 
 *         if inp.size < self.args_size or inp.size % self.args_size != 0:
*/
      __pyx_t_14 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_15, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 5038, __pyx_L9_except_error)
      __Pyx_GOTREF(__pyx_t_15);
      __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_mstate_global->__pyx_n_u_fromiter); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 5038, __pyx_L9_except_error)
      __Pyx_GOTREF(__pyx_t_16);
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      __pyx_t_6 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_16))) {
        __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_16);
        assert(__pyx_t_14);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_16);
        __Pyx_INCREF(__pyx_t_14);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_16, __pyx__function);
        __pyx_t_6 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_14, __pyx_v_args};
        __pyx_t_15 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 5038, __pyx_L9_except_error)
        __Pyx_GOTREF(__pyx_t_15);
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dtype, __pyx_v_self->numpy_dtype, __pyx_t_15, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 5038, __pyx_L9_except_error)
        __pyx_t_5 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_16, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_15);
        __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5038, __pyx_L9_except_error)
        __Pyx_GOTREF(__pyx_t_5);
      }
      __Pyx_XDECREF_SET(__pyx_v_inp, __pyx_t_5);
      __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
      goto __pyx_L8_exception_handled;
    }
    goto __pyx_L9_except_error;

    /* "symengine/lib/symengine_wrapper.pyx":5035
 *             args = args[0]
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             inp = np.asanyarray(args, dtype=self.numpy_dtype)
 *         except TypeError:
*/
    __pyx_L9_except_error:;
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_XGIVEREF(__pyx_t_10);
    __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
    goto __pyx_L1_error;
    __pyx_L8_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_XGIVEREF(__pyx_t_10);
    __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
    __pyx_L12_try_end:;
  }

  /* "symengine/lib/symengine_wrapper.pyx":5040
 *             inp = np.fromiter(args, dtype=self.numpy_dtype)
 * 
 *         if inp.size < self.args_size or inp.size % self.args_size != 0:             # <<<<<<<<<<<<<<
 *             raise ValueError("Broadcasting failed (input/arg size mismatch)")
 *         nbroadcast = inp.size // self.args_size
*/
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_inp, __pyx_mstate_global->__pyx_n_u_size); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5040, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_12 = __Pyx_PyLong_FromSize_t(__pyx_v_self->args_size); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 5040, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_4 = PyObject_RichCompare(__pyx_t_11, __pyx_t_12, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5040, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 5040, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (!__pyx_t_2) {
  } else {
    __pyx_t_3 = __pyx_t_2;
    goto __pyx_L16_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_inp, __pyx_mstate_global->__pyx_n_u_size); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5040, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_12 = __Pyx_PyLong_FromSize_t(__pyx_v_self->args_size); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 5040, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_11 = PyNumber_Remainder(__pyx_t_4, __pyx_t_12); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5040, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __pyx_t_2 = (__Pyx_PyLong_BoolNeObjC(__pyx_t_11, __pyx_mstate_global->__pyx_int_0, 0, 0)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 5040, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_3 = __pyx_t_2;
  __pyx_L16_bool_binop_done:;
  if (unlikely(__pyx_t_3)) {

    /* "symengine/lib/symengine_wrapper.pyx":5041
 * 
 *         if inp.size < self.args_size or inp.size % self.args_size != 0:
 *             raise ValueError("Broadcasting failed (input/arg size mismatch)")             # <<<<<<<<<<<<<<
 *         nbroadcast = inp.size // self.args_size
 * 
*/
    __pyx_t_12 = NULL;
    __pyx_t_6 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_mstate_global->__pyx_kp_u_Broadcasting_failed_input_arg_si};
      __pyx_t_11 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
      if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5041, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
    }
    __Pyx_Raise(__pyx_t_11, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __PYX_ERR(0, 5041, __pyx_L1_error)

    /* "symengine/lib/symengine_wrapper.pyx":5040
 *             inp = np.fromiter(args, dtype=self.numpy_dtype)
 * 
 *         if inp.size < self.args_size or inp.size % self.args_size != 0:             # <<<<<<<<<<<<<<
 *             raise ValueError("Broadcasting failed (input/arg size mismatch)")
 *         nbroadcast = inp.size // self.args_size
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":5042
 *         if inp.size < self.args_size or inp.size % self.args_size != 0:
 *             raise ValueError("Broadcasting failed (input/arg size mismatch)")
 *         nbroadcast = inp.size // self.args_size             # <<<<<<<<<<<<<<
 * 
 *         if inp.ndim > 1:
*/
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_inp, __pyx_mstate_global->__pyx_n_u_size); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5042, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_12 = __Pyx_PyLong_FromSize_t(__pyx_v_self->args_size); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 5042, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_4 = PyNumber_FloorDivide(__pyx_t_11, __pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5042, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __pyx_t_6 = __Pyx_PyLong_As_size_t(__pyx_t_4); if (unlikely((__pyx_t_6 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 5042, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_nbroadcast = __pyx_t_6;

  /* "symengine/lib/symengine_wrapper.pyx":5044
 *         nbroadcast = inp.size // self.args_size
 * 
 *         if inp.ndim > 1:             # <<<<<<<<<<<<<<
 *             if self.args_size > 1:
 *                 if self.order == 'C':
*/
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_inp, __pyx_mstate_global->__pyx_n_u_ndim); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5044, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_12 = PyObject_RichCompare(__pyx_t_4, __pyx_mstate_global->__pyx_int_1, Py_GT); __Pyx_XGOTREF(__pyx_t_12); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 5044, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 5044, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  if (__pyx_t_3) {

    /* "symengine/lib/symengine_wrapper.pyx":5045
 * 
 *         if inp.ndim > 1:
 *             if self.args_size > 1:             # <<<<<<<<<<<<<<
 *                 if self.order == 'C':
 *                     if inp.shape[inp.ndim-1] != self.args_size:
*/
    __pyx_t_3 = (__pyx_v_self->args_size > 1);
    if (__pyx_t_3) {

      /* "symengine/lib/symengine_wrapper.pyx":5046
 *         if inp.ndim > 1:
 *             if self.args_size > 1:
 *                 if self.order == 'C':             # <<<<<<<<<<<<<<
 *                     if inp.shape[inp.ndim-1] != self.args_size:
 *                         raise ValueError(("C order implies last dim (%d) == len(args)"
*/
      __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_v_self->order, __pyx_mstate_global->__pyx_n_u_C, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 5046, __pyx_L1_error)
      if (__pyx_t_3) {

        /* "symengine/lib/symengine_wrapper.pyx":5047
 *             if self.args_size > 1:
 *                 if self.order == 'C':
 *                     if inp.shape[inp.ndim-1] != self.args_size:             # <<<<<<<<<<<<<<
 *                         raise ValueError(("C order implies last dim (%d) == len(args)"
 *                                           " (%d)") % (inp.shape[inp.ndim-1], self.args_size))
*/
        __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_inp, __pyx_mstate_global->__pyx_n_u_shape); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 5047, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_inp, __pyx_mstate_global->__pyx_n_u_ndim); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5047, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_11 = __Pyx_PyLong_SubtractObjC(__pyx_t_4, __pyx_mstate_global->__pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5047, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_12, __pyx_t_11); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5047, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __pyx_t_11 = __Pyx_PyLong_FromSize_t(__pyx_v_self->args_size); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5047, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_12 = PyObject_RichCompare(__pyx_t_4, __pyx_t_11, Py_NE); __Pyx_XGOTREF(__pyx_t_12); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 5047, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 5047, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        if (unlikely(__pyx_t_3)) {

          /* "symengine/lib/symengine_wrapper.pyx":5048
 *                 if self.order == 'C':
 *                     if inp.shape[inp.ndim-1] != self.args_size:
 *                         raise ValueError(("C order implies last dim (%d) == len(args)"             # <<<<<<<<<<<<<<
 *                                           " (%d)") % (inp.shape[inp.ndim-1], self.args_size))
 *                     extra_dim = inp.shape[:inp.ndim-1]
*/
          __pyx_t_11 = NULL;

          /* "symengine/lib/symengine_wrapper.pyx":5049
 *                     if inp.shape[inp.ndim-1] != self.args_size:
 *                         raise ValueError(("C order implies last dim (%d) == len(args)"
 *                                           " (%d)") % (inp.shape[inp.ndim-1], self.args_size))             # <<<<<<<<<<<<<<
 *                     extra_dim = inp.shape[:inp.ndim-1]
 *                 elif self.order == 'F':
*/
          __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_inp, __pyx_mstate_global->__pyx_n_u_shape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5049, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_inp, __pyx_mstate_global->__pyx_n_u_ndim); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5049, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_16 = __Pyx_PyLong_SubtractObjC(__pyx_t_5, __pyx_mstate_global->__pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 5049, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_16);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_t_16); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5049, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
          __pyx_t_16 = __Pyx_PyObject_FormatAndDecref(__Pyx_PyNumber_Long(__pyx_t_5), __pyx_mstate_global->__pyx_n_u_d); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 5049, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_16);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_5 = __Pyx_PyUnicode_From_size_t(__pyx_v_self->args_size, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5049, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_17[0] = __pyx_mstate_global->__pyx_kp_u_C_order_implies_last_dim;
          __pyx_t_17[1] = __pyx_t_16;
          __pyx_t_17[2] = __pyx_mstate_global->__pyx_kp_u_len_args;
          __pyx_t_17[3] = __pyx_t_5;
          __pyx_t_17[4] = __pyx_mstate_global->__pyx_kp_u__5;

          /* "symengine/lib/symengine_wrapper.pyx":5048
 *                 if self.order == 'C':
 *                     if inp.shape[inp.ndim-1] != self.args_size:
 *                         raise ValueError(("C order implies last dim (%d) == len(args)"             # <<<<<<<<<<<<<<
 *                                           " (%d)") % (inp.shape[inp.ndim-1], self.args_size))
 *                     extra_dim = inp.shape[:inp.ndim-1]
*/
          __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_17, 5, 26 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_16) + 16 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_16));
          if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5048, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_6 = 1;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_t_4};
            __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 5048, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_12);
          }
          __Pyx_Raise(__pyx_t_12, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          __PYX_ERR(0, 5048, __pyx_L1_error)

          /* "symengine/lib/symengine_wrapper.pyx":5047
 *             if self.args_size > 1:
 *                 if self.order == 'C':
 *                     if inp.shape[inp.ndim-1] != self.args_size:             # <<<<<<<<<<<<<<
 *                         raise ValueError(("C order implies last dim (%d) == len(args)"
 *                                           " (%d)") % (inp.shape[inp.ndim-1], self.args_size))
*/
        }

        /* "symengine/lib/symengine_wrapper.pyx":5050
 *                         raise ValueError(("C order implies last dim (%d) == len(args)"
 *                                           " (%d)") % (inp.shape[inp.ndim-1], self.args_size))
 *                     extra_dim = inp.shape[:inp.ndim-1]             # <<<<<<<<<<<<<<
 *                 elif self.order == 'F':
 *                     if inp.shape[0] != self.args_size:
*/
        __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_inp, __pyx_mstate_global->__pyx_n_u_shape); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 5050, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_inp, __pyx_mstate_global->__pyx_n_u_ndim); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5050, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_11 = __Pyx_PyLong_SubtractObjC(__pyx_t_4, __pyx_mstate_global->__pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5050, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_t_12, 0, 0, NULL, &__pyx_t_11, NULL, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5050, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __pyx_v_extra_dim = __pyx_t_4;
        __pyx_t_4 = 0;

        /* "symengine/lib/symengine_wrapper.pyx":5046
 *         if inp.ndim > 1:
 *             if self.args_size > 1:
 *                 if self.order == 'C':             # <<<<<<<<<<<<<<
 *                     if inp.shape[inp.ndim-1] != self.args_size:
 *                         raise ValueError(("C order implies last dim (%d) == len(args)"
*/
        goto __pyx_L20;
      }

      /* "symengine/lib/symengine_wrapper.pyx":5051
 *                                           " (%d)") % (inp.shape[inp.ndim-1], self.args_size))
 *                     extra_dim = inp.shape[:inp.ndim-1]
 *                 elif self.order == 'F':             # <<<<<<<<<<<<<<
 *                     if inp.shape[0] != self.args_size:
 *                         raise ValueError("F order implies first dim (%d) == len(args) (%d)"
*/
      __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_v_self->order, __pyx_mstate_global->__pyx_n_u_F, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 5051, __pyx_L1_error)
      if (__pyx_t_3) {

        /* "symengine/lib/symengine_wrapper.pyx":5052
 *                     extra_dim = inp.shape[:inp.ndim-1]
 *                 elif self.order == 'F':
 *                     if inp.shape[0] != self.args_size:             # <<<<<<<<<<<<<<
 *                         raise ValueError("F order implies first dim (%d) == len(args) (%d)"
 *                                          % (inp.shape[0], self.args_size))
*/
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_inp, __pyx_mstate_global->__pyx_n_u_shape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5052, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_11 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5052, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_4 = __Pyx_PyLong_FromSize_t(__pyx_v_self->args_size); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5052, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_12 = PyObject_RichCompare(__pyx_t_11, __pyx_t_4, Py_NE); __Pyx_XGOTREF(__pyx_t_12); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 5052, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 5052, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        if (unlikely(__pyx_t_3)) {

          /* "symengine/lib/symengine_wrapper.pyx":5053
 *                 elif self.order == 'F':
 *                     if inp.shape[0] != self.args_size:
 *                         raise ValueError("F order implies first dim (%d) == len(args) (%d)"             # <<<<<<<<<<<<<<
 *                                          % (inp.shape[0], self.args_size))
 *                     extra_dim = inp.shape[1:]
*/
          __pyx_t_4 = NULL;

          /* "symengine/lib/symengine_wrapper.pyx":5054
 *                     if inp.shape[0] != self.args_size:
 *                         raise ValueError("F order implies first dim (%d) == len(args) (%d)"
 *                                          % (inp.shape[0], self.args_size))             # <<<<<<<<<<<<<<
 *                     extra_dim = inp.shape[1:]
 *             else:
*/
          __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_inp, __pyx_mstate_global->__pyx_n_u_shape); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5054, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_11);
          __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_11, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5054, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __pyx_t_11 = __Pyx_PyObject_FormatAndDecref(__Pyx_PyNumber_Long(__pyx_t_5), __pyx_mstate_global->__pyx_n_u_d); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5054, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_11);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_5 = __Pyx_PyUnicode_From_size_t(__pyx_v_self->args_size, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5054, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_17[0] = __pyx_mstate_global->__pyx_kp_u_F_order_implies_first_dim;
          __pyx_t_17[1] = __pyx_t_11;
          __pyx_t_17[2] = __pyx_mstate_global->__pyx_kp_u_len_args;
          __pyx_t_17[3] = __pyx_t_5;
          __pyx_t_17[4] = __pyx_mstate_global->__pyx_kp_u__5;

          /* "symengine/lib/symengine_wrapper.pyx":5053
 *                 elif self.order == 'F':
 *                     if inp.shape[0] != self.args_size:
 *                         raise ValueError("F order implies first dim (%d) == len(args) (%d)"             # <<<<<<<<<<<<<<
 *                                          % (inp.shape[0], self.args_size))
 *                     extra_dim = inp.shape[1:]
*/
          __pyx_t_16 = __Pyx_PyUnicode_Join(__pyx_t_17, 5, 27 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_11) + 16 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11));
          if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 5053, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_16);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_6 = 1;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_16};
            __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
            __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
            if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 5053, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_12);
          }
          __Pyx_Raise(__pyx_t_12, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          __PYX_ERR(0, 5053, __pyx_L1_error)

          /* "symengine/lib/symengine_wrapper.pyx":5052
 *                     extra_dim = inp.shape[:inp.ndim-1]
 *                 elif self.order == 'F':
 *                     if inp.shape[0] != self.args_size:             # <<<<<<<<<<<<<<
 *                         raise ValueError("F order implies first dim (%d) == len(args) (%d)"
 *                                          % (inp.shape[0], self.args_size))
*/
        }

        /* "symengine/lib/symengine_wrapper.pyx":5055
 *                         raise ValueError("F order implies first dim (%d) == len(args) (%d)"
 *                                          % (inp.shape[0], self.args_size))
 *                     extra_dim = inp.shape[1:]             # <<<<<<<<<<<<<<
 *             else:
 *                 extra_dim = inp.shape
*/
        __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_inp, __pyx_mstate_global->__pyx_n_u_shape); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 5055, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_16 = __Pyx_PyObject_GetSlice(__pyx_t_12, 1, 0, NULL, NULL, &__pyx_mstate_global->__pyx_slice[1], 1, 0, 1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 5055, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_16);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_v_extra_dim = __pyx_t_16;
        __pyx_t_16 = 0;

        /* "symengine/lib/symengine_wrapper.pyx":5051
 *                                           " (%d)") % (inp.shape[inp.ndim-1], self.args_size))
 *                     extra_dim = inp.shape[:inp.ndim-1]
 *                 elif self.order == 'F':             # <<<<<<<<<<<<<<
 *                     if inp.shape[0] != self.args_size:
 *                         raise ValueError("F order implies first dim (%d) == len(args) (%d)"
*/
      }
      __pyx_L20:;

      /* "symengine/lib/symengine_wrapper.pyx":5045
 * 
 *         if inp.ndim > 1:
 *             if self.args_size > 1:             # <<<<<<<<<<<<<<
 *                 if self.order == 'C':
 *                     if inp.shape[inp.ndim-1] != self.args_size:
*/
      goto __pyx_L19;
    }

    /* "symengine/lib/symengine_wrapper.pyx":5057
 *                     extra_dim = inp.shape[1:]
 *             else:
 *                 extra_dim = inp.shape             # <<<<<<<<<<<<<<
 *         else:
 *             if nbroadcast > 1 and inp.ndim == 1:
*/
    /*else*/ {
      __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_inp, __pyx_mstate_global->__pyx_n_u_shape); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 5057, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_16);
      __pyx_v_extra_dim = __pyx_t_16;
      __pyx_t_16 = 0;
    }
    __pyx_L19:;

    /* "symengine/lib/symengine_wrapper.pyx":5044
 *         nbroadcast = inp.size // self.args_size
 * 
 *         if inp.ndim > 1:             # <<<<<<<<<<<<<<
 *             if self.args_size > 1:
 *                 if self.order == 'C':
*/
    goto __pyx_L18;
  }

  /* "symengine/lib/symengine_wrapper.pyx":5059
 *                 extra_dim = inp.shape
 *         else:
 *             if nbroadcast > 1 and inp.ndim == 1:             # <<<<<<<<<<<<<<
 *                 extra_dim = (nbroadcast,)  # special case
 *             else:
*/
  /*else*/ {
    __pyx_t_2 = (__pyx_v_nbroadcast > 1);
    if (__pyx_t_2) {
    } else {
      __pyx_t_3 = __pyx_t_2;
      goto __pyx_L24_bool_binop_done;
    }
    __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_inp, __pyx_mstate_global->__pyx_n_u_ndim); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 5059, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    __pyx_t_2 = (__Pyx_PyLong_BoolEqObjC(__pyx_t_16, __pyx_mstate_global->__pyx_int_1, 1, 0)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 5059, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    __pyx_t_3 = __pyx_t_2;
    __pyx_L24_bool_binop_done:;
    if (__pyx_t_3) {

      /* "symengine/lib/symengine_wrapper.pyx":5060
 *         else:
 *             if nbroadcast > 1 and inp.ndim == 1:
 *                 extra_dim = (nbroadcast,)  # special case             # <<<<<<<<<<<<<<
 *             else:
 *                 extra_dim = ()
*/
      __pyx_t_16 = __Pyx_PyLong_FromSize_t(__pyx_v_nbroadcast); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 5060, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_16);
      __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 5060, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_GIVEREF(__pyx_t_16);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_16) != (0)) __PYX_ERR(0, 5060, __pyx_L1_error);
      __pyx_t_16 = 0;
      __pyx_v_extra_dim = __pyx_t_12;
      __pyx_t_12 = 0;

      /* "symengine/lib/symengine_wrapper.pyx":5059
 *                 extra_dim = inp.shape
 *         else:
 *             if nbroadcast > 1 and inp.ndim == 1:             # <<<<<<<<<<<<<<
 *                 extra_dim = (nbroadcast,)  # special case
 *             else:
*/
      goto __pyx_L23;
    }

    /* "symengine/lib/symengine_wrapper.pyx":5062
 *                 extra_dim = (nbroadcast,)  # special case
 *             else:
 *                 extra_dim = ()             # <<<<<<<<<<<<<<
 *         extra_left = extra_dim if self.order == 'C' else ()
 *         extra_right = () if self.order == 'C' else extra_dim
*/
    /*else*/ {
      __Pyx_INCREF(__pyx_mstate_global->__pyx_empty_tuple);
      __pyx_v_extra_dim = __pyx_mstate_global->__pyx_empty_tuple;
    }
    __pyx_L23:;
  }
  __pyx_L18:;

  /* "symengine/lib/symengine_wrapper.pyx":5063
 *             else:
 *                 extra_dim = ()
 *         extra_left = extra_dim if self.order == 'C' else ()             # <<<<<<<<<<<<<<
 *         extra_right = () if self.order == 'C' else extra_dim
 *         new_out_shapes = [extra_left + out_shape + extra_right
*/
  __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_v_self->order, __pyx_mstate_global->__pyx_n_u_C, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 5063, __pyx_L1_error)
  if (__pyx_t_3) {
    if (unlikely(!__pyx_v_extra_dim)) { __Pyx_RaiseUnboundLocalError("extra_dim"); __PYX_ERR(0, 5063, __pyx_L1_error) }
    __Pyx_INCREF(__pyx_v_extra_dim);
    __pyx_t_12 = __pyx_v_extra_dim;
  } else {
    __Pyx_INCREF(__pyx_mstate_global->__pyx_empty_tuple);
    __pyx_t_12 = __pyx_mstate_global->__pyx_empty_tuple;
  }
  __pyx_v_extra_left = __pyx_t_12;
  __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5064
 *                 extra_dim = ()
 *         extra_left = extra_dim if self.order == 'C' else ()
 *         extra_right = () if self.order == 'C' else extra_dim             # <<<<<<<<<<<<<<
 *         new_out_shapes = [extra_left + out_shape + extra_right
 *                           for out_shape in self.out_shapes]
*/
  __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_v_self->order, __pyx_mstate_global->__pyx_n_u_C, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 5064, __pyx_L1_error)
  if (__pyx_t_3) {
    __Pyx_INCREF(__pyx_mstate_global->__pyx_empty_tuple);
    __pyx_t_12 = __pyx_mstate_global->__pyx_empty_tuple;
  } else {
    if (unlikely(!__pyx_v_extra_dim)) { __Pyx_RaiseUnboundLocalError("extra_dim"); __PYX_ERR(0, 5064, __pyx_L1_error) }
    __Pyx_INCREF(__pyx_v_extra_dim);
    __pyx_t_12 = __pyx_v_extra_dim;
  }
  __pyx_v_extra_right = __pyx_t_12;
  __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5065
 *         extra_left = extra_dim if self.order == 'C' else ()
 *         extra_right = () if self.order == 'C' else extra_dim
 *         new_out_shapes = [extra_left + out_shape + extra_right             # <<<<<<<<<<<<<<
 *                           for out_shape in self.out_shapes]
 * 
*/
  { /* enter inner scope */
    __pyx_t_12 = PyList_New(0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 5065, __pyx_L28_error)
    __Pyx_GOTREF(__pyx_t_12);

    /* "symengine/lib/symengine_wrapper.pyx":5066
 *         extra_right = () if self.order == 'C' else extra_dim
 *         new_out_shapes = [extra_left + out_shape + extra_right
 *                           for out_shape in self.out_shapes]             # <<<<<<<<<<<<<<
 * 
 *         new_tot_out_size = nbroadcast * self.tot_out_size
*/
    if (unlikely(__pyx_v_self->out_shapes == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
      __PYX_ERR(0, 5066, __pyx_L28_error)
    }
    __pyx_t_16 = __pyx_v_self->out_shapes; __Pyx_INCREF(__pyx_t_16);
    __pyx_t_7 = 0;
    for (;;) {
      {
        Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_16);
        #if !CYTHON_ASSUME_SAFE_SIZE
        if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 5066, __pyx_L28_error)
        #endif
        if (__pyx_t_7 >= __pyx_temp) break;
      }
      __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_16, __pyx_t_7, __Pyx_ReferenceSharing_OwnStrongReference);
      ++__pyx_t_7;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5066, __pyx_L28_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_XDECREF_SET(__pyx_9genexpr19__pyx_v_out_shape, __pyx_t_4);
      __pyx_t_4 = 0;

      /* "symengine/lib/symengine_wrapper.pyx":5065
 *         extra_left = extra_dim if self.order == 'C' else ()
 *         extra_right = () if self.order == 'C' else extra_dim
 *         new_out_shapes = [extra_left + out_shape + extra_right             # <<<<<<<<<<<<<<
 *                           for out_shape in self.out_shapes]
 * 
*/
      __pyx_t_4 = PyNumber_Add(__pyx_v_extra_left, __pyx_9genexpr19__pyx_v_out_shape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5065, __pyx_L28_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = PyNumber_Add(__pyx_t_4, __pyx_v_extra_right); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5065, __pyx_L28_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_12, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 5065, __pyx_L28_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "symengine/lib/symengine_wrapper.pyx":5066
 *         extra_right = () if self.order == 'C' else extra_dim
 *         new_out_shapes = [extra_left + out_shape + extra_right
 *                           for out_shape in self.out_shapes]             # <<<<<<<<<<<<<<
 * 
 *         new_tot_out_size = nbroadcast * self.tot_out_size
*/
    }
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    __Pyx_XDECREF(__pyx_9genexpr19__pyx_v_out_shape); __pyx_9genexpr19__pyx_v_out_shape = 0;
    goto __pyx_L32_exit_scope;
    __pyx_L28_error:;
    __Pyx_XDECREF(__pyx_9genexpr19__pyx_v_out_shape); __pyx_9genexpr19__pyx_v_out_shape = 0;
    goto __pyx_L1_error;
    __pyx_L32_exit_scope:;
  } /* exit inner scope */
  __pyx_v_new_out_shapes = ((PyObject*)__pyx_t_12);
  __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5068
 *                           for out_shape in self.out_shapes]
 * 
 *         new_tot_out_size = nbroadcast * self.tot_out_size             # <<<<<<<<<<<<<<
 *         if out is None:
 *             out = np.empty(new_tot_out_size, dtype=self.numpy_dtype, order=self.order)
*/
  __pyx_v_new_tot_out_size = (__pyx_v_nbroadcast * __pyx_v_self->tot_out_size);

  /* "symengine/lib/symengine_wrapper.pyx":5069
 * 
 *         new_tot_out_size = nbroadcast * self.tot_out_size
 *         if out is None:             # <<<<<<<<<<<<<<
 *             out = np.empty(new_tot_out_size, dtype=self.numpy_dtype, order=self.order)
 *         else:
*/
  __pyx_t_3 = (__pyx_v_out == Py_None);
  if (__pyx_t_3) {

    /* "symengine/lib/symengine_wrapper.pyx":5070
 *         new_tot_out_size = nbroadcast * self.tot_out_size
 *         if out is None:
 *             out = np.empty(new_tot_out_size, dtype=self.numpy_dtype, order=self.order)             # <<<<<<<<<<<<<<
 *         else:
 *             if out.size < new_tot_out_size:
*/
    __pyx_t_16 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5070, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5070, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyLong_FromSize_t(__pyx_v_new_tot_out_size); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5070, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_4);
      assert(__pyx_t_16);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_16);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
      __pyx_t_6 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_16, __pyx_t_5};
      __pyx_t_11 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5070, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dtype, __pyx_v_self->numpy_dtype, __pyx_t_11, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 5070, __pyx_L1_error)
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_order, __pyx_v_self->order, __pyx_t_11, __pyx_callargs+2, 1) < (0)) __PYX_ERR(0, 5070, __pyx_L1_error)
      __pyx_t_12 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_11);
      __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 5070, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
    }
    __Pyx_DECREF_SET(__pyx_v_out, __pyx_t_12);
    __pyx_t_12 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":5069
 * 
 *         new_tot_out_size = nbroadcast * self.tot_out_size
 *         if out is None:             # <<<<<<<<<<<<<<
 *             out = np.empty(new_tot_out_size, dtype=self.numpy_dtype, order=self.order)
 *         else:
*/
    goto __pyx_L33;
  }

  /* "symengine/lib/symengine_wrapper.pyx":5072
 *             out = np.empty(new_tot_out_size, dtype=self.numpy_dtype, order=self.order)
 *         else:
 *             if out.size < new_tot_out_size:             # <<<<<<<<<<<<<<
 *                 raise ValueError("Incompatible size of output argument")
 *             if out.ndim > 1:
*/
  /*else*/ {
    __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_out, __pyx_mstate_global->__pyx_n_u_size); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 5072, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __pyx_t_4 = __Pyx_PyLong_FromSize_t(__pyx_v_new_tot_out_size); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5072, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_11 = PyObject_RichCompare(__pyx_t_12, __pyx_t_4, Py_LT); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5072, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 5072, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    if (unlikely(__pyx_t_3)) {

      /* "symengine/lib/symengine_wrapper.pyx":5073
 *         else:
 *             if out.size < new_tot_out_size:
 *                 raise ValueError("Incompatible size of output argument")             # <<<<<<<<<<<<<<
 *             if out.ndim > 1:
 *                 if len(self.out_shapes) > 1:
*/
      __pyx_t_4 = NULL;
      __pyx_t_6 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Incompatible_size_of_output_argu};
        __pyx_t_11 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5073, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
      }
      __Pyx_Raise(__pyx_t_11, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __PYX_ERR(0, 5073, __pyx_L1_error)

      /* "symengine/lib/symengine_wrapper.pyx":5072
 *             out = np.empty(new_tot_out_size, dtype=self.numpy_dtype, order=self.order)
 *         else:
 *             if out.size < new_tot_out_size:             # <<<<<<<<<<<<<<
 *                 raise ValueError("Incompatible size of output argument")
 *             if out.ndim > 1:
*/
    }

    /* "symengine/lib/symengine_wrapper.pyx":5074
 *             if out.size < new_tot_out_size:
 *                 raise ValueError("Incompatible size of output argument")
 *             if out.ndim > 1:             # <<<<<<<<<<<<<<
 *                 if len(self.out_shapes) > 1:
 *                     raise ValueError("output array with ndim > 1 assumes one output")
*/
    __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_out, __pyx_mstate_global->__pyx_n_u_ndim); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5074, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_4 = PyObject_RichCompare(__pyx_t_11, __pyx_mstate_global->__pyx_int_1, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5074, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 5074, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_3) {

      /* "symengine/lib/symengine_wrapper.pyx":5075
 *                 raise ValueError("Incompatible size of output argument")
 *             if out.ndim > 1:
 *                 if len(self.out_shapes) > 1:             # <<<<<<<<<<<<<<
 *                     raise ValueError("output array with ndim > 1 assumes one output")
 *                 out_shape, = self.out_shapes
*/
      __pyx_t_4 = __pyx_v_self->out_shapes;
      __Pyx_INCREF(__pyx_t_4);
      if (unlikely(__pyx_t_4 == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
        __PYX_ERR(0, 5075, __pyx_L1_error)
      }
      __pyx_t_7 = __Pyx_PyList_GET_SIZE(__pyx_t_4); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 5075, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_3 = (__pyx_t_7 > 1);
      if (unlikely(__pyx_t_3)) {

        /* "symengine/lib/symengine_wrapper.pyx":5076
 *             if out.ndim > 1:
 *                 if len(self.out_shapes) > 1:
 *                     raise ValueError("output array with ndim > 1 assumes one output")             # <<<<<<<<<<<<<<
 *                 out_shape, = self.out_shapes
 *                 if self.order == 'C':
*/
        __pyx_t_11 = NULL;
        __pyx_t_6 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_mstate_global->__pyx_kp_u_output_array_with_ndim_1_assumes};
          __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5076, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
        }
        __Pyx_Raise(__pyx_t_4, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __PYX_ERR(0, 5076, __pyx_L1_error)

        /* "symengine/lib/symengine_wrapper.pyx":5075
 *                 raise ValueError("Incompatible size of output argument")
 *             if out.ndim > 1:
 *                 if len(self.out_shapes) > 1:             # <<<<<<<<<<<<<<
 *                     raise ValueError("output array with ndim > 1 assumes one output")
 *                 out_shape, = self.out_shapes
*/
      }

      /* "symengine/lib/symengine_wrapper.pyx":5077
 *                 if len(self.out_shapes) > 1:
 *                     raise ValueError("output array with ndim > 1 assumes one output")
 *                 out_shape, = self.out_shapes             # <<<<<<<<<<<<<<
 *                 if self.order == 'C':
 *                     if not out.flags['C_CONTIGUOUS']:
*/
      __pyx_t_4 = __pyx_v_self->out_shapes;
      __Pyx_INCREF(__pyx_t_4);
      if (likely(__pyx_t_4 != Py_None)) {
        PyObject* sequence = __pyx_t_4;
        Py_ssize_t size = __Pyx_PyList_GET_SIZE(sequence);
        if (unlikely(size != 1)) {
          if (size > 1) __Pyx_RaiseTooManyValuesError(1);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          __PYX_ERR(0, 5077, __pyx_L1_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_11 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference);
        if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5077, __pyx_L1_error)
        __Pyx_XGOTREF(__pyx_t_11);
        #else
        __pyx_t_11 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5077, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        #endif
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else {
        __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 5077, __pyx_L1_error)
      }
      __pyx_v_out_shape = __pyx_t_11;
      __pyx_t_11 = 0;

      /* "symengine/lib/symengine_wrapper.pyx":5078
 *                     raise ValueError("output array with ndim > 1 assumes one output")
 *                 out_shape, = self.out_shapes
 *                 if self.order == 'C':             # <<<<<<<<<<<<<<
 *                     if not out.flags['C_CONTIGUOUS']:
 *                         raise ValueError("Output argument needs to be C-contiguous")
*/
      __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_v_self->order, __pyx_mstate_global->__pyx_n_u_C, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 5078, __pyx_L1_error)
      if (__pyx_t_3) {

        /* "symengine/lib/symengine_wrapper.pyx":5079
 *                 out_shape, = self.out_shapes
 *                 if self.order == 'C':
 *                     if not out.flags['C_CONTIGUOUS']:             # <<<<<<<<<<<<<<
 *                         raise ValueError("Output argument needs to be C-contiguous")
 *                     if out.shape[-len(out_shape):] != tuple(out_shape):
*/
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_out, __pyx_mstate_global->__pyx_n_u_flags); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5079, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_11 = __Pyx_PyObject_Dict_GetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_C_CONTIGUOUS); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5079, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 5079, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __pyx_t_2 = (!__pyx_t_3);
        if (unlikely(__pyx_t_2)) {

          /* "symengine/lib/symengine_wrapper.pyx":5080
 *                 if self.order == 'C':
 *                     if not out.flags['C_CONTIGUOUS']:
 *                         raise ValueError("Output argument needs to be C-contiguous")             # <<<<<<<<<<<<<<
 *                     if out.shape[-len(out_shape):] != tuple(out_shape):
 *                         raise ValueError("shape mismatch for output array")
*/
          __pyx_t_4 = NULL;
          __pyx_t_6 = 1;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Output_argument_needs_to_be_C_co};
            __pyx_t_11 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
            if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5080, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_11);
          }
          __Pyx_Raise(__pyx_t_11, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __PYX_ERR(0, 5080, __pyx_L1_error)

          /* "symengine/lib/symengine_wrapper.pyx":5079
 *                 out_shape, = self.out_shapes
 *                 if self.order == 'C':
 *                     if not out.flags['C_CONTIGUOUS']:             # <<<<<<<<<<<<<<
 *                         raise ValueError("Output argument needs to be C-contiguous")
 *                     if out.shape[-len(out_shape):] != tuple(out_shape):
*/
        }

        /* "symengine/lib/symengine_wrapper.pyx":5081
 *                     if not out.flags['C_CONTIGUOUS']:
 *                         raise ValueError("Output argument needs to be C-contiguous")
 *                     if out.shape[-len(out_shape):] != tuple(out_shape):             # <<<<<<<<<<<<<<
 *                         raise ValueError("shape mismatch for output array")
 *                 elif self.order == 'F':
*/
        __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_out, __pyx_mstate_global->__pyx_n_u_shape); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5081, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_7 = PyObject_Length(__pyx_v_out_shape); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 5081, __pyx_L1_error)
        __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_t_11, (-__pyx_t_7), 0, NULL, NULL, NULL, 1, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5081, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __pyx_t_11 = __Pyx_PySequence_Tuple(__pyx_v_out_shape); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5081, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_12 = PyObject_RichCompare(__pyx_t_4, __pyx_t_11, Py_NE); __Pyx_XGOTREF(__pyx_t_12); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 5081, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 5081, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        if (unlikely(__pyx_t_2)) {

          /* "symengine/lib/symengine_wrapper.pyx":5082
 *                         raise ValueError("Output argument needs to be C-contiguous")
 *                     if out.shape[-len(out_shape):] != tuple(out_shape):
 *                         raise ValueError("shape mismatch for output array")             # <<<<<<<<<<<<<<
 *                 elif self.order == 'F':
 *                     if not out.flags['F_CONTIGUOUS']:
*/
          __pyx_t_11 = NULL;
          __pyx_t_6 = 1;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_mstate_global->__pyx_kp_u_shape_mismatch_for_output_array};
            __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
            if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 5082, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_12);
          }
          __Pyx_Raise(__pyx_t_12, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          __PYX_ERR(0, 5082, __pyx_L1_error)

          /* "symengine/lib/symengine_wrapper.pyx":5081
 *                     if not out.flags['C_CONTIGUOUS']:
 *                         raise ValueError("Output argument needs to be C-contiguous")
 *                     if out.shape[-len(out_shape):] != tuple(out_shape):             # <<<<<<<<<<<<<<
 *                         raise ValueError("shape mismatch for output array")
 *                 elif self.order == 'F':
*/
        }

        /* "symengine/lib/symengine_wrapper.pyx":5078
 *                     raise ValueError("output array with ndim > 1 assumes one output")
 *                 out_shape, = self.out_shapes
 *                 if self.order == 'C':             # <<<<<<<<<<<<<<
 *                     if not out.flags['C_CONTIGUOUS']:
 *                         raise ValueError("Output argument needs to be C-contiguous")
*/
        goto __pyx_L37;
      }

      /* "symengine/lib/symengine_wrapper.pyx":5083
 *                     if out.shape[-len(out_shape):] != tuple(out_shape):
 *                         raise ValueError("shape mismatch for output array")
 *                 elif self.order == 'F':             # <<<<<<<<<<<<<<
 *                     if not out.flags['F_CONTIGUOUS']:
 *                         raise ValueError("Output argument needs to be F-contiguous")
*/
      __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_v_self->order, __pyx_mstate_global->__pyx_n_u_F, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 5083, __pyx_L1_error)
      if (__pyx_t_2) {

        /* "symengine/lib/symengine_wrapper.pyx":5084
 *                         raise ValueError("shape mismatch for output array")
 *                 elif self.order == 'F':
 *                     if not out.flags['F_CONTIGUOUS']:             # <<<<<<<<<<<<<<
 *                         raise ValueError("Output argument needs to be F-contiguous")
 *                     if out.shape[:len(out_shape)] != tuple(out_shape):
*/
        __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_out, __pyx_mstate_global->__pyx_n_u_flags); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 5084, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_11 = __Pyx_PyObject_Dict_GetItem(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_F_CONTIGUOUS); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5084, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 5084, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __pyx_t_3 = (!__pyx_t_2);
        if (unlikely(__pyx_t_3)) {

          /* "symengine/lib/symengine_wrapper.pyx":5085
 *                 elif self.order == 'F':
 *                     if not out.flags['F_CONTIGUOUS']:
 *                         raise ValueError("Output argument needs to be F-contiguous")             # <<<<<<<<<<<<<<
 *                     if out.shape[:len(out_shape)] != tuple(out_shape):
 *                         raise ValueError("shape mismatch for output array")
*/
          __pyx_t_12 = NULL;
          __pyx_t_6 = 1;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_mstate_global->__pyx_kp_u_Output_argument_needs_to_be_F_co};
            __pyx_t_11 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5085, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_11);
          }
          __Pyx_Raise(__pyx_t_11, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __PYX_ERR(0, 5085, __pyx_L1_error)

          /* "symengine/lib/symengine_wrapper.pyx":5084
 *                         raise ValueError("shape mismatch for output array")
 *                 elif self.order == 'F':
 *                     if not out.flags['F_CONTIGUOUS']:             # <<<<<<<<<<<<<<
 *                         raise ValueError("Output argument needs to be F-contiguous")
 *                     if out.shape[:len(out_shape)] != tuple(out_shape):
*/
        }

        /* "symengine/lib/symengine_wrapper.pyx":5086
 *                     if not out.flags['F_CONTIGUOUS']:
 *                         raise ValueError("Output argument needs to be F-contiguous")
 *                     if out.shape[:len(out_shape)] != tuple(out_shape):             # <<<<<<<<<<<<<<
 *                         raise ValueError("shape mismatch for output array")
 *             else:
*/
        __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_out, __pyx_mstate_global->__pyx_n_u_shape); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5086, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_7 = PyObject_Length(__pyx_v_out_shape); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 5086, __pyx_L1_error)
        __pyx_t_12 = __Pyx_PyObject_GetSlice(__pyx_t_11, 0, __pyx_t_7, NULL, NULL, NULL, 0, 1, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 5086, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __pyx_t_11 = __Pyx_PySequence_Tuple(__pyx_v_out_shape); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5086, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_4 = PyObject_RichCompare(__pyx_t_12, __pyx_t_11, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5086, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 5086, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(__pyx_t_3)) {

          /* "symengine/lib/symengine_wrapper.pyx":5087
 *                         raise ValueError("Output argument needs to be F-contiguous")
 *                     if out.shape[:len(out_shape)] != tuple(out_shape):
 *                         raise ValueError("shape mismatch for output array")             # <<<<<<<<<<<<<<
 *             else:
 *                 if not out.flags['F_CONTIGUOUS']:  # or C_CONTIGUOUS (ndim <= 1)
*/
          __pyx_t_11 = NULL;
          __pyx_t_6 = 1;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_mstate_global->__pyx_kp_u_shape_mismatch_for_output_array};
            __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
            if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5087, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
          }
          __Pyx_Raise(__pyx_t_4, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __PYX_ERR(0, 5087, __pyx_L1_error)

          /* "symengine/lib/symengine_wrapper.pyx":5086
 *                     if not out.flags['F_CONTIGUOUS']:
 *                         raise ValueError("Output argument needs to be F-contiguous")
 *                     if out.shape[:len(out_shape)] != tuple(out_shape):             # <<<<<<<<<<<<<<
 *                         raise ValueError("shape mismatch for output array")
 *             else:
*/
        }

        /* "symengine/lib/symengine_wrapper.pyx":5083
 *                     if out.shape[-len(out_shape):] != tuple(out_shape):
 *                         raise ValueError("shape mismatch for output array")
 *                 elif self.order == 'F':             # <<<<<<<<<<<<<<
 *                     if not out.flags['F_CONTIGUOUS']:
 *                         raise ValueError("Output argument needs to be F-contiguous")
*/
      }
      __pyx_L37:;

      /* "symengine/lib/symengine_wrapper.pyx":5074
 *             if out.size < new_tot_out_size:
 *                 raise ValueError("Incompatible size of output argument")
 *             if out.ndim > 1:             # <<<<<<<<<<<<<<
 *                 if len(self.out_shapes) > 1:
 *                     raise ValueError("output array with ndim > 1 assumes one output")
*/
      goto __pyx_L35;
    }

    /* "symengine/lib/symengine_wrapper.pyx":5089
 *                         raise ValueError("shape mismatch for output array")
 *             else:
 *                 if not out.flags['F_CONTIGUOUS']:  # or C_CONTIGUOUS (ndim <= 1)             # <<<<<<<<<<<<<<
 *                     raise ValueError("Output array need to be contiguous")
 *             if not out.flags['WRITEABLE']:
*/
    /*else*/ {
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_out, __pyx_mstate_global->__pyx_n_u_flags); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5089, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_11 = __Pyx_PyObject_Dict_GetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_F_CONTIGUOUS); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5089, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 5089, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_2 = (!__pyx_t_3);
      if (unlikely(__pyx_t_2)) {

        /* "symengine/lib/symengine_wrapper.pyx":5090
 *             else:
 *                 if not out.flags['F_CONTIGUOUS']:  # or C_CONTIGUOUS (ndim <= 1)
 *                     raise ValueError("Output array need to be contiguous")             # <<<<<<<<<<<<<<
 *             if not out.flags['WRITEABLE']:
 *                 raise ValueError("Output argument needs to be writeable")
*/
        __pyx_t_4 = NULL;
        __pyx_t_6 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Output_array_need_to_be_contiguo};
          __pyx_t_11 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5090, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_11);
        }
        __Pyx_Raise(__pyx_t_11, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __PYX_ERR(0, 5090, __pyx_L1_error)

        /* "symengine/lib/symengine_wrapper.pyx":5089
 *                         raise ValueError("shape mismatch for output array")
 *             else:
 *                 if not out.flags['F_CONTIGUOUS']:  # or C_CONTIGUOUS (ndim <= 1)             # <<<<<<<<<<<<<<
 *                     raise ValueError("Output array need to be contiguous")
 *             if not out.flags['WRITEABLE']:
*/
      }
    }
    __pyx_L35:;

    /* "symengine/lib/symengine_wrapper.pyx":5091
 *                 if not out.flags['F_CONTIGUOUS']:  # or C_CONTIGUOUS (ndim <= 1)
 *                     raise ValueError("Output array need to be contiguous")
 *             if not out.flags['WRITEABLE']:             # <<<<<<<<<<<<<<
 *                 raise ValueError("Output argument needs to be writeable")
 *             out = out.ravel(order=self.order)
*/
    __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_out, __pyx_mstate_global->__pyx_n_u_flags); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5091, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_WRITEABLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5091, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 5091, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_3 = (!__pyx_t_2);
    if (unlikely(__pyx_t_3)) {

      /* "symengine/lib/symengine_wrapper.pyx":5092
 *                     raise ValueError("Output array need to be contiguous")
 *             if not out.flags['WRITEABLE']:
 *                 raise ValueError("Output argument needs to be writeable")             # <<<<<<<<<<<<<<
 *             out = out.ravel(order=self.order)
 * 
*/
      __pyx_t_11 = NULL;
      __pyx_t_6 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_mstate_global->__pyx_kp_u_Output_argument_needs_to_be_writ};
        __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5092, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
      }
      __Pyx_Raise(__pyx_t_4, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __PYX_ERR(0, 5092, __pyx_L1_error)

      /* "symengine/lib/symengine_wrapper.pyx":5091
 *                 if not out.flags['F_CONTIGUOUS']:  # or C_CONTIGUOUS (ndim <= 1)
 *                     raise ValueError("Output array need to be contiguous")
 *             if not out.flags['WRITEABLE']:             # <<<<<<<<<<<<<<
 *                 raise ValueError("Output argument needs to be writeable")
 *             out = out.ravel(order=self.order)
*/
    }

    /* "symengine/lib/symengine_wrapper.pyx":5093
 *             if not out.flags['WRITEABLE']:
 *                 raise ValueError("Output argument needs to be writeable")
 *             out = out.ravel(order=self.order)             # <<<<<<<<<<<<<<
 * 
 *         self.unsafe_eval(inp, out, nbroadcast)
*/
    __pyx_t_11 = __pyx_v_out;
    __Pyx_INCREF(__pyx_t_11);
    __pyx_t_6 = 0;
    {
      PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_11, NULL};
      __pyx_t_12 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 5093, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_order, __pyx_v_self->order, __pyx_t_12, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 5093, __pyx_L1_error)
      __pyx_t_4 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_ravel, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_12);
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5093, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_DECREF_SET(__pyx_v_out, __pyx_t_4);
    __pyx_t_4 = 0;
  }
  __pyx_L33:;

  /* "symengine/lib/symengine_wrapper.pyx":5095
 *             out = out.ravel(order=self.order)
 * 
 *         self.unsafe_eval(inp, out, nbroadcast)             # <<<<<<<<<<<<<<
 * 
 *         if self.order == 'C':
*/
  __pyx_t_18.__pyx_n = 1;
  __pyx_t_18.nbroadcast = __pyx_v_nbroadcast;
  __pyx_t_4 = ((struct __pyx_vtabstruct_9symengine_3lib_17symengine_wrapper__Lambdify *)__pyx_v_self->__pyx_vtab)->unsafe_eval(__pyx_v_self, __pyx_v_inp, __pyx_v_out, 0, &__pyx_t_18); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5095, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5097
 *         self.unsafe_eval(inp, out, nbroadcast)
 * 
 *         if self.order == 'C':             # <<<<<<<<<<<<<<
 *             out = out.reshape((nbroadcast, self.tot_out_size), order='C')
 *             result = [
*/
  __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_v_self->order, __pyx_mstate_global->__pyx_n_u_C, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 5097, __pyx_L1_error)
  if (__pyx_t_3) {

    /* "symengine/lib/symengine_wrapper.pyx":5098
 * 
 *         if self.order == 'C':
 *             out = out.reshape((nbroadcast, self.tot_out_size), order='C')             # <<<<<<<<<<<<<<
 *             result = [
 *                 out[:, self.accum_out_sizes[idx]:self.accum_out_sizes[idx+1]].reshape(
*/
    __pyx_t_12 = __pyx_v_out;
    __Pyx_INCREF(__pyx_t_12);
    __pyx_t_11 = __Pyx_PyLong_FromSize_t(__pyx_v_nbroadcast); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5098, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_5 = __Pyx_PyLong_FromSize_t(__pyx_v_self->tot_out_size); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5098, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_16 = PyTuple_New(2); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 5098, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    __Pyx_GIVEREF(__pyx_t_11);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_11) != (0)) __PYX_ERR(0, 5098, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_5);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_16, 1, __pyx_t_5) != (0)) __PYX_ERR(0, 5098, __pyx_L1_error);
    __pyx_t_11 = 0;
    __pyx_t_5 = 0;
    __pyx_t_6 = 0;
    {
      PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_12, __pyx_t_16};
      __pyx_t_5 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5098, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_order, __pyx_mstate_global->__pyx_n_u_C, __pyx_t_5, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 5098, __pyx_L1_error)
      __pyx_t_4 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_reshape, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_5);
      __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5098, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_DECREF_SET(__pyx_v_out, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":5099
 *         if self.order == 'C':
 *             out = out.reshape((nbroadcast, self.tot_out_size), order='C')
 *             result = [             # <<<<<<<<<<<<<<
 *                 out[:, self.accum_out_sizes[idx]:self.accum_out_sizes[idx+1]].reshape(
 *                     new_out_shapes[idx], order='C') for idx in range(self.n_exprs)
*/
    { /* enter inner scope */
      __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5099, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);

      /* "symengine/lib/symengine_wrapper.pyx":5101
 *             result = [
 *                 out[:, self.accum_out_sizes[idx]:self.accum_out_sizes[idx+1]].reshape(
 *                     new_out_shapes[idx], order='C') for idx in range(self.n_exprs)             # <<<<<<<<<<<<<<
 *             ]
 *         elif self.order == 'F':
*/
      __pyx_t_6 = __pyx_v_self->n_exprs;
      __pyx_t_19 = __pyx_t_6;
      for (__pyx_t_20 = 0; __pyx_t_20 < __pyx_t_19; __pyx_t_20+=1) {
        __pyx_9genexpr20__pyx_v_idx = __pyx_t_20;

        /* "symengine/lib/symengine_wrapper.pyx":5100
 *             out = out.reshape((nbroadcast, self.tot_out_size), order='C')
 *             result = [
 *                 out[:, self.accum_out_sizes[idx]:self.accum_out_sizes[idx+1]].reshape(             # <<<<<<<<<<<<<<
 *                     new_out_shapes[idx], order='C') for idx in range(self.n_exprs)
 *             ]
*/
        __pyx_t_12 = __Pyx_PyLong_From_int((__pyx_v_self->accum_out_sizes[__pyx_9genexpr20__pyx_v_idx])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 5100, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_11 = __Pyx_PyLong_From_int((__pyx_v_self->accum_out_sizes[(__pyx_9genexpr20__pyx_v_idx + 1)])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5100, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_15 = PySlice_New(__pyx_t_12, __pyx_t_11, Py_None); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 5100, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_15);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5100, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_INCREF(__pyx_mstate_global->__pyx_slice[0]);
        __Pyx_GIVEREF(__pyx_mstate_global->__pyx_slice[0]);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_mstate_global->__pyx_slice[0]) != (0)) __PYX_ERR(0, 5100, __pyx_L1_error);
        __Pyx_GIVEREF(__pyx_t_15);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_15) != (0)) __PYX_ERR(0, 5100, __pyx_L1_error);
        __pyx_t_15 = 0;
        __pyx_t_15 = __Pyx_PyObject_GetItem(__pyx_v_out, __pyx_t_11); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 5100, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_15);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __pyx_t_16 = __pyx_t_15;
        __Pyx_INCREF(__pyx_t_16);

        /* "symengine/lib/symengine_wrapper.pyx":5101
 *             result = [
 *                 out[:, self.accum_out_sizes[idx]:self.accum_out_sizes[idx+1]].reshape(
 *                     new_out_shapes[idx], order='C') for idx in range(self.n_exprs)             # <<<<<<<<<<<<<<
 *             ]
 *         elif self.order == 'F':
*/
        __pyx_t_11 = __Pyx_GetItemInt_List(__pyx_v_new_out_shapes, __pyx_9genexpr20__pyx_v_idx, size_t, 0, __Pyx_PyLong_FromSize_t, 1, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5101, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_21 = 0;
        {
          PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_16, __pyx_t_11};
          __pyx_t_12 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 5100, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_12);
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_order, __pyx_mstate_global->__pyx_n_u_C, __pyx_t_12, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 5100, __pyx_L1_error)
          __pyx_t_5 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_reshape, __pyx_callargs+__pyx_t_21, (2-__pyx_t_21) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_12);
          __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
          if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5100, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
        }
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 5099, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
    } /* exit inner scope */
    __pyx_v_result = ((PyObject*)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":5097
 *         self.unsafe_eval(inp, out, nbroadcast)
 * 
 *         if self.order == 'C':             # <<<<<<<<<<<<<<
 *             out = out.reshape((nbroadcast, self.tot_out_size), order='C')
 *             result = [
*/
    goto __pyx_L44;
  }

  /* "symengine/lib/symengine_wrapper.pyx":5103
 *                     new_out_shapes[idx], order='C') for idx in range(self.n_exprs)
 *             ]
 *         elif self.order == 'F':             # <<<<<<<<<<<<<<
 *             out = out.reshape((self.tot_out_size, nbroadcast), order='F')
 *             result = [
*/
  __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_v_self->order, __pyx_mstate_global->__pyx_n_u_F, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 5103, __pyx_L1_error)
  if (__pyx_t_3) {

    /* "symengine/lib/symengine_wrapper.pyx":5104
 *             ]
 *         elif self.order == 'F':
 *             out = out.reshape((self.tot_out_size, nbroadcast), order='F')             # <<<<<<<<<<<<<<
 *             result = [
 *                 out[self.accum_out_sizes[idx]:self.accum_out_sizes[idx+1], :].reshape(
*/
    __pyx_t_5 = __pyx_v_out;
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_15 = __Pyx_PyLong_FromSize_t(__pyx_v_self->tot_out_size); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 5104, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);
    __pyx_t_12 = __Pyx_PyLong_FromSize_t(__pyx_v_nbroadcast); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 5104, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5104, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_GIVEREF(__pyx_t_15);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_15) != (0)) __PYX_ERR(0, 5104, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_12);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_12) != (0)) __PYX_ERR(0, 5104, __pyx_L1_error);
    __pyx_t_15 = 0;
    __pyx_t_12 = 0;
    __pyx_t_6 = 0;
    {
      PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_5, __pyx_t_11};
      __pyx_t_12 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 5104, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_order, __pyx_mstate_global->__pyx_n_u_F, __pyx_t_12, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 5104, __pyx_L1_error)
      __pyx_t_4 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_reshape, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_12);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5104, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_DECREF_SET(__pyx_v_out, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":5105
 *         elif self.order == 'F':
 *             out = out.reshape((self.tot_out_size, nbroadcast), order='F')
 *             result = [             # <<<<<<<<<<<<<<
 *                 out[self.accum_out_sizes[idx]:self.accum_out_sizes[idx+1], :].reshape(
 *                     new_out_shapes[idx], order='F') for idx in range(self.n_exprs)
*/
    { /* enter inner scope */
      __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5105, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);

      /* "symengine/lib/symengine_wrapper.pyx":5107
 *             result = [
 *                 out[self.accum_out_sizes[idx]:self.accum_out_sizes[idx+1], :].reshape(
 *                     new_out_shapes[idx], order='F') for idx in range(self.n_exprs)             # <<<<<<<<<<<<<<
 *             ]
 *         if self.n_exprs == 1:
*/
      __pyx_t_6 = __pyx_v_self->n_exprs;
      __pyx_t_19 = __pyx_t_6;
      for (__pyx_t_20 = 0; __pyx_t_20 < __pyx_t_19; __pyx_t_20+=1) {
        __pyx_9genexpr21__pyx_v_idx = __pyx_t_20;

        /* "symengine/lib/symengine_wrapper.pyx":5106
 *             out = out.reshape((self.tot_out_size, nbroadcast), order='F')
 *             result = [
 *                 out[self.accum_out_sizes[idx]:self.accum_out_sizes[idx+1], :].reshape(             # <<<<<<<<<<<<<<
 *                     new_out_shapes[idx], order='F') for idx in range(self.n_exprs)
 *             ]
*/
        __pyx_t_5 = __Pyx_PyLong_From_int((__pyx_v_self->accum_out_sizes[__pyx_9genexpr21__pyx_v_idx])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5106, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_15 = __Pyx_PyLong_From_int((__pyx_v_self->accum_out_sizes[(__pyx_9genexpr21__pyx_v_idx + 1)])); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 5106, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_15);
        __pyx_t_16 = PySlice_New(__pyx_t_5, __pyx_t_15, Py_None); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 5106, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_16);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
        __pyx_t_15 = PyTuple_New(2); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 5106, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_15);
        __Pyx_GIVEREF(__pyx_t_16);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_16) != (0)) __PYX_ERR(0, 5106, __pyx_L1_error);
        __Pyx_INCREF(__pyx_mstate_global->__pyx_slice[0]);
        __Pyx_GIVEREF(__pyx_mstate_global->__pyx_slice[0]);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_15, 1, __pyx_mstate_global->__pyx_slice[0]) != (0)) __PYX_ERR(0, 5106, __pyx_L1_error);
        __pyx_t_16 = 0;
        __pyx_t_16 = __Pyx_PyObject_GetItem(__pyx_v_out, __pyx_t_15); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 5106, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_16);
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
        __pyx_t_11 = __pyx_t_16;
        __Pyx_INCREF(__pyx_t_11);

        /* "symengine/lib/symengine_wrapper.pyx":5107
 *             result = [
 *                 out[self.accum_out_sizes[idx]:self.accum_out_sizes[idx+1], :].reshape(
 *                     new_out_shapes[idx], order='F') for idx in range(self.n_exprs)             # <<<<<<<<<<<<<<
 *             ]
 *         if self.n_exprs == 1:
*/
        __pyx_t_15 = __Pyx_GetItemInt_List(__pyx_v_new_out_shapes, __pyx_9genexpr21__pyx_v_idx, size_t, 0, __Pyx_PyLong_FromSize_t, 1, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 5107, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_15);
        __pyx_t_21 = 0;
        {
          PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_11, __pyx_t_15};
          __pyx_t_5 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5106, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_order, __pyx_mstate_global->__pyx_n_u_F, __pyx_t_5, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 5106, __pyx_L1_error)
          __pyx_t_12 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_reshape, __pyx_callargs+__pyx_t_21, (2-__pyx_t_21) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_5);
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
          if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 5106, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_12);
        }
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_12))) __PYX_ERR(0, 5105, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      }
    } /* exit inner scope */
    __pyx_v_result = ((PyObject*)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":5103
 *                     new_out_shapes[idx], order='C') for idx in range(self.n_exprs)
 *             ]
 *         elif self.order == 'F':             # <<<<<<<<<<<<<<
 *             out = out.reshape((self.tot_out_size, nbroadcast), order='F')
 *             result = [
*/
  }
  __pyx_L44:;

  /* "symengine/lib/symengine_wrapper.pyx":5109
 *                     new_out_shapes[idx], order='F') for idx in range(self.n_exprs)
 *             ]
 *         if self.n_exprs == 1:             # <<<<<<<<<<<<<<
 *             return result[0]
 *         else:
*/
  __pyx_t_3 = (__pyx_v_self->n_exprs == 1);
  if (__pyx_t_3) {

    /* "symengine/lib/symengine_wrapper.pyx":5110
 *             ]
 *         if self.n_exprs == 1:
 *             return result[0]             # <<<<<<<<<<<<<<
 *         else:
 *             return result
*/
    __Pyx_XDECREF(__pyx_r);
    if (unlikely(!__pyx_v_result)) { __Pyx_RaiseUnboundLocalError("result"); __PYX_ERR(0, 5110, __pyx_L1_error) }
    __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_result, 0, long, 1, __Pyx_PyLong_From_long, 1, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5110, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":5109
 *                     new_out_shapes[idx], order='F') for idx in range(self.n_exprs)
 *             ]
 *         if self.n_exprs == 1:             # <<<<<<<<<<<<<<
 *             return result[0]
 *         else:
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":5112
 *             return result[0]
 *         else:
 *             return result             # <<<<<<<<<<<<<<
 * 
 * 
*/
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    if (unlikely(!__pyx_v_result)) { __Pyx_RaiseUnboundLocalError("result"); __PYX_ERR(0, 5112, __pyx_L1_error) }
    __Pyx_INCREF(__pyx_v_result);
    __pyx_r = __pyx_v_result;
    goto __pyx_L0;
  }

  /* "symengine/lib/symengine_wrapper.pyx":5010
 *         raise ValueError("Not supported")
 * 
 *     def __call__(self, *args, out=None):             # <<<<<<<<<<<<<<
 *         """
 *         Parameters
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper._Lambdify.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_inp);
  __Pyx_XDECREF(__pyx_v_extra_dim);
  __Pyx_XDECREF(__pyx_v_extra_left);
  __Pyx_XDECREF(__pyx_v_extra_right);
  __Pyx_XDECREF(__pyx_v_new_out_shapes);
  __Pyx_XDECREF(__pyx_v_out_shape);
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_9genexpr19__pyx_v_out_shape);
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pxd":35
 *     cdef size_t args_size, tot_out_size
 *     cdef list out_shapes
 *     cdef readonly bint real             # <<<<<<<<<<<<<<
 *     cdef readonly size_t n_exprs
 *     cdef public str order
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9_Lambdify_4real_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9_Lambdify_4real_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_9_Lambdify_4real___get__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_9_Lambdify_4real___get__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->real); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 35, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper._Lambdify.real.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pxd":36
 *     cdef list out_shapes
 *     cdef readonly bint real
 *     cdef readonly size_t n_exprs             # <<<<<<<<<<<<<<
 *     cdef public str order
 *     cdef vector[int] accum_out_sizes
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9_Lambdify_7n_exprs_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9_Lambdify_7n_exprs_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_9_Lambdify_7n_exprs___get__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_9_Lambdify_7n_exprs___get__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_FromSize_t(__pyx_v_self->n_exprs); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 36, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper._Lambdify.n_exprs.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pxd":37
 *     cdef readonly bint real
 *     cdef readonly size_t n_exprs
 *     cdef public str order             # <<<<<<<<<<<<<<
 *     cdef vector[int] accum_out_sizes
 *     cdef object numpy_dtype
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9_Lambdify_5order_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9_Lambdify_5order_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_9_Lambdify_5order___get__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_9_Lambdify_5order___get__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->order);
  __pyx_r = __pyx_v_self->order;
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_9symengine_3lib_17symengine_wrapper_9_Lambdify_5order_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_9symengine_3lib_17symengine_wrapper_9_Lambdify_5order_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_9_Lambdify_5order_2__set__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_9symengine_3lib_17symengine_wrapper_9_Lambdify_5order_2__set__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_1))) __PYX_ERR(3, 37, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->order);
  __Pyx_DECREF(__pyx_v_self->order);
  __pyx_v_self->order = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper._Lambdify.order.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_9symengine_3lib_17symengine_wrapper_9_Lambdify_5order_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_9symengine_3lib_17symengine_wrapper_9_Lambdify_5order_5__del__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_9_Lambdify_5order_4__del__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify *)__pyx_v_self));

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

static int __pyx_pf_9symengine_3lib_17symengine_wrapper_9_Lambdify_5order_4__del__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->order);
  __Pyx_DECREF(__pyx_v_self->order);
  __pyx_v_self->order = ((PyObject*)Py_None);

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

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9_Lambdify_11__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_9_Lambdify_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_9_Lambdify_11__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9_Lambdify_11__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_9_Lambdify_10__reduce_cython__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_9_Lambdify_10__reduce_cython__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self.accum_out_sizes, self.args_size, self.n_exprs, self.numpy_dtype, self.order, self.out_shapes, self.real, self.tot_out_size)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None and _dict:
*/
  __pyx_t_1 = __pyx_convert_vector_to_py_int(__pyx_v_self->accum_out_sizes); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyLong_FromSize_t(__pyx_v_self->args_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyLong_FromSize_t(__pyx_v_self->n_exprs); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_self->real); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyLong_FromSize_t(__pyx_v_self->tot_out_size); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyTuple_New(8); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1) != (0)) __PYX_ERR(1, 5, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_2) != (0)) __PYX_ERR(1, 5, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_3) != (0)) __PYX_ERR(1, 5, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_self->numpy_dtype);
  __Pyx_GIVEREF(__pyx_v_self->numpy_dtype);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_v_self->numpy_dtype) != (0)) __PYX_ERR(1, 5, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_self->order);
  __Pyx_GIVEREF(__pyx_v_self->order);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 4, __pyx_v_self->order) != (0)) __PYX_ERR(1, 5, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_self->out_shapes);
  __Pyx_GIVEREF(__pyx_v_self->out_shapes);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 5, __pyx_v_self->out_shapes) != (0)) __PYX_ERR(1, 5, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_4);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 6, __pyx_t_4) != (0)) __PYX_ERR(1, 5, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_5);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 7, __pyx_t_5) != (0)) __PYX_ERR(1, 5, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_5 = 0;
  __pyx_v_state = ((PyObject*)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self.accum_out_sizes, self.args_size, self.n_exprs, self.numpy_dtype, self.order, self.out_shapes, self.real, self.tot_out_size)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None and _dict:
 *         state += (_dict,)
*/
  __pyx_t_6 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_v__dict = __pyx_t_6;
  __pyx_t_6 = 0;

  /* "(tree fragment)":7
 *     state = (self.accum_out_sizes, self.args_size, self.n_exprs, self.numpy_dtype, self.order, self.out_shapes, self.real, self.tot_out_size)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None and _dict:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
*/
  __pyx_t_8 = (__pyx_v__dict != Py_None);
  if (__pyx_t_8) {
  } else {
    __pyx_t_7 = __pyx_t_8;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(1, 7, __pyx_L1_error)
  __pyx_t_7 = __pyx_t_8;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_7) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None and _dict:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
*/
    __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v__dict) != (0)) __PYX_ERR(1, 8, __pyx_L1_error);
    __pyx_t_5 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_5));
    __pyx_t_5 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None and _dict:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self.numpy_dtype is not None or self.order is not None or self.out_shapes is not None
*/
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self.accum_out_sizes, self.args_size, self.n_exprs, self.numpy_dtype, self.order, self.out_shapes, self.real, self.tot_out_size)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None and _dict:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
*/
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self.numpy_dtype is not None or self.order is not None or self.out_shapes is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle__Lambdify, (type(self), 0x9ba3967, None), state
*/
  /*else*/ {
    __pyx_t_8 = (__pyx_v_self->numpy_dtype != Py_None);
    if (!__pyx_t_8) {
    } else {
      __pyx_t_7 = __pyx_t_8;
      goto __pyx_L6_bool_binop_done;
    }
    __pyx_t_8 = (__pyx_v_self->order != ((PyObject*)Py_None));
    if (!__pyx_t_8) {
    } else {
      __pyx_t_7 = __pyx_t_8;
      goto __pyx_L6_bool_binop_done;
    }
    __pyx_t_8 = (__pyx_v_self->out_shapes != ((PyObject*)Py_None));
    __pyx_t_7 = __pyx_t_8;
    __pyx_L6_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_7;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.numpy_dtype is not None or self.order is not None or self.out_shapes is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle__Lambdify, (type(self), 0x9ba3967, None), state
 *     else:
*/
  if (__pyx_v_use_setstate) {

    /* "(tree fragment)":13
 *         use_setstate = self.numpy_dtype is not None or self.order is not None or self.out_shapes is not None
 *     if use_setstate:
 *         return __pyx_unpickle__Lambdify, (type(self), 0x9ba3967, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle__Lambdify, (type(self), 0x9ba3967, state)
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pyx_unpickle__Lambdify); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 13, __pyx_L1_error);
    __Pyx_INCREF(__pyx_mstate_global->__pyx_int_163199335);
    __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_163199335);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_mstate_global->__pyx_int_163199335) != (0)) __PYX_ERR(1, 13, __pyx_L1_error);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 2, Py_None) != (0)) __PYX_ERR(1, 13, __pyx_L1_error);
    __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5) != (0)) __PYX_ERR(1, 13, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_6);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_6) != (0)) __PYX_ERR(1, 13, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 13, __pyx_L1_error);
    __pyx_t_5 = 0;
    __pyx_t_6 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.numpy_dtype is not None or self.order is not None or self.out_shapes is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle__Lambdify, (type(self), 0x9ba3967, None), state
 *     else:
*/
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle__Lambdify, (type(self), 0x9ba3967, None), state
 *     else:
 *         return __pyx_unpickle__Lambdify, (type(self), 0x9ba3967, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle__Lambdify__set_state(self, __pyx_state)
*/
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_pyx_unpickle__Lambdify); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(1, 15, __pyx_L1_error);
    __Pyx_INCREF(__pyx_mstate_global->__pyx_int_163199335);
    __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_163199335);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_mstate_global->__pyx_int_163199335) != (0)) __PYX_ERR(1, 15, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state) != (0)) __PYX_ERR(1, 15, __pyx_L1_error);
    __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_4);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4) != (0)) __PYX_ERR(1, 15, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_6);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_6) != (0)) __PYX_ERR(1, 15, __pyx_L1_error);
    __pyx_t_4 = 0;
    __pyx_t_6 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper._Lambdify.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle__Lambdify, (type(self), 0x9ba3967, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle__Lambdify__set_state(self, __pyx_state)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9_Lambdify_13__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_9_Lambdify_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_9_Lambdify_13__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9_Lambdify_13__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(1, 16, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 16, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 16, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 16, __pyx_L3_error)
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 16, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper._Lambdify.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_9_Lambdify_12__setstate_cython__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify *)__pyx_v_self), __pyx_v___pyx_state);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_9_Lambdify_12__setstate_cython__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle__Lambdify, (type(self), 0x9ba3967, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle__Lambdify__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
*/
  __pyx_t_1 = __pyx_v___pyx_state;
  __Pyx_INCREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(1, 17, __pyx_L1_error)
  if (unlikely(__pyx_t_1 == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'");
    __PYX_ERR(1, 17, __pyx_L1_error)
  }
  __pyx_t_2 = __pyx_f_9symengine_3lib_17symengine_wrapper___pyx_unpickle__Lambdify__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 17, __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;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle__Lambdify, (type(self), 0x9ba3967, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle__Lambdify__set_state(self, __pyx_state)
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper._Lambdify.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":5115
 * 
 * 
 * cdef double _scipy_callback_lambda_real(int n, double *x, void *user_data) noexcept nogil:             # <<<<<<<<<<<<<<
 *     cdef symengine.LambdaRealDoubleVisitor* lamb = <symengine.LambdaRealDoubleVisitor *>user_data
 *     cdef double result
*/

static double __pyx_f_9symengine_3lib_17symengine_wrapper__scipy_callback_lambda_real(CYTHON_UNUSED int __pyx_v_n, double *__pyx_v_x, void *__pyx_v_user_data) {
  SymEngine::LambdaRealDoubleVisitor *__pyx_v_lamb;
  double __pyx_v_result;
  double __pyx_r;

  /* "symengine/lib/symengine_wrapper.pyx":5116
 * 
 * cdef double _scipy_callback_lambda_real(int n, double *x, void *user_data) noexcept nogil:
 *     cdef symengine.LambdaRealDoubleVisitor* lamb = <symengine.LambdaRealDoubleVisitor *>user_data             # <<<<<<<<<<<<<<
 *     cdef double result
 *     deref(lamb).call(&result, x)
*/
  __pyx_v_lamb = ((SymEngine::LambdaRealDoubleVisitor *)__pyx_v_user_data);

  /* "symengine/lib/symengine_wrapper.pyx":5118
 *     cdef symengine.LambdaRealDoubleVisitor* lamb = <symengine.LambdaRealDoubleVisitor *>user_data
 *     cdef double result
 *     deref(lamb).call(&result, x)             # <<<<<<<<<<<<<<
 *     return result
 * 
*/
  (*__pyx_v_lamb).call((&__pyx_v_result), __pyx_v_x);

  /* "symengine/lib/symengine_wrapper.pyx":5119
 *     cdef double result
 *     deref(lamb).call(&result, x)
 *     return result             # <<<<<<<<<<<<<<
 * 
 * cdef void _ctypes_callback_lambda_real(double *output, const double *input, void *user_data) noexcept nogil:
*/
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":5115
 * 
 * 
 * cdef double _scipy_callback_lambda_real(int n, double *x, void *user_data) noexcept nogil:             # <<<<<<<<<<<<<<
 *     cdef symengine.LambdaRealDoubleVisitor* lamb = <symengine.LambdaRealDoubleVisitor *>user_data
 *     cdef double result
*/

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

/* "symengine/lib/symengine_wrapper.pyx":5121
 *     return result
 * 
 * cdef void _ctypes_callback_lambda_real(double *output, const double *input, void *user_data) noexcept nogil:             # <<<<<<<<<<<<<<
 *     cdef symengine.LambdaRealDoubleVisitor* lamb = <symengine.LambdaRealDoubleVisitor *>user_data
 *     deref(lamb).call(output, input)
*/

static void __pyx_f_9symengine_3lib_17symengine_wrapper__ctypes_callback_lambda_real(double *__pyx_v_output, double const *__pyx_v_input, void *__pyx_v_user_data) {
  SymEngine::LambdaRealDoubleVisitor *__pyx_v_lamb;

  /* "symengine/lib/symengine_wrapper.pyx":5122
 * 
 * cdef void _ctypes_callback_lambda_real(double *output, const double *input, void *user_data) noexcept nogil:
 *     cdef symengine.LambdaRealDoubleVisitor* lamb = <symengine.LambdaRealDoubleVisitor *>user_data             # <<<<<<<<<<<<<<
 *     deref(lamb).call(output, input)
 * 
*/
  __pyx_v_lamb = ((SymEngine::LambdaRealDoubleVisitor *)__pyx_v_user_data);

  /* "symengine/lib/symengine_wrapper.pyx":5123
 * cdef void _ctypes_callback_lambda_real(double *output, const double *input, void *user_data) noexcept nogil:
 *     cdef symengine.LambdaRealDoubleVisitor* lamb = <symengine.LambdaRealDoubleVisitor *>user_data
 *     deref(lamb).call(output, input)             # <<<<<<<<<<<<<<
 * 
 * cdef double _scipy_callback_llvm_real(int n, double *x, void *user_data) noexcept nogil:
*/
  (*__pyx_v_lamb).call(__pyx_v_output, __pyx_v_input);

  /* "symengine/lib/symengine_wrapper.pyx":5121
 *     return result
 * 
 * cdef void _ctypes_callback_lambda_real(double *output, const double *input, void *user_data) noexcept nogil:             # <<<<<<<<<<<<<<
 *     cdef symengine.LambdaRealDoubleVisitor* lamb = <symengine.LambdaRealDoubleVisitor *>user_data
 *     deref(lamb).call(output, input)
*/

  /* function exit code */
}

/* "symengine/lib/symengine_wrapper.pyx":5125
 *     deref(lamb).call(output, input)
 * 
 * cdef double _scipy_callback_llvm_real(int n, double *x, void *user_data) noexcept nogil:             # <<<<<<<<<<<<<<
 *     cdef symengine.LLVMDoubleVisitor* lamb = <symengine.LLVMDoubleVisitor *>user_data
 *     cdef double result
*/

static double __pyx_f_9symengine_3lib_17symengine_wrapper__scipy_callback_llvm_real(CYTHON_UNUSED int __pyx_v_n, double *__pyx_v_x, void *__pyx_v_user_data) {
  SymEngine::LLVMDoubleVisitor *__pyx_v_lamb;
  double __pyx_v_result;
  double __pyx_r;

  /* "symengine/lib/symengine_wrapper.pyx":5126
 * 
 * cdef double _scipy_callback_llvm_real(int n, double *x, void *user_data) noexcept nogil:
 *     cdef symengine.LLVMDoubleVisitor* lamb = <symengine.LLVMDoubleVisitor *>user_data             # <<<<<<<<<<<<<<
 *     cdef double result
 *     deref(lamb).call(&result, x)
*/
  __pyx_v_lamb = ((SymEngine::LLVMDoubleVisitor *)__pyx_v_user_data);

  /* "symengine/lib/symengine_wrapper.pyx":5128
 *     cdef symengine.LLVMDoubleVisitor* lamb = <symengine.LLVMDoubleVisitor *>user_data
 *     cdef double result
 *     deref(lamb).call(&result, x)             # <<<<<<<<<<<<<<
 *     return result
 * 
*/
  (*__pyx_v_lamb).call((&__pyx_v_result), __pyx_v_x);

  /* "symengine/lib/symengine_wrapper.pyx":5129
 *     cdef double result
 *     deref(lamb).call(&result, x)
 *     return result             # <<<<<<<<<<<<<<
 * 
 * cdef void _ctypes_callback_llvm_real(double *output, const double *input, void *user_data) noexcept nogil:
*/
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":5125
 *     deref(lamb).call(output, input)
 * 
 * cdef double _scipy_callback_llvm_real(int n, double *x, void *user_data) noexcept nogil:             # <<<<<<<<<<<<<<
 *     cdef symengine.LLVMDoubleVisitor* lamb = <symengine.LLVMDoubleVisitor *>user_data
 *     cdef double result
*/

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

/* "symengine/lib/symengine_wrapper.pyx":5131
 *     return result
 * 
 * cdef void _ctypes_callback_llvm_real(double *output, const double *input, void *user_data) noexcept nogil:             # <<<<<<<<<<<<<<
 *     cdef symengine.LLVMDoubleVisitor* lamb = <symengine.LLVMDoubleVisitor *>user_data
 *     deref(lamb).call(output, input)
*/

static void __pyx_f_9symengine_3lib_17symengine_wrapper__ctypes_callback_llvm_real(double *__pyx_v_output, double const *__pyx_v_input, void *__pyx_v_user_data) {
  SymEngine::LLVMDoubleVisitor *__pyx_v_lamb;

  /* "symengine/lib/symengine_wrapper.pyx":5132
 * 
 * cdef void _ctypes_callback_llvm_real(double *output, const double *input, void *user_data) noexcept nogil:
 *     cdef symengine.LLVMDoubleVisitor* lamb = <symengine.LLVMDoubleVisitor *>user_data             # <<<<<<<<<<<<<<
 *     deref(lamb).call(output, input)
 * 
*/
  __pyx_v_lamb = ((SymEngine::LLVMDoubleVisitor *)__pyx_v_user_data);

  /* "symengine/lib/symengine_wrapper.pyx":5133
 * cdef void _ctypes_callback_llvm_real(double *output, const double *input, void *user_data) noexcept nogil:
 *     cdef symengine.LLVMDoubleVisitor* lamb = <symengine.LLVMDoubleVisitor *>user_data
 *     deref(lamb).call(output, input)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  (*__pyx_v_lamb).call(__pyx_v_output, __pyx_v_input);

  /* "symengine/lib/symengine_wrapper.pyx":5131
 *     return result
 * 
 * cdef void _ctypes_callback_llvm_real(double *output, const double *input, void *user_data) noexcept nogil:             # <<<<<<<<<<<<<<
 *     cdef symengine.LLVMDoubleVisitor* lamb = <symengine.LLVMDoubleVisitor *>user_data
 *     deref(lamb).call(output, input)
*/

  /* function exit code */
}

/* "symengine/lib/symengine_wrapper.pyx":5136
 * 
 * 
 * def create_low_level_callable(lambdify, *args):             # <<<<<<<<<<<<<<
 *     from scipy import LowLevelCallable
 *     class LambdifyLowLevelCallable(LowLevelCallable):
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_185create_low_level_callable(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_185create_low_level_callable = {"create_low_level_callable", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_185create_low_level_callable, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_185create_low_level_callable(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_lambdify = 0;
  PyObject *__pyx_v_args = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("create_low_level_callable (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  __pyx_v_args = __Pyx_ArgsSlice_FASTCALL(__pyx_args, 1, __pyx_nargs);
  if (unlikely(!__pyx_v_args)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_v_args);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_lambdify,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 5136, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        default:
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5136, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      const Py_ssize_t used_pos_args = (kwd_pos_args < 1) ? kwd_pos_args : 1;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, used_pos_args, __pyx_kwds_len, "create_low_level_callable", 0) < (0)) __PYX_ERR(0, 5136, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("create_low_level_callable", 0, 1, 1, i); __PYX_ERR(0, 5136, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs < 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5136, __pyx_L3_error)
    }
    __pyx_v_lambdify = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("create_low_level_callable", 0, 1, 1, __pyx_nargs); __PYX_ERR(0, 5136, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.create_low_level_callable", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_184create_low_level_callable(__pyx_self, __pyx_v_lambdify, __pyx_v_args);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_args);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":5139
 *     from scipy import LowLevelCallable
 *     class LambdifyLowLevelCallable(LowLevelCallable):
 *         def __init__(self, lambdify, *args):             # <<<<<<<<<<<<<<
 *             self.lambdify = lambdify
 *         def __new__(cls, value, *args, **kwargs):
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_25create_low_level_callable_24LambdifyLowLevelCallable_1__init__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_25create_low_level_callable_24LambdifyLowLevelCallable_1__init__ = {"__init__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_25create_low_level_callable_24LambdifyLowLevelCallable_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_25create_low_level_callable_24LambdifyLowLevelCallable_1__init__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_lambdify = 0;
  CYTHON_UNUSED PyObject *__pyx_v_args = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  __pyx_v_args = __Pyx_ArgsSlice_FASTCALL(__pyx_args, 2, __pyx_nargs);
  if (unlikely(!__pyx_v_args)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_v_args);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_lambdify,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 5139, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        default:
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5139, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5139, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      const Py_ssize_t used_pos_args = (kwd_pos_args < 2) ? kwd_pos_args : 2;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, used_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 5139, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 2, i); __PYX_ERR(0, 5139, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs < 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5139, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5139, __pyx_L3_error)
    }
    __pyx_v_self = values[0];
    __pyx_v_lambdify = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 2, __pyx_nargs); __PYX_ERR(0, 5139, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.create_low_level_callable.LambdifyLowLevelCallable.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_25create_low_level_callable_24LambdifyLowLevelCallable___init__(__pyx_self, __pyx_v_self, __pyx_v_lambdify, __pyx_v_args);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_args);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_25create_low_level_callable_24LambdifyLowLevelCallable___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_lambdify, CYTHON_UNUSED PyObject *__pyx_v_args) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":5140
 *     class LambdifyLowLevelCallable(LowLevelCallable):
 *         def __init__(self, lambdify, *args):
 *             self.lambdify = lambdify             # <<<<<<<<<<<<<<
 *         def __new__(cls, value, *args, **kwargs):
 *             return super(LambdifyLowLevelCallable, cls).__new__(cls, *args)
*/
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_lambdify, __pyx_v_lambdify) < (0)) __PYX_ERR(0, 5140, __pyx_L1_error)

  /* "symengine/lib/symengine_wrapper.pyx":5139
 *     from scipy import LowLevelCallable
 *     class LambdifyLowLevelCallable(LowLevelCallable):
 *         def __init__(self, lambdify, *args):             # <<<<<<<<<<<<<<
 *             self.lambdify = lambdify
 *         def __new__(cls, value, *args, **kwargs):
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.create_low_level_callable.LambdifyLowLevelCallable.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":5141
 *         def __init__(self, lambdify, *args):
 *             self.lambdify = lambdify
 *         def __new__(cls, value, *args, **kwargs):             # <<<<<<<<<<<<<<
 *             return super(LambdifyLowLevelCallable, cls).__new__(cls, *args)
 *     return LambdifyLowLevelCallable(lambdify, *args)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_25create_low_level_callable_24LambdifyLowLevelCallable_3__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_25create_low_level_callable_24LambdifyLowLevelCallable_3__new__ = {"__new__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_25create_low_level_callable_24LambdifyLowLevelCallable_3__new__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_25create_low_level_callable_24LambdifyLowLevelCallable_3__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_cls = 0;
  CYTHON_UNUSED PyObject *__pyx_v_value = 0;
  PyObject *__pyx_v_args = 0;
  CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  __pyx_v_args = __Pyx_ArgsSlice_FASTCALL(__pyx_args, 2, __pyx_nargs);
  if (unlikely(!__pyx_v_args)) {
    __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_v_args);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,&__pyx_mstate_global->__pyx_n_u_value,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 5141, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        default:
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5141, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5141, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      const Py_ssize_t used_pos_args = (kwd_pos_args < 2) ? kwd_pos_args : 2;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, __pyx_kwds_len, "__new__", 1) < (0)) __PYX_ERR(0, 5141, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__new__", 0, 2, 2, i); __PYX_ERR(0, 5141, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs < 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5141, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5141, __pyx_L3_error)
    }
    __pyx_v_cls = values[0];
    __pyx_v_value = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 0, 2, 2, __pyx_nargs); __PYX_ERR(0, 5141, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_XDECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.create_low_level_callable.LambdifyLowLevelCallable.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_25create_low_level_callable_24LambdifyLowLevelCallable_2__new__(__pyx_self, __pyx_v_cls, __pyx_v_value, __pyx_v_args, __pyx_v_kwargs);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_25create_low_level_callable_24LambdifyLowLevelCallable_2__new__(PyObject *__pyx_self, PyObject *__pyx_v_cls, CYTHON_UNUSED PyObject *__pyx_v_value, PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_6_create_low_level_callable *__pyx_cur_scope;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_6_create_low_level_callable *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__new__", 0);
  __pyx_outer_scope = (struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_6_create_low_level_callable *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "symengine/lib/symengine_wrapper.pyx":5142
 *             self.lambdify = lambdify
 *         def __new__(cls, value, *args, **kwargs):
 *             return super(LambdifyLowLevelCallable, cls).__new__(cls, *args)             # <<<<<<<<<<<<<<
 *     return LambdifyLowLevelCallable(lambdify, *args)
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  if (unlikely(!__pyx_cur_scope->__pyx_v_LambdifyLowLevelCallable)) { __Pyx_RaiseClosureNameError("LambdifyLowLevelCallable"); __PYX_ERR(0, 5142, __pyx_L1_error) }
  __pyx_t_3 = 1;
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_cur_scope->__pyx_v_LambdifyLowLevelCallable, __pyx_v_cls};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_super, __pyx_callargs+__pyx_t_3, (3-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5142, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5142, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5142, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_cls);
  __Pyx_GIVEREF(__pyx_v_cls);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_cls) != (0)) __PYX_ERR(0, 5142, __pyx_L1_error);
  __pyx_t_4 = PyNumber_Add(__pyx_t_1, __pyx_v_args); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5142, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5142, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":5141
 *         def __init__(self, lambdify, *args):
 *             self.lambdify = lambdify
 *         def __new__(cls, value, *args, **kwargs):             # <<<<<<<<<<<<<<
 *             return super(LambdifyLowLevelCallable, cls).__new__(cls, *args)
 *     return LambdifyLowLevelCallable(lambdify, *args)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.create_low_level_callable.LambdifyLowLevelCallable.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":5136
 * 
 * 
 * def create_low_level_callable(lambdify, *args):             # <<<<<<<<<<<<<<
 *     from scipy import LowLevelCallable
 *     class LambdifyLowLevelCallable(LowLevelCallable):
*/

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_184create_low_level_callable(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lambdify, PyObject *__pyx_v_args) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_6_create_low_level_callable *__pyx_cur_scope;
  PyObject *__pyx_v_LowLevelCallable = 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 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_low_level_callable", 0);
  __pyx_cur_scope = (struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_6_create_low_level_callable *)__pyx_tp_new_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_6_create_low_level_callable(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_6_create_low_level_callable, __pyx_mstate_global->__pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_6_create_low_level_callable *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 5136, __pyx_L1_error)
  } else {
    __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
  }

  /* "symengine/lib/symengine_wrapper.pyx":5137
 * 
 * def create_low_level_callable(lambdify, *args):
 *     from scipy import LowLevelCallable             # <<<<<<<<<<<<<<
 *     class LambdifyLowLevelCallable(LowLevelCallable):
 *         def __init__(self, lambdify, *args):
*/
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_LowLevelCallable};
    __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_scipy, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5137, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_LowLevelCallable};
    __pyx_t_3 = 0; {
      __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_1, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5137, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      switch (__pyx_t_3) {
        case 0:
        __Pyx_INCREF(__pyx_t_4);
        __pyx_v_LowLevelCallable = __pyx_t_4;
        break;
        default:;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5138
 * def create_low_level_callable(lambdify, *args):
 *     from scipy import LowLevelCallable
 *     class LambdifyLowLevelCallable(LowLevelCallable):             # <<<<<<<<<<<<<<
 *         def __init__(self, lambdify, *args):
 *             self.lambdify = lambdify
*/
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5138, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_LowLevelCallable);
  __Pyx_GIVEREF(__pyx_v_LowLevelCallable);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_LowLevelCallable) != (0)) __PYX_ERR(0, 5138, __pyx_L1_error);
  __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5138, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5138, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_LambdifyLowLevelCallable, __pyx_mstate_global->__pyx_n_u_create_low_level_callable_locals, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5138, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (__pyx_t_4 != __pyx_t_1) {
    if (unlikely((PyDict_SetItemString(__pyx_t_6, "__orig_bases__", __pyx_t_1) < 0))) __PYX_ERR(0, 5138, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5139
 *     from scipy import LowLevelCallable
 *     class LambdifyLowLevelCallable(LowLevelCallable):
 *         def __init__(self, lambdify, *args):             # <<<<<<<<<<<<<<
 *             self.lambdify = lambdify
 *         def __new__(cls, value, *args, **kwargs):
*/
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_25create_low_level_callable_24LambdifyLowLevelCallable_1__init__, 0, __pyx_mstate_global->__pyx_n_u_create_low_level_callable_locals_2, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[6])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5139, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_1) < (0)) __PYX_ERR(0, 5139, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5141
 *         def __init__(self, lambdify, *args):
 *             self.lambdify = lambdify
 *         def __new__(cls, value, *args, **kwargs):             # <<<<<<<<<<<<<<
 *             return super(LambdifyLowLevelCallable, cls).__new__(cls, *args)
 *     return LambdifyLowLevelCallable(lambdify, *args)
*/
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_25create_low_level_callable_24LambdifyLowLevelCallable_3__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_create_low_level_callable_locals_3, ((PyObject*)__pyx_cur_scope), __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[7])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5141, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_SetNewInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_new, __pyx_t_1) < (0)) __PYX_ERR(0, 5141, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5138
 * def create_low_level_callable(lambdify, *args):
 *     from scipy import LowLevelCallable
 *     class LambdifyLowLevelCallable(LowLevelCallable):             # <<<<<<<<<<<<<<
 *         def __init__(self, lambdify, *args):
 *             self.lambdify = lambdify
*/
  __pyx_t_1 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_LambdifyLowLevelCallable, __pyx_t_4, __pyx_t_6, NULL, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5138, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_cur_scope->__pyx_v_LambdifyLowLevelCallable = __pyx_t_1;
  __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5143
 *         def __new__(cls, value, *args, **kwargs):
 *             return super(LambdifyLowLevelCallable, cls).__new__(cls, *args)
 *     return LambdifyLowLevelCallable(lambdify, *args)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5143, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_v_lambdify);
  __Pyx_GIVEREF(__pyx_v_lambdify);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_lambdify) != (0)) __PYX_ERR(0, 5143, __pyx_L1_error);
  __pyx_t_5 = PyNumber_Add(__pyx_t_4, __pyx_v_args); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5143, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_v_LambdifyLowLevelCallable, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5143, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":5136
 * 
 * 
 * def create_low_level_callable(lambdify, *args):             # <<<<<<<<<<<<<<
 *     from scipy import LowLevelCallable
 *     class LambdifyLowLevelCallable(LowLevelCallable):
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.create_low_level_callable", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_LowLevelCallable);
  __Pyx_DECREF((PyObject *)__pyx_cur_scope);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":5147
 * 
 * cdef class LambdaDouble(_Lambdify):
 *     def __cinit__(self, args, *exprs, cppbool real=True, order='C', cppbool cse=False, cppbool _load=False, dtype=None):             # <<<<<<<<<<<<<<
 *         # reject additional arguments
 *         pass
*/

/* Python wrapper */
static int __pyx_pw_9symengine_3lib_17symengine_wrapper_12LambdaDouble_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_9symengine_3lib_17symengine_wrapper_12LambdaDouble_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_args = 0;
  CYTHON_UNUSED bool __pyx_v_real;
  CYTHON_UNUSED PyObject *__pyx_v_order = 0;
  CYTHON_UNUSED bool __pyx_v_cse;
  CYTHON_UNUSED bool __pyx_v__load;
  CYTHON_UNUSED PyObject *__pyx_v_dtype = 0;
  CYTHON_UNUSED PyObject *__pyx_v_exprs = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[6] = {0,0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_v_exprs = __Pyx_ArgsSlice_VARARGS(__pyx_args, 1, __pyx_nargs);
  if (unlikely(!__pyx_v_exprs)) {
    __Pyx_RefNannyFinishContext();
    return -1;
  }
  __Pyx_GOTREF(__pyx_v_exprs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_args,&__pyx_mstate_global->__pyx_n_u_real,&__pyx_mstate_global->__pyx_n_u_order,&__pyx_mstate_global->__pyx_n_u_cse,&__pyx_mstate_global->__pyx_n_u_load,&__pyx_mstate_global->__pyx_n_u_dtype,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 5147, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        default:
        case  1:
        values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5147, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      const Py_ssize_t used_pos_args = (kwd_pos_args < 1) ? kwd_pos_args : 1;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, used_pos_args, __pyx_kwds_len, "__cinit__", 0) < (0)) __PYX_ERR(0, 5147, __pyx_L3_error)
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_n_u_C));
      if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)Py_None));
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 1, 1, i); __PYX_ERR(0, 5147, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs < 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5147, __pyx_L3_error)
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_n_u_C));
      if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_args = values[0];
    if (values[1]) {
      __pyx_v_real = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_real == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 5147, __pyx_L3_error)
    } else {
      __pyx_v_real = ((bool)1);
    }
    __pyx_v_order = values[2];
    if (values[3]) {
      __pyx_v_cse = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_cse == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 5147, __pyx_L3_error)
    } else {
      __pyx_v_cse = ((bool)0);
    }
    if (values[4]) {
      __pyx_v__load = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v__load == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 5147, __pyx_L3_error)
    } else {
      __pyx_v__load = ((bool)0);
    }
    __pyx_v_dtype = values[5];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 1, 1, __pyx_nargs); __PYX_ERR(0, 5147, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_exprs); __pyx_v_exprs = 0;
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.LambdaDouble.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_12LambdaDouble___cinit__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LambdaDouble *)__pyx_v_self), __pyx_v_args, __pyx_v_real, __pyx_v_order, __pyx_v_cse, __pyx_v__load, __pyx_v_dtype, __pyx_v_exprs);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_exprs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_9symengine_3lib_17symengine_wrapper_12LambdaDouble___cinit__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LambdaDouble *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED bool __pyx_v_real, CYTHON_UNUSED PyObject *__pyx_v_order, CYTHON_UNUSED bool __pyx_v_cse, CYTHON_UNUSED bool __pyx_v__load, CYTHON_UNUSED PyObject *__pyx_v_dtype, CYTHON_UNUSED PyObject *__pyx_v_exprs) {
  int __pyx_r;

  /* function exit code */
  __pyx_r = 0;
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":5151
 *         pass
 * 
 *     cdef _init(self, symengine.vec_basic& args_, symengine.vec_basic& outs_, cppbool cse):             # <<<<<<<<<<<<<<
 *         self.lambda_visitor.reset(new symengine.LambdaRealDoubleVisitor())
 *         deref(self.lambda_visitor).init(args_, outs_, cse)
*/

static PyObject *__pyx_f_9symengine_3lib_17symengine_wrapper_12LambdaDouble__init(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LambdaDouble *__pyx_v_self, SymEngine::vec_basic &__pyx_v_args_, SymEngine::vec_basic &__pyx_v_outs_, bool __pyx_v_cse) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_init", 0);

  /* "symengine/lib/symengine_wrapper.pyx":5152
 * 
 *     cdef _init(self, symengine.vec_basic& args_, symengine.vec_basic& outs_, cppbool cse):
 *         self.lambda_visitor.reset(new symengine.LambdaRealDoubleVisitor())             # <<<<<<<<<<<<<<
 *         deref(self.lambda_visitor).init(args_, outs_, cse)
 * 
*/
  __pyx_v_self->lambda_visitor.reset(new SymEngine::LambdaRealDoubleVisitor());

  /* "symengine/lib/symengine_wrapper.pyx":5153
 *     cdef _init(self, symengine.vec_basic& args_, symengine.vec_basic& outs_, cppbool cse):
 *         self.lambda_visitor.reset(new symengine.LambdaRealDoubleVisitor())
 *         deref(self.lambda_visitor).init(args_, outs_, cse)             # <<<<<<<<<<<<<<
 * 
 *     cpdef unsafe_real(self, double[::1] inp, double[::1] out, int inp_offset=0, int out_offset=0):
*/
  try {
    (*__pyx_v_self->lambda_visitor).init(__pyx_v_args_, __pyx_v_outs_, __pyx_v_cse);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 5153, __pyx_L1_error)
  }

  /* "symengine/lib/symengine_wrapper.pyx":5151
 *         pass
 * 
 *     cdef _init(self, symengine.vec_basic& args_, symengine.vec_basic& outs_, cppbool cse):             # <<<<<<<<<<<<<<
 *         self.lambda_visitor.reset(new symengine.LambdaRealDoubleVisitor())
 *         deref(self.lambda_visitor).init(args_, outs_, cse)
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.LambdaDouble._init", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":5155
 *         deref(self.lambda_visitor).init(args_, outs_, cse)
 * 
 *     cpdef unsafe_real(self, double[::1] inp, double[::1] out, int inp_offset=0, int out_offset=0):             # <<<<<<<<<<<<<<
 *         deref(self.lambda_visitor).call(&out[out_offset], &inp[inp_offset])
 * 
*/

static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_12LambdaDouble_3unsafe_real(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_9symengine_3lib_17symengine_wrapper_12LambdaDouble_unsafe_real(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LambdaDouble *__pyx_v_self, __Pyx_memviewslice __pyx_v_inp, __Pyx_memviewslice __pyx_v_out, int __pyx_skip_dispatch, struct __pyx_opt_args_9symengine_3lib_17symengine_wrapper_12LambdaDouble_unsafe_real *__pyx_optional_args) {
  int __pyx_v_inp_offset = ((int)0);
  int __pyx_v_out_offset = ((int)0);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  size_t __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  int __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("unsafe_real", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_inp_offset = __pyx_optional_args->inp_offset;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_out_offset = __pyx_optional_args->out_offset;
      }
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LambdaDouble &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_unsafe_real); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5155, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_9symengine_3lib_17symengine_wrapper_12LambdaDouble_3unsafe_real)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        if (unlikely(!__pyx_v_inp.memview)) { __Pyx_RaiseUnboundLocalError("inp"); __PYX_ERR(0, 5155, __pyx_L1_error) }
        __pyx_t_5 = __pyx_memoryview_fromslice(__pyx_v_inp, 1, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5155, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        if (unlikely(!__pyx_v_out.memview)) { __Pyx_RaiseUnboundLocalError("out"); __PYX_ERR(0, 5155, __pyx_L1_error) }
        __pyx_t_6 = __pyx_memoryview_fromslice(__pyx_v_out, 1, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5155, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_7 = __Pyx_PyLong_From_int(__pyx_v_inp_offset); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5155, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_8 = __Pyx_PyLong_From_int(__pyx_v_out_offset); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 5155, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_9 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_9 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[5] = {__pyx_t_3, __pyx_t_5, __pyx_t_6, __pyx_t_7, __pyx_t_8};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_9, (5-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5155, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "symengine/lib/symengine_wrapper.pyx":5156
 * 
 *     cpdef unsafe_real(self, double[::1] inp, double[::1] out, int inp_offset=0, int out_offset=0):
 *         deref(self.lambda_visitor).call(&out[out_offset], &inp[inp_offset])             # <<<<<<<<<<<<<<
 * 
 *     cpdef unsafe_eval(self, inp, out, unsigned nbroadcast=1):
*/
  __pyx_t_10 = __pyx_v_out_offset;
  __pyx_t_11 = -1;
  if (__pyx_t_10 < 0) {
    __pyx_t_10 += __pyx_v_out.shape[0];
    if (unlikely(__pyx_t_10 < 0)) __pyx_t_11 = 0;
  } else if (unlikely(__pyx_t_10 >= __pyx_v_out.shape[0])) __pyx_t_11 = 0;
  if (unlikely(__pyx_t_11 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_11);
    __PYX_ERR(0, 5156, __pyx_L1_error)
  }
  __pyx_t_12 = __pyx_v_inp_offset;
  __pyx_t_11 = -1;
  if (__pyx_t_12 < 0) {
    __pyx_t_12 += __pyx_v_inp.shape[0];
    if (unlikely(__pyx_t_12 < 0)) __pyx_t_11 = 0;
  } else if (unlikely(__pyx_t_12 >= __pyx_v_inp.shape[0])) __pyx_t_11 = 0;
  if (unlikely(__pyx_t_11 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_11);
    __PYX_ERR(0, 5156, __pyx_L1_error)
  }
  (*__pyx_v_self->lambda_visitor).call((&(*((double *) ( /* dim=0 */ ((char *) (((double *) __pyx_v_out.data) + __pyx_t_10)) )))), (&(*((double *) ( /* dim=0 */ ((char *) (((double *) __pyx_v_inp.data) + __pyx_t_12)) )))));

  /* "symengine/lib/symengine_wrapper.pyx":5155
 *         deref(self.lambda_visitor).init(args_, outs_, cse)
 * 
 *     cpdef unsafe_real(self, double[::1] inp, double[::1] out, int inp_offset=0, int out_offset=0):             # <<<<<<<<<<<<<<
 *         deref(self.lambda_visitor).call(&out[out_offset], &inp[inp_offset])
 * 
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.LambdaDouble.unsafe_real", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_12LambdaDouble_3unsafe_real(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_12LambdaDouble_3unsafe_real = {"unsafe_real", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_12LambdaDouble_3unsafe_real, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_12LambdaDouble_3unsafe_real(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  __Pyx_memviewslice __pyx_v_inp = { 0, 0, { 0 }, { 0 }, { 0 } };
  __Pyx_memviewslice __pyx_v_out = { 0, 0, { 0 }, { 0 }, { 0 } };
  int __pyx_v_inp_offset;
  int __pyx_v_out_offset;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("unsafe_real (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_inp,&__pyx_mstate_global->__pyx_n_u_out,&__pyx_mstate_global->__pyx_n_u_inp_offset,&__pyx_mstate_global->__pyx_n_u_out_offset,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 5155, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 5155, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 5155, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5155, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5155, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "unsafe_real", 0) < (0)) __PYX_ERR(0, 5155, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("unsafe_real", 0, 2, 4, i); __PYX_ERR(0, 5155, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 5155, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 5155, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5155, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5155, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_inp = __Pyx_PyObject_to_MemoryviewSlice_dc_double(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_inp.memview)) __PYX_ERR(0, 5155, __pyx_L3_error)
    __pyx_v_out = __Pyx_PyObject_to_MemoryviewSlice_dc_double(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_out.memview)) __PYX_ERR(0, 5155, __pyx_L3_error)
    if (values[2]) {
      __pyx_v_inp_offset = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_inp_offset == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5155, __pyx_L3_error)
    } else {
      __pyx_v_inp_offset = ((int)0);
    }
    if (values[3]) {
      __pyx_v_out_offset = __Pyx_PyLong_As_int(values[3]); if (unlikely((__pyx_v_out_offset == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5155, __pyx_L3_error)
    } else {
      __pyx_v_out_offset = ((int)0);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("unsafe_real", 0, 2, 4, __pyx_nargs); __PYX_ERR(0, 5155, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_inp, 1);
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_out, 1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.LambdaDouble.unsafe_real", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_12LambdaDouble_2unsafe_real(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LambdaDouble *)__pyx_v_self), __pyx_v_inp, __pyx_v_out, __pyx_v_inp_offset, __pyx_v_out_offset);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_inp, 1);
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_out, 1);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_12LambdaDouble_2unsafe_real(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LambdaDouble *__pyx_v_self, __Pyx_memviewslice __pyx_v_inp, __Pyx_memviewslice __pyx_v_out, int __pyx_v_inp_offset, int __pyx_v_out_offset) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_9symengine_3lib_17symengine_wrapper_12LambdaDouble_unsafe_real __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("unsafe_real", 0);
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(!__pyx_v_inp.memview)) { __Pyx_RaiseUnboundLocalError("inp"); __PYX_ERR(0, 5155, __pyx_L1_error) }
  if (unlikely(!__pyx_v_out.memview)) { __Pyx_RaiseUnboundLocalError("out"); __PYX_ERR(0, 5155, __pyx_L1_error) }
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.inp_offset = __pyx_v_inp_offset;
  __pyx_t_2.out_offset = __pyx_v_out_offset;
  __pyx_t_1 = __pyx_vtabptr_9symengine_3lib_17symengine_wrapper_LambdaDouble->unsafe_real(__pyx_v_self, __pyx_v_inp, __pyx_v_out, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.LambdaDouble.unsafe_real", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":5158
 *         deref(self.lambda_visitor).call(&out[out_offset], &inp[inp_offset])
 * 
 *     cpdef unsafe_eval(self, inp, out, unsigned nbroadcast=1):             # <<<<<<<<<<<<<<
 *         cdef double[::1] c_inp, c_out
 *         cdef unsigned idx
*/

static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_12LambdaDouble_5unsafe_eval(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_9symengine_3lib_17symengine_wrapper_12LambdaDouble_unsafe_eval(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LambdaDouble *__pyx_v_self, PyObject *__pyx_v_inp, PyObject *__pyx_v_out, int __pyx_skip_dispatch, struct __pyx_opt_args_9symengine_3lib_17symengine_wrapper_12LambdaDouble_unsafe_eval *__pyx_optional_args) {
  unsigned int __pyx_v_nbroadcast = ((unsigned int)1);
  __Pyx_memviewslice __pyx_v_c_inp = { 0, 0, { 0 }, { 0 }, { 0 } };
  __Pyx_memviewslice __pyx_v_c_out = { 0, 0, { 0 }, { 0 }, { 0 } };
  unsigned int __pyx_v_idx;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  __Pyx_memviewslice __pyx_t_8 = { 0, 0, { 0 }, { 0 }, { 0 } };
  unsigned int __pyx_t_9;
  unsigned int __pyx_t_10;
  unsigned int __pyx_t_11;
  int __pyx_t_12;
  size_t __pyx_t_13;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("unsafe_eval", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_nbroadcast = __pyx_optional_args->nbroadcast;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LambdaDouble &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_unsafe_eval); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5158, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_9symengine_3lib_17symengine_wrapper_12LambdaDouble_5unsafe_eval)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = __Pyx_PyLong_From_unsigned_int(__pyx_v_nbroadcast); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5158, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_6 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_6 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_inp, __pyx_v_out, __pyx_t_5};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (4-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5158, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "symengine/lib/symengine_wrapper.pyx":5161
 *         cdef double[::1] c_inp, c_out
 *         cdef unsigned idx
 *         c_inp = np.ascontiguousarray(inp.ravel(order=self.order), dtype=self.numpy_dtype)             # <<<<<<<<<<<<<<
 *         c_out = out
 *         for idx in range(nbroadcast):
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5161, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ascontiguousarray); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5161, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = __pyx_v_inp;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_6 = 0;
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_3, NULL};
    __pyx_t_7 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5161, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_order, __pyx_v_self->__pyx_base.order, __pyx_t_7, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 5161, __pyx_L1_error)
    __pyx_t_4 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_ravel, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_7);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5161, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, __pyx_t_4};
    __pyx_t_7 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5161, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dtype, __pyx_v_self->__pyx_base.numpy_dtype, __pyx_t_7, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 5161, __pyx_L1_error)
    __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_7);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5161, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_dc_double(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_8.memview)) __PYX_ERR(0, 5161, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_c_inp = __pyx_t_8;
  __pyx_t_8.memview = NULL;
  __pyx_t_8.data = NULL;

  /* "symengine/lib/symengine_wrapper.pyx":5162
 *         cdef unsigned idx
 *         c_inp = np.ascontiguousarray(inp.ravel(order=self.order), dtype=self.numpy_dtype)
 *         c_out = out             # <<<<<<<<<<<<<<
 *         for idx in range(nbroadcast):
 *             deref(self.lambda_visitor).call(&c_out[idx*self.tot_out_size], &c_inp[idx*self.args_size])
*/
  __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_dc_double(__pyx_v_out, PyBUF_WRITABLE); if (unlikely(!__pyx_t_8.memview)) __PYX_ERR(0, 5162, __pyx_L1_error)
  __pyx_v_c_out = __pyx_t_8;
  __pyx_t_8.memview = NULL;
  __pyx_t_8.data = NULL;

  /* "symengine/lib/symengine_wrapper.pyx":5163
 *         c_inp = np.ascontiguousarray(inp.ravel(order=self.order), dtype=self.numpy_dtype)
 *         c_out = out
 *         for idx in range(nbroadcast):             # <<<<<<<<<<<<<<
 *             deref(self.lambda_visitor).call(&c_out[idx*self.tot_out_size], &c_inp[idx*self.args_size])
 * 
*/
  __pyx_t_9 = __pyx_v_nbroadcast;
  __pyx_t_10 = __pyx_t_9;
  for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) {
    __pyx_v_idx = __pyx_t_11;

    /* "symengine/lib/symengine_wrapper.pyx":5164
 *         c_out = out
 *         for idx in range(nbroadcast):
 *             deref(self.lambda_visitor).call(&c_out[idx*self.tot_out_size], &c_inp[idx*self.args_size])             # <<<<<<<<<<<<<<
 * 
 *     cpdef as_scipy_low_level_callable(self):
*/
    __pyx_t_6 = (__pyx_v_idx * __pyx_v_self->__pyx_base.tot_out_size);
    __pyx_t_12 = -1;
    if (unlikely(__pyx_t_6 >= (size_t)__pyx_v_c_out.shape[0])) __pyx_t_12 = 0;
    if (unlikely(__pyx_t_12 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_12);
      __PYX_ERR(0, 5164, __pyx_L1_error)
    }
    __pyx_t_13 = (__pyx_v_idx * __pyx_v_self->__pyx_base.args_size);
    __pyx_t_12 = -1;
    if (unlikely(__pyx_t_13 >= (size_t)__pyx_v_c_inp.shape[0])) __pyx_t_12 = 0;
    if (unlikely(__pyx_t_12 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_12);
      __PYX_ERR(0, 5164, __pyx_L1_error)
    }
    (*__pyx_v_self->lambda_visitor).call((&(*((double *) ( /* dim=0 */ ((char *) (((double *) __pyx_v_c_out.data) + __pyx_t_6)) )))), (&(*((double *) ( /* dim=0 */ ((char *) (((double *) __pyx_v_c_inp.data) + __pyx_t_13)) )))));
  }

  /* "symengine/lib/symengine_wrapper.pyx":5158
 *         deref(self.lambda_visitor).call(&out[out_offset], &inp[inp_offset])
 * 
 *     cpdef unsafe_eval(self, inp, out, unsigned nbroadcast=1):             # <<<<<<<<<<<<<<
 *         cdef double[::1] c_inp, c_out
 *         cdef unsigned idx
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __PYX_XCLEAR_MEMVIEW(&__pyx_t_8, 1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.LambdaDouble.unsafe_eval", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_c_inp, 1);
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_c_out, 1);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_12LambdaDouble_5unsafe_eval(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_12LambdaDouble_5unsafe_eval = {"unsafe_eval", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_12LambdaDouble_5unsafe_eval, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_12LambdaDouble_5unsafe_eval(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_inp = 0;
  PyObject *__pyx_v_out = 0;
  unsigned int __pyx_v_nbroadcast;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("unsafe_eval (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_inp,&__pyx_mstate_global->__pyx_n_u_out,&__pyx_mstate_global->__pyx_n_u_nbroadcast,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 5158, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 5158, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5158, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5158, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "unsafe_eval", 0) < (0)) __PYX_ERR(0, 5158, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("unsafe_eval", 0, 2, 3, i); __PYX_ERR(0, 5158, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 5158, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5158, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5158, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_inp = values[0];
    __pyx_v_out = values[1];
    if (values[2]) {
      __pyx_v_nbroadcast = __Pyx_PyLong_As_unsigned_int(values[2]); if (unlikely((__pyx_v_nbroadcast == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5158, __pyx_L3_error)
    } else {
      __pyx_v_nbroadcast = ((unsigned int)1);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("unsafe_eval", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 5158, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.LambdaDouble.unsafe_eval", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_12LambdaDouble_4unsafe_eval(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LambdaDouble *)__pyx_v_self), __pyx_v_inp, __pyx_v_out, __pyx_v_nbroadcast);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_12LambdaDouble_4unsafe_eval(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LambdaDouble *__pyx_v_self, PyObject *__pyx_v_inp, PyObject *__pyx_v_out, unsigned int __pyx_v_nbroadcast) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_9symengine_3lib_17symengine_wrapper_9_Lambdify_unsafe_eval __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("unsafe_eval", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.nbroadcast = __pyx_v_nbroadcast;
  __pyx_t_1 = __pyx_vtabptr_9symengine_3lib_17symengine_wrapper_LambdaDouble->__pyx_base.unsafe_eval(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify *)__pyx_v_self), __pyx_v_inp, __pyx_v_out, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5158, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.LambdaDouble.unsafe_eval", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":5166
 *             deref(self.lambda_visitor).call(&c_out[idx*self.tot_out_size], &c_inp[idx*self.args_size])
 * 
 *     cpdef as_scipy_low_level_callable(self):             # <<<<<<<<<<<<<<
 *         from ctypes import c_double, c_void_p, c_int, cast, POINTER, CFUNCTYPE
 *         if self.tot_out_size > 1:
*/

static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_12LambdaDouble_7as_scipy_low_level_callable(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_9symengine_3lib_17symengine_wrapper_12LambdaDouble_as_scipy_low_level_callable(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LambdaDouble *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_c_double = NULL;
  PyObject *__pyx_v_c_void_p = NULL;
  PyObject *__pyx_v_c_int = NULL;
  PyObject *__pyx_v_cast = NULL;
  PyObject *__pyx_v_POINTER = NULL;
  PyObject *__pyx_v_CFUNCTYPE = NULL;
  PyObject *__pyx_v_addr1 = NULL;
  PyObject *__pyx_v_addr2 = 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;
  size_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("as_scipy_low_level_callable", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LambdaDouble &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_as_scipy_low_level_callable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5166, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_9symengine_3lib_17symengine_wrapper_12LambdaDouble_7as_scipy_low_level_callable)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5166, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "symengine/lib/symengine_wrapper.pyx":5167
 * 
 *     cpdef as_scipy_low_level_callable(self):
 *         from ctypes import c_double, c_void_p, c_int, cast, POINTER, CFUNCTYPE             # <<<<<<<<<<<<<<
 *         if self.tot_out_size > 1:
 *             raise RuntimeError("SciPy LowLevelCallable supports only functions with 1 output")
*/
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_c_double,__pyx_mstate_global->__pyx_n_u_c_void_p,__pyx_mstate_global->__pyx_n_u_c_int,__pyx_mstate_global->__pyx_n_u_cast,__pyx_mstate_global->__pyx_n_u_POINTER,__pyx_mstate_global->__pyx_n_u_CFUNCTYPE};
    __pyx_t_6 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_ctypes, __pyx_imported_names, 6, NULL, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5167, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_t_6;
  __Pyx_GOTREF(__pyx_t_1);
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_c_double,__pyx_mstate_global->__pyx_n_u_c_void_p,__pyx_mstate_global->__pyx_n_u_c_int,__pyx_mstate_global->__pyx_n_u_cast,__pyx_mstate_global->__pyx_n_u_POINTER,__pyx_mstate_global->__pyx_n_u_CFUNCTYPE};
    for (__pyx_t_7=0; __pyx_t_7 < 6; __pyx_t_7++) {
      __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_imported_names[__pyx_t_7]); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5167, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      switch (__pyx_t_7) {
        case 0:
        __Pyx_INCREF(__pyx_t_2);
        __pyx_v_c_double = __pyx_t_2;
        break;
        case 1:
        __Pyx_INCREF(__pyx_t_2);
        __pyx_v_c_void_p = __pyx_t_2;
        break;
        case 2:
        __Pyx_INCREF(__pyx_t_2);
        __pyx_v_c_int = __pyx_t_2;
        break;
        case 3:
        __Pyx_INCREF(__pyx_t_2);
        __pyx_v_cast = __pyx_t_2;
        break;
        case 4:
        __Pyx_INCREF(__pyx_t_2);
        __pyx_v_POINTER = __pyx_t_2;
        break;
        case 5:
        __Pyx_INCREF(__pyx_t_2);
        __pyx_v_CFUNCTYPE = __pyx_t_2;
        break;
        default:;
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5168
 *     cpdef as_scipy_low_level_callable(self):
 *         from ctypes import c_double, c_void_p, c_int, cast, POINTER, CFUNCTYPE
 *         if self.tot_out_size > 1:             # <<<<<<<<<<<<<<
 *             raise RuntimeError("SciPy LowLevelCallable supports only functions with 1 output")
 *         addr1 = cast(<size_t>&_scipy_callback_lambda_real,
*/
  __pyx_t_8 = (__pyx_v_self->__pyx_base.tot_out_size > 1);
  if (unlikely(__pyx_t_8)) {

    /* "symengine/lib/symengine_wrapper.pyx":5169
 *         from ctypes import c_double, c_void_p, c_int, cast, POINTER, CFUNCTYPE
 *         if self.tot_out_size > 1:
 *             raise RuntimeError("SciPy LowLevelCallable supports only functions with 1 output")             # <<<<<<<<<<<<<<
 *         addr1 = cast(<size_t>&_scipy_callback_lambda_real,
 *                         CFUNCTYPE(c_double, c_int, POINTER(c_double), c_void_p))
*/
    __pyx_t_2 = NULL;
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_SciPy_LowLevelCallable_supports};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5169, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 5169, __pyx_L1_error)

    /* "symengine/lib/symengine_wrapper.pyx":5168
 *     cpdef as_scipy_low_level_callable(self):
 *         from ctypes import c_double, c_void_p, c_int, cast, POINTER, CFUNCTYPE
 *         if self.tot_out_size > 1:             # <<<<<<<<<<<<<<
 *             raise RuntimeError("SciPy LowLevelCallable supports only functions with 1 output")
 *         addr1 = cast(<size_t>&_scipy_callback_lambda_real,
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":5170
 *         if self.tot_out_size > 1:
 *             raise RuntimeError("SciPy LowLevelCallable supports only functions with 1 output")
 *         addr1 = cast(<size_t>&_scipy_callback_lambda_real,             # <<<<<<<<<<<<<<
 *                         CFUNCTYPE(c_double, c_int, POINTER(c_double), c_void_p))
 *         addr2 = cast(<size_t>self.lambda_visitor.get(), c_void_p)
*/
  __pyx_t_2 = NULL;
  __Pyx_INCREF(__pyx_v_cast);
  __pyx_t_4 = __pyx_v_cast; 
  __pyx_t_3 = __Pyx_PyLong_FromSize_t(((size_t)(&__pyx_f_9symengine_3lib_17symengine_wrapper__scipy_callback_lambda_real))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5170, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "symengine/lib/symengine_wrapper.pyx":5171
 *             raise RuntimeError("SciPy LowLevelCallable supports only functions with 1 output")
 *         addr1 = cast(<size_t>&_scipy_callback_lambda_real,
 *                         CFUNCTYPE(c_double, c_int, POINTER(c_double), c_void_p))             # <<<<<<<<<<<<<<
 *         addr2 = cast(<size_t>self.lambda_visitor.get(), c_void_p)
 *         return create_low_level_callable(self, addr1, addr2)
*/
  __pyx_t_10 = NULL;
  __Pyx_INCREF(__pyx_v_CFUNCTYPE);
  __pyx_t_11 = __pyx_v_CFUNCTYPE; 
  __pyx_t_13 = NULL;
  __Pyx_INCREF(__pyx_v_POINTER);
  __pyx_t_14 = __pyx_v_POINTER; 
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_14))) {
    __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_14);
    assert(__pyx_t_13);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_14);
    __Pyx_INCREF(__pyx_t_13);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_14, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_13, __pyx_v_c_double};
    __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_14, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 5171, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
  }
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_11))) {
    __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_11);
    assert(__pyx_t_10);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_11);
    __Pyx_INCREF(__pyx_t_10);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_11, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_10, __pyx_v_c_double, __pyx_v_c_int, __pyx_t_12, __pyx_v_c_void_p};
    __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_11, __pyx_callargs+__pyx_t_5, (5-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5171, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
  }
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_t_3, __pyx_t_9};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5170, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_addr1 = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5172
 *         addr1 = cast(<size_t>&_scipy_callback_lambda_real,
 *                         CFUNCTYPE(c_double, c_int, POINTER(c_double), c_void_p))
 *         addr2 = cast(<size_t>self.lambda_visitor.get(), c_void_p)             # <<<<<<<<<<<<<<
 *         return create_low_level_callable(self, addr1, addr2)
 * 
*/
  __pyx_t_4 = NULL;
  __Pyx_INCREF(__pyx_v_cast);
  __pyx_t_9 = __pyx_v_cast; 
  __pyx_t_3 = __Pyx_PyLong_FromSize_t(((size_t)__pyx_v_self->lambda_visitor.get())); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5172, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_9))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_9);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_9, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_t_3, __pyx_v_c_void_p};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5172, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_addr2 = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5173
 *                         CFUNCTYPE(c_double, c_int, POINTER(c_double), c_void_p))
 *         addr2 = cast(<size_t>self.lambda_visitor.get(), c_void_p)
 *         return create_low_level_callable(self, addr1, addr2)             # <<<<<<<<<<<<<<
 * 
 *     cpdef as_ctypes(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_9 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_create_low_level_callable); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5173, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_9);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_9);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_9, ((PyObject *)__pyx_v_self), __pyx_v_addr1, __pyx_v_addr2};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5173, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":5166
 *             deref(self.lambda_visitor).call(&c_out[idx*self.tot_out_size], &c_inp[idx*self.args_size])
 * 
 *     cpdef as_scipy_low_level_callable(self):             # <<<<<<<<<<<<<<
 *         from ctypes import c_double, c_void_p, c_int, cast, POINTER, CFUNCTYPE
 *         if self.tot_out_size > 1:
*/

  /* 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_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.LambdaDouble.as_scipy_low_level_callable", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_c_double);
  __Pyx_XDECREF(__pyx_v_c_void_p);
  __Pyx_XDECREF(__pyx_v_c_int);
  __Pyx_XDECREF(__pyx_v_cast);
  __Pyx_XDECREF(__pyx_v_POINTER);
  __Pyx_XDECREF(__pyx_v_CFUNCTYPE);
  __Pyx_XDECREF(__pyx_v_addr1);
  __Pyx_XDECREF(__pyx_v_addr2);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_12LambdaDouble_7as_scipy_low_level_callable(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_12LambdaDouble_7as_scipy_low_level_callable = {"as_scipy_low_level_callable", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_12LambdaDouble_7as_scipy_low_level_callable, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_12LambdaDouble_7as_scipy_low_level_callable(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("as_scipy_low_level_callable (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("as_scipy_low_level_callable", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("as_scipy_low_level_callable", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_12LambdaDouble_6as_scipy_low_level_callable(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LambdaDouble *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_12LambdaDouble_6as_scipy_low_level_callable(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LambdaDouble *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("as_scipy_low_level_callable", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_12LambdaDouble_as_scipy_low_level_callable(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.LambdaDouble.as_scipy_low_level_callable", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":5175
 *         return create_low_level_callable(self, addr1, addr2)
 * 
 *     cpdef as_ctypes(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a tuple with first element being a ctypes function with signature
*/

static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_12LambdaDouble_9as_ctypes(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_9symengine_3lib_17symengine_wrapper_12LambdaDouble_as_ctypes(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LambdaDouble *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_c_double = NULL;
  PyObject *__pyx_v_c_void_p = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_c_int = NULL;
  PyObject *__pyx_v_cast = NULL;
  PyObject *__pyx_v_POINTER = NULL;
  PyObject *__pyx_v_CFUNCTYPE = NULL;
  PyObject *__pyx_v_addr1 = NULL;
  PyObject *__pyx_v_addr2 = 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;
  size_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("as_ctypes", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LambdaDouble &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_as_ctypes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5175, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_9symengine_3lib_17symengine_wrapper_12LambdaDouble_9as_ctypes)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5175, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "symengine/lib/symengine_wrapper.pyx":5184
 *         passed as input to the function as the third argument `user_data`.
 *         """
 *         from ctypes import c_double, c_void_p, c_int, cast, POINTER, CFUNCTYPE             # <<<<<<<<<<<<<<
 *         addr1 = cast(<size_t>&_ctypes_callback_lambda_real,
 *                         CFUNCTYPE(c_void_p, POINTER(c_double), POINTER(c_double), c_void_p))
*/
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_c_double,__pyx_mstate_global->__pyx_n_u_c_void_p,__pyx_mstate_global->__pyx_n_u_c_int,__pyx_mstate_global->__pyx_n_u_cast,__pyx_mstate_global->__pyx_n_u_POINTER,__pyx_mstate_global->__pyx_n_u_CFUNCTYPE};
    __pyx_t_6 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_ctypes, __pyx_imported_names, 6, NULL, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5184, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_t_6;
  __Pyx_GOTREF(__pyx_t_1);
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_c_double,__pyx_mstate_global->__pyx_n_u_c_void_p,__pyx_mstate_global->__pyx_n_u_c_int,__pyx_mstate_global->__pyx_n_u_cast,__pyx_mstate_global->__pyx_n_u_POINTER,__pyx_mstate_global->__pyx_n_u_CFUNCTYPE};
    for (__pyx_t_7=0; __pyx_t_7 < 6; __pyx_t_7++) {
      __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_imported_names[__pyx_t_7]); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5184, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      switch (__pyx_t_7) {
        case 0:
        __Pyx_INCREF(__pyx_t_2);
        __pyx_v_c_double = __pyx_t_2;
        break;
        case 1:
        __Pyx_INCREF(__pyx_t_2);
        __pyx_v_c_void_p = __pyx_t_2;
        break;
        case 2:
        __Pyx_INCREF(__pyx_t_2);
        __pyx_v_c_int = __pyx_t_2;
        break;
        case 3:
        __Pyx_INCREF(__pyx_t_2);
        __pyx_v_cast = __pyx_t_2;
        break;
        case 4:
        __Pyx_INCREF(__pyx_t_2);
        __pyx_v_POINTER = __pyx_t_2;
        break;
        case 5:
        __Pyx_INCREF(__pyx_t_2);
        __pyx_v_CFUNCTYPE = __pyx_t_2;
        break;
        default:;
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5185
 *         """
 *         from ctypes import c_double, c_void_p, c_int, cast, POINTER, CFUNCTYPE
 *         addr1 = cast(<size_t>&_ctypes_callback_lambda_real,             # <<<<<<<<<<<<<<
 *                         CFUNCTYPE(c_void_p, POINTER(c_double), POINTER(c_double), c_void_p))
 *         addr2 = cast(<size_t>self.lambda_visitor.get(), c_void_p)
*/
  __pyx_t_2 = NULL;
  __Pyx_INCREF(__pyx_v_cast);
  __pyx_t_4 = __pyx_v_cast; 
  __pyx_t_3 = __Pyx_PyLong_FromSize_t(((size_t)(&__pyx_f_9symengine_3lib_17symengine_wrapper__ctypes_callback_lambda_real))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5185, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "symengine/lib/symengine_wrapper.pyx":5186
 *         from ctypes import c_double, c_void_p, c_int, cast, POINTER, CFUNCTYPE
 *         addr1 = cast(<size_t>&_ctypes_callback_lambda_real,
 *                         CFUNCTYPE(c_void_p, POINTER(c_double), POINTER(c_double), c_void_p))             # <<<<<<<<<<<<<<
 *         addr2 = cast(<size_t>self.lambda_visitor.get(), c_void_p)
 *         return addr1, addr2
*/
  __pyx_t_9 = NULL;
  __Pyx_INCREF(__pyx_v_CFUNCTYPE);
  __pyx_t_10 = __pyx_v_CFUNCTYPE; 
  __pyx_t_12 = NULL;
  __Pyx_INCREF(__pyx_v_POINTER);
  __pyx_t_13 = __pyx_v_POINTER; 
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_13))) {
    __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_13);
    assert(__pyx_t_12);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_13);
    __Pyx_INCREF(__pyx_t_12);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_13, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_v_c_double};
    __pyx_t_11 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_13, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5186, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
  }
  __pyx_t_12 = NULL;
  __Pyx_INCREF(__pyx_v_POINTER);
  __pyx_t_14 = __pyx_v_POINTER; 
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_14))) {
    __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_14);
    assert(__pyx_t_12);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_14);
    __Pyx_INCREF(__pyx_t_12);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_14, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_v_c_double};
    __pyx_t_13 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_14, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 5186, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
  }
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_10))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_10);
    assert(__pyx_t_9);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_10);
    __Pyx_INCREF(__pyx_t_9);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_10, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_9, __pyx_v_c_void_p, __pyx_t_11, __pyx_t_13, __pyx_v_c_void_p};
    __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_10, __pyx_callargs+__pyx_t_5, (5-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 5186, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
  }
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_t_3, __pyx_t_8};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5185, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_addr1 = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5187
 *         addr1 = cast(<size_t>&_ctypes_callback_lambda_real,
 *                         CFUNCTYPE(c_void_p, POINTER(c_double), POINTER(c_double), c_void_p))
 *         addr2 = cast(<size_t>self.lambda_visitor.get(), c_void_p)             # <<<<<<<<<<<<<<
 *         return addr1, addr2
 * 
*/
  __pyx_t_4 = NULL;
  __Pyx_INCREF(__pyx_v_cast);
  __pyx_t_8 = __pyx_v_cast; 
  __pyx_t_3 = __Pyx_PyLong_FromSize_t(((size_t)__pyx_v_self->lambda_visitor.get())); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5187, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_8);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_8, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_t_3, __pyx_v_c_void_p};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5187, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_addr2 = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5188
 *                         CFUNCTYPE(c_void_p, POINTER(c_double), POINTER(c_double), c_void_p))
 *         addr2 = cast(<size_t>self.lambda_visitor.get(), c_void_p)
 *         return addr1, addr2             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5188, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_addr1);
  __Pyx_GIVEREF(__pyx_v_addr1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_addr1) != (0)) __PYX_ERR(0, 5188, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_addr2);
  __Pyx_GIVEREF(__pyx_v_addr2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_addr2) != (0)) __PYX_ERR(0, 5188, __pyx_L1_error);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":5175
 *         return create_low_level_callable(self, addr1, addr2)
 * 
 *     cpdef as_ctypes(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a tuple with first element being a ctypes function with signature
*/

  /* 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_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.LambdaDouble.as_ctypes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_c_double);
  __Pyx_XDECREF(__pyx_v_c_void_p);
  __Pyx_XDECREF(__pyx_v_c_int);
  __Pyx_XDECREF(__pyx_v_cast);
  __Pyx_XDECREF(__pyx_v_POINTER);
  __Pyx_XDECREF(__pyx_v_CFUNCTYPE);
  __Pyx_XDECREF(__pyx_v_addr1);
  __Pyx_XDECREF(__pyx_v_addr2);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_12LambdaDouble_9as_ctypes(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9symengine_3lib_17symengine_wrapper_12LambdaDouble_8as_ctypes, "\n        Returns a tuple with first element being a ctypes function with signature\n\n            void func(double \\*output, const double \\*input, void \\*user_data)\n\n        and second element being a ctypes void pointer. This void pointer needs to be\n        passed as input to the function as the third argument `user_data`.\n        ");
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_12LambdaDouble_9as_ctypes = {"as_ctypes", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_12LambdaDouble_9as_ctypes, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9symengine_3lib_17symengine_wrapper_12LambdaDouble_8as_ctypes};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_12LambdaDouble_9as_ctypes(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("as_ctypes (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("as_ctypes", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("as_ctypes", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_12LambdaDouble_8as_ctypes(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LambdaDouble *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_12LambdaDouble_8as_ctypes(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LambdaDouble *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("as_ctypes", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_12LambdaDouble_as_ctypes(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5175, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.LambdaDouble.as_ctypes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_12LambdaDouble_11__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_12LambdaDouble_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_12LambdaDouble_11__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_12LambdaDouble_11__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_12LambdaDouble_10__reduce_cython__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LambdaDouble *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_12LambdaDouble_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LambdaDouble *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.LambdaDouble.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_12LambdaDouble_13__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_12LambdaDouble_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_12LambdaDouble_13__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_12LambdaDouble_13__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(1, 3, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 3, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 3, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3, __pyx_L3_error)
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.LambdaDouble.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_12LambdaDouble_12__setstate_cython__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LambdaDouble *)__pyx_v_self), __pyx_v___pyx_state);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_12LambdaDouble_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LambdaDouble *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.LambdaDouble.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":5192
 * 
 * cdef class LambdaComplexDouble(_Lambdify):
 *     def __cinit__(self, args, *exprs, cppbool real=True, order='C', cppbool cse=False, cppbool _load=False, dtype=None):             # <<<<<<<<<<<<<<
 *         # reject additional arguments
 *         pass
*/

/* Python wrapper */
static int __pyx_pw_9symengine_3lib_17symengine_wrapper_19LambdaComplexDouble_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_9symengine_3lib_17symengine_wrapper_19LambdaComplexDouble_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_args = 0;
  CYTHON_UNUSED bool __pyx_v_real;
  CYTHON_UNUSED PyObject *__pyx_v_order = 0;
  CYTHON_UNUSED bool __pyx_v_cse;
  CYTHON_UNUSED bool __pyx_v__load;
  CYTHON_UNUSED PyObject *__pyx_v_dtype = 0;
  CYTHON_UNUSED PyObject *__pyx_v_exprs = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[6] = {0,0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_v_exprs = __Pyx_ArgsSlice_VARARGS(__pyx_args, 1, __pyx_nargs);
  if (unlikely(!__pyx_v_exprs)) {
    __Pyx_RefNannyFinishContext();
    return -1;
  }
  __Pyx_GOTREF(__pyx_v_exprs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_args,&__pyx_mstate_global->__pyx_n_u_real,&__pyx_mstate_global->__pyx_n_u_order,&__pyx_mstate_global->__pyx_n_u_cse,&__pyx_mstate_global->__pyx_n_u_load,&__pyx_mstate_global->__pyx_n_u_dtype,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 5192, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        default:
        case  1:
        values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5192, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      const Py_ssize_t used_pos_args = (kwd_pos_args < 1) ? kwd_pos_args : 1;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, used_pos_args, __pyx_kwds_len, "__cinit__", 0) < (0)) __PYX_ERR(0, 5192, __pyx_L3_error)
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_n_u_C));
      if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)Py_None));
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 1, 1, i); __PYX_ERR(0, 5192, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs < 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5192, __pyx_L3_error)
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_n_u_C));
      if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_args = values[0];
    if (values[1]) {
      __pyx_v_real = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_real == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 5192, __pyx_L3_error)
    } else {
      __pyx_v_real = ((bool)1);
    }
    __pyx_v_order = values[2];
    if (values[3]) {
      __pyx_v_cse = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_cse == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 5192, __pyx_L3_error)
    } else {
      __pyx_v_cse = ((bool)0);
    }
    if (values[4]) {
      __pyx_v__load = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v__load == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 5192, __pyx_L3_error)
    } else {
      __pyx_v__load = ((bool)0);
    }
    __pyx_v_dtype = values[5];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 1, 1, __pyx_nargs); __PYX_ERR(0, 5192, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_exprs); __pyx_v_exprs = 0;
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.LambdaComplexDouble.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_19LambdaComplexDouble___cinit__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LambdaComplexDouble *)__pyx_v_self), __pyx_v_args, __pyx_v_real, __pyx_v_order, __pyx_v_cse, __pyx_v__load, __pyx_v_dtype, __pyx_v_exprs);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_exprs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_9symengine_3lib_17symengine_wrapper_19LambdaComplexDouble___cinit__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LambdaComplexDouble *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED bool __pyx_v_real, CYTHON_UNUSED PyObject *__pyx_v_order, CYTHON_UNUSED bool __pyx_v_cse, CYTHON_UNUSED bool __pyx_v__load, CYTHON_UNUSED PyObject *__pyx_v_dtype, CYTHON_UNUSED PyObject *__pyx_v_exprs) {
  int __pyx_r;

  /* function exit code */
  __pyx_r = 0;
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":5196
 *         pass
 * 
 *     cdef _init(self, symengine.vec_basic& args_, symengine.vec_basic& outs_, cppbool cse):             # <<<<<<<<<<<<<<
 *         self.lambda_visitor.reset(new symengine.LambdaComplexDoubleVisitor())
 *         deref(self.lambda_visitor).init(args_, outs_, cse)
*/

static PyObject *__pyx_f_9symengine_3lib_17symengine_wrapper_19LambdaComplexDouble__init(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LambdaComplexDouble *__pyx_v_self, SymEngine::vec_basic &__pyx_v_args_, SymEngine::vec_basic &__pyx_v_outs_, bool __pyx_v_cse) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_init", 0);

  /* "symengine/lib/symengine_wrapper.pyx":5197
 * 
 *     cdef _init(self, symengine.vec_basic& args_, symengine.vec_basic& outs_, cppbool cse):
 *         self.lambda_visitor.reset(new symengine.LambdaComplexDoubleVisitor())             # <<<<<<<<<<<<<<
 *         deref(self.lambda_visitor).init(args_, outs_, cse)
 * 
*/
  __pyx_v_self->lambda_visitor.reset(new SymEngine::LambdaComplexDoubleVisitor());

  /* "symengine/lib/symengine_wrapper.pyx":5198
 *     cdef _init(self, symengine.vec_basic& args_, symengine.vec_basic& outs_, cppbool cse):
 *         self.lambda_visitor.reset(new symengine.LambdaComplexDoubleVisitor())
 *         deref(self.lambda_visitor).init(args_, outs_, cse)             # <<<<<<<<<<<<<<
 * 
 *     cpdef unsafe_complex(self, double complex[::1] inp, double complex[::1] out, int inp_offset=0, int out_offset=0):
*/
  try {
    (*__pyx_v_self->lambda_visitor).init(__pyx_v_args_, __pyx_v_outs_, __pyx_v_cse);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 5198, __pyx_L1_error)
  }

  /* "symengine/lib/symengine_wrapper.pyx":5196
 *         pass
 * 
 *     cdef _init(self, symengine.vec_basic& args_, symengine.vec_basic& outs_, cppbool cse):             # <<<<<<<<<<<<<<
 *         self.lambda_visitor.reset(new symengine.LambdaComplexDoubleVisitor())
 *         deref(self.lambda_visitor).init(args_, outs_, cse)
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.LambdaComplexDouble._init", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":5200
 *         deref(self.lambda_visitor).init(args_, outs_, cse)
 * 
 *     cpdef unsafe_complex(self, double complex[::1] inp, double complex[::1] out, int inp_offset=0, int out_offset=0):             # <<<<<<<<<<<<<<
 *         deref(self.lambda_visitor).call(&out[out_offset], &inp[inp_offset])
 * 
*/

static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_19LambdaComplexDouble_3unsafe_complex(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_9symengine_3lib_17symengine_wrapper_19LambdaComplexDouble_unsafe_complex(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LambdaComplexDouble *__pyx_v_self, __Pyx_memviewslice __pyx_v_inp, __Pyx_memviewslice __pyx_v_out, int __pyx_skip_dispatch, struct __pyx_opt_args_9symengine_3lib_17symengine_wrapper_19LambdaComplexDouble_unsafe_complex *__pyx_optional_args) {
  int __pyx_v_inp_offset = ((int)0);
  int __pyx_v_out_offset = ((int)0);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  size_t __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  int __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("unsafe_complex", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_inp_offset = __pyx_optional_args->inp_offset;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_out_offset = __pyx_optional_args->out_offset;
      }
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LambdaComplexDouble &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_unsafe_complex); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5200, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_9symengine_3lib_17symengine_wrapper_19LambdaComplexDouble_3unsafe_complex)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        if (unlikely(!__pyx_v_inp.memview)) { __Pyx_RaiseUnboundLocalError("inp"); __PYX_ERR(0, 5200, __pyx_L1_error) }
        __pyx_t_5 = __pyx_memoryview_fromslice(__pyx_v_inp, 1, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_double_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_double_complex, 0);; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5200, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        if (unlikely(!__pyx_v_out.memview)) { __Pyx_RaiseUnboundLocalError("out"); __PYX_ERR(0, 5200, __pyx_L1_error) }
        __pyx_t_6 = __pyx_memoryview_fromslice(__pyx_v_out, 1, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_double_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_double_complex, 0);; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5200, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_7 = __Pyx_PyLong_From_int(__pyx_v_inp_offset); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5200, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_8 = __Pyx_PyLong_From_int(__pyx_v_out_offset); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 5200, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_9 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_9 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[5] = {__pyx_t_3, __pyx_t_5, __pyx_t_6, __pyx_t_7, __pyx_t_8};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_9, (5-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5200, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "symengine/lib/symengine_wrapper.pyx":5201
 * 
 *     cpdef unsafe_complex(self, double complex[::1] inp, double complex[::1] out, int inp_offset=0, int out_offset=0):
 *         deref(self.lambda_visitor).call(&out[out_offset], &inp[inp_offset])             # <<<<<<<<<<<<<<
 * 
 *     cpdef unsafe_eval(self, inp, out, unsigned nbroadcast=1):
*/
  __pyx_t_10 = __pyx_v_out_offset;
  __pyx_t_11 = -1;
  if (__pyx_t_10 < 0) {
    __pyx_t_10 += __pyx_v_out.shape[0];
    if (unlikely(__pyx_t_10 < 0)) __pyx_t_11 = 0;
  } else if (unlikely(__pyx_t_10 >= __pyx_v_out.shape[0])) __pyx_t_11 = 0;
  if (unlikely(__pyx_t_11 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_11);
    __PYX_ERR(0, 5201, __pyx_L1_error)
  }
  __pyx_t_12 = __pyx_v_inp_offset;
  __pyx_t_11 = -1;
  if (__pyx_t_12 < 0) {
    __pyx_t_12 += __pyx_v_inp.shape[0];
    if (unlikely(__pyx_t_12 < 0)) __pyx_t_11 = 0;
  } else if (unlikely(__pyx_t_12 >= __pyx_v_inp.shape[0])) __pyx_t_11 = 0;
  if (unlikely(__pyx_t_11 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_11);
    __PYX_ERR(0, 5201, __pyx_L1_error)
  }
  (*__pyx_v_self->lambda_visitor).call((&(*((__pyx_t_double_complex *) ( /* dim=0 */ ((char *) (((__pyx_t_double_complex *) __pyx_v_out.data) + __pyx_t_10)) )))), (&(*((__pyx_t_double_complex *) ( /* dim=0 */ ((char *) (((__pyx_t_double_complex *) __pyx_v_inp.data) + __pyx_t_12)) )))));

  /* "symengine/lib/symengine_wrapper.pyx":5200
 *         deref(self.lambda_visitor).init(args_, outs_, cse)
 * 
 *     cpdef unsafe_complex(self, double complex[::1] inp, double complex[::1] out, int inp_offset=0, int out_offset=0):             # <<<<<<<<<<<<<<
 *         deref(self.lambda_visitor).call(&out[out_offset], &inp[inp_offset])
 * 
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.LambdaComplexDouble.unsafe_complex", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_19LambdaComplexDouble_3unsafe_complex(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_19LambdaComplexDouble_3unsafe_complex = {"unsafe_complex", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_19LambdaComplexDouble_3unsafe_complex, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_19LambdaComplexDouble_3unsafe_complex(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  __Pyx_memviewslice __pyx_v_inp = { 0, 0, { 0 }, { 0 }, { 0 } };
  __Pyx_memviewslice __pyx_v_out = { 0, 0, { 0 }, { 0 }, { 0 } };
  int __pyx_v_inp_offset;
  int __pyx_v_out_offset;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("unsafe_complex (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_inp,&__pyx_mstate_global->__pyx_n_u_out,&__pyx_mstate_global->__pyx_n_u_inp_offset,&__pyx_mstate_global->__pyx_n_u_out_offset,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 5200, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 5200, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 5200, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5200, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5200, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "unsafe_complex", 0) < (0)) __PYX_ERR(0, 5200, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("unsafe_complex", 0, 2, 4, i); __PYX_ERR(0, 5200, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 5200, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 5200, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5200, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5200, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_inp = __Pyx_PyObject_to_MemoryviewSlice_dc___pyx_t_double_complex(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_inp.memview)) __PYX_ERR(0, 5200, __pyx_L3_error)
    __pyx_v_out = __Pyx_PyObject_to_MemoryviewSlice_dc___pyx_t_double_complex(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_out.memview)) __PYX_ERR(0, 5200, __pyx_L3_error)
    if (values[2]) {
      __pyx_v_inp_offset = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_inp_offset == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5200, __pyx_L3_error)
    } else {
      __pyx_v_inp_offset = ((int)0);
    }
    if (values[3]) {
      __pyx_v_out_offset = __Pyx_PyLong_As_int(values[3]); if (unlikely((__pyx_v_out_offset == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5200, __pyx_L3_error)
    } else {
      __pyx_v_out_offset = ((int)0);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("unsafe_complex", 0, 2, 4, __pyx_nargs); __PYX_ERR(0, 5200, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_inp, 1);
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_out, 1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.LambdaComplexDouble.unsafe_complex", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_19LambdaComplexDouble_2unsafe_complex(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LambdaComplexDouble *)__pyx_v_self), __pyx_v_inp, __pyx_v_out, __pyx_v_inp_offset, __pyx_v_out_offset);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_inp, 1);
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_out, 1);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_19LambdaComplexDouble_2unsafe_complex(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LambdaComplexDouble *__pyx_v_self, __Pyx_memviewslice __pyx_v_inp, __Pyx_memviewslice __pyx_v_out, int __pyx_v_inp_offset, int __pyx_v_out_offset) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_9symengine_3lib_17symengine_wrapper_19LambdaComplexDouble_unsafe_complex __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("unsafe_complex", 0);
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(!__pyx_v_inp.memview)) { __Pyx_RaiseUnboundLocalError("inp"); __PYX_ERR(0, 5200, __pyx_L1_error) }
  if (unlikely(!__pyx_v_out.memview)) { __Pyx_RaiseUnboundLocalError("out"); __PYX_ERR(0, 5200, __pyx_L1_error) }
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.inp_offset = __pyx_v_inp_offset;
  __pyx_t_2.out_offset = __pyx_v_out_offset;
  __pyx_t_1 = __pyx_vtabptr_9symengine_3lib_17symengine_wrapper_LambdaComplexDouble->unsafe_complex(__pyx_v_self, __pyx_v_inp, __pyx_v_out, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.LambdaComplexDouble.unsafe_complex", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":5203
 *         deref(self.lambda_visitor).call(&out[out_offset], &inp[inp_offset])
 * 
 *     cpdef unsafe_eval(self, inp, out, unsigned nbroadcast=1):             # <<<<<<<<<<<<<<
 *         cdef double complex[::1] c_inp, c_out
 *         cdef unsigned idx
*/

static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_19LambdaComplexDouble_5unsafe_eval(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_9symengine_3lib_17symengine_wrapper_19LambdaComplexDouble_unsafe_eval(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LambdaComplexDouble *__pyx_v_self, PyObject *__pyx_v_inp, PyObject *__pyx_v_out, int __pyx_skip_dispatch, struct __pyx_opt_args_9symengine_3lib_17symengine_wrapper_19LambdaComplexDouble_unsafe_eval *__pyx_optional_args) {
  unsigned int __pyx_v_nbroadcast = ((unsigned int)1);
  __Pyx_memviewslice __pyx_v_c_inp = { 0, 0, { 0 }, { 0 }, { 0 } };
  __Pyx_memviewslice __pyx_v_c_out = { 0, 0, { 0 }, { 0 }, { 0 } };
  unsigned int __pyx_v_idx;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  __Pyx_memviewslice __pyx_t_8 = { 0, 0, { 0 }, { 0 }, { 0 } };
  unsigned int __pyx_t_9;
  unsigned int __pyx_t_10;
  unsigned int __pyx_t_11;
  int __pyx_t_12;
  size_t __pyx_t_13;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("unsafe_eval", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_nbroadcast = __pyx_optional_args->nbroadcast;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LambdaComplexDouble &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_unsafe_eval); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5203, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_9symengine_3lib_17symengine_wrapper_19LambdaComplexDouble_5unsafe_eval)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = __Pyx_PyLong_From_unsigned_int(__pyx_v_nbroadcast); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5203, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_6 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_6 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_inp, __pyx_v_out, __pyx_t_5};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (4-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5203, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "symengine/lib/symengine_wrapper.pyx":5206
 *         cdef double complex[::1] c_inp, c_out
 *         cdef unsigned idx
 *         c_inp = np.ascontiguousarray(inp.ravel(order=self.order), dtype=self.numpy_dtype)             # <<<<<<<<<<<<<<
 *         c_out = out
 *         for idx in range(nbroadcast):
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ascontiguousarray); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = __pyx_v_inp;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_6 = 0;
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_3, NULL};
    __pyx_t_7 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5206, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_order, __pyx_v_self->__pyx_base.order, __pyx_t_7, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 5206, __pyx_L1_error)
    __pyx_t_4 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_ravel, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_7);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5206, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, __pyx_t_4};
    __pyx_t_7 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5206, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dtype, __pyx_v_self->__pyx_base.numpy_dtype, __pyx_t_7, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 5206, __pyx_L1_error)
    __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_7);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5206, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_dc___pyx_t_double_complex(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_8.memview)) __PYX_ERR(0, 5206, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_c_inp = __pyx_t_8;
  __pyx_t_8.memview = NULL;
  __pyx_t_8.data = NULL;

  /* "symengine/lib/symengine_wrapper.pyx":5207
 *         cdef unsigned idx
 *         c_inp = np.ascontiguousarray(inp.ravel(order=self.order), dtype=self.numpy_dtype)
 *         c_out = out             # <<<<<<<<<<<<<<
 *         for idx in range(nbroadcast):
 *             deref(self.lambda_visitor).call(&c_out[idx*self.tot_out_size], &c_inp[idx*self.args_size])
*/
  __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_dc___pyx_t_double_complex(__pyx_v_out, PyBUF_WRITABLE); if (unlikely(!__pyx_t_8.memview)) __PYX_ERR(0, 5207, __pyx_L1_error)
  __pyx_v_c_out = __pyx_t_8;
  __pyx_t_8.memview = NULL;
  __pyx_t_8.data = NULL;

  /* "symengine/lib/symengine_wrapper.pyx":5208
 *         c_inp = np.ascontiguousarray(inp.ravel(order=self.order), dtype=self.numpy_dtype)
 *         c_out = out
 *         for idx in range(nbroadcast):             # <<<<<<<<<<<<<<
 *             deref(self.lambda_visitor).call(&c_out[idx*self.tot_out_size], &c_inp[idx*self.args_size])
 * 
*/
  __pyx_t_9 = __pyx_v_nbroadcast;
  __pyx_t_10 = __pyx_t_9;
  for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) {
    __pyx_v_idx = __pyx_t_11;

    /* "symengine/lib/symengine_wrapper.pyx":5209
 *         c_out = out
 *         for idx in range(nbroadcast):
 *             deref(self.lambda_visitor).call(&c_out[idx*self.tot_out_size], &c_inp[idx*self.args_size])             # <<<<<<<<<<<<<<
 * 
 * 
*/
    __pyx_t_6 = (__pyx_v_idx * __pyx_v_self->__pyx_base.tot_out_size);
    __pyx_t_12 = -1;
    if (unlikely(__pyx_t_6 >= (size_t)__pyx_v_c_out.shape[0])) __pyx_t_12 = 0;
    if (unlikely(__pyx_t_12 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_12);
      __PYX_ERR(0, 5209, __pyx_L1_error)
    }
    __pyx_t_13 = (__pyx_v_idx * __pyx_v_self->__pyx_base.args_size);
    __pyx_t_12 = -1;
    if (unlikely(__pyx_t_13 >= (size_t)__pyx_v_c_inp.shape[0])) __pyx_t_12 = 0;
    if (unlikely(__pyx_t_12 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_12);
      __PYX_ERR(0, 5209, __pyx_L1_error)
    }
    (*__pyx_v_self->lambda_visitor).call((&(*((__pyx_t_double_complex *) ( /* dim=0 */ ((char *) (((__pyx_t_double_complex *) __pyx_v_c_out.data) + __pyx_t_6)) )))), (&(*((__pyx_t_double_complex *) ( /* dim=0 */ ((char *) (((__pyx_t_double_complex *) __pyx_v_c_inp.data) + __pyx_t_13)) )))));
  }

  /* "symengine/lib/symengine_wrapper.pyx":5203
 *         deref(self.lambda_visitor).call(&out[out_offset], &inp[inp_offset])
 * 
 *     cpdef unsafe_eval(self, inp, out, unsigned nbroadcast=1):             # <<<<<<<<<<<<<<
 *         cdef double complex[::1] c_inp, c_out
 *         cdef unsigned idx
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __PYX_XCLEAR_MEMVIEW(&__pyx_t_8, 1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.LambdaComplexDouble.unsafe_eval", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_c_inp, 1);
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_c_out, 1);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_19LambdaComplexDouble_5unsafe_eval(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_19LambdaComplexDouble_5unsafe_eval = {"unsafe_eval", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_19LambdaComplexDouble_5unsafe_eval, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_19LambdaComplexDouble_5unsafe_eval(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_inp = 0;
  PyObject *__pyx_v_out = 0;
  unsigned int __pyx_v_nbroadcast;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("unsafe_eval (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_inp,&__pyx_mstate_global->__pyx_n_u_out,&__pyx_mstate_global->__pyx_n_u_nbroadcast,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 5203, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 5203, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5203, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5203, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "unsafe_eval", 0) < (0)) __PYX_ERR(0, 5203, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("unsafe_eval", 0, 2, 3, i); __PYX_ERR(0, 5203, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 5203, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5203, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5203, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_inp = values[0];
    __pyx_v_out = values[1];
    if (values[2]) {
      __pyx_v_nbroadcast = __Pyx_PyLong_As_unsigned_int(values[2]); if (unlikely((__pyx_v_nbroadcast == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5203, __pyx_L3_error)
    } else {
      __pyx_v_nbroadcast = ((unsigned int)1);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("unsafe_eval", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 5203, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.LambdaComplexDouble.unsafe_eval", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_19LambdaComplexDouble_4unsafe_eval(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LambdaComplexDouble *)__pyx_v_self), __pyx_v_inp, __pyx_v_out, __pyx_v_nbroadcast);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_19LambdaComplexDouble_4unsafe_eval(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LambdaComplexDouble *__pyx_v_self, PyObject *__pyx_v_inp, PyObject *__pyx_v_out, unsigned int __pyx_v_nbroadcast) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_9symengine_3lib_17symengine_wrapper_9_Lambdify_unsafe_eval __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("unsafe_eval", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.nbroadcast = __pyx_v_nbroadcast;
  __pyx_t_1 = __pyx_vtabptr_9symengine_3lib_17symengine_wrapper_LambdaComplexDouble->__pyx_base.unsafe_eval(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify *)__pyx_v_self), __pyx_v_inp, __pyx_v_out, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5203, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.LambdaComplexDouble.unsafe_eval", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_19LambdaComplexDouble_7__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_19LambdaComplexDouble_7__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_19LambdaComplexDouble_7__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_19LambdaComplexDouble_7__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_19LambdaComplexDouble_6__reduce_cython__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LambdaComplexDouble *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_19LambdaComplexDouble_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LambdaComplexDouble *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.LambdaComplexDouble.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_19LambdaComplexDouble_9__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_19LambdaComplexDouble_9__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_19LambdaComplexDouble_9__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_19LambdaComplexDouble_9__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(1, 3, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 3, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 3, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3, __pyx_L3_error)
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.LambdaComplexDouble.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_19LambdaComplexDouble_8__setstate_cython__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LambdaComplexDouble *)__pyx_v_self), __pyx_v___pyx_state);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_19LambdaComplexDouble_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LambdaComplexDouble *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.LambdaComplexDouble.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":5213
 * 
 * cdef class LLVMDouble(_LLVMLambdify):
 *     def __cinit__(self, args, *exprs, cppbool real=True, order='C', cppbool cse=False, cppbool _load=False, opt_level=3, dtype=None):             # <<<<<<<<<<<<<<
 *         self.opt_level = opt_level
 * 
*/

/* Python wrapper */
static int __pyx_pw_9symengine_3lib_17symengine_wrapper_10LLVMDouble_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_9symengine_3lib_17symengine_wrapper_10LLVMDouble_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_args = 0;
  CYTHON_UNUSED bool __pyx_v_real;
  CYTHON_UNUSED PyObject *__pyx_v_order = 0;
  CYTHON_UNUSED bool __pyx_v_cse;
  CYTHON_UNUSED bool __pyx_v__load;
  PyObject *__pyx_v_opt_level = 0;
  CYTHON_UNUSED PyObject *__pyx_v_dtype = 0;
  CYTHON_UNUSED PyObject *__pyx_v_exprs = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[7] = {0,0,0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_v_exprs = __Pyx_ArgsSlice_VARARGS(__pyx_args, 1, __pyx_nargs);
  if (unlikely(!__pyx_v_exprs)) {
    __Pyx_RefNannyFinishContext();
    return -1;
  }
  __Pyx_GOTREF(__pyx_v_exprs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_args,&__pyx_mstate_global->__pyx_n_u_real,&__pyx_mstate_global->__pyx_n_u_order,&__pyx_mstate_global->__pyx_n_u_cse,&__pyx_mstate_global->__pyx_n_u_load,&__pyx_mstate_global->__pyx_n_u_opt_level,&__pyx_mstate_global->__pyx_n_u_dtype,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 5213, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        default:
        case  1:
        values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5213, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      const Py_ssize_t used_pos_args = (kwd_pos_args < 1) ? kwd_pos_args : 1;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, used_pos_args, __pyx_kwds_len, "__cinit__", 0) < (0)) __PYX_ERR(0, 5213, __pyx_L3_error)
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_n_u_C));
      if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_3));
      if (!values[6]) values[6] = __Pyx_NewRef(((PyObject *)Py_None));
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 1, 1, i); __PYX_ERR(0, 5213, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs < 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5213, __pyx_L3_error)
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_n_u_C));
      if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_3));
      if (!values[6]) values[6] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_args = values[0];
    if (values[1]) {
      __pyx_v_real = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_real == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 5213, __pyx_L3_error)
    } else {
      __pyx_v_real = ((bool)1);
    }
    __pyx_v_order = values[2];
    if (values[3]) {
      __pyx_v_cse = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_cse == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 5213, __pyx_L3_error)
    } else {
      __pyx_v_cse = ((bool)0);
    }
    if (values[4]) {
      __pyx_v__load = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v__load == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 5213, __pyx_L3_error)
    } else {
      __pyx_v__load = ((bool)0);
    }
    __pyx_v_opt_level = values[5];
    __pyx_v_dtype = values[6];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 1, 1, __pyx_nargs); __PYX_ERR(0, 5213, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_exprs); __pyx_v_exprs = 0;
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.LLVMDouble.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_10LLVMDouble___cinit__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMDouble *)__pyx_v_self), __pyx_v_args, __pyx_v_real, __pyx_v_order, __pyx_v_cse, __pyx_v__load, __pyx_v_opt_level, __pyx_v_dtype, __pyx_v_exprs);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_exprs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_9symengine_3lib_17symengine_wrapper_10LLVMDouble___cinit__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMDouble *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED bool __pyx_v_real, CYTHON_UNUSED PyObject *__pyx_v_order, CYTHON_UNUSED bool __pyx_v_cse, CYTHON_UNUSED bool __pyx_v__load, PyObject *__pyx_v_opt_level, CYTHON_UNUSED PyObject *__pyx_v_dtype, CYTHON_UNUSED PyObject *__pyx_v_exprs) {
  int __pyx_r;
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5214
 * cdef class LLVMDouble(_LLVMLambdify):
 *     def __cinit__(self, args, *exprs, cppbool real=True, order='C', cppbool cse=False, cppbool _load=False, opt_level=3, dtype=None):
 *         self.opt_level = opt_level             # <<<<<<<<<<<<<<
 * 
 *     cdef _init(self, symengine.vec_basic& args_, symengine.vec_basic& outs_, cppbool cse):
*/
  __pyx_t_1 = __Pyx_PyLong_As_int(__pyx_v_opt_level); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5214, __pyx_L1_error)
  __pyx_v_self->__pyx_base.opt_level = __pyx_t_1;

  /* "symengine/lib/symengine_wrapper.pyx":5213
 * 
 * cdef class LLVMDouble(_LLVMLambdify):
 *     def __cinit__(self, args, *exprs, cppbool real=True, order='C', cppbool cse=False, cppbool _load=False, opt_level=3, dtype=None):             # <<<<<<<<<<<<<<
 *         self.opt_level = opt_level
 * 
*/

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.LLVMDouble.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":5216
 *         self.opt_level = opt_level
 * 
 *     cdef _init(self, symengine.vec_basic& args_, symengine.vec_basic& outs_, cppbool cse):             # <<<<<<<<<<<<<<
 *         self.lambda_visitor.reset(new symengine.LLVMDoubleVisitor())
 *         deref(self.lambda_visitor).init(args_, outs_, cse, self.opt_level)
*/

static PyObject *__pyx_f_9symengine_3lib_17symengine_wrapper_10LLVMDouble__init(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMDouble *__pyx_v_self, SymEngine::vec_basic &__pyx_v_args_, SymEngine::vec_basic &__pyx_v_outs_, bool __pyx_v_cse) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  SymEngine::LLVMDoubleVisitor *__pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_init", 0);

  /* "symengine/lib/symengine_wrapper.pyx":5217
 * 
 *     cdef _init(self, symengine.vec_basic& args_, symengine.vec_basic& outs_, cppbool cse):
 *         self.lambda_visitor.reset(new symengine.LLVMDoubleVisitor())             # <<<<<<<<<<<<<<
 *         deref(self.lambda_visitor).init(args_, outs_, cse, self.opt_level)
 * 
*/
  try {
    __pyx_t_1 = new SymEngine::LLVMDoubleVisitor();
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 5217, __pyx_L1_error)
  }
  __pyx_v_self->lambda_visitor.reset(__pyx_t_1);

  /* "symengine/lib/symengine_wrapper.pyx":5218
 *     cdef _init(self, symengine.vec_basic& args_, symengine.vec_basic& outs_, cppbool cse):
 *         self.lambda_visitor.reset(new symengine.LLVMDoubleVisitor())
 *         deref(self.lambda_visitor).init(args_, outs_, cse, self.opt_level)             # <<<<<<<<<<<<<<
 * 
 *     cdef _load(self, const string &s):
*/
  try {
    (*__pyx_v_self->lambda_visitor).init(__pyx_v_args_, __pyx_v_outs_, __pyx_v_cse, __pyx_v_self->__pyx_base.opt_level);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 5218, __pyx_L1_error)
  }

  /* "symengine/lib/symengine_wrapper.pyx":5216
 *         self.opt_level = opt_level
 * 
 *     cdef _init(self, symengine.vec_basic& args_, symengine.vec_basic& outs_, cppbool cse):             # <<<<<<<<<<<<<<
 *         self.lambda_visitor.reset(new symengine.LLVMDoubleVisitor())
 *         deref(self.lambda_visitor).init(args_, outs_, cse, self.opt_level)
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.LLVMDouble._init", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":5220
 *         deref(self.lambda_visitor).init(args_, outs_, cse, self.opt_level)
 * 
 *     cdef _load(self, const string &s):             # <<<<<<<<<<<<<<
 *         self.lambda_visitor.reset(new symengine.LLVMDoubleVisitor())
 *         deref(self.lambda_visitor).loads(s)
*/

static PyObject *__pyx_f_9symengine_3lib_17symengine_wrapper_10LLVMDouble__load(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMDouble *__pyx_v_self, std::string const &__pyx_v_s) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  SymEngine::LLVMDoubleVisitor *__pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_load", 0);

  /* "symengine/lib/symengine_wrapper.pyx":5221
 * 
 *     cdef _load(self, const string &s):
 *         self.lambda_visitor.reset(new symengine.LLVMDoubleVisitor())             # <<<<<<<<<<<<<<
 *         deref(self.lambda_visitor).loads(s)
 * 
*/
  try {
    __pyx_t_1 = new SymEngine::LLVMDoubleVisitor();
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 5221, __pyx_L1_error)
  }
  __pyx_v_self->lambda_visitor.reset(__pyx_t_1);

  /* "symengine/lib/symengine_wrapper.pyx":5222
 *     cdef _load(self, const string &s):
 *         self.lambda_visitor.reset(new symengine.LLVMDoubleVisitor())
 *         deref(self.lambda_visitor).loads(s)             # <<<<<<<<<<<<<<
 * 
 *     def __reduce__(self):
*/
  (*__pyx_v_self->lambda_visitor).loads(__pyx_v_s);

  /* "symengine/lib/symengine_wrapper.pyx":5220
 *         deref(self.lambda_visitor).init(args_, outs_, cse, self.opt_level)
 * 
 *     cdef _load(self, const string &s):             # <<<<<<<<<<<<<<
 *         self.lambda_visitor.reset(new symengine.LLVMDoubleVisitor())
 *         deref(self.lambda_visitor).loads(s)
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.LLVMDouble._load", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":5224
 *         deref(self.lambda_visitor).loads(s)
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         """
 *         Interface for pickle. Note that the resulting object is platform dependent.
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10LLVMDouble_3__reduce__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9symengine_3lib_17symengine_wrapper_10LLVMDouble_2__reduce__, "\n        Interface for pickle. Note that the resulting object is platform dependent.\n        ");
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_10LLVMDouble_3__reduce__ = {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_10LLVMDouble_3__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9symengine_3lib_17symengine_wrapper_10LLVMDouble_2__reduce__};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10LLVMDouble_3__reduce__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_10LLVMDouble_2__reduce__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMDouble *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10LLVMDouble_2__reduce__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMDouble *__pyx_v_self) {
  PyObject *__pyx_v_s = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":5228
 *         Interface for pickle. Note that the resulting object is platform dependent.
 *         """
 *         cdef bytes s = deref(self.lambda_visitor).dumps()             # <<<<<<<<<<<<<<
 *         return llvm_loading_func, (self.args_size, self.tot_out_size, self.out_shapes, self.real, \
 *             self.n_exprs, self.order, self.accum_out_sizes, self.numpy_dtype, s)
*/
  __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string((*__pyx_v_self->lambda_visitor).dumps()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5228, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_s = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5229
 *         """
 *         cdef bytes s = deref(self.lambda_visitor).dumps()
 *         return llvm_loading_func, (self.args_size, self.tot_out_size, self.out_shapes, self.real, \             # <<<<<<<<<<<<<<
 *             self.n_exprs, self.order, self.accum_out_sizes, self.numpy_dtype, s)
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_llvm_loading_func); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5229, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyLong_FromSize_t(__pyx_v_self->__pyx_base.__pyx_base.args_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5229, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyLong_FromSize_t(__pyx_v_self->__pyx_base.__pyx_base.tot_out_size); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5229, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_self->__pyx_base.__pyx_base.real); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5229, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "symengine/lib/symengine_wrapper.pyx":5230
 *         cdef bytes s = deref(self.lambda_visitor).dumps()
 *         return llvm_loading_func, (self.args_size, self.tot_out_size, self.out_shapes, self.real, \
 *             self.n_exprs, self.order, self.accum_out_sizes, self.numpy_dtype, s)             # <<<<<<<<<<<<<<
 * 
 *     cpdef unsafe_real(self, double[::1] inp, double[::1] out, int inp_offset=0, int out_offset=0):
*/
  __pyx_t_5 = __Pyx_PyLong_FromSize_t(__pyx_v_self->__pyx_base.__pyx_base.n_exprs); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5230, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __pyx_convert_vector_to_py_int(__pyx_v_self->__pyx_base.__pyx_base.accum_out_sizes); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5230, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "symengine/lib/symengine_wrapper.pyx":5229
 *         """
 *         cdef bytes s = deref(self.lambda_visitor).dumps()
 *         return llvm_loading_func, (self.args_size, self.tot_out_size, self.out_shapes, self.real, \             # <<<<<<<<<<<<<<
 *             self.n_exprs, self.order, self.accum_out_sizes, self.numpy_dtype, s)
 * 
*/
  __pyx_t_7 = PyTuple_New(9); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5229, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2) != (0)) __PYX_ERR(0, 5229, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_3) != (0)) __PYX_ERR(0, 5229, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.out_shapes);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.out_shapes);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_v_self->__pyx_base.__pyx_base.out_shapes) != (0)) __PYX_ERR(0, 5229, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_4);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_t_4) != (0)) __PYX_ERR(0, 5229, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_5);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 4, __pyx_t_5) != (0)) __PYX_ERR(0, 5229, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.order);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.order);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 5, __pyx_v_self->__pyx_base.__pyx_base.order) != (0)) __PYX_ERR(0, 5229, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_6);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 6, __pyx_t_6) != (0)) __PYX_ERR(0, 5229, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.numpy_dtype);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.numpy_dtype);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 7, __pyx_v_self->__pyx_base.__pyx_base.numpy_dtype) != (0)) __PYX_ERR(0, 5229, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_s);
  __Pyx_GIVEREF(__pyx_v_s);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 8, __pyx_v_s) != (0)) __PYX_ERR(0, 5229, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_5 = 0;
  __pyx_t_6 = 0;
  __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5229, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 5229, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_7);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_7) != (0)) __PYX_ERR(0, 5229, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_7 = 0;
  __pyx_r = __pyx_t_6;
  __pyx_t_6 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":5224
 *         deref(self.lambda_visitor).loads(s)
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         """
 *         Interface for pickle. Note that the resulting object is platform dependent.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.LLVMDouble.__reduce__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_s);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":5232
 *             self.n_exprs, self.order, self.accum_out_sizes, self.numpy_dtype, s)
 * 
 *     cpdef unsafe_real(self, double[::1] inp, double[::1] out, int inp_offset=0, int out_offset=0):             # <<<<<<<<<<<<<<
 *         deref(self.lambda_visitor).call(&out[out_offset], &inp[inp_offset])
 * 
*/

static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10LLVMDouble_5unsafe_real(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_9symengine_3lib_17symengine_wrapper_10LLVMDouble_unsafe_real(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMDouble *__pyx_v_self, __Pyx_memviewslice __pyx_v_inp, __Pyx_memviewslice __pyx_v_out, int __pyx_skip_dispatch, struct __pyx_opt_args_9symengine_3lib_17symengine_wrapper_10LLVMDouble_unsafe_real *__pyx_optional_args) {
  int __pyx_v_inp_offset = ((int)0);
  int __pyx_v_out_offset = ((int)0);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  size_t __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  int __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("unsafe_real", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_inp_offset = __pyx_optional_args->inp_offset;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_out_offset = __pyx_optional_args->out_offset;
      }
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LLVMDouble &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_unsafe_real); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5232, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_9symengine_3lib_17symengine_wrapper_10LLVMDouble_5unsafe_real)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        if (unlikely(!__pyx_v_inp.memview)) { __Pyx_RaiseUnboundLocalError("inp"); __PYX_ERR(0, 5232, __pyx_L1_error) }
        __pyx_t_5 = __pyx_memoryview_fromslice(__pyx_v_inp, 1, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5232, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        if (unlikely(!__pyx_v_out.memview)) { __Pyx_RaiseUnboundLocalError("out"); __PYX_ERR(0, 5232, __pyx_L1_error) }
        __pyx_t_6 = __pyx_memoryview_fromslice(__pyx_v_out, 1, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5232, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_7 = __Pyx_PyLong_From_int(__pyx_v_inp_offset); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5232, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_8 = __Pyx_PyLong_From_int(__pyx_v_out_offset); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 5232, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_9 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_9 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[5] = {__pyx_t_3, __pyx_t_5, __pyx_t_6, __pyx_t_7, __pyx_t_8};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_9, (5-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5232, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "symengine/lib/symengine_wrapper.pyx":5233
 * 
 *     cpdef unsafe_real(self, double[::1] inp, double[::1] out, int inp_offset=0, int out_offset=0):
 *         deref(self.lambda_visitor).call(&out[out_offset], &inp[inp_offset])             # <<<<<<<<<<<<<<
 * 
 *     cpdef unsafe_eval(self, inp, out, unsigned nbroadcast=1):
*/
  __pyx_t_10 = __pyx_v_out_offset;
  __pyx_t_11 = -1;
  if (__pyx_t_10 < 0) {
    __pyx_t_10 += __pyx_v_out.shape[0];
    if (unlikely(__pyx_t_10 < 0)) __pyx_t_11 = 0;
  } else if (unlikely(__pyx_t_10 >= __pyx_v_out.shape[0])) __pyx_t_11 = 0;
  if (unlikely(__pyx_t_11 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_11);
    __PYX_ERR(0, 5233, __pyx_L1_error)
  }
  __pyx_t_12 = __pyx_v_inp_offset;
  __pyx_t_11 = -1;
  if (__pyx_t_12 < 0) {
    __pyx_t_12 += __pyx_v_inp.shape[0];
    if (unlikely(__pyx_t_12 < 0)) __pyx_t_11 = 0;
  } else if (unlikely(__pyx_t_12 >= __pyx_v_inp.shape[0])) __pyx_t_11 = 0;
  if (unlikely(__pyx_t_11 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_11);
    __PYX_ERR(0, 5233, __pyx_L1_error)
  }
  (*__pyx_v_self->lambda_visitor).call((&(*((double *) ( /* dim=0 */ ((char *) (((double *) __pyx_v_out.data) + __pyx_t_10)) )))), (&(*((double *) ( /* dim=0 */ ((char *) (((double *) __pyx_v_inp.data) + __pyx_t_12)) )))));

  /* "symengine/lib/symengine_wrapper.pyx":5232
 *             self.n_exprs, self.order, self.accum_out_sizes, self.numpy_dtype, s)
 * 
 *     cpdef unsafe_real(self, double[::1] inp, double[::1] out, int inp_offset=0, int out_offset=0):             # <<<<<<<<<<<<<<
 *         deref(self.lambda_visitor).call(&out[out_offset], &inp[inp_offset])
 * 
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.LLVMDouble.unsafe_real", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10LLVMDouble_5unsafe_real(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_10LLVMDouble_5unsafe_real = {"unsafe_real", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_10LLVMDouble_5unsafe_real, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10LLVMDouble_5unsafe_real(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  __Pyx_memviewslice __pyx_v_inp = { 0, 0, { 0 }, { 0 }, { 0 } };
  __Pyx_memviewslice __pyx_v_out = { 0, 0, { 0 }, { 0 }, { 0 } };
  int __pyx_v_inp_offset;
  int __pyx_v_out_offset;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("unsafe_real (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_inp,&__pyx_mstate_global->__pyx_n_u_out,&__pyx_mstate_global->__pyx_n_u_inp_offset,&__pyx_mstate_global->__pyx_n_u_out_offset,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 5232, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 5232, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 5232, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5232, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5232, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "unsafe_real", 0) < (0)) __PYX_ERR(0, 5232, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("unsafe_real", 0, 2, 4, i); __PYX_ERR(0, 5232, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 5232, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 5232, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5232, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5232, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_inp = __Pyx_PyObject_to_MemoryviewSlice_dc_double(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_inp.memview)) __PYX_ERR(0, 5232, __pyx_L3_error)
    __pyx_v_out = __Pyx_PyObject_to_MemoryviewSlice_dc_double(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_out.memview)) __PYX_ERR(0, 5232, __pyx_L3_error)
    if (values[2]) {
      __pyx_v_inp_offset = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_inp_offset == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5232, __pyx_L3_error)
    } else {
      __pyx_v_inp_offset = ((int)0);
    }
    if (values[3]) {
      __pyx_v_out_offset = __Pyx_PyLong_As_int(values[3]); if (unlikely((__pyx_v_out_offset == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5232, __pyx_L3_error)
    } else {
      __pyx_v_out_offset = ((int)0);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("unsafe_real", 0, 2, 4, __pyx_nargs); __PYX_ERR(0, 5232, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_inp, 1);
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_out, 1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.LLVMDouble.unsafe_real", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_10LLVMDouble_4unsafe_real(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMDouble *)__pyx_v_self), __pyx_v_inp, __pyx_v_out, __pyx_v_inp_offset, __pyx_v_out_offset);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_inp, 1);
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_out, 1);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10LLVMDouble_4unsafe_real(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMDouble *__pyx_v_self, __Pyx_memviewslice __pyx_v_inp, __Pyx_memviewslice __pyx_v_out, int __pyx_v_inp_offset, int __pyx_v_out_offset) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_9symengine_3lib_17symengine_wrapper_10LLVMDouble_unsafe_real __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("unsafe_real", 0);
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(!__pyx_v_inp.memview)) { __Pyx_RaiseUnboundLocalError("inp"); __PYX_ERR(0, 5232, __pyx_L1_error) }
  if (unlikely(!__pyx_v_out.memview)) { __Pyx_RaiseUnboundLocalError("out"); __PYX_ERR(0, 5232, __pyx_L1_error) }
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.inp_offset = __pyx_v_inp_offset;
  __pyx_t_2.out_offset = __pyx_v_out_offset;
  __pyx_t_1 = __pyx_vtabptr_9symengine_3lib_17symengine_wrapper_LLVMDouble->unsafe_real(__pyx_v_self, __pyx_v_inp, __pyx_v_out, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5232, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.LLVMDouble.unsafe_real", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":5235
 *         deref(self.lambda_visitor).call(&out[out_offset], &inp[inp_offset])
 * 
 *     cpdef unsafe_eval(self, inp, out, unsigned nbroadcast=1):             # <<<<<<<<<<<<<<
 *         cdef double[::1] c_inp, c_out
 *         cdef unsigned idx
*/

static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10LLVMDouble_7unsafe_eval(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_9symengine_3lib_17symengine_wrapper_10LLVMDouble_unsafe_eval(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMDouble *__pyx_v_self, PyObject *__pyx_v_inp, PyObject *__pyx_v_out, int __pyx_skip_dispatch, struct __pyx_opt_args_9symengine_3lib_17symengine_wrapper_10LLVMDouble_unsafe_eval *__pyx_optional_args) {
  unsigned int __pyx_v_nbroadcast = ((unsigned int)1);
  __Pyx_memviewslice __pyx_v_c_inp = { 0, 0, { 0 }, { 0 }, { 0 } };
  __Pyx_memviewslice __pyx_v_c_out = { 0, 0, { 0 }, { 0 }, { 0 } };
  unsigned int __pyx_v_idx;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  __Pyx_memviewslice __pyx_t_8 = { 0, 0, { 0 }, { 0 }, { 0 } };
  unsigned int __pyx_t_9;
  unsigned int __pyx_t_10;
  unsigned int __pyx_t_11;
  int __pyx_t_12;
  size_t __pyx_t_13;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("unsafe_eval", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_nbroadcast = __pyx_optional_args->nbroadcast;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LLVMDouble &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_unsafe_eval); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5235, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_9symengine_3lib_17symengine_wrapper_10LLVMDouble_7unsafe_eval)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = __Pyx_PyLong_From_unsigned_int(__pyx_v_nbroadcast); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5235, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_6 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_6 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_inp, __pyx_v_out, __pyx_t_5};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (4-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5235, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "symengine/lib/symengine_wrapper.pyx":5238
 *         cdef double[::1] c_inp, c_out
 *         cdef unsigned idx
 *         c_inp = np.ascontiguousarray(inp.ravel(order=self.order), dtype=self.numpy_dtype)             # <<<<<<<<<<<<<<
 *         c_out = out
 *         for idx in range(nbroadcast):
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5238, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ascontiguousarray); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5238, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = __pyx_v_inp;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_6 = 0;
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_3, NULL};
    __pyx_t_7 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5238, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_order, __pyx_v_self->__pyx_base.__pyx_base.order, __pyx_t_7, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 5238, __pyx_L1_error)
    __pyx_t_4 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_ravel, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_7);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5238, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, __pyx_t_4};
    __pyx_t_7 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5238, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dtype, __pyx_v_self->__pyx_base.__pyx_base.numpy_dtype, __pyx_t_7, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 5238, __pyx_L1_error)
    __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_7);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5238, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_dc_double(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_8.memview)) __PYX_ERR(0, 5238, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_c_inp = __pyx_t_8;
  __pyx_t_8.memview = NULL;
  __pyx_t_8.data = NULL;

  /* "symengine/lib/symengine_wrapper.pyx":5239
 *         cdef unsigned idx
 *         c_inp = np.ascontiguousarray(inp.ravel(order=self.order), dtype=self.numpy_dtype)
 *         c_out = out             # <<<<<<<<<<<<<<
 *         for idx in range(nbroadcast):
 *             deref(self.lambda_visitor).call(&c_out[idx*self.tot_out_size], &c_inp[idx*self.args_size])
*/
  __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_dc_double(__pyx_v_out, PyBUF_WRITABLE); if (unlikely(!__pyx_t_8.memview)) __PYX_ERR(0, 5239, __pyx_L1_error)
  __pyx_v_c_out = __pyx_t_8;
  __pyx_t_8.memview = NULL;
  __pyx_t_8.data = NULL;

  /* "symengine/lib/symengine_wrapper.pyx":5240
 *         c_inp = np.ascontiguousarray(inp.ravel(order=self.order), dtype=self.numpy_dtype)
 *         c_out = out
 *         for idx in range(nbroadcast):             # <<<<<<<<<<<<<<
 *             deref(self.lambda_visitor).call(&c_out[idx*self.tot_out_size], &c_inp[idx*self.args_size])
 * 
*/
  __pyx_t_9 = __pyx_v_nbroadcast;
  __pyx_t_10 = __pyx_t_9;
  for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) {
    __pyx_v_idx = __pyx_t_11;

    /* "symengine/lib/symengine_wrapper.pyx":5241
 *         c_out = out
 *         for idx in range(nbroadcast):
 *             deref(self.lambda_visitor).call(&c_out[idx*self.tot_out_size], &c_inp[idx*self.args_size])             # <<<<<<<<<<<<<<
 * 
 *     cpdef as_scipy_low_level_callable(self):
*/
    __pyx_t_6 = (__pyx_v_idx * __pyx_v_self->__pyx_base.__pyx_base.tot_out_size);
    __pyx_t_12 = -1;
    if (unlikely(__pyx_t_6 >= (size_t)__pyx_v_c_out.shape[0])) __pyx_t_12 = 0;
    if (unlikely(__pyx_t_12 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_12);
      __PYX_ERR(0, 5241, __pyx_L1_error)
    }
    __pyx_t_13 = (__pyx_v_idx * __pyx_v_self->__pyx_base.__pyx_base.args_size);
    __pyx_t_12 = -1;
    if (unlikely(__pyx_t_13 >= (size_t)__pyx_v_c_inp.shape[0])) __pyx_t_12 = 0;
    if (unlikely(__pyx_t_12 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_12);
      __PYX_ERR(0, 5241, __pyx_L1_error)
    }
    (*__pyx_v_self->lambda_visitor).call((&(*((double *) ( /* dim=0 */ ((char *) (((double *) __pyx_v_c_out.data) + __pyx_t_6)) )))), (&(*((double *) ( /* dim=0 */ ((char *) (((double *) __pyx_v_c_inp.data) + __pyx_t_13)) )))));
  }

  /* "symengine/lib/symengine_wrapper.pyx":5235
 *         deref(self.lambda_visitor).call(&out[out_offset], &inp[inp_offset])
 * 
 *     cpdef unsafe_eval(self, inp, out, unsigned nbroadcast=1):             # <<<<<<<<<<<<<<
 *         cdef double[::1] c_inp, c_out
 *         cdef unsigned idx
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __PYX_XCLEAR_MEMVIEW(&__pyx_t_8, 1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.LLVMDouble.unsafe_eval", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_c_inp, 1);
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_c_out, 1);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10LLVMDouble_7unsafe_eval(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_10LLVMDouble_7unsafe_eval = {"unsafe_eval", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_10LLVMDouble_7unsafe_eval, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10LLVMDouble_7unsafe_eval(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_inp = 0;
  PyObject *__pyx_v_out = 0;
  unsigned int __pyx_v_nbroadcast;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("unsafe_eval (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_inp,&__pyx_mstate_global->__pyx_n_u_out,&__pyx_mstate_global->__pyx_n_u_nbroadcast,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 5235, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 5235, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5235, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5235, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "unsafe_eval", 0) < (0)) __PYX_ERR(0, 5235, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("unsafe_eval", 0, 2, 3, i); __PYX_ERR(0, 5235, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 5235, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5235, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5235, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_inp = values[0];
    __pyx_v_out = values[1];
    if (values[2]) {
      __pyx_v_nbroadcast = __Pyx_PyLong_As_unsigned_int(values[2]); if (unlikely((__pyx_v_nbroadcast == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5235, __pyx_L3_error)
    } else {
      __pyx_v_nbroadcast = ((unsigned int)1);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("unsafe_eval", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 5235, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.LLVMDouble.unsafe_eval", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_10LLVMDouble_6unsafe_eval(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMDouble *)__pyx_v_self), __pyx_v_inp, __pyx_v_out, __pyx_v_nbroadcast);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10LLVMDouble_6unsafe_eval(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMDouble *__pyx_v_self, PyObject *__pyx_v_inp, PyObject *__pyx_v_out, unsigned int __pyx_v_nbroadcast) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_9symengine_3lib_17symengine_wrapper_9_Lambdify_unsafe_eval __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("unsafe_eval", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.nbroadcast = __pyx_v_nbroadcast;
  __pyx_t_1 = __pyx_vtabptr_9symengine_3lib_17symengine_wrapper_LLVMDouble->__pyx_base.__pyx_base.unsafe_eval(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify *)__pyx_v_self), __pyx_v_inp, __pyx_v_out, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5235, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.LLVMDouble.unsafe_eval", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":5243
 *             deref(self.lambda_visitor).call(&c_out[idx*self.tot_out_size], &c_inp[idx*self.args_size])
 * 
 *     cpdef as_scipy_low_level_callable(self):             # <<<<<<<<<<<<<<
 *         from ctypes import c_double, c_void_p, c_int, cast, POINTER, CFUNCTYPE
 *         if not self.real:
*/

static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10LLVMDouble_9as_scipy_low_level_callable(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_9symengine_3lib_17symengine_wrapper_10LLVMDouble_as_scipy_low_level_callable(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMDouble *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_c_double = NULL;
  PyObject *__pyx_v_c_void_p = NULL;
  PyObject *__pyx_v_c_int = NULL;
  PyObject *__pyx_v_cast = NULL;
  PyObject *__pyx_v_POINTER = NULL;
  PyObject *__pyx_v_CFUNCTYPE = NULL;
  PyObject *__pyx_v_addr1 = NULL;
  PyObject *__pyx_v_addr2 = 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;
  size_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("as_scipy_low_level_callable", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LLVMDouble &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_as_scipy_low_level_callable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5243, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_9symengine_3lib_17symengine_wrapper_10LLVMDouble_9as_scipy_low_level_callable)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5243, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "symengine/lib/symengine_wrapper.pyx":5244
 * 
 *     cpdef as_scipy_low_level_callable(self):
 *         from ctypes import c_double, c_void_p, c_int, cast, POINTER, CFUNCTYPE             # <<<<<<<<<<<<<<
 *         if not self.real:
 *             raise RuntimeError("Lambda function has to be real")
*/
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_c_double,__pyx_mstate_global->__pyx_n_u_c_void_p,__pyx_mstate_global->__pyx_n_u_c_int,__pyx_mstate_global->__pyx_n_u_cast,__pyx_mstate_global->__pyx_n_u_POINTER,__pyx_mstate_global->__pyx_n_u_CFUNCTYPE};
    __pyx_t_6 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_ctypes, __pyx_imported_names, 6, NULL, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5244, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_t_6;
  __Pyx_GOTREF(__pyx_t_1);
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_c_double,__pyx_mstate_global->__pyx_n_u_c_void_p,__pyx_mstate_global->__pyx_n_u_c_int,__pyx_mstate_global->__pyx_n_u_cast,__pyx_mstate_global->__pyx_n_u_POINTER,__pyx_mstate_global->__pyx_n_u_CFUNCTYPE};
    for (__pyx_t_7=0; __pyx_t_7 < 6; __pyx_t_7++) {
      __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_imported_names[__pyx_t_7]); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5244, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      switch (__pyx_t_7) {
        case 0:
        __Pyx_INCREF(__pyx_t_2);
        __pyx_v_c_double = __pyx_t_2;
        break;
        case 1:
        __Pyx_INCREF(__pyx_t_2);
        __pyx_v_c_void_p = __pyx_t_2;
        break;
        case 2:
        __Pyx_INCREF(__pyx_t_2);
        __pyx_v_c_int = __pyx_t_2;
        break;
        case 3:
        __Pyx_INCREF(__pyx_t_2);
        __pyx_v_cast = __pyx_t_2;
        break;
        case 4:
        __Pyx_INCREF(__pyx_t_2);
        __pyx_v_POINTER = __pyx_t_2;
        break;
        case 5:
        __Pyx_INCREF(__pyx_t_2);
        __pyx_v_CFUNCTYPE = __pyx_t_2;
        break;
        default:;
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5245
 *     cpdef as_scipy_low_level_callable(self):
 *         from ctypes import c_double, c_void_p, c_int, cast, POINTER, CFUNCTYPE
 *         if not self.real:             # <<<<<<<<<<<<<<
 *             raise RuntimeError("Lambda function has to be real")
 *         if self.tot_out_size > 1:
*/
  __pyx_t_8 = (!__pyx_v_self->__pyx_base.__pyx_base.real);
  if (unlikely(__pyx_t_8)) {

    /* "symengine/lib/symengine_wrapper.pyx":5246
 *         from ctypes import c_double, c_void_p, c_int, cast, POINTER, CFUNCTYPE
 *         if not self.real:
 *             raise RuntimeError("Lambda function has to be real")             # <<<<<<<<<<<<<<
 *         if self.tot_out_size > 1:
 *             raise RuntimeError("SciPy LowLevelCallable supports only functions with 1 output")
*/
    __pyx_t_2 = NULL;
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Lambda_function_has_to_be_real};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5246, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 5246, __pyx_L1_error)

    /* "symengine/lib/symengine_wrapper.pyx":5245
 *     cpdef as_scipy_low_level_callable(self):
 *         from ctypes import c_double, c_void_p, c_int, cast, POINTER, CFUNCTYPE
 *         if not self.real:             # <<<<<<<<<<<<<<
 *             raise RuntimeError("Lambda function has to be real")
 *         if self.tot_out_size > 1:
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":5247
 *         if not self.real:
 *             raise RuntimeError("Lambda function has to be real")
 *         if self.tot_out_size > 1:             # <<<<<<<<<<<<<<
 *             raise RuntimeError("SciPy LowLevelCallable supports only functions with 1 output")
 *         addr1 = cast(<size_t>&_scipy_callback_llvm_real,
*/
  __pyx_t_8 = (__pyx_v_self->__pyx_base.__pyx_base.tot_out_size > 1);
  if (unlikely(__pyx_t_8)) {

    /* "symengine/lib/symengine_wrapper.pyx":5248
 *             raise RuntimeError("Lambda function has to be real")
 *         if self.tot_out_size > 1:
 *             raise RuntimeError("SciPy LowLevelCallable supports only functions with 1 output")             # <<<<<<<<<<<<<<
 *         addr1 = cast(<size_t>&_scipy_callback_llvm_real,
 *                         CFUNCTYPE(c_double, c_int, POINTER(c_double), c_void_p))
*/
    __pyx_t_2 = NULL;
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_SciPy_LowLevelCallable_supports};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5248, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 5248, __pyx_L1_error)

    /* "symengine/lib/symengine_wrapper.pyx":5247
 *         if not self.real:
 *             raise RuntimeError("Lambda function has to be real")
 *         if self.tot_out_size > 1:             # <<<<<<<<<<<<<<
 *             raise RuntimeError("SciPy LowLevelCallable supports only functions with 1 output")
 *         addr1 = cast(<size_t>&_scipy_callback_llvm_real,
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":5249
 *         if self.tot_out_size > 1:
 *             raise RuntimeError("SciPy LowLevelCallable supports only functions with 1 output")
 *         addr1 = cast(<size_t>&_scipy_callback_llvm_real,             # <<<<<<<<<<<<<<
 *                         CFUNCTYPE(c_double, c_int, POINTER(c_double), c_void_p))
 *         addr2 = cast(<size_t>self.lambda_visitor.get(), c_void_p)
*/
  __pyx_t_2 = NULL;
  __Pyx_INCREF(__pyx_v_cast);
  __pyx_t_4 = __pyx_v_cast; 
  __pyx_t_3 = __Pyx_PyLong_FromSize_t(((size_t)(&__pyx_f_9symengine_3lib_17symengine_wrapper__scipy_callback_llvm_real))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5249, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "symengine/lib/symengine_wrapper.pyx":5250
 *             raise RuntimeError("SciPy LowLevelCallable supports only functions with 1 output")
 *         addr1 = cast(<size_t>&_scipy_callback_llvm_real,
 *                         CFUNCTYPE(c_double, c_int, POINTER(c_double), c_void_p))             # <<<<<<<<<<<<<<
 *         addr2 = cast(<size_t>self.lambda_visitor.get(), c_void_p)
 *         return create_low_level_callable(self, addr1, addr2)
*/
  __pyx_t_10 = NULL;
  __Pyx_INCREF(__pyx_v_CFUNCTYPE);
  __pyx_t_11 = __pyx_v_CFUNCTYPE; 
  __pyx_t_13 = NULL;
  __Pyx_INCREF(__pyx_v_POINTER);
  __pyx_t_14 = __pyx_v_POINTER; 
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_14))) {
    __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_14);
    assert(__pyx_t_13);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_14);
    __Pyx_INCREF(__pyx_t_13);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_14, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_13, __pyx_v_c_double};
    __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_14, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 5250, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
  }
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_11))) {
    __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_11);
    assert(__pyx_t_10);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_11);
    __Pyx_INCREF(__pyx_t_10);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_11, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_10, __pyx_v_c_double, __pyx_v_c_int, __pyx_t_12, __pyx_v_c_void_p};
    __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_11, __pyx_callargs+__pyx_t_5, (5-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5250, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
  }
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_t_3, __pyx_t_9};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5249, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_addr1 = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5251
 *         addr1 = cast(<size_t>&_scipy_callback_llvm_real,
 *                         CFUNCTYPE(c_double, c_int, POINTER(c_double), c_void_p))
 *         addr2 = cast(<size_t>self.lambda_visitor.get(), c_void_p)             # <<<<<<<<<<<<<<
 *         return create_low_level_callable(self, addr1, addr2)
 * 
*/
  __pyx_t_4 = NULL;
  __Pyx_INCREF(__pyx_v_cast);
  __pyx_t_9 = __pyx_v_cast; 
  __pyx_t_3 = __Pyx_PyLong_FromSize_t(((size_t)__pyx_v_self->lambda_visitor.get())); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5251, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_9))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_9);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_9, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_t_3, __pyx_v_c_void_p};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5251, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_addr2 = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5252
 *                         CFUNCTYPE(c_double, c_int, POINTER(c_double), c_void_p))
 *         addr2 = cast(<size_t>self.lambda_visitor.get(), c_void_p)
 *         return create_low_level_callable(self, addr1, addr2)             # <<<<<<<<<<<<<<
 * 
 *     cpdef as_ctypes(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_9 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_create_low_level_callable); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5252, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_9);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_9);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_9, ((PyObject *)__pyx_v_self), __pyx_v_addr1, __pyx_v_addr2};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5252, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":5243
 *             deref(self.lambda_visitor).call(&c_out[idx*self.tot_out_size], &c_inp[idx*self.args_size])
 * 
 *     cpdef as_scipy_low_level_callable(self):             # <<<<<<<<<<<<<<
 *         from ctypes import c_double, c_void_p, c_int, cast, POINTER, CFUNCTYPE
 *         if not self.real:
*/

  /* 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_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.LLVMDouble.as_scipy_low_level_callable", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_c_double);
  __Pyx_XDECREF(__pyx_v_c_void_p);
  __Pyx_XDECREF(__pyx_v_c_int);
  __Pyx_XDECREF(__pyx_v_cast);
  __Pyx_XDECREF(__pyx_v_POINTER);
  __Pyx_XDECREF(__pyx_v_CFUNCTYPE);
  __Pyx_XDECREF(__pyx_v_addr1);
  __Pyx_XDECREF(__pyx_v_addr2);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10LLVMDouble_9as_scipy_low_level_callable(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_10LLVMDouble_9as_scipy_low_level_callable = {"as_scipy_low_level_callable", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_10LLVMDouble_9as_scipy_low_level_callable, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10LLVMDouble_9as_scipy_low_level_callable(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("as_scipy_low_level_callable (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("as_scipy_low_level_callable", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("as_scipy_low_level_callable", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_10LLVMDouble_8as_scipy_low_level_callable(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMDouble *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10LLVMDouble_8as_scipy_low_level_callable(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMDouble *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("as_scipy_low_level_callable", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_10LLVMDouble_as_scipy_low_level_callable(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5243, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.LLVMDouble.as_scipy_low_level_callable", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":5254
 *         return create_low_level_callable(self, addr1, addr2)
 * 
 *     cpdef as_ctypes(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a tuple with first element being a ctypes function with signature
*/

static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10LLVMDouble_11as_ctypes(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_9symengine_3lib_17symengine_wrapper_10LLVMDouble_as_ctypes(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMDouble *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_c_double = NULL;
  PyObject *__pyx_v_c_void_p = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_c_int = NULL;
  PyObject *__pyx_v_cast = NULL;
  PyObject *__pyx_v_POINTER = NULL;
  PyObject *__pyx_v_CFUNCTYPE = NULL;
  PyObject *__pyx_v_addr1 = NULL;
  PyObject *__pyx_v_addr2 = 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;
  size_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("as_ctypes", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LLVMDouble &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_as_ctypes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5254, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_9symengine_3lib_17symengine_wrapper_10LLVMDouble_11as_ctypes)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5254, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "symengine/lib/symengine_wrapper.pyx":5263
 *         passed as input to the function as the third argument `user_data`.
 *         """
 *         from ctypes import c_double, c_void_p, c_int, cast, POINTER, CFUNCTYPE             # <<<<<<<<<<<<<<
 *         if not self.real:
 *             raise RuntimeError("Lambda function has to be real")
*/
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_c_double,__pyx_mstate_global->__pyx_n_u_c_void_p,__pyx_mstate_global->__pyx_n_u_c_int,__pyx_mstate_global->__pyx_n_u_cast,__pyx_mstate_global->__pyx_n_u_POINTER,__pyx_mstate_global->__pyx_n_u_CFUNCTYPE};
    __pyx_t_6 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_ctypes, __pyx_imported_names, 6, NULL, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5263, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_t_6;
  __Pyx_GOTREF(__pyx_t_1);
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_c_double,__pyx_mstate_global->__pyx_n_u_c_void_p,__pyx_mstate_global->__pyx_n_u_c_int,__pyx_mstate_global->__pyx_n_u_cast,__pyx_mstate_global->__pyx_n_u_POINTER,__pyx_mstate_global->__pyx_n_u_CFUNCTYPE};
    for (__pyx_t_7=0; __pyx_t_7 < 6; __pyx_t_7++) {
      __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_imported_names[__pyx_t_7]); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5263, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      switch (__pyx_t_7) {
        case 0:
        __Pyx_INCREF(__pyx_t_2);
        __pyx_v_c_double = __pyx_t_2;
        break;
        case 1:
        __Pyx_INCREF(__pyx_t_2);
        __pyx_v_c_void_p = __pyx_t_2;
        break;
        case 2:
        __Pyx_INCREF(__pyx_t_2);
        __pyx_v_c_int = __pyx_t_2;
        break;
        case 3:
        __Pyx_INCREF(__pyx_t_2);
        __pyx_v_cast = __pyx_t_2;
        break;
        case 4:
        __Pyx_INCREF(__pyx_t_2);
        __pyx_v_POINTER = __pyx_t_2;
        break;
        case 5:
        __Pyx_INCREF(__pyx_t_2);
        __pyx_v_CFUNCTYPE = __pyx_t_2;
        break;
        default:;
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5264
 *         """
 *         from ctypes import c_double, c_void_p, c_int, cast, POINTER, CFUNCTYPE
 *         if not self.real:             # <<<<<<<<<<<<<<
 *             raise RuntimeError("Lambda function has to be real")
 *         addr1 = cast(<size_t>&_ctypes_callback_llvm_real,
*/
  __pyx_t_8 = (!__pyx_v_self->__pyx_base.__pyx_base.real);
  if (unlikely(__pyx_t_8)) {

    /* "symengine/lib/symengine_wrapper.pyx":5265
 *         from ctypes import c_double, c_void_p, c_int, cast, POINTER, CFUNCTYPE
 *         if not self.real:
 *             raise RuntimeError("Lambda function has to be real")             # <<<<<<<<<<<<<<
 *         addr1 = cast(<size_t>&_ctypes_callback_llvm_real,
 *                         CFUNCTYPE(c_void_p, POINTER(c_double), POINTER(c_double), c_void_p))
*/
    __pyx_t_2 = NULL;
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Lambda_function_has_to_be_real};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5265, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 5265, __pyx_L1_error)

    /* "symengine/lib/symengine_wrapper.pyx":5264
 *         """
 *         from ctypes import c_double, c_void_p, c_int, cast, POINTER, CFUNCTYPE
 *         if not self.real:             # <<<<<<<<<<<<<<
 *             raise RuntimeError("Lambda function has to be real")
 *         addr1 = cast(<size_t>&_ctypes_callback_llvm_real,
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":5266
 *         if not self.real:
 *             raise RuntimeError("Lambda function has to be real")
 *         addr1 = cast(<size_t>&_ctypes_callback_llvm_real,             # <<<<<<<<<<<<<<
 *                         CFUNCTYPE(c_void_p, POINTER(c_double), POINTER(c_double), c_void_p))
 *         addr2 = cast(<size_t>self.lambda_visitor.get(), c_void_p)
*/
  __pyx_t_2 = NULL;
  __Pyx_INCREF(__pyx_v_cast);
  __pyx_t_4 = __pyx_v_cast; 
  __pyx_t_3 = __Pyx_PyLong_FromSize_t(((size_t)(&__pyx_f_9symengine_3lib_17symengine_wrapper__ctypes_callback_llvm_real))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5266, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "symengine/lib/symengine_wrapper.pyx":5267
 *             raise RuntimeError("Lambda function has to be real")
 *         addr1 = cast(<size_t>&_ctypes_callback_llvm_real,
 *                         CFUNCTYPE(c_void_p, POINTER(c_double), POINTER(c_double), c_void_p))             # <<<<<<<<<<<<<<
 *         addr2 = cast(<size_t>self.lambda_visitor.get(), c_void_p)
 *         return addr1, addr2
*/
  __pyx_t_10 = NULL;
  __Pyx_INCREF(__pyx_v_CFUNCTYPE);
  __pyx_t_11 = __pyx_v_CFUNCTYPE; 
  __pyx_t_13 = NULL;
  __Pyx_INCREF(__pyx_v_POINTER);
  __pyx_t_14 = __pyx_v_POINTER; 
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_14))) {
    __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_14);
    assert(__pyx_t_13);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_14);
    __Pyx_INCREF(__pyx_t_13);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_14, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_13, __pyx_v_c_double};
    __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_14, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 5267, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
  }
  __pyx_t_13 = NULL;
  __Pyx_INCREF(__pyx_v_POINTER);
  __pyx_t_15 = __pyx_v_POINTER; 
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_15))) {
    __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_15);
    assert(__pyx_t_13);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_15);
    __Pyx_INCREF(__pyx_t_13);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_15, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_13, __pyx_v_c_double};
    __pyx_t_14 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_15, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 5267, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
  }
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_11))) {
    __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_11);
    assert(__pyx_t_10);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_11);
    __Pyx_INCREF(__pyx_t_10);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_11, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_10, __pyx_v_c_void_p, __pyx_t_12, __pyx_t_14, __pyx_v_c_void_p};
    __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_11, __pyx_callargs+__pyx_t_5, (5-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5267, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
  }
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_t_3, __pyx_t_9};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5266, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_addr1 = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5268
 *         addr1 = cast(<size_t>&_ctypes_callback_llvm_real,
 *                         CFUNCTYPE(c_void_p, POINTER(c_double), POINTER(c_double), c_void_p))
 *         addr2 = cast(<size_t>self.lambda_visitor.get(), c_void_p)             # <<<<<<<<<<<<<<
 *         return addr1, addr2
 * 
*/
  __pyx_t_4 = NULL;
  __Pyx_INCREF(__pyx_v_cast);
  __pyx_t_9 = __pyx_v_cast; 
  __pyx_t_3 = __Pyx_PyLong_FromSize_t(((size_t)__pyx_v_self->lambda_visitor.get())); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5268, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_9))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_9);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_9, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_t_3, __pyx_v_c_void_p};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5268, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_addr2 = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5269
 *                         CFUNCTYPE(c_void_p, POINTER(c_double), POINTER(c_double), c_void_p))
 *         addr2 = cast(<size_t>self.lambda_visitor.get(), c_void_p)
 *         return addr1, addr2             # <<<<<<<<<<<<<<
 * 
 * cdef class LLVMFloat(_LLVMLambdify):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5269, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_addr1);
  __Pyx_GIVEREF(__pyx_v_addr1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_addr1) != (0)) __PYX_ERR(0, 5269, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_addr2);
  __Pyx_GIVEREF(__pyx_v_addr2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_addr2) != (0)) __PYX_ERR(0, 5269, __pyx_L1_error);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":5254
 *         return create_low_level_callable(self, addr1, addr2)
 * 
 *     cpdef as_ctypes(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a tuple with first element being a ctypes function with signature
*/

  /* 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_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.LLVMDouble.as_ctypes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_c_double);
  __Pyx_XDECREF(__pyx_v_c_void_p);
  __Pyx_XDECREF(__pyx_v_c_int);
  __Pyx_XDECREF(__pyx_v_cast);
  __Pyx_XDECREF(__pyx_v_POINTER);
  __Pyx_XDECREF(__pyx_v_CFUNCTYPE);
  __Pyx_XDECREF(__pyx_v_addr1);
  __Pyx_XDECREF(__pyx_v_addr2);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10LLVMDouble_11as_ctypes(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9symengine_3lib_17symengine_wrapper_10LLVMDouble_10as_ctypes, "\n        Returns a tuple with first element being a ctypes function with signature\n\n            void func(double * output, const double *input, void *user_data)\n\n        and second element being a ctypes void pointer. This void pointer needs to be\n        passed as input to the function as the third argument `user_data`.\n        ");
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_10LLVMDouble_11as_ctypes = {"as_ctypes", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_10LLVMDouble_11as_ctypes, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9symengine_3lib_17symengine_wrapper_10LLVMDouble_10as_ctypes};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_10LLVMDouble_11as_ctypes(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("as_ctypes (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("as_ctypes", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("as_ctypes", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_10LLVMDouble_10as_ctypes(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMDouble *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_10LLVMDouble_10as_ctypes(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMDouble *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("as_ctypes", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_10LLVMDouble_as_ctypes(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5254, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.LLVMDouble.as_ctypes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":5272
 * 
 * cdef class LLVMFloat(_LLVMLambdify):
 *     def __cinit__(self, args, *exprs, cppbool real=True, order='C', cppbool cse=False, cppbool _load=False, opt_level=3, dtype=None):             # <<<<<<<<<<<<<<
 *         self.opt_level = opt_level
 * 
*/

/* Python wrapper */
static int __pyx_pw_9symengine_3lib_17symengine_wrapper_9LLVMFloat_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_9symengine_3lib_17symengine_wrapper_9LLVMFloat_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_args = 0;
  CYTHON_UNUSED bool __pyx_v_real;
  CYTHON_UNUSED PyObject *__pyx_v_order = 0;
  CYTHON_UNUSED bool __pyx_v_cse;
  CYTHON_UNUSED bool __pyx_v__load;
  PyObject *__pyx_v_opt_level = 0;
  CYTHON_UNUSED PyObject *__pyx_v_dtype = 0;
  CYTHON_UNUSED PyObject *__pyx_v_exprs = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[7] = {0,0,0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_v_exprs = __Pyx_ArgsSlice_VARARGS(__pyx_args, 1, __pyx_nargs);
  if (unlikely(!__pyx_v_exprs)) {
    __Pyx_RefNannyFinishContext();
    return -1;
  }
  __Pyx_GOTREF(__pyx_v_exprs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_args,&__pyx_mstate_global->__pyx_n_u_real,&__pyx_mstate_global->__pyx_n_u_order,&__pyx_mstate_global->__pyx_n_u_cse,&__pyx_mstate_global->__pyx_n_u_load,&__pyx_mstate_global->__pyx_n_u_opt_level,&__pyx_mstate_global->__pyx_n_u_dtype,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 5272, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        default:
        case  1:
        values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5272, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      const Py_ssize_t used_pos_args = (kwd_pos_args < 1) ? kwd_pos_args : 1;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, used_pos_args, __pyx_kwds_len, "__cinit__", 0) < (0)) __PYX_ERR(0, 5272, __pyx_L3_error)
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_n_u_C));
      if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_3));
      if (!values[6]) values[6] = __Pyx_NewRef(((PyObject *)Py_None));
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 1, 1, i); __PYX_ERR(0, 5272, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs < 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5272, __pyx_L3_error)
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_n_u_C));
      if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_3));
      if (!values[6]) values[6] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_args = values[0];
    if (values[1]) {
      __pyx_v_real = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_real == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 5272, __pyx_L3_error)
    } else {
      __pyx_v_real = ((bool)1);
    }
    __pyx_v_order = values[2];
    if (values[3]) {
      __pyx_v_cse = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_cse == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 5272, __pyx_L3_error)
    } else {
      __pyx_v_cse = ((bool)0);
    }
    if (values[4]) {
      __pyx_v__load = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v__load == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 5272, __pyx_L3_error)
    } else {
      __pyx_v__load = ((bool)0);
    }
    __pyx_v_opt_level = values[5];
    __pyx_v_dtype = values[6];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 1, 1, __pyx_nargs); __PYX_ERR(0, 5272, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_exprs); __pyx_v_exprs = 0;
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.LLVMFloat.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_9LLVMFloat___cinit__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMFloat *)__pyx_v_self), __pyx_v_args, __pyx_v_real, __pyx_v_order, __pyx_v_cse, __pyx_v__load, __pyx_v_opt_level, __pyx_v_dtype, __pyx_v_exprs);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_exprs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_9symengine_3lib_17symengine_wrapper_9LLVMFloat___cinit__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMFloat *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED bool __pyx_v_real, CYTHON_UNUSED PyObject *__pyx_v_order, CYTHON_UNUSED bool __pyx_v_cse, CYTHON_UNUSED bool __pyx_v__load, PyObject *__pyx_v_opt_level, CYTHON_UNUSED PyObject *__pyx_v_dtype, CYTHON_UNUSED PyObject *__pyx_v_exprs) {
  int __pyx_r;
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5273
 * cdef class LLVMFloat(_LLVMLambdify):
 *     def __cinit__(self, args, *exprs, cppbool real=True, order='C', cppbool cse=False, cppbool _load=False, opt_level=3, dtype=None):
 *         self.opt_level = opt_level             # <<<<<<<<<<<<<<
 * 
 *     cdef _init(self, symengine.vec_basic& args_, symengine.vec_basic& outs_, cppbool cse):
*/
  __pyx_t_1 = __Pyx_PyLong_As_int(__pyx_v_opt_level); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5273, __pyx_L1_error)
  __pyx_v_self->__pyx_base.opt_level = __pyx_t_1;

  /* "symengine/lib/symengine_wrapper.pyx":5272
 * 
 * cdef class LLVMFloat(_LLVMLambdify):
 *     def __cinit__(self, args, *exprs, cppbool real=True, order='C', cppbool cse=False, cppbool _load=False, opt_level=3, dtype=None):             # <<<<<<<<<<<<<<
 *         self.opt_level = opt_level
 * 
*/

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.LLVMFloat.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":5275
 *         self.opt_level = opt_level
 * 
 *     cdef _init(self, symengine.vec_basic& args_, symengine.vec_basic& outs_, cppbool cse):             # <<<<<<<<<<<<<<
 *         self.lambda_visitor.reset(new symengine.LLVMFloatVisitor())
 *         deref(self.lambda_visitor).init(args_, outs_, cse, self.opt_level)
*/

static PyObject *__pyx_f_9symengine_3lib_17symengine_wrapper_9LLVMFloat__init(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMFloat *__pyx_v_self, SymEngine::vec_basic &__pyx_v_args_, SymEngine::vec_basic &__pyx_v_outs_, bool __pyx_v_cse) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  SymEngine::LLVMFloatVisitor *__pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_init", 0);

  /* "symengine/lib/symengine_wrapper.pyx":5276
 * 
 *     cdef _init(self, symengine.vec_basic& args_, symengine.vec_basic& outs_, cppbool cse):
 *         self.lambda_visitor.reset(new symengine.LLVMFloatVisitor())             # <<<<<<<<<<<<<<
 *         deref(self.lambda_visitor).init(args_, outs_, cse, self.opt_level)
 * 
*/
  try {
    __pyx_t_1 = new SymEngine::LLVMFloatVisitor();
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 5276, __pyx_L1_error)
  }
  __pyx_v_self->lambda_visitor.reset(__pyx_t_1);

  /* "symengine/lib/symengine_wrapper.pyx":5277
 *     cdef _init(self, symengine.vec_basic& args_, symengine.vec_basic& outs_, cppbool cse):
 *         self.lambda_visitor.reset(new symengine.LLVMFloatVisitor())
 *         deref(self.lambda_visitor).init(args_, outs_, cse, self.opt_level)             # <<<<<<<<<<<<<<
 * 
 *     cdef _load(self, const string &s):
*/
  try {
    (*__pyx_v_self->lambda_visitor).init(__pyx_v_args_, __pyx_v_outs_, __pyx_v_cse, __pyx_v_self->__pyx_base.opt_level);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 5277, __pyx_L1_error)
  }

  /* "symengine/lib/symengine_wrapper.pyx":5275
 *         self.opt_level = opt_level
 * 
 *     cdef _init(self, symengine.vec_basic& args_, symengine.vec_basic& outs_, cppbool cse):             # <<<<<<<<<<<<<<
 *         self.lambda_visitor.reset(new symengine.LLVMFloatVisitor())
 *         deref(self.lambda_visitor).init(args_, outs_, cse, self.opt_level)
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.LLVMFloat._init", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":5279
 *         deref(self.lambda_visitor).init(args_, outs_, cse, self.opt_level)
 * 
 *     cdef _load(self, const string &s):             # <<<<<<<<<<<<<<
 *         self.lambda_visitor.reset(new symengine.LLVMFloatVisitor())
 *         deref(self.lambda_visitor).loads(s)
*/

static PyObject *__pyx_f_9symengine_3lib_17symengine_wrapper_9LLVMFloat__load(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMFloat *__pyx_v_self, std::string const &__pyx_v_s) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  SymEngine::LLVMFloatVisitor *__pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_load", 0);

  /* "symengine/lib/symengine_wrapper.pyx":5280
 * 
 *     cdef _load(self, const string &s):
 *         self.lambda_visitor.reset(new symengine.LLVMFloatVisitor())             # <<<<<<<<<<<<<<
 *         deref(self.lambda_visitor).loads(s)
 * 
*/
  try {
    __pyx_t_1 = new SymEngine::LLVMFloatVisitor();
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 5280, __pyx_L1_error)
  }
  __pyx_v_self->lambda_visitor.reset(__pyx_t_1);

  /* "symengine/lib/symengine_wrapper.pyx":5281
 *     cdef _load(self, const string &s):
 *         self.lambda_visitor.reset(new symengine.LLVMFloatVisitor())
 *         deref(self.lambda_visitor).loads(s)             # <<<<<<<<<<<<<<
 * 
 *     def __reduce__(self):
*/
  (*__pyx_v_self->lambda_visitor).loads(__pyx_v_s);

  /* "symengine/lib/symengine_wrapper.pyx":5279
 *         deref(self.lambda_visitor).init(args_, outs_, cse, self.opt_level)
 * 
 *     cdef _load(self, const string &s):             # <<<<<<<<<<<<<<
 *         self.lambda_visitor.reset(new symengine.LLVMFloatVisitor())
 *         deref(self.lambda_visitor).loads(s)
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.LLVMFloat._load", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":5283
 *         deref(self.lambda_visitor).loads(s)
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         """
 *         Interface for pickle. Note that the resulting object is platform dependent.
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9LLVMFloat_3__reduce__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9symengine_3lib_17symengine_wrapper_9LLVMFloat_2__reduce__, "\n        Interface for pickle. Note that the resulting object is platform dependent.\n        ");
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_9LLVMFloat_3__reduce__ = {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_9LLVMFloat_3__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9symengine_3lib_17symengine_wrapper_9LLVMFloat_2__reduce__};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9LLVMFloat_3__reduce__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_9LLVMFloat_2__reduce__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMFloat *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_9LLVMFloat_2__reduce__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMFloat *__pyx_v_self) {
  PyObject *__pyx_v_s = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":5287
 *         Interface for pickle. Note that the resulting object is platform dependent.
 *         """
 *         cdef bytes s = deref(self.lambda_visitor).dumps()             # <<<<<<<<<<<<<<
 *         return llvm_float_loading_func, (self.args_size, self.tot_out_size, self.out_shapes, self.real, \
 *             self.n_exprs, self.order, self.accum_out_sizes, self.numpy_dtype, s)
*/
  __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string((*__pyx_v_self->lambda_visitor).dumps()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5287, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_s = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5288
 *         """
 *         cdef bytes s = deref(self.lambda_visitor).dumps()
 *         return llvm_float_loading_func, (self.args_size, self.tot_out_size, self.out_shapes, self.real, \             # <<<<<<<<<<<<<<
 *             self.n_exprs, self.order, self.accum_out_sizes, self.numpy_dtype, s)
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_llvm_float_loading_func); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5288, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyLong_FromSize_t(__pyx_v_self->__pyx_base.__pyx_base.args_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5288, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyLong_FromSize_t(__pyx_v_self->__pyx_base.__pyx_base.tot_out_size); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5288, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_self->__pyx_base.__pyx_base.real); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5288, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "symengine/lib/symengine_wrapper.pyx":5289
 *         cdef bytes s = deref(self.lambda_visitor).dumps()
 *         return llvm_float_loading_func, (self.args_size, self.tot_out_size, self.out_shapes, self.real, \
 *             self.n_exprs, self.order, self.accum_out_sizes, self.numpy_dtype, s)             # <<<<<<<<<<<<<<
 * 
 *     cpdef unsafe_real(self, float[::1] inp, float[::1] out, int inp_offset=0, int out_offset=0):
*/
  __pyx_t_5 = __Pyx_PyLong_FromSize_t(__pyx_v_self->__pyx_base.__pyx_base.n_exprs); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5289, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __pyx_convert_vector_to_py_int(__pyx_v_self->__pyx_base.__pyx_base.accum_out_sizes); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5289, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "symengine/lib/symengine_wrapper.pyx":5288
 *         """
 *         cdef bytes s = deref(self.lambda_visitor).dumps()
 *         return llvm_float_loading_func, (self.args_size, self.tot_out_size, self.out_shapes, self.real, \             # <<<<<<<<<<<<<<
 *             self.n_exprs, self.order, self.accum_out_sizes, self.numpy_dtype, s)
 * 
*/
  __pyx_t_7 = PyTuple_New(9); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5288, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2) != (0)) __PYX_ERR(0, 5288, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_3) != (0)) __PYX_ERR(0, 5288, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.out_shapes);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.out_shapes);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_v_self->__pyx_base.__pyx_base.out_shapes) != (0)) __PYX_ERR(0, 5288, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_4);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_t_4) != (0)) __PYX_ERR(0, 5288, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_5);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 4, __pyx_t_5) != (0)) __PYX_ERR(0, 5288, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.order);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.order);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 5, __pyx_v_self->__pyx_base.__pyx_base.order) != (0)) __PYX_ERR(0, 5288, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_6);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 6, __pyx_t_6) != (0)) __PYX_ERR(0, 5288, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.numpy_dtype);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.numpy_dtype);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 7, __pyx_v_self->__pyx_base.__pyx_base.numpy_dtype) != (0)) __PYX_ERR(0, 5288, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_s);
  __Pyx_GIVEREF(__pyx_v_s);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 8, __pyx_v_s) != (0)) __PYX_ERR(0, 5288, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_5 = 0;
  __pyx_t_6 = 0;
  __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5288, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 5288, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_7);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_7) != (0)) __PYX_ERR(0, 5288, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_7 = 0;
  __pyx_r = __pyx_t_6;
  __pyx_t_6 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":5283
 *         deref(self.lambda_visitor).loads(s)
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         """
 *         Interface for pickle. Note that the resulting object is platform dependent.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.LLVMFloat.__reduce__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_s);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":5291
 *             self.n_exprs, self.order, self.accum_out_sizes, self.numpy_dtype, s)
 * 
 *     cpdef unsafe_real(self, float[::1] inp, float[::1] out, int inp_offset=0, int out_offset=0):             # <<<<<<<<<<<<<<
 *         deref(self.lambda_visitor).call(&out[out_offset], &inp[inp_offset])
 * 
*/

static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9LLVMFloat_5unsafe_real(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_9symengine_3lib_17symengine_wrapper_9LLVMFloat_unsafe_real(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMFloat *__pyx_v_self, __Pyx_memviewslice __pyx_v_inp, __Pyx_memviewslice __pyx_v_out, int __pyx_skip_dispatch, struct __pyx_opt_args_9symengine_3lib_17symengine_wrapper_9LLVMFloat_unsafe_real *__pyx_optional_args) {
  int __pyx_v_inp_offset = ((int)0);
  int __pyx_v_out_offset = ((int)0);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  size_t __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  int __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("unsafe_real", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_inp_offset = __pyx_optional_args->inp_offset;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_out_offset = __pyx_optional_args->out_offset;
      }
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LLVMFloat &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_unsafe_real); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5291, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_9symengine_3lib_17symengine_wrapper_9LLVMFloat_5unsafe_real)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        if (unlikely(!__pyx_v_inp.memview)) { __Pyx_RaiseUnboundLocalError("inp"); __PYX_ERR(0, 5291, __pyx_L1_error) }
        __pyx_t_5 = __pyx_memoryview_fromslice(__pyx_v_inp, 1, (PyObject *(*)(char *)) __pyx_memview_get_float, (int (*)(char *, PyObject *)) __pyx_memview_set_float, 0);; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5291, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        if (unlikely(!__pyx_v_out.memview)) { __Pyx_RaiseUnboundLocalError("out"); __PYX_ERR(0, 5291, __pyx_L1_error) }
        __pyx_t_6 = __pyx_memoryview_fromslice(__pyx_v_out, 1, (PyObject *(*)(char *)) __pyx_memview_get_float, (int (*)(char *, PyObject *)) __pyx_memview_set_float, 0);; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5291, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_7 = __Pyx_PyLong_From_int(__pyx_v_inp_offset); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5291, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_8 = __Pyx_PyLong_From_int(__pyx_v_out_offset); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 5291, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_9 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_9 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[5] = {__pyx_t_3, __pyx_t_5, __pyx_t_6, __pyx_t_7, __pyx_t_8};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_9, (5-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5291, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "symengine/lib/symengine_wrapper.pyx":5292
 * 
 *     cpdef unsafe_real(self, float[::1] inp, float[::1] out, int inp_offset=0, int out_offset=0):
 *         deref(self.lambda_visitor).call(&out[out_offset], &inp[inp_offset])             # <<<<<<<<<<<<<<
 * 
 *     cpdef unsafe_eval(self, inp, out, unsigned nbroadcast=1):
*/
  __pyx_t_10 = __pyx_v_out_offset;
  __pyx_t_11 = -1;
  if (__pyx_t_10 < 0) {
    __pyx_t_10 += __pyx_v_out.shape[0];
    if (unlikely(__pyx_t_10 < 0)) __pyx_t_11 = 0;
  } else if (unlikely(__pyx_t_10 >= __pyx_v_out.shape[0])) __pyx_t_11 = 0;
  if (unlikely(__pyx_t_11 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_11);
    __PYX_ERR(0, 5292, __pyx_L1_error)
  }
  __pyx_t_12 = __pyx_v_inp_offset;
  __pyx_t_11 = -1;
  if (__pyx_t_12 < 0) {
    __pyx_t_12 += __pyx_v_inp.shape[0];
    if (unlikely(__pyx_t_12 < 0)) __pyx_t_11 = 0;
  } else if (unlikely(__pyx_t_12 >= __pyx_v_inp.shape[0])) __pyx_t_11 = 0;
  if (unlikely(__pyx_t_11 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_11);
    __PYX_ERR(0, 5292, __pyx_L1_error)
  }
  (*__pyx_v_self->lambda_visitor).call((&(*((float *) ( /* dim=0 */ ((char *) (((float *) __pyx_v_out.data) + __pyx_t_10)) )))), (&(*((float *) ( /* dim=0 */ ((char *) (((float *) __pyx_v_inp.data) + __pyx_t_12)) )))));

  /* "symengine/lib/symengine_wrapper.pyx":5291
 *             self.n_exprs, self.order, self.accum_out_sizes, self.numpy_dtype, s)
 * 
 *     cpdef unsafe_real(self, float[::1] inp, float[::1] out, int inp_offset=0, int out_offset=0):             # <<<<<<<<<<<<<<
 *         deref(self.lambda_visitor).call(&out[out_offset], &inp[inp_offset])
 * 
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.LLVMFloat.unsafe_real", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9LLVMFloat_5unsafe_real(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_9LLVMFloat_5unsafe_real = {"unsafe_real", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_9LLVMFloat_5unsafe_real, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9LLVMFloat_5unsafe_real(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  __Pyx_memviewslice __pyx_v_inp = { 0, 0, { 0 }, { 0 }, { 0 } };
  __Pyx_memviewslice __pyx_v_out = { 0, 0, { 0 }, { 0 }, { 0 } };
  int __pyx_v_inp_offset;
  int __pyx_v_out_offset;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("unsafe_real (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_inp,&__pyx_mstate_global->__pyx_n_u_out,&__pyx_mstate_global->__pyx_n_u_inp_offset,&__pyx_mstate_global->__pyx_n_u_out_offset,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 5291, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 5291, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 5291, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5291, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5291, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "unsafe_real", 0) < (0)) __PYX_ERR(0, 5291, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("unsafe_real", 0, 2, 4, i); __PYX_ERR(0, 5291, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 5291, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 5291, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5291, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5291, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_inp = __Pyx_PyObject_to_MemoryviewSlice_dc_float(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_inp.memview)) __PYX_ERR(0, 5291, __pyx_L3_error)
    __pyx_v_out = __Pyx_PyObject_to_MemoryviewSlice_dc_float(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_out.memview)) __PYX_ERR(0, 5291, __pyx_L3_error)
    if (values[2]) {
      __pyx_v_inp_offset = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_inp_offset == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5291, __pyx_L3_error)
    } else {
      __pyx_v_inp_offset = ((int)0);
    }
    if (values[3]) {
      __pyx_v_out_offset = __Pyx_PyLong_As_int(values[3]); if (unlikely((__pyx_v_out_offset == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5291, __pyx_L3_error)
    } else {
      __pyx_v_out_offset = ((int)0);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("unsafe_real", 0, 2, 4, __pyx_nargs); __PYX_ERR(0, 5291, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_inp, 1);
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_out, 1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.LLVMFloat.unsafe_real", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_9LLVMFloat_4unsafe_real(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMFloat *)__pyx_v_self), __pyx_v_inp, __pyx_v_out, __pyx_v_inp_offset, __pyx_v_out_offset);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_inp, 1);
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_out, 1);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_9LLVMFloat_4unsafe_real(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMFloat *__pyx_v_self, __Pyx_memviewslice __pyx_v_inp, __Pyx_memviewslice __pyx_v_out, int __pyx_v_inp_offset, int __pyx_v_out_offset) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_9symengine_3lib_17symengine_wrapper_9LLVMFloat_unsafe_real __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("unsafe_real", 0);
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(!__pyx_v_inp.memview)) { __Pyx_RaiseUnboundLocalError("inp"); __PYX_ERR(0, 5291, __pyx_L1_error) }
  if (unlikely(!__pyx_v_out.memview)) { __Pyx_RaiseUnboundLocalError("out"); __PYX_ERR(0, 5291, __pyx_L1_error) }
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.inp_offset = __pyx_v_inp_offset;
  __pyx_t_2.out_offset = __pyx_v_out_offset;
  __pyx_t_1 = __pyx_vtabptr_9symengine_3lib_17symengine_wrapper_LLVMFloat->unsafe_real(__pyx_v_self, __pyx_v_inp, __pyx_v_out, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5291, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.LLVMFloat.unsafe_real", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":5294
 *         deref(self.lambda_visitor).call(&out[out_offset], &inp[inp_offset])
 * 
 *     cpdef unsafe_eval(self, inp, out, unsigned nbroadcast=1):             # <<<<<<<<<<<<<<
 *         cdef float[::1] c_inp, c_out
 *         cdef unsigned idx
*/

static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9LLVMFloat_7unsafe_eval(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_9symengine_3lib_17symengine_wrapper_9LLVMFloat_unsafe_eval(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMFloat *__pyx_v_self, PyObject *__pyx_v_inp, PyObject *__pyx_v_out, int __pyx_skip_dispatch, struct __pyx_opt_args_9symengine_3lib_17symengine_wrapper_9LLVMFloat_unsafe_eval *__pyx_optional_args) {
  unsigned int __pyx_v_nbroadcast = ((unsigned int)1);
  __Pyx_memviewslice __pyx_v_c_inp = { 0, 0, { 0 }, { 0 }, { 0 } };
  __Pyx_memviewslice __pyx_v_c_out = { 0, 0, { 0 }, { 0 }, { 0 } };
  unsigned int __pyx_v_idx;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  __Pyx_memviewslice __pyx_t_8 = { 0, 0, { 0 }, { 0 }, { 0 } };
  unsigned int __pyx_t_9;
  unsigned int __pyx_t_10;
  unsigned int __pyx_t_11;
  int __pyx_t_12;
  size_t __pyx_t_13;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("unsafe_eval", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_nbroadcast = __pyx_optional_args->nbroadcast;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LLVMFloat &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_unsafe_eval); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5294, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_9symengine_3lib_17symengine_wrapper_9LLVMFloat_7unsafe_eval)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = __Pyx_PyLong_From_unsigned_int(__pyx_v_nbroadcast); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5294, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_6 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_6 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_inp, __pyx_v_out, __pyx_t_5};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (4-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5294, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "symengine/lib/symengine_wrapper.pyx":5297
 *         cdef float[::1] c_inp, c_out
 *         cdef unsigned idx
 *         c_inp = np.ascontiguousarray(inp.ravel(order=self.order), dtype=self.numpy_dtype)             # <<<<<<<<<<<<<<
 *         c_out = out
 *         for idx in range(nbroadcast):
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5297, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ascontiguousarray); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5297, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = __pyx_v_inp;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_6 = 0;
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_3, NULL};
    __pyx_t_7 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5297, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_order, __pyx_v_self->__pyx_base.__pyx_base.order, __pyx_t_7, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 5297, __pyx_L1_error)
    __pyx_t_4 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_ravel, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_7);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5297, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, __pyx_t_4};
    __pyx_t_7 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5297, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dtype, __pyx_v_self->__pyx_base.__pyx_base.numpy_dtype, __pyx_t_7, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 5297, __pyx_L1_error)
    __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_7);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5297, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_dc_float(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_8.memview)) __PYX_ERR(0, 5297, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_c_inp = __pyx_t_8;
  __pyx_t_8.memview = NULL;
  __pyx_t_8.data = NULL;

  /* "symengine/lib/symengine_wrapper.pyx":5298
 *         cdef unsigned idx
 *         c_inp = np.ascontiguousarray(inp.ravel(order=self.order), dtype=self.numpy_dtype)
 *         c_out = out             # <<<<<<<<<<<<<<
 *         for idx in range(nbroadcast):
 *             deref(self.lambda_visitor).call(&c_out[idx*self.tot_out_size], &c_inp[idx*self.args_size])
*/
  __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_dc_float(__pyx_v_out, PyBUF_WRITABLE); if (unlikely(!__pyx_t_8.memview)) __PYX_ERR(0, 5298, __pyx_L1_error)
  __pyx_v_c_out = __pyx_t_8;
  __pyx_t_8.memview = NULL;
  __pyx_t_8.data = NULL;

  /* "symengine/lib/symengine_wrapper.pyx":5299
 *         c_inp = np.ascontiguousarray(inp.ravel(order=self.order), dtype=self.numpy_dtype)
 *         c_out = out
 *         for idx in range(nbroadcast):             # <<<<<<<<<<<<<<
 *             deref(self.lambda_visitor).call(&c_out[idx*self.tot_out_size], &c_inp[idx*self.args_size])
 * 
*/
  __pyx_t_9 = __pyx_v_nbroadcast;
  __pyx_t_10 = __pyx_t_9;
  for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) {
    __pyx_v_idx = __pyx_t_11;

    /* "symengine/lib/symengine_wrapper.pyx":5300
 *         c_out = out
 *         for idx in range(nbroadcast):
 *             deref(self.lambda_visitor).call(&c_out[idx*self.tot_out_size], &c_inp[idx*self.args_size])             # <<<<<<<<<<<<<<
 * 
 * cdef class LLVMLongDouble(_LLVMLambdify):
*/
    __pyx_t_6 = (__pyx_v_idx * __pyx_v_self->__pyx_base.__pyx_base.tot_out_size);
    __pyx_t_12 = -1;
    if (unlikely(__pyx_t_6 >= (size_t)__pyx_v_c_out.shape[0])) __pyx_t_12 = 0;
    if (unlikely(__pyx_t_12 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_12);
      __PYX_ERR(0, 5300, __pyx_L1_error)
    }
    __pyx_t_13 = (__pyx_v_idx * __pyx_v_self->__pyx_base.__pyx_base.args_size);
    __pyx_t_12 = -1;
    if (unlikely(__pyx_t_13 >= (size_t)__pyx_v_c_inp.shape[0])) __pyx_t_12 = 0;
    if (unlikely(__pyx_t_12 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_12);
      __PYX_ERR(0, 5300, __pyx_L1_error)
    }
    (*__pyx_v_self->lambda_visitor).call((&(*((float *) ( /* dim=0 */ ((char *) (((float *) __pyx_v_c_out.data) + __pyx_t_6)) )))), (&(*((float *) ( /* dim=0 */ ((char *) (((float *) __pyx_v_c_inp.data) + __pyx_t_13)) )))));
  }

  /* "symengine/lib/symengine_wrapper.pyx":5294
 *         deref(self.lambda_visitor).call(&out[out_offset], &inp[inp_offset])
 * 
 *     cpdef unsafe_eval(self, inp, out, unsigned nbroadcast=1):             # <<<<<<<<<<<<<<
 *         cdef float[::1] c_inp, c_out
 *         cdef unsigned idx
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __PYX_XCLEAR_MEMVIEW(&__pyx_t_8, 1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.LLVMFloat.unsafe_eval", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_c_inp, 1);
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_c_out, 1);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9LLVMFloat_7unsafe_eval(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_9LLVMFloat_7unsafe_eval = {"unsafe_eval", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_9LLVMFloat_7unsafe_eval, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_9LLVMFloat_7unsafe_eval(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_inp = 0;
  PyObject *__pyx_v_out = 0;
  unsigned int __pyx_v_nbroadcast;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("unsafe_eval (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_inp,&__pyx_mstate_global->__pyx_n_u_out,&__pyx_mstate_global->__pyx_n_u_nbroadcast,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 5294, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 5294, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5294, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5294, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "unsafe_eval", 0) < (0)) __PYX_ERR(0, 5294, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("unsafe_eval", 0, 2, 3, i); __PYX_ERR(0, 5294, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 5294, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5294, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5294, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_inp = values[0];
    __pyx_v_out = values[1];
    if (values[2]) {
      __pyx_v_nbroadcast = __Pyx_PyLong_As_unsigned_int(values[2]); if (unlikely((__pyx_v_nbroadcast == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5294, __pyx_L3_error)
    } else {
      __pyx_v_nbroadcast = ((unsigned int)1);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("unsafe_eval", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 5294, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.LLVMFloat.unsafe_eval", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_9LLVMFloat_6unsafe_eval(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMFloat *)__pyx_v_self), __pyx_v_inp, __pyx_v_out, __pyx_v_nbroadcast);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_9LLVMFloat_6unsafe_eval(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMFloat *__pyx_v_self, PyObject *__pyx_v_inp, PyObject *__pyx_v_out, unsigned int __pyx_v_nbroadcast) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_9symengine_3lib_17symengine_wrapper_9_Lambdify_unsafe_eval __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("unsafe_eval", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.nbroadcast = __pyx_v_nbroadcast;
  __pyx_t_1 = __pyx_vtabptr_9symengine_3lib_17symengine_wrapper_LLVMFloat->__pyx_base.__pyx_base.unsafe_eval(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify *)__pyx_v_self), __pyx_v_inp, __pyx_v_out, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5294, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.LLVMFloat.unsafe_eval", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":5303
 * 
 * cdef class LLVMLongDouble(_LLVMLambdify):
 *     def __cinit__(self, args, *exprs, cppbool real=True, order='C', cppbool cse=False, cppbool _load=False, opt_level=3, dtype=None):             # <<<<<<<<<<<<<<
 *         self.opt_level = opt_level
 * 
*/

/* Python wrapper */
static int __pyx_pw_9symengine_3lib_17symengine_wrapper_14LLVMLongDouble_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_9symengine_3lib_17symengine_wrapper_14LLVMLongDouble_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_args = 0;
  CYTHON_UNUSED bool __pyx_v_real;
  CYTHON_UNUSED PyObject *__pyx_v_order = 0;
  CYTHON_UNUSED bool __pyx_v_cse;
  CYTHON_UNUSED bool __pyx_v__load;
  PyObject *__pyx_v_opt_level = 0;
  CYTHON_UNUSED PyObject *__pyx_v_dtype = 0;
  CYTHON_UNUSED PyObject *__pyx_v_exprs = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[7] = {0,0,0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_v_exprs = __Pyx_ArgsSlice_VARARGS(__pyx_args, 1, __pyx_nargs);
  if (unlikely(!__pyx_v_exprs)) {
    __Pyx_RefNannyFinishContext();
    return -1;
  }
  __Pyx_GOTREF(__pyx_v_exprs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_args,&__pyx_mstate_global->__pyx_n_u_real,&__pyx_mstate_global->__pyx_n_u_order,&__pyx_mstate_global->__pyx_n_u_cse,&__pyx_mstate_global->__pyx_n_u_load,&__pyx_mstate_global->__pyx_n_u_opt_level,&__pyx_mstate_global->__pyx_n_u_dtype,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 5303, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        default:
        case  1:
        values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5303, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      const Py_ssize_t used_pos_args = (kwd_pos_args < 1) ? kwd_pos_args : 1;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, used_pos_args, __pyx_kwds_len, "__cinit__", 0) < (0)) __PYX_ERR(0, 5303, __pyx_L3_error)
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_n_u_C));
      if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_3));
      if (!values[6]) values[6] = __Pyx_NewRef(((PyObject *)Py_None));
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 1, 1, i); __PYX_ERR(0, 5303, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs < 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5303, __pyx_L3_error)
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_n_u_C));
      if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_3));
      if (!values[6]) values[6] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_args = values[0];
    if (values[1]) {
      __pyx_v_real = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_real == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 5303, __pyx_L3_error)
    } else {
      __pyx_v_real = ((bool)1);
    }
    __pyx_v_order = values[2];
    if (values[3]) {
      __pyx_v_cse = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_cse == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 5303, __pyx_L3_error)
    } else {
      __pyx_v_cse = ((bool)0);
    }
    if (values[4]) {
      __pyx_v__load = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v__load == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 5303, __pyx_L3_error)
    } else {
      __pyx_v__load = ((bool)0);
    }
    __pyx_v_opt_level = values[5];
    __pyx_v_dtype = values[6];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 1, 1, __pyx_nargs); __PYX_ERR(0, 5303, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_exprs); __pyx_v_exprs = 0;
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.LLVMLongDouble.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_14LLVMLongDouble___cinit__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMLongDouble *)__pyx_v_self), __pyx_v_args, __pyx_v_real, __pyx_v_order, __pyx_v_cse, __pyx_v__load, __pyx_v_opt_level, __pyx_v_dtype, __pyx_v_exprs);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_exprs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_9symengine_3lib_17symengine_wrapper_14LLVMLongDouble___cinit__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMLongDouble *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED bool __pyx_v_real, CYTHON_UNUSED PyObject *__pyx_v_order, CYTHON_UNUSED bool __pyx_v_cse, CYTHON_UNUSED bool __pyx_v__load, PyObject *__pyx_v_opt_level, CYTHON_UNUSED PyObject *__pyx_v_dtype, CYTHON_UNUSED PyObject *__pyx_v_exprs) {
  int __pyx_r;
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5304
 * cdef class LLVMLongDouble(_LLVMLambdify):
 *     def __cinit__(self, args, *exprs, cppbool real=True, order='C', cppbool cse=False, cppbool _load=False, opt_level=3, dtype=None):
 *         self.opt_level = opt_level             # <<<<<<<<<<<<<<
 * 
 *     cdef _init(self, symengine.vec_basic& args_, symengine.vec_basic& outs_, cppbool cse):
*/
  __pyx_t_1 = __Pyx_PyLong_As_int(__pyx_v_opt_level); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5304, __pyx_L1_error)
  __pyx_v_self->__pyx_base.opt_level = __pyx_t_1;

  /* "symengine/lib/symengine_wrapper.pyx":5303
 * 
 * cdef class LLVMLongDouble(_LLVMLambdify):
 *     def __cinit__(self, args, *exprs, cppbool real=True, order='C', cppbool cse=False, cppbool _load=False, opt_level=3, dtype=None):             # <<<<<<<<<<<<<<
 *         self.opt_level = opt_level
 * 
*/

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.LLVMLongDouble.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":5306
 *         self.opt_level = opt_level
 * 
 *     cdef _init(self, symengine.vec_basic& args_, symengine.vec_basic& outs_, cppbool cse):             # <<<<<<<<<<<<<<
 *         self.lambda_visitor.reset(new symengine.LLVMLongDoubleVisitor())
 *         deref(self.lambda_visitor).init(args_, outs_, cse, self.opt_level)
*/

static PyObject *__pyx_f_9symengine_3lib_17symengine_wrapper_14LLVMLongDouble__init(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMLongDouble *__pyx_v_self, SymEngine::vec_basic &__pyx_v_args_, SymEngine::vec_basic &__pyx_v_outs_, bool __pyx_v_cse) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  SymEngine::LLVMLongDoubleVisitor *__pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_init", 0);

  /* "symengine/lib/symengine_wrapper.pyx":5307
 * 
 *     cdef _init(self, symengine.vec_basic& args_, symengine.vec_basic& outs_, cppbool cse):
 *         self.lambda_visitor.reset(new symengine.LLVMLongDoubleVisitor())             # <<<<<<<<<<<<<<
 *         deref(self.lambda_visitor).init(args_, outs_, cse, self.opt_level)
 * 
*/
  try {
    __pyx_t_1 = new SymEngine::LLVMLongDoubleVisitor();
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 5307, __pyx_L1_error)
  }
  __pyx_v_self->lambda_visitor.reset(__pyx_t_1);

  /* "symengine/lib/symengine_wrapper.pyx":5308
 *     cdef _init(self, symengine.vec_basic& args_, symengine.vec_basic& outs_, cppbool cse):
 *         self.lambda_visitor.reset(new symengine.LLVMLongDoubleVisitor())
 *         deref(self.lambda_visitor).init(args_, outs_, cse, self.opt_level)             # <<<<<<<<<<<<<<
 * 
 *     cdef _load(self, const string &s):
*/
  try {
    (*__pyx_v_self->lambda_visitor).init(__pyx_v_args_, __pyx_v_outs_, __pyx_v_cse, __pyx_v_self->__pyx_base.opt_level);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 5308, __pyx_L1_error)
  }

  /* "symengine/lib/symengine_wrapper.pyx":5306
 *         self.opt_level = opt_level
 * 
 *     cdef _init(self, symengine.vec_basic& args_, symengine.vec_basic& outs_, cppbool cse):             # <<<<<<<<<<<<<<
 *         self.lambda_visitor.reset(new symengine.LLVMLongDoubleVisitor())
 *         deref(self.lambda_visitor).init(args_, outs_, cse, self.opt_level)
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.LLVMLongDouble._init", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":5310
 *         deref(self.lambda_visitor).init(args_, outs_, cse, self.opt_level)
 * 
 *     cdef _load(self, const string &s):             # <<<<<<<<<<<<<<
 *         self.lambda_visitor.reset(new symengine.LLVMLongDoubleVisitor())
 *         deref(self.lambda_visitor).loads(s)
*/

static PyObject *__pyx_f_9symengine_3lib_17symengine_wrapper_14LLVMLongDouble__load(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMLongDouble *__pyx_v_self, std::string const &__pyx_v_s) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  SymEngine::LLVMLongDoubleVisitor *__pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_load", 0);

  /* "symengine/lib/symengine_wrapper.pyx":5311
 * 
 *     cdef _load(self, const string &s):
 *         self.lambda_visitor.reset(new symengine.LLVMLongDoubleVisitor())             # <<<<<<<<<<<<<<
 *         deref(self.lambda_visitor).loads(s)
 * 
*/
  try {
    __pyx_t_1 = new SymEngine::LLVMLongDoubleVisitor();
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 5311, __pyx_L1_error)
  }
  __pyx_v_self->lambda_visitor.reset(__pyx_t_1);

  /* "symengine/lib/symengine_wrapper.pyx":5312
 *     cdef _load(self, const string &s):
 *         self.lambda_visitor.reset(new symengine.LLVMLongDoubleVisitor())
 *         deref(self.lambda_visitor).loads(s)             # <<<<<<<<<<<<<<
 * 
 *     def __reduce__(self):
*/
  (*__pyx_v_self->lambda_visitor).loads(__pyx_v_s);

  /* "symengine/lib/symengine_wrapper.pyx":5310
 *         deref(self.lambda_visitor).init(args_, outs_, cse, self.opt_level)
 * 
 *     cdef _load(self, const string &s):             # <<<<<<<<<<<<<<
 *         self.lambda_visitor.reset(new symengine.LLVMLongDoubleVisitor())
 *         deref(self.lambda_visitor).loads(s)
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.LLVMLongDouble._load", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":5314
 *         deref(self.lambda_visitor).loads(s)
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         """
 *         Interface for pickle. Note that the resulting object is platform dependent.
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_14LLVMLongDouble_3__reduce__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9symengine_3lib_17symengine_wrapper_14LLVMLongDouble_2__reduce__, "\n        Interface for pickle. Note that the resulting object is platform dependent.\n        ");
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_14LLVMLongDouble_3__reduce__ = {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_14LLVMLongDouble_3__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9symengine_3lib_17symengine_wrapper_14LLVMLongDouble_2__reduce__};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_14LLVMLongDouble_3__reduce__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_14LLVMLongDouble_2__reduce__(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMLongDouble *)__pyx_v_self));

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_14LLVMLongDouble_2__reduce__(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMLongDouble *__pyx_v_self) {
  PyObject *__pyx_v_s = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce__", 0);

  /* "symengine/lib/symengine_wrapper.pyx":5318
 *         Interface for pickle. Note that the resulting object is platform dependent.
 *         """
 *         cdef bytes s = deref(self.lambda_visitor).dumps()             # <<<<<<<<<<<<<<
 *         return llvm_long_double_loading_func, (self.args_size, self.tot_out_size, self.out_shapes, self.real, \
 *             self.n_exprs, self.order, self.accum_out_sizes, self.numpy_dtype, s)
*/
  __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string((*__pyx_v_self->lambda_visitor).dumps()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5318, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_s = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5319
 *         """
 *         cdef bytes s = deref(self.lambda_visitor).dumps()
 *         return llvm_long_double_loading_func, (self.args_size, self.tot_out_size, self.out_shapes, self.real, \             # <<<<<<<<<<<<<<
 *             self.n_exprs, self.order, self.accum_out_sizes, self.numpy_dtype, s)
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_llvm_long_double_loading_func); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5319, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyLong_FromSize_t(__pyx_v_self->__pyx_base.__pyx_base.args_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5319, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyLong_FromSize_t(__pyx_v_self->__pyx_base.__pyx_base.tot_out_size); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5319, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_self->__pyx_base.__pyx_base.real); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5319, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "symengine/lib/symengine_wrapper.pyx":5320
 *         cdef bytes s = deref(self.lambda_visitor).dumps()
 *         return llvm_long_double_loading_func, (self.args_size, self.tot_out_size, self.out_shapes, self.real, \
 *             self.n_exprs, self.order, self.accum_out_sizes, self.numpy_dtype, s)             # <<<<<<<<<<<<<<
 * 
 *     cpdef unsafe_real(self, long double[::1] inp, long double[::1] out, int inp_offset=0, int out_offset=0):
*/
  __pyx_t_5 = __Pyx_PyLong_FromSize_t(__pyx_v_self->__pyx_base.__pyx_base.n_exprs); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5320, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __pyx_convert_vector_to_py_int(__pyx_v_self->__pyx_base.__pyx_base.accum_out_sizes); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5320, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "symengine/lib/symengine_wrapper.pyx":5319
 *         """
 *         cdef bytes s = deref(self.lambda_visitor).dumps()
 *         return llvm_long_double_loading_func, (self.args_size, self.tot_out_size, self.out_shapes, self.real, \             # <<<<<<<<<<<<<<
 *             self.n_exprs, self.order, self.accum_out_sizes, self.numpy_dtype, s)
 * 
*/
  __pyx_t_7 = PyTuple_New(9); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5319, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2) != (0)) __PYX_ERR(0, 5319, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_3) != (0)) __PYX_ERR(0, 5319, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.out_shapes);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.out_shapes);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_v_self->__pyx_base.__pyx_base.out_shapes) != (0)) __PYX_ERR(0, 5319, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_4);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_t_4) != (0)) __PYX_ERR(0, 5319, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_5);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 4, __pyx_t_5) != (0)) __PYX_ERR(0, 5319, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.order);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.order);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 5, __pyx_v_self->__pyx_base.__pyx_base.order) != (0)) __PYX_ERR(0, 5319, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_6);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 6, __pyx_t_6) != (0)) __PYX_ERR(0, 5319, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.numpy_dtype);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.numpy_dtype);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 7, __pyx_v_self->__pyx_base.__pyx_base.numpy_dtype) != (0)) __PYX_ERR(0, 5319, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_s);
  __Pyx_GIVEREF(__pyx_v_s);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 8, __pyx_v_s) != (0)) __PYX_ERR(0, 5319, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_5 = 0;
  __pyx_t_6 = 0;
  __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5319, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 5319, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_7);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_7) != (0)) __PYX_ERR(0, 5319, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_7 = 0;
  __pyx_r = __pyx_t_6;
  __pyx_t_6 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":5314
 *         deref(self.lambda_visitor).loads(s)
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         """
 *         Interface for pickle. Note that the resulting object is platform dependent.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.LLVMLongDouble.__reduce__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_s);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":5322
 *             self.n_exprs, self.order, self.accum_out_sizes, self.numpy_dtype, s)
 * 
 *     cpdef unsafe_real(self, long double[::1] inp, long double[::1] out, int inp_offset=0, int out_offset=0):             # <<<<<<<<<<<<<<
 *         deref(self.lambda_visitor).call(&out[out_offset], &inp[inp_offset])
 * 
*/

static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_14LLVMLongDouble_5unsafe_real(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_9symengine_3lib_17symengine_wrapper_14LLVMLongDouble_unsafe_real(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMLongDouble *__pyx_v_self, __Pyx_memviewslice __pyx_v_inp, __Pyx_memviewslice __pyx_v_out, int __pyx_skip_dispatch, struct __pyx_opt_args_9symengine_3lib_17symengine_wrapper_14LLVMLongDouble_unsafe_real *__pyx_optional_args) {
  int __pyx_v_inp_offset = ((int)0);
  int __pyx_v_out_offset = ((int)0);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  size_t __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  int __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("unsafe_real", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_inp_offset = __pyx_optional_args->inp_offset;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_out_offset = __pyx_optional_args->out_offset;
      }
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LLVMLongDouble &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_unsafe_real); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5322, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_9symengine_3lib_17symengine_wrapper_14LLVMLongDouble_5unsafe_real)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        if (unlikely(!__pyx_v_inp.memview)) { __Pyx_RaiseUnboundLocalError("inp"); __PYX_ERR(0, 5322, __pyx_L1_error) }
        __pyx_t_5 = __pyx_memoryview_fromslice(__pyx_v_inp, 1, (PyObject *(*)(char *)) __pyx_memview_get_long__double, (int (*)(char *, PyObject *)) __pyx_memview_set_long__double, 0);; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5322, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        if (unlikely(!__pyx_v_out.memview)) { __Pyx_RaiseUnboundLocalError("out"); __PYX_ERR(0, 5322, __pyx_L1_error) }
        __pyx_t_6 = __pyx_memoryview_fromslice(__pyx_v_out, 1, (PyObject *(*)(char *)) __pyx_memview_get_long__double, (int (*)(char *, PyObject *)) __pyx_memview_set_long__double, 0);; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5322, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_7 = __Pyx_PyLong_From_int(__pyx_v_inp_offset); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5322, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_8 = __Pyx_PyLong_From_int(__pyx_v_out_offset); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 5322, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_9 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_9 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[5] = {__pyx_t_3, __pyx_t_5, __pyx_t_6, __pyx_t_7, __pyx_t_8};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_9, (5-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5322, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "symengine/lib/symengine_wrapper.pyx":5323
 * 
 *     cpdef unsafe_real(self, long double[::1] inp, long double[::1] out, int inp_offset=0, int out_offset=0):
 *         deref(self.lambda_visitor).call(&out[out_offset], &inp[inp_offset])             # <<<<<<<<<<<<<<
 * 
 *     cpdef unsafe_eval(self, inp, out, unsigned nbroadcast=1):
*/
  __pyx_t_10 = __pyx_v_out_offset;
  __pyx_t_11 = -1;
  if (__pyx_t_10 < 0) {
    __pyx_t_10 += __pyx_v_out.shape[0];
    if (unlikely(__pyx_t_10 < 0)) __pyx_t_11 = 0;
  } else if (unlikely(__pyx_t_10 >= __pyx_v_out.shape[0])) __pyx_t_11 = 0;
  if (unlikely(__pyx_t_11 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_11);
    __PYX_ERR(0, 5323, __pyx_L1_error)
  }
  __pyx_t_12 = __pyx_v_inp_offset;
  __pyx_t_11 = -1;
  if (__pyx_t_12 < 0) {
    __pyx_t_12 += __pyx_v_inp.shape[0];
    if (unlikely(__pyx_t_12 < 0)) __pyx_t_11 = 0;
  } else if (unlikely(__pyx_t_12 >= __pyx_v_inp.shape[0])) __pyx_t_11 = 0;
  if (unlikely(__pyx_t_11 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_11);
    __PYX_ERR(0, 5323, __pyx_L1_error)
  }
  (*__pyx_v_self->lambda_visitor).call((&(*((long double *) ( /* dim=0 */ ((char *) (((long double *) __pyx_v_out.data) + __pyx_t_10)) )))), (&(*((long double *) ( /* dim=0 */ ((char *) (((long double *) __pyx_v_inp.data) + __pyx_t_12)) )))));

  /* "symengine/lib/symengine_wrapper.pyx":5322
 *             self.n_exprs, self.order, self.accum_out_sizes, self.numpy_dtype, s)
 * 
 *     cpdef unsafe_real(self, long double[::1] inp, long double[::1] out, int inp_offset=0, int out_offset=0):             # <<<<<<<<<<<<<<
 *         deref(self.lambda_visitor).call(&out[out_offset], &inp[inp_offset])
 * 
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.LLVMLongDouble.unsafe_real", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_14LLVMLongDouble_5unsafe_real(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_14LLVMLongDouble_5unsafe_real = {"unsafe_real", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_14LLVMLongDouble_5unsafe_real, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_14LLVMLongDouble_5unsafe_real(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  __Pyx_memviewslice __pyx_v_inp = { 0, 0, { 0 }, { 0 }, { 0 } };
  __Pyx_memviewslice __pyx_v_out = { 0, 0, { 0 }, { 0 }, { 0 } };
  int __pyx_v_inp_offset;
  int __pyx_v_out_offset;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("unsafe_real (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_inp,&__pyx_mstate_global->__pyx_n_u_out,&__pyx_mstate_global->__pyx_n_u_inp_offset,&__pyx_mstate_global->__pyx_n_u_out_offset,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 5322, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 5322, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 5322, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5322, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5322, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "unsafe_real", 0) < (0)) __PYX_ERR(0, 5322, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("unsafe_real", 0, 2, 4, i); __PYX_ERR(0, 5322, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 5322, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 5322, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5322, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5322, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_inp = __Pyx_PyObject_to_MemoryviewSlice_dc_long__double(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_inp.memview)) __PYX_ERR(0, 5322, __pyx_L3_error)
    __pyx_v_out = __Pyx_PyObject_to_MemoryviewSlice_dc_long__double(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_out.memview)) __PYX_ERR(0, 5322, __pyx_L3_error)
    if (values[2]) {
      __pyx_v_inp_offset = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_inp_offset == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5322, __pyx_L3_error)
    } else {
      __pyx_v_inp_offset = ((int)0);
    }
    if (values[3]) {
      __pyx_v_out_offset = __Pyx_PyLong_As_int(values[3]); if (unlikely((__pyx_v_out_offset == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5322, __pyx_L3_error)
    } else {
      __pyx_v_out_offset = ((int)0);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("unsafe_real", 0, 2, 4, __pyx_nargs); __PYX_ERR(0, 5322, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_inp, 1);
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_out, 1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.LLVMLongDouble.unsafe_real", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_14LLVMLongDouble_4unsafe_real(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMLongDouble *)__pyx_v_self), __pyx_v_inp, __pyx_v_out, __pyx_v_inp_offset, __pyx_v_out_offset);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_inp, 1);
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_out, 1);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_14LLVMLongDouble_4unsafe_real(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMLongDouble *__pyx_v_self, __Pyx_memviewslice __pyx_v_inp, __Pyx_memviewslice __pyx_v_out, int __pyx_v_inp_offset, int __pyx_v_out_offset) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_9symengine_3lib_17symengine_wrapper_14LLVMLongDouble_unsafe_real __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("unsafe_real", 0);
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(!__pyx_v_inp.memview)) { __Pyx_RaiseUnboundLocalError("inp"); __PYX_ERR(0, 5322, __pyx_L1_error) }
  if (unlikely(!__pyx_v_out.memview)) { __Pyx_RaiseUnboundLocalError("out"); __PYX_ERR(0, 5322, __pyx_L1_error) }
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.inp_offset = __pyx_v_inp_offset;
  __pyx_t_2.out_offset = __pyx_v_out_offset;
  __pyx_t_1 = __pyx_vtabptr_9symengine_3lib_17symengine_wrapper_LLVMLongDouble->unsafe_real(__pyx_v_self, __pyx_v_inp, __pyx_v_out, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5322, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.LLVMLongDouble.unsafe_real", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":5325
 *         deref(self.lambda_visitor).call(&out[out_offset], &inp[inp_offset])
 * 
 *     cpdef unsafe_eval(self, inp, out, unsigned nbroadcast=1):             # <<<<<<<<<<<<<<
 *         cdef long double[::1] c_inp, c_out
 *         cdef unsigned idx
*/

static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_14LLVMLongDouble_7unsafe_eval(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_9symengine_3lib_17symengine_wrapper_14LLVMLongDouble_unsafe_eval(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMLongDouble *__pyx_v_self, PyObject *__pyx_v_inp, PyObject *__pyx_v_out, int __pyx_skip_dispatch, struct __pyx_opt_args_9symengine_3lib_17symengine_wrapper_14LLVMLongDouble_unsafe_eval *__pyx_optional_args) {
  unsigned int __pyx_v_nbroadcast = ((unsigned int)1);
  __Pyx_memviewslice __pyx_v_c_inp = { 0, 0, { 0 }, { 0 }, { 0 } };
  __Pyx_memviewslice __pyx_v_c_out = { 0, 0, { 0 }, { 0 }, { 0 } };
  unsigned int __pyx_v_idx;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  __Pyx_memviewslice __pyx_t_8 = { 0, 0, { 0 }, { 0 }, { 0 } };
  unsigned int __pyx_t_9;
  unsigned int __pyx_t_10;
  unsigned int __pyx_t_11;
  int __pyx_t_12;
  size_t __pyx_t_13;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("unsafe_eval", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_nbroadcast = __pyx_optional_args->nbroadcast;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LLVMLongDouble &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_unsafe_eval); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5325, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_9symengine_3lib_17symengine_wrapper_14LLVMLongDouble_7unsafe_eval)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = __Pyx_PyLong_From_unsigned_int(__pyx_v_nbroadcast); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5325, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_6 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_6 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_inp, __pyx_v_out, __pyx_t_5};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (4-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5325, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "symengine/lib/symengine_wrapper.pyx":5328
 *         cdef long double[::1] c_inp, c_out
 *         cdef unsigned idx
 *         c_inp = np.ascontiguousarray(inp.ravel(order=self.order), dtype=self.numpy_dtype)             # <<<<<<<<<<<<<<
 *         c_out = out
 *         for idx in range(nbroadcast):
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5328, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ascontiguousarray); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5328, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = __pyx_v_inp;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_6 = 0;
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_3, NULL};
    __pyx_t_7 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5328, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_order, __pyx_v_self->__pyx_base.__pyx_base.order, __pyx_t_7, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 5328, __pyx_L1_error)
    __pyx_t_4 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_ravel, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_7);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5328, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, __pyx_t_4};
    __pyx_t_7 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5328, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dtype, __pyx_v_self->__pyx_base.__pyx_base.numpy_dtype, __pyx_t_7, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 5328, __pyx_L1_error)
    __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_7);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5328, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_dc_long__double(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_8.memview)) __PYX_ERR(0, 5328, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_c_inp = __pyx_t_8;
  __pyx_t_8.memview = NULL;
  __pyx_t_8.data = NULL;

  /* "symengine/lib/symengine_wrapper.pyx":5329
 *         cdef unsigned idx
 *         c_inp = np.ascontiguousarray(inp.ravel(order=self.order), dtype=self.numpy_dtype)
 *         c_out = out             # <<<<<<<<<<<<<<
 *         for idx in range(nbroadcast):
 *             deref(self.lambda_visitor).call(&c_out[idx*self.tot_out_size], &c_inp[idx*self.args_size])
*/
  __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_dc_long__double(__pyx_v_out, PyBUF_WRITABLE); if (unlikely(!__pyx_t_8.memview)) __PYX_ERR(0, 5329, __pyx_L1_error)
  __pyx_v_c_out = __pyx_t_8;
  __pyx_t_8.memview = NULL;
  __pyx_t_8.data = NULL;

  /* "symengine/lib/symengine_wrapper.pyx":5330
 *         c_inp = np.ascontiguousarray(inp.ravel(order=self.order), dtype=self.numpy_dtype)
 *         c_out = out
 *         for idx in range(nbroadcast):             # <<<<<<<<<<<<<<
 *             deref(self.lambda_visitor).call(&c_out[idx*self.tot_out_size], &c_inp[idx*self.args_size])
 * 
*/
  __pyx_t_9 = __pyx_v_nbroadcast;
  __pyx_t_10 = __pyx_t_9;
  for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) {
    __pyx_v_idx = __pyx_t_11;

    /* "symengine/lib/symengine_wrapper.pyx":5331
 *         c_out = out
 *         for idx in range(nbroadcast):
 *             deref(self.lambda_visitor).call(&c_out[idx*self.tot_out_size], &c_inp[idx*self.args_size])             # <<<<<<<<<<<<<<
 * 
 * def llvm_loading_func(*args):
*/
    __pyx_t_6 = (__pyx_v_idx * __pyx_v_self->__pyx_base.__pyx_base.tot_out_size);
    __pyx_t_12 = -1;
    if (unlikely(__pyx_t_6 >= (size_t)__pyx_v_c_out.shape[0])) __pyx_t_12 = 0;
    if (unlikely(__pyx_t_12 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_12);
      __PYX_ERR(0, 5331, __pyx_L1_error)
    }
    __pyx_t_13 = (__pyx_v_idx * __pyx_v_self->__pyx_base.__pyx_base.args_size);
    __pyx_t_12 = -1;
    if (unlikely(__pyx_t_13 >= (size_t)__pyx_v_c_inp.shape[0])) __pyx_t_12 = 0;
    if (unlikely(__pyx_t_12 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_12);
      __PYX_ERR(0, 5331, __pyx_L1_error)
    }
    (*__pyx_v_self->lambda_visitor).call((&(*((long double *) ( /* dim=0 */ ((char *) (((long double *) __pyx_v_c_out.data) + __pyx_t_6)) )))), (&(*((long double *) ( /* dim=0 */ ((char *) (((long double *) __pyx_v_c_inp.data) + __pyx_t_13)) )))));
  }

  /* "symengine/lib/symengine_wrapper.pyx":5325
 *         deref(self.lambda_visitor).call(&out[out_offset], &inp[inp_offset])
 * 
 *     cpdef unsafe_eval(self, inp, out, unsigned nbroadcast=1):             # <<<<<<<<<<<<<<
 *         cdef long double[::1] c_inp, c_out
 *         cdef unsigned idx
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __PYX_XCLEAR_MEMVIEW(&__pyx_t_8, 1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.LLVMLongDouble.unsafe_eval", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_c_inp, 1);
  __PYX_XCLEAR_MEMVIEW(&__pyx_v_c_out, 1);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_14LLVMLongDouble_7unsafe_eval(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_14LLVMLongDouble_7unsafe_eval = {"unsafe_eval", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_14LLVMLongDouble_7unsafe_eval, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_14LLVMLongDouble_7unsafe_eval(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_inp = 0;
  PyObject *__pyx_v_out = 0;
  unsigned int __pyx_v_nbroadcast;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("unsafe_eval (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_inp,&__pyx_mstate_global->__pyx_n_u_out,&__pyx_mstate_global->__pyx_n_u_nbroadcast,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 5325, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 5325, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5325, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5325, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "unsafe_eval", 0) < (0)) __PYX_ERR(0, 5325, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("unsafe_eval", 0, 2, 3, i); __PYX_ERR(0, 5325, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 5325, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5325, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5325, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_inp = values[0];
    __pyx_v_out = values[1];
    if (values[2]) {
      __pyx_v_nbroadcast = __Pyx_PyLong_As_unsigned_int(values[2]); if (unlikely((__pyx_v_nbroadcast == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5325, __pyx_L3_error)
    } else {
      __pyx_v_nbroadcast = ((unsigned int)1);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("unsafe_eval", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 5325, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.LLVMLongDouble.unsafe_eval", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_14LLVMLongDouble_6unsafe_eval(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMLongDouble *)__pyx_v_self), __pyx_v_inp, __pyx_v_out, __pyx_v_nbroadcast);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_14LLVMLongDouble_6unsafe_eval(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMLongDouble *__pyx_v_self, PyObject *__pyx_v_inp, PyObject *__pyx_v_out, unsigned int __pyx_v_nbroadcast) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_9symengine_3lib_17symengine_wrapper_9_Lambdify_unsafe_eval __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("unsafe_eval", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.nbroadcast = __pyx_v_nbroadcast;
  __pyx_t_1 = __pyx_vtabptr_9symengine_3lib_17symengine_wrapper_LLVMLongDouble->__pyx_base.__pyx_base.unsafe_eval(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify *)__pyx_v_self), __pyx_v_inp, __pyx_v_out, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5325, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.LLVMLongDouble.unsafe_eval", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":5333
 *             deref(self.lambda_visitor).call(&c_out[idx*self.tot_out_size], &c_inp[idx*self.args_size])
 * 
 * def llvm_loading_func(*args):             # <<<<<<<<<<<<<<
 *     return LLVMDouble(args, _load=True)
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_187llvm_loading_func(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_187llvm_loading_func = {"llvm_loading_func", (PyCFunction)(void(*)(void))(PyCFunctionWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_187llvm_loading_func, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_187llvm_loading_func(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_args = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("llvm_loading_func (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("llvm_loading_func", __pyx_kwds); return NULL;}
  __Pyx_INCREF(__pyx_args);
  __pyx_v_args = __pyx_args;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_186llvm_loading_func(__pyx_self, __pyx_v_args);

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_186llvm_loading_func(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_args) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("llvm_loading_func", 0);

  /* "symengine/lib/symengine_wrapper.pyx":5334
 * 
 * def llvm_loading_func(*args):
 *     return LLVMDouble(args, _load=True)             # <<<<<<<<<<<<<<
 * 
 * def llvm_float_loading_func(*args):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __pyx_t_3 = 1;
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, __pyx_v_args};
    __pyx_t_4 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5334, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_load, Py_True, __pyx_t_4, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 5334, __pyx_L1_error)
    __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LLVMDouble, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5334, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_1);
  }
  __pyx_r = ((PyObject *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":5333
 *             deref(self.lambda_visitor).call(&c_out[idx*self.tot_out_size], &c_inp[idx*self.args_size])
 * 
 * def llvm_loading_func(*args):             # <<<<<<<<<<<<<<
 *     return LLVMDouble(args, _load=True)
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.llvm_loading_func", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":5336
 *     return LLVMDouble(args, _load=True)
 * 
 * def llvm_float_loading_func(*args):             # <<<<<<<<<<<<<<
 *     return LLVMFloat(args, _load=True)
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_189llvm_float_loading_func(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_189llvm_float_loading_func = {"llvm_float_loading_func", (PyCFunction)(void(*)(void))(PyCFunctionWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_189llvm_float_loading_func, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_189llvm_float_loading_func(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_args = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("llvm_float_loading_func (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("llvm_float_loading_func", __pyx_kwds); return NULL;}
  __Pyx_INCREF(__pyx_args);
  __pyx_v_args = __pyx_args;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_188llvm_float_loading_func(__pyx_self, __pyx_v_args);

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_188llvm_float_loading_func(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_args) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("llvm_float_loading_func", 0);

  /* "symengine/lib/symengine_wrapper.pyx":5337
 * 
 * def llvm_float_loading_func(*args):
 *     return LLVMFloat(args, _load=True)             # <<<<<<<<<<<<<<
 * 
 * def llvm_long_double_loading_func(*args):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __pyx_t_3 = 1;
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, __pyx_v_args};
    __pyx_t_4 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5337, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_load, Py_True, __pyx_t_4, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 5337, __pyx_L1_error)
    __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LLVMFloat, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5337, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_1);
  }
  __pyx_r = ((PyObject *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":5336
 *     return LLVMDouble(args, _load=True)
 * 
 * def llvm_float_loading_func(*args):             # <<<<<<<<<<<<<<
 *     return LLVMFloat(args, _load=True)
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.llvm_float_loading_func", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":5339
 *     return LLVMFloat(args, _load=True)
 * 
 * def llvm_long_double_loading_func(*args):             # <<<<<<<<<<<<<<
 *     return LLVMLongDouble(args, _load=True)
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_191llvm_long_double_loading_func(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_191llvm_long_double_loading_func = {"llvm_long_double_loading_func", (PyCFunction)(void(*)(void))(PyCFunctionWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_191llvm_long_double_loading_func, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_191llvm_long_double_loading_func(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_args = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("llvm_long_double_loading_func (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("llvm_long_double_loading_func", __pyx_kwds); return NULL;}
  __Pyx_INCREF(__pyx_args);
  __pyx_v_args = __pyx_args;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_190llvm_long_double_loading_func(__pyx_self, __pyx_v_args);

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_190llvm_long_double_loading_func(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_args) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("llvm_long_double_loading_func", 0);

  /* "symengine/lib/symengine_wrapper.pyx":5340
 * 
 * def llvm_long_double_loading_func(*args):
 *     return LLVMLongDouble(args, _load=True)             # <<<<<<<<<<<<<<
 * 
 * def Lambdify(args, *exprs, cppbool real=True, backend=None, order='C',
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __pyx_t_3 = 1;
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, __pyx_v_args};
    __pyx_t_4 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5340, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_load, Py_True, __pyx_t_4, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 5340, __pyx_L1_error)
    __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LLVMLongDouble, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5340, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_1);
  }
  __pyx_r = ((PyObject *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":5339
 *     return LLVMFloat(args, _load=True)
 * 
 * def llvm_long_double_loading_func(*args):             # <<<<<<<<<<<<<<
 *     return LLVMLongDouble(args, _load=True)
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.llvm_long_double_loading_func", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":5342
 *     return LLVMLongDouble(args, _load=True)
 * 
 * def Lambdify(args, *exprs, cppbool real=True, backend=None, order='C',             # <<<<<<<<<<<<<<
 *              as_scipy=False, cse=False, dtype=None, **kwargs):
 *     """
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_193Lambdify(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9symengine_3lib_17symengine_wrapper_192Lambdify, "\n    Lambdify instances are callbacks that numerically evaluate their symbolic\n    expressions from user provided input (real or complex) into (possibly user\n    provided) output buffers (real or complex). Multidimensional data are\n    processed in their most cache-friendly way (i.e. \"ravelled\").\n\n    Parameters\n    ----------\n    args: iterable of Symbols\n    \\*exprs: array_like of expressions\n        the shape of exprs is preserved\n    real : bool\n        Whether datatype is ``double`` (``double complex`` otherwise).\n    backend : str\n        'llvm' or 'lambda'. When ``None`` the environment variable\n        'SYMENGINE_LAMBDIFY_BACKEND' is used (taken as 'llvm' if available, otherwise 'lambda').\n    order : 'C' or 'F'\n        C- or Fortran-contiguous memory layout. Note that this affects\n        broadcasting: e.g. a (m, n) matrix taking 3 arguments and given a\n        (k, l, 3) (C-contiguous) input will give a (k, l, m, n) shaped output,\n        whereas a (3, k, l) (C-contiguous) input will give a (m, n, k, l) shaped\n        output. If ``None`` order is taken as ``self.order`` (from initialization).\n    as_scipy : bool\n        return a SciPy LowLevelCallable which can be used in SciPy's integrate\n        methods\n    cse : bool\n        Run Common Subexpression Elimination on the output before generating\n        the callback.\n    dtype : numpy.dtype type\n\n    Returns\n    -------\n    callback instance with signature f(inp, out=None)\n\n    Examples\n    --------\n    >>> from symengine import var, Lambdify\n    >>> var('x y z')\n    >>> f = Lambdify([x, y, z], [x+y+z, x*y*z])\n    >>> f([2, 3, 4])\n    [ 9., 24.]\n    >>> out = np.array(2)\n    >>> f(x, out); out\n    [ 9., 24.]\n\n    ");
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_193Lambdify = {"Lambdify", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_193Lambdify, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9symengine_3lib_17symengine_wrapper_192Lambdify};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_193Lambdify(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_args = 0;
  bool __pyx_v_real;
  PyObject *__pyx_v_backend = 0;
  PyObject *__pyx_v_order = 0;
  PyObject *__pyx_v_as_scipy = 0;
  PyObject *__pyx_v_cse = 0;
  PyObject *__pyx_v_dtype = 0;
  PyObject *__pyx_v_exprs = 0;
  PyObject *__pyx_v_kwargs = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[7] = {0,0,0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Lambdify (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  __pyx_v_exprs = __Pyx_ArgsSlice_FASTCALL(__pyx_args, 1, __pyx_nargs);
  if (unlikely(!__pyx_v_exprs)) {
    __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_v_exprs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_args,&__pyx_mstate_global->__pyx_n_u_real,&__pyx_mstate_global->__pyx_n_u_backend,&__pyx_mstate_global->__pyx_n_u_order,&__pyx_mstate_global->__pyx_n_u_as_scipy,&__pyx_mstate_global->__pyx_n_u_cse,&__pyx_mstate_global->__pyx_n_u_dtype,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 5342, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        default:
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5342, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      const Py_ssize_t used_pos_args = (kwd_pos_args < 1) ? kwd_pos_args : 1;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, __pyx_kwds_len, "Lambdify", 1) < (0)) __PYX_ERR(0, 5342, __pyx_L3_error)
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_n_u_C)));

      /* "symengine/lib/symengine_wrapper.pyx":5343
 * 
 * def Lambdify(args, *exprs, cppbool real=True, backend=None, order='C',
 *              as_scipy=False, cse=False, dtype=None, **kwargs):             # <<<<<<<<<<<<<<
 *     """
 *     Lambdify instances are callbacks that numerically evaluate their symbolic
*/
      if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False)));
      if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False)));
      if (!values[6]) values[6] = __Pyx_NewRef(((PyObject *)Py_None));
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("Lambdify", 0, 1, 1, i); __PYX_ERR(0, 5342, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs < 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5342, __pyx_L3_error)

      /* "symengine/lib/symengine_wrapper.pyx":5342
 *     return LLVMLongDouble(args, _load=True)
 * 
 * def Lambdify(args, *exprs, cppbool real=True, backend=None, order='C',             # <<<<<<<<<<<<<<
 *              as_scipy=False, cse=False, dtype=None, **kwargs):
 *     """
*/
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_n_u_C)));
      if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False)));
      if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False)));

      /* "symengine/lib/symengine_wrapper.pyx":5343
 * 
 * def Lambdify(args, *exprs, cppbool real=True, backend=None, order='C',
 *              as_scipy=False, cse=False, dtype=None, **kwargs):             # <<<<<<<<<<<<<<
 *     """
 *     Lambdify instances are callbacks that numerically evaluate their symbolic
*/
      if (!values[6]) values[6] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_args = values[0];
    if (values[1]) {
      __pyx_v_real = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_real == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 5342, __pyx_L3_error)
    } else {

      /* "symengine/lib/symengine_wrapper.pyx":5342
 *     return LLVMLongDouble(args, _load=True)
 * 
 * def Lambdify(args, *exprs, cppbool real=True, backend=None, order='C',             # <<<<<<<<<<<<<<
 *              as_scipy=False, cse=False, dtype=None, **kwargs):
 *     """
*/
      __pyx_v_real = ((bool)((int)1));
    }
    __pyx_v_backend = values[2];
    __pyx_v_order = values[3];
    __pyx_v_as_scipy = values[4];
    __pyx_v_cse = values[5];
    __pyx_v_dtype = values[6];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("Lambdify", 0, 1, 1, __pyx_nargs); __PYX_ERR(0, 5342, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_exprs); __pyx_v_exprs = 0;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Lambdify", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_192Lambdify(__pyx_self, __pyx_v_args, __pyx_v_real, __pyx_v_backend, __pyx_v_order, __pyx_v_as_scipy, __pyx_v_cse, __pyx_v_dtype, __pyx_v_exprs, __pyx_v_kwargs);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_exprs);
  __Pyx_DECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_192Lambdify(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_args, bool __pyx_v_real, PyObject *__pyx_v_backend, PyObject *__pyx_v_order, PyObject *__pyx_v_as_scipy, PyObject *__pyx_v_cse, PyObject *__pyx_v_dtype, PyObject *__pyx_v_exprs, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_v_backend_default = NULL;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify *__pyx_v_ret = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("Lambdify", 0);
  __Pyx_INCREF(__pyx_v_backend);
  __Pyx_INCREF(__pyx_v_dtype);

  /* "symengine/lib/symengine_wrapper.pyx":5390
 * 
 *     """
 *     if backend is None:             # <<<<<<<<<<<<<<
 *         backend_default = 'llvm' if real else 'lambda'
 *         backend = os.getenv('SYMENGINE_LAMBDIFY_BACKEND', backend_default)
*/
  __pyx_t_1 = (__pyx_v_backend == Py_None);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":5391
 *     """
 *     if backend is None:
 *         backend_default = 'llvm' if real else 'lambda'             # <<<<<<<<<<<<<<
 *         backend = os.getenv('SYMENGINE_LAMBDIFY_BACKEND', backend_default)
 *     if backend == "llvm":
*/
    __pyx_t_1 = (__pyx_v_real != 0);
    if (__pyx_t_1) {
      __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_llvm);
      __pyx_t_2 = __pyx_mstate_global->__pyx_n_u_llvm;
    } else {
      __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_lambda);
      __pyx_t_2 = __pyx_mstate_global->__pyx_n_u_lambda;
    }
    __pyx_v_backend_default = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":5392
 *     if backend is None:
 *         backend_default = 'llvm' if real else 'lambda'
 *         backend = os.getenv('SYMENGINE_LAMBDIFY_BACKEND', backend_default)             # <<<<<<<<<<<<<<
 *     if backend == "llvm":
 *         if dtype == None:
*/
    __pyx_t_3 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_os); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5392, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_getenv); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5392, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_6 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
      assert(__pyx_t_3);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
      __pyx_t_6 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_mstate_global->__pyx_n_u_SYMENGINE_LAMBDIFY_BACKEND, __pyx_v_backend_default};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5392, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_DECREF_SET(__pyx_v_backend, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":5390
 * 
 *     """
 *     if backend is None:             # <<<<<<<<<<<<<<
 *         backend_default = 'llvm' if real else 'lambda'
 *         backend = os.getenv('SYMENGINE_LAMBDIFY_BACKEND', backend_default)
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":5393
 *         backend_default = 'llvm' if real else 'lambda'
 *         backend = os.getenv('SYMENGINE_LAMBDIFY_BACKEND', backend_default)
 *     if backend == "llvm":             # <<<<<<<<<<<<<<
 *         if dtype == None:
 *             dtype = np.float64
*/
  __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_backend, __pyx_mstate_global->__pyx_n_u_llvm, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 5393, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":5394
 *         backend = os.getenv('SYMENGINE_LAMBDIFY_BACKEND', backend_default)
 *     if backend == "llvm":
 *         if dtype == None:             # <<<<<<<<<<<<<<
 *             dtype = np.float64
 *         if dtype == np.float64:
*/
    __pyx_t_2 = PyObject_RichCompare(__pyx_v_dtype, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5394, __pyx_L1_error)
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 5394, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_1) {

      /* "symengine/lib/symengine_wrapper.pyx":5395
 *     if backend == "llvm":
 *         if dtype == None:
 *             dtype = np.float64             # <<<<<<<<<<<<<<
 *         if dtype == np.float64:
 *             ret = LLVMDouble(args, *exprs, real=real, order=order, cse=cse, dtype=np.float64, **kwargs)
*/
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5395, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_float64); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5395, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF_SET(__pyx_v_dtype, __pyx_t_5);
      __pyx_t_5 = 0;

      /* "symengine/lib/symengine_wrapper.pyx":5394
 *         backend = os.getenv('SYMENGINE_LAMBDIFY_BACKEND', backend_default)
 *     if backend == "llvm":
 *         if dtype == None:             # <<<<<<<<<<<<<<
 *             dtype = np.float64
 *         if dtype == np.float64:
*/
    }

    /* "symengine/lib/symengine_wrapper.pyx":5396
 *         if dtype == None:
 *             dtype = np.float64
 *         if dtype == np.float64:             # <<<<<<<<<<<<<<
 *             ret = LLVMDouble(args, *exprs, real=real, order=order, cse=cse, dtype=np.float64, **kwargs)
 *         elif dtype == np.float32:
*/
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5396, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_float64); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5396, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyObject_RichCompare(__pyx_v_dtype, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5396, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 5396, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_1) {

      /* "symengine/lib/symengine_wrapper.pyx":5397
 *             dtype = np.float64
 *         if dtype == np.float64:
 *             ret = LLVMDouble(args, *exprs, real=real, order=order, cse=cse, dtype=np.float64, **kwargs)             # <<<<<<<<<<<<<<
 *         elif dtype == np.float32:
 *             ret = LLVMFloat(args, *exprs, real=real, order=order, cse=cse, dtype=np.float32, **kwargs)
*/
      __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5397, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_v_args);
      __Pyx_GIVEREF(__pyx_v_args);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_args) != (0)) __PYX_ERR(0, 5397, __pyx_L1_error);
      __pyx_t_2 = PyNumber_Add(__pyx_t_5, __pyx_v_exprs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5397, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_3 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5397, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_real); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5397, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_real, __pyx_t_4) < (0)) __PYX_ERR(0, 5397, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_order, __pyx_v_order) < (0)) __PYX_ERR(0, 5397, __pyx_L1_error)
      if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_cse, __pyx_v_cse) < (0)) __PYX_ERR(0, 5397, __pyx_L1_error)
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5397, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_float64); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5397, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_dtype, __pyx_t_7) < (0)) __PYX_ERR(0, 5397, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_5 = __pyx_t_3;
      __pyx_t_3 = 0;
      if (__Pyx_MergeKeywords(__pyx_t_5, __pyx_v_kwargs) < (0)) __PYX_ERR(0, 5397, __pyx_L1_error)
      __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LLVMDouble), __pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5397, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_v_ret = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify *)__pyx_t_3);
      __pyx_t_3 = 0;

      /* "symengine/lib/symengine_wrapper.pyx":5396
 *         if dtype == None:
 *             dtype = np.float64
 *         if dtype == np.float64:             # <<<<<<<<<<<<<<
 *             ret = LLVMDouble(args, *exprs, real=real, order=order, cse=cse, dtype=np.float64, **kwargs)
 *         elif dtype == np.float32:
*/
      goto __pyx_L6;
    }

    /* "symengine/lib/symengine_wrapper.pyx":5398
 *         if dtype == np.float64:
 *             ret = LLVMDouble(args, *exprs, real=real, order=order, cse=cse, dtype=np.float64, **kwargs)
 *         elif dtype == np.float32:             # <<<<<<<<<<<<<<
 *             ret = LLVMFloat(args, *exprs, real=real, order=order, cse=cse, dtype=np.float32, **kwargs)
 *         elif dtype == np.longdouble:
*/
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5398, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_float32); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5398, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyObject_RichCompare(__pyx_v_dtype, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5398, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 5398, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_1) {

      /* "symengine/lib/symengine_wrapper.pyx":5399
 *             ret = LLVMDouble(args, *exprs, real=real, order=order, cse=cse, dtype=np.float64, **kwargs)
 *         elif dtype == np.float32:
 *             ret = LLVMFloat(args, *exprs, real=real, order=order, cse=cse, dtype=np.float32, **kwargs)             # <<<<<<<<<<<<<<
 *         elif dtype == np.longdouble:
 *             ret = LLVMLongDouble(args, *exprs, real=real, order=order, cse=cse, dtype=np.longdouble, **kwargs)
*/
      __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5399, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_v_args);
      __Pyx_GIVEREF(__pyx_v_args);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_args) != (0)) __PYX_ERR(0, 5399, __pyx_L1_error);
      __pyx_t_5 = PyNumber_Add(__pyx_t_3, __pyx_v_exprs); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5399, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_2 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5399, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_7 = __Pyx_PyBool_FromLong(__pyx_v_real); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5399, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_real, __pyx_t_7) < (0)) __PYX_ERR(0, 5399, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_order, __pyx_v_order) < (0)) __PYX_ERR(0, 5399, __pyx_L1_error)
      if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_cse, __pyx_v_cse) < (0)) __PYX_ERR(0, 5399, __pyx_L1_error)
      __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5399, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_float32); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5399, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_dtype, __pyx_t_4) < (0)) __PYX_ERR(0, 5399, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_3 = __pyx_t_2;
      __pyx_t_2 = 0;
      if (__Pyx_MergeKeywords(__pyx_t_3, __pyx_v_kwargs) < (0)) __PYX_ERR(0, 5399, __pyx_L1_error)
      __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LLVMFloat), __pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5399, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_v_ret = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify *)__pyx_t_2);
      __pyx_t_2 = 0;

      /* "symengine/lib/symengine_wrapper.pyx":5398
 *         if dtype == np.float64:
 *             ret = LLVMDouble(args, *exprs, real=real, order=order, cse=cse, dtype=np.float64, **kwargs)
 *         elif dtype == np.float32:             # <<<<<<<<<<<<<<
 *             ret = LLVMFloat(args, *exprs, real=real, order=order, cse=cse, dtype=np.float32, **kwargs)
 *         elif dtype == np.longdouble:
*/
      goto __pyx_L6;
    }

    /* "symengine/lib/symengine_wrapper.pyx":5400
 *         elif dtype == np.float32:
 *             ret = LLVMFloat(args, *exprs, real=real, order=order, cse=cse, dtype=np.float32, **kwargs)
 *         elif dtype == np.longdouble:             # <<<<<<<<<<<<<<
 *             ret = LLVMLongDouble(args, *exprs, real=real, order=order, cse=cse, dtype=np.longdouble, **kwargs)
 *         else:
*/
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5400, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_longdouble); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5400, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyObject_RichCompare(__pyx_v_dtype, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5400, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 5400, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (likely(__pyx_t_1)) {

      /* "symengine/lib/symengine_wrapper.pyx":5401
 *             ret = LLVMFloat(args, *exprs, real=real, order=order, cse=cse, dtype=np.float32, **kwargs)
 *         elif dtype == np.longdouble:
 *             ret = LLVMLongDouble(args, *exprs, real=real, order=order, cse=cse, dtype=np.longdouble, **kwargs)             # <<<<<<<<<<<<<<
 *         else:
 *             raise ValueError("Unknown numpy dtype.")
*/
      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5401, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_v_args);
      __Pyx_GIVEREF(__pyx_v_args);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_args) != (0)) __PYX_ERR(0, 5401, __pyx_L1_error);
      __pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_v_exprs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5401, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_5 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5401, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_real); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5401, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_real, __pyx_t_4) < (0)) __PYX_ERR(0, 5401, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_order, __pyx_v_order) < (0)) __PYX_ERR(0, 5401, __pyx_L1_error)
      if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_cse, __pyx_v_cse) < (0)) __PYX_ERR(0, 5401, __pyx_L1_error)
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5401, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_longdouble); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5401, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_dtype, __pyx_t_7) < (0)) __PYX_ERR(0, 5401, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_2 = __pyx_t_5;
      __pyx_t_5 = 0;
      if (__Pyx_MergeKeywords(__pyx_t_2, __pyx_v_kwargs) < (0)) __PYX_ERR(0, 5401, __pyx_L1_error)
      __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LLVMLongDouble), __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5401, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_v_ret = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify *)__pyx_t_5);
      __pyx_t_5 = 0;

      /* "symengine/lib/symengine_wrapper.pyx":5400
 *         elif dtype == np.float32:
 *             ret = LLVMFloat(args, *exprs, real=real, order=order, cse=cse, dtype=np.float32, **kwargs)
 *         elif dtype == np.longdouble:             # <<<<<<<<<<<<<<
 *             ret = LLVMLongDouble(args, *exprs, real=real, order=order, cse=cse, dtype=np.longdouble, **kwargs)
 *         else:
*/
      goto __pyx_L6;
    }

    /* "symengine/lib/symengine_wrapper.pyx":5403
 *             ret = LLVMLongDouble(args, *exprs, real=real, order=order, cse=cse, dtype=np.longdouble, **kwargs)
 *         else:
 *             raise ValueError("Unknown numpy dtype.")             # <<<<<<<<<<<<<<
 * 
 *         if as_scipy:
*/
    /*else*/ {
      __pyx_t_2 = NULL;
      __pyx_t_6 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Unknown_numpy_dtype};
        __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5403, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
      }
      __Pyx_Raise(__pyx_t_5, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __PYX_ERR(0, 5403, __pyx_L1_error)
    }
    __pyx_L6:;

    /* "symengine/lib/symengine_wrapper.pyx":5405
 *             raise ValueError("Unknown numpy dtype.")
 * 
 *         if as_scipy:             # <<<<<<<<<<<<<<
 *             return ret.as_scipy_low_level_callable()
 *         return ret
*/
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_as_scipy); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 5405, __pyx_L1_error)
    if (__pyx_t_1) {

      /* "symengine/lib/symengine_wrapper.pyx":5406
 * 
 *         if as_scipy:
 *             return ret.as_scipy_low_level_callable()             # <<<<<<<<<<<<<<
 *         return ret
 *     elif backend == "lambda":
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = ((PyObject *)__pyx_v_ret);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_6 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
        __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_as_scipy_low_level_callable, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5406, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
      }
      __pyx_r = __pyx_t_5;
      __pyx_t_5 = 0;
      goto __pyx_L0;

      /* "symengine/lib/symengine_wrapper.pyx":5405
 *             raise ValueError("Unknown numpy dtype.")
 * 
 *         if as_scipy:             # <<<<<<<<<<<<<<
 *             return ret.as_scipy_low_level_callable()
 *         return ret
*/
    }

    /* "symengine/lib/symengine_wrapper.pyx":5407
 *         if as_scipy:
 *             return ret.as_scipy_low_level_callable()
 *         return ret             # <<<<<<<<<<<<<<
 *     elif backend == "lambda":
 *         pass
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF((PyObject *)__pyx_v_ret);
    __pyx_r = ((PyObject *)__pyx_v_ret);
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":5393
 *         backend_default = 'llvm' if real else 'lambda'
 *         backend = os.getenv('SYMENGINE_LAMBDIFY_BACKEND', backend_default)
 *     if backend == "llvm":             # <<<<<<<<<<<<<<
 *         if dtype == None:
 *             dtype = np.float64
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":5408
 *             return ret.as_scipy_low_level_callable()
 *         return ret
 *     elif backend == "lambda":             # <<<<<<<<<<<<<<
 *         pass
 *     else:
*/
  __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_backend, __pyx_mstate_global->__pyx_n_u_lambda, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 5408, __pyx_L1_error)
  if (__pyx_t_1) {
    goto __pyx_L4;
  }

  /* "symengine/lib/symengine_wrapper.pyx":5411
 *         pass
 *     else:
 *         warnings.warn("Unknown SymEngine backend: %s\nUsing backend='lambda'" % backend)             # <<<<<<<<<<<<<<
 *     if real:
 *         ret = LambdaDouble(args, *exprs, real=real, order=order, cse=cse, **kwargs)
*/
  /*else*/ {
    __pyx_t_2 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_warnings); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5411, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_warn); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5411, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyUnicode_FormatSafe(__pyx_mstate_global->__pyx_kp_u_Unknown_SymEngine_backend_s_Usin, __pyx_v_backend); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5411, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_7);
      assert(__pyx_t_2);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
      __pyx_t_6 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
      __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5411, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_L4:;

  /* "symengine/lib/symengine_wrapper.pyx":5412
 *     else:
 *         warnings.warn("Unknown SymEngine backend: %s\nUsing backend='lambda'" % backend)
 *     if real:             # <<<<<<<<<<<<<<
 *         ret = LambdaDouble(args, *exprs, real=real, order=order, cse=cse, **kwargs)
 *     else:
*/
  __pyx_t_1 = (__pyx_v_real != 0);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":5413
 *         warnings.warn("Unknown SymEngine backend: %s\nUsing backend='lambda'" % backend)
 *     if real:
 *         ret = LambdaDouble(args, *exprs, real=real, order=order, cse=cse, **kwargs)             # <<<<<<<<<<<<<<
 *     else:
 *         ret = LambdaComplexDouble(args, *exprs, real=real, order=order, cse=cse, **kwargs)
*/
    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5413, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_v_args);
    __Pyx_GIVEREF(__pyx_v_args);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_args) != (0)) __PYX_ERR(0, 5413, __pyx_L1_error);
    __pyx_t_7 = PyNumber_Add(__pyx_t_5, __pyx_v_exprs); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5413, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_3 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5413, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_real); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5413, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_real, __pyx_t_2) < (0)) __PYX_ERR(0, 5413, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_order, __pyx_v_order) < (0)) __PYX_ERR(0, 5413, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_cse, __pyx_v_cse) < (0)) __PYX_ERR(0, 5413, __pyx_L1_error)
    __pyx_t_5 = __pyx_t_3;
    __pyx_t_3 = 0;
    if (__Pyx_MergeKeywords(__pyx_t_5, __pyx_v_kwargs) < (0)) __PYX_ERR(0, 5413, __pyx_L1_error)
    __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LambdaDouble), __pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5413, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_ret = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":5412
 *     else:
 *         warnings.warn("Unknown SymEngine backend: %s\nUsing backend='lambda'" % backend)
 *     if real:             # <<<<<<<<<<<<<<
 *         ret = LambdaDouble(args, *exprs, real=real, order=order, cse=cse, **kwargs)
 *     else:
*/
    goto __pyx_L8;
  }

  /* "symengine/lib/symengine_wrapper.pyx":5415
 *         ret = LambdaDouble(args, *exprs, real=real, order=order, cse=cse, **kwargs)
 *     else:
 *         ret = LambdaComplexDouble(args, *exprs, real=real, order=order, cse=cse, **kwargs)             # <<<<<<<<<<<<<<
 *     if as_scipy:
 *         return ret.as_scipy_low_level_callable()
*/
  /*else*/ {
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5415, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_args);
    __Pyx_GIVEREF(__pyx_v_args);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_args) != (0)) __PYX_ERR(0, 5415, __pyx_L1_error);
    __pyx_t_5 = PyNumber_Add(__pyx_t_3, __pyx_v_exprs); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5415, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_7 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5415, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_real); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5415, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_real, __pyx_t_2) < (0)) __PYX_ERR(0, 5415, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_order, __pyx_v_order) < (0)) __PYX_ERR(0, 5415, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_cse, __pyx_v_cse) < (0)) __PYX_ERR(0, 5415, __pyx_L1_error)
    __pyx_t_3 = __pyx_t_7;
    __pyx_t_7 = 0;
    if (__Pyx_MergeKeywords(__pyx_t_3, __pyx_v_kwargs) < (0)) __PYX_ERR(0, 5415, __pyx_L1_error)
    __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LambdaComplexDouble), __pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5415, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_ret = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify *)__pyx_t_7);
    __pyx_t_7 = 0;
  }
  __pyx_L8:;

  /* "symengine/lib/symengine_wrapper.pyx":5416
 *     else:
 *         ret = LambdaComplexDouble(args, *exprs, real=real, order=order, cse=cse, **kwargs)
 *     if as_scipy:             # <<<<<<<<<<<<<<
 *         return ret.as_scipy_low_level_callable()
 *     return ret
*/
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_as_scipy); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 5416, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":5417
 *         ret = LambdaComplexDouble(args, *exprs, real=real, order=order, cse=cse, **kwargs)
 *     if as_scipy:
 *         return ret.as_scipy_low_level_callable()             # <<<<<<<<<<<<<<
 *     return ret
 * 
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = ((PyObject *)__pyx_v_ret);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_6 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
      __pyx_t_7 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_as_scipy_low_level_callable, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5417, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
    }
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":5416
 *     else:
 *         ret = LambdaComplexDouble(args, *exprs, real=real, order=order, cse=cse, **kwargs)
 *     if as_scipy:             # <<<<<<<<<<<<<<
 *         return ret.as_scipy_low_level_callable()
 *     return ret
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":5418
 *     if as_scipy:
 *         return ret.as_scipy_low_level_callable()
 *     return ret             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_ret);
  __pyx_r = ((PyObject *)__pyx_v_ret);
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":5342
 *     return LLVMLongDouble(args, _load=True)
 * 
 * def Lambdify(args, *exprs, cppbool real=True, backend=None, order='C',             # <<<<<<<<<<<<<<
 *              as_scipy=False, cse=False, dtype=None, **kwargs):
 *     """
*/

  /* 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_7);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.Lambdify", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_backend_default);
  __Pyx_XDECREF((PyObject *)__pyx_v_ret);
  __Pyx_XDECREF(__pyx_v_backend);
  __Pyx_XDECREF(__pyx_v_dtype);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":5421
 * 
 * 
 * def LambdifyCSE(args, *exprs, order='C', **kwargs):             # <<<<<<<<<<<<<<
 *     """ Analogous with Lambdify but performs common subexpression elimination.
 *     """
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_195LambdifyCSE(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9symengine_3lib_17symengine_wrapper_194LambdifyCSE, " Analogous with Lambdify but performs common subexpression elimination.\n    ");
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_195LambdifyCSE = {"LambdifyCSE", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_195LambdifyCSE, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9symengine_3lib_17symengine_wrapper_194LambdifyCSE};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_195LambdifyCSE(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_v_order = 0;
  PyObject *__pyx_v_exprs = 0;
  PyObject *__pyx_v_kwargs = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("LambdifyCSE (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  __pyx_v_exprs = __Pyx_ArgsSlice_FASTCALL(__pyx_args, 1, __pyx_nargs);
  if (unlikely(!__pyx_v_exprs)) {
    __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_v_exprs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_args,&__pyx_mstate_global->__pyx_n_u_order,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 5421, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        default:
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5421, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      const Py_ssize_t used_pos_args = (kwd_pos_args < 1) ? kwd_pos_args : 1;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, __pyx_kwds_len, "LambdifyCSE", 1) < (0)) __PYX_ERR(0, 5421, __pyx_L3_error)
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_n_u_C)));
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("LambdifyCSE", 0, 1, 1, i); __PYX_ERR(0, 5421, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs < 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5421, __pyx_L3_error)
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_n_u_C)));
    }
    __pyx_v_args = values[0];
    __pyx_v_order = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("LambdifyCSE", 0, 1, 1, __pyx_nargs); __PYX_ERR(0, 5421, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_exprs); __pyx_v_exprs = 0;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.LambdifyCSE", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_194LambdifyCSE(__pyx_self, __pyx_v_args, __pyx_v_order, __pyx_v_exprs, __pyx_v_kwargs);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_exprs);
  __Pyx_DECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_194LambdifyCSE(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_args, PyObject *__pyx_v_order, PyObject *__pyx_v_exprs, PyObject *__pyx_v_kwargs) {
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("LambdifyCSE", 0);

  /* "symengine/lib/symengine_wrapper.pyx":5424
 *     """ Analogous with Lambdify but performs common subexpression elimination.
 *     """
 *     warnings.warn("LambdifyCSE is deprecated. Use Lambdify(..., cse=True)", DeprecationWarning)             # <<<<<<<<<<<<<<
 *     return Lambdify(args, *exprs, cse=True, order=order, **kwargs)
 * 
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_warnings); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5424, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_warn); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5424, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_LambdifyCSE_is_deprecated_Use_La, ((PyObject *)(((PyTypeObject*)PyExc_DeprecationWarning)))};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5424, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5425
 *     """
 *     warnings.warn("LambdifyCSE is deprecated. Use Lambdify(..., cse=True)", DeprecationWarning)
 *     return Lambdify(args, *exprs, cse=True, order=order, **kwargs)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_Lambdify); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5425, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5425, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_v_args);
  __Pyx_GIVEREF(__pyx_v_args);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_args) != (0)) __PYX_ERR(0, 5425, __pyx_L1_error);
  __pyx_t_2 = PyNumber_Add(__pyx_t_4, __pyx_v_exprs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5425, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5425, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_cse, Py_True) < (0)) __PYX_ERR(0, 5425, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_order, __pyx_v_order) < (0)) __PYX_ERR(0, 5425, __pyx_L1_error)
  __pyx_t_4 = __pyx_t_3;
  __pyx_t_3 = 0;
  if (__Pyx_MergeKeywords(__pyx_t_4, __pyx_v_kwargs) < (0)) __PYX_ERR(0, 5425, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5425, __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_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":5421
 * 
 * 
 * def LambdifyCSE(args, *exprs, order='C', **kwargs):             # <<<<<<<<<<<<<<
 *     """ Analogous with Lambdify but performs common subexpression elimination.
 *     """
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.LambdifyCSE", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":5428
 * 
 * 
 * def ccode(expr):             # <<<<<<<<<<<<<<
 *     cdef Basic expr_ = sympify(expr)
 *     return symengine.ccode(deref(expr_.thisptr)).decode("utf-8")
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_197ccode(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_197ccode = {"ccode", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_197ccode, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_197ccode(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_expr = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ccode (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_expr,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 5428, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5428, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "ccode", 0) < (0)) __PYX_ERR(0, 5428, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("ccode", 1, 1, 1, i); __PYX_ERR(0, 5428, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5428, __pyx_L3_error)
    }
    __pyx_v_expr = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("ccode", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 5428, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.ccode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_196ccode(__pyx_self, __pyx_v_expr);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_196ccode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_expr) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_expr_ = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  std::string __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("ccode", 0);

  /* "symengine/lib/symengine_wrapper.pyx":5429
 * 
 * def ccode(expr):
 *     cdef Basic expr_ = sympify(expr)             # <<<<<<<<<<<<<<
 *     return symengine.ccode(deref(expr_.thisptr)).decode("utf-8")
 * 
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5429, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_expr};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5429, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 5429, __pyx_L1_error)
  __pyx_v_expr_ = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5430
 * def ccode(expr):
 *     cdef Basic expr_ = sympify(expr)
 *     return symengine.ccode(deref(expr_.thisptr)).decode("utf-8")             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_5 = SymEngine::ccode((*__pyx_v_expr_->thisptr));
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 5430, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_decode_cpp_string(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5), 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5430, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":5428
 * 
 * 
 * def ccode(expr):             # <<<<<<<<<<<<<<
 *     cdef Basic expr_ = sympify(expr)
 *     return symengine.ccode(deref(expr_.thisptr)).decode("utf-8")
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.ccode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_expr_);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":5433
 * 
 * 
 * def piecewise(*v):             # <<<<<<<<<<<<<<
 *     cdef symengine.PiecewiseVec vec
 *     cdef pair[rcp_const_basic, RCP[symengine.const_Boolean]] p
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_199piecewise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_199piecewise = {"piecewise", (PyCFunction)(void(*)(void))(PyCFunctionWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_199piecewise, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_199piecewise(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_v = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("piecewise (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("piecewise", __pyx_kwds); return NULL;}
  __Pyx_INCREF(__pyx_args);
  __pyx_v_v = __pyx_args;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_198piecewise(__pyx_self, __pyx_v_v);

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_198piecewise(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_v) {
  SymEngine::PiecewiseVec __pyx_v_vec;
  std::pair<SymEngine::RCP<const SymEngine::Basic>,SymEngine::RCP<const SymEngine::Boolean> >  __pyx_v_p;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_e = 0;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Boolean *__pyx_v_b = 0;
  PyObject *__pyx_v_expr = NULL;
  PyObject *__pyx_v_rel = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *(*__pyx_t_7)(PyObject *);
  size_t __pyx_t_8;
  SymEngine::RCP<const SymEngine::Basic> __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("piecewise", 0);

  /* "symengine/lib/symengine_wrapper.pyx":5438
 *     cdef Basic e
 *     cdef Boolean b
 *     for expr, rel in v:             # <<<<<<<<<<<<<<
 *         e = sympify(expr)
 *         b = sympify(rel)
*/
  __pyx_t_1 = __pyx_v_v; __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = 0;
  for (;;) {
    {
      Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
      #if !CYTHON_ASSUME_SAFE_SIZE
      if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 5438, __pyx_L1_error)
      #endif
      if (__pyx_t_2 >= __pyx_temp) break;
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_3 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2));
    #else
    __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2);
    #endif
    ++__pyx_t_2;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5438, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) {
      PyObject* sequence = __pyx_t_3;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 5438, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0);
        __Pyx_INCREF(__pyx_t_4);
        __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1);
        __Pyx_INCREF(__pyx_t_5);
      } else {
        __pyx_t_4 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference);
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5438, __pyx_L1_error)
        __Pyx_XGOTREF(__pyx_t_4);
        __pyx_t_5 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference);
        if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5438, __pyx_L1_error)
        __Pyx_XGOTREF(__pyx_t_5);
      }
      #else
      __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5438, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5438, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      #endif
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5438, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_6);
      index = 0; __pyx_t_4 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_4)) goto __pyx_L5_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_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_5);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < (0)) __PYX_ERR(0, 5438, __pyx_L1_error)
      __pyx_t_7 = NULL;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      goto __pyx_L6_unpacking_done;
      __pyx_L5_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_7 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 5438, __pyx_L1_error)
      __pyx_L6_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_expr, __pyx_t_4);
    __pyx_t_4 = 0;
    __Pyx_XDECREF_SET(__pyx_v_rel, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":5439
 *     cdef Boolean b
 *     for expr, rel in v:
 *         e = sympify(expr)             # <<<<<<<<<<<<<<
 *         b = sympify(rel)
 *         p.first = <rcp_const_basic>e.thisptr
*/
    __pyx_t_5 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5439, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_8 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      assert(__pyx_t_5);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
      __pyx_t_8 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_expr};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5439, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 5439, __pyx_L1_error)
    __Pyx_XDECREF_SET(__pyx_v_e, ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":5440
 *     for expr, rel in v:
 *         e = sympify(expr)
 *         b = sympify(rel)             # <<<<<<<<<<<<<<
 *         p.first = <rcp_const_basic>e.thisptr
 *         p.second = <RCP[symengine.const_Boolean]>symengine.rcp_static_cast_Boolean(b.thisptr)
*/
    __pyx_t_4 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5440, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_8 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
      assert(__pyx_t_4);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
      __pyx_t_8 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_rel};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5440, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Boolean))))) __PYX_ERR(0, 5440, __pyx_L1_error)
    __Pyx_XDECREF_SET(__pyx_v_b, ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Boolean *)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":5441
 *         e = sympify(expr)
 *         b = sympify(rel)
 *         p.first = <rcp_const_basic>e.thisptr             # <<<<<<<<<<<<<<
 *         p.second = <RCP[symengine.const_Boolean]>symengine.rcp_static_cast_Boolean(b.thisptr)
 *         vec.push_back(p)
*/
    __pyx_v_p.first = ((SymEngine::RCP<const SymEngine::Basic>)__pyx_v_e->thisptr);

    /* "symengine/lib/symengine_wrapper.pyx":5442
 *         b = sympify(rel)
 *         p.first = <rcp_const_basic>e.thisptr
 *         p.second = <RCP[symengine.const_Boolean]>symengine.rcp_static_cast_Boolean(b.thisptr)             # <<<<<<<<<<<<<<
 *         vec.push_back(p)
 *     return c2py(symengine.piecewise(move[symengine.PiecewiseVec](vec)))
*/
    __pyx_v_p.second = ((SymEngine::RCP<const SymEngine::Boolean> )SymEngine::rcp_static_cast<const SymEngine::Boolean>(__pyx_v_b->__pyx_base.__pyx_base.thisptr));

    /* "symengine/lib/symengine_wrapper.pyx":5443
 *         p.first = <rcp_const_basic>e.thisptr
 *         p.second = <RCP[symengine.const_Boolean]>symengine.rcp_static_cast_Boolean(b.thisptr)
 *         vec.push_back(p)             # <<<<<<<<<<<<<<
 *     return c2py(symengine.piecewise(move[symengine.PiecewiseVec](vec)))
 * 
*/
    try {
      __pyx_v_vec.push_back(__pyx_v_p);
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(0, 5443, __pyx_L1_error)
    }

    /* "symengine/lib/symengine_wrapper.pyx":5438
 *     cdef Basic e
 *     cdef Boolean b
 *     for expr, rel in v:             # <<<<<<<<<<<<<<
 *         e = sympify(expr)
 *         b = sympify(rel)
*/
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5444
 *         p.second = <RCP[symengine.const_Boolean]>symengine.rcp_static_cast_Boolean(b.thisptr)
 *         vec.push_back(p)
 *     return c2py(symengine.piecewise(move[symengine.PiecewiseVec](vec)))             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_9 = SymEngine::piecewise(cython_std::move<SymEngine::PiecewiseVec>(__pyx_v_vec));
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 5444, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_9)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5444, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":5433
 * 
 * 
 * def piecewise(*v):             # <<<<<<<<<<<<<<
 *     cdef symengine.PiecewiseVec vec
 *     cdef pair[rcp_const_basic, RCP[symengine.const_Boolean]] p
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.piecewise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_e);
  __Pyx_XDECREF((PyObject *)__pyx_v_b);
  __Pyx_XDECREF(__pyx_v_expr);
  __Pyx_XDECREF(__pyx_v_rel);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":5447
 * 
 * 
 * def interval(start, end, left_open=False, right_open=False):             # <<<<<<<<<<<<<<
 *     if isinstance(start, NegativeInfinity):
 *         left_open = True
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_201interval(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_201interval = {"interval", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_201interval, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_201interval(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_start = 0;
  PyObject *__pyx_v_end = 0;
  PyObject *__pyx_v_left_open = 0;
  PyObject *__pyx_v_right_open = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("interval (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_start,&__pyx_mstate_global->__pyx_n_u_end,&__pyx_mstate_global->__pyx_n_u_left_open,&__pyx_mstate_global->__pyx_n_u_right_open,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 5447, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 5447, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 5447, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5447, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5447, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "interval", 0) < (0)) __PYX_ERR(0, 5447, __pyx_L3_error)
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False)));
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False)));
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("interval", 0, 2, 4, i); __PYX_ERR(0, 5447, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 5447, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 5447, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5447, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5447, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False)));
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False)));
    }
    __pyx_v_start = values[0];
    __pyx_v_end = values[1];
    __pyx_v_left_open = values[2];
    __pyx_v_right_open = values[3];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("interval", 0, 2, 4, __pyx_nargs); __PYX_ERR(0, 5447, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.interval", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_200interval(__pyx_self, __pyx_v_start, __pyx_v_end, __pyx_v_left_open, __pyx_v_right_open);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_200interval(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_start, PyObject *__pyx_v_end, PyObject *__pyx_v_left_open, PyObject *__pyx_v_right_open) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Number *__pyx_v_start_ = 0;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Number *__pyx_v_end_ = 0;
  bool __pyx_v_left_open_;
  bool __pyx_v_right_open_;
  SymEngine::RCP<SymEngine::Number const >  __pyx_v_n1;
  SymEngine::RCP<SymEngine::Number const >  __pyx_v_n2;
  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;
  size_t __pyx_t_5;
  bool __pyx_t_6;
  SymEngine::RCP<const SymEngine::Basic> __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("interval", 0);
  __Pyx_INCREF(__pyx_v_left_open);
  __Pyx_INCREF(__pyx_v_right_open);

  /* "symengine/lib/symengine_wrapper.pyx":5448
 * 
 * def interval(start, end, left_open=False, right_open=False):
 *     if isinstance(start, NegativeInfinity):             # <<<<<<<<<<<<<<
 *         left_open = True
 *     if isinstance(end, Infinity):
*/
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_start, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_NegativeInfinity); 
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":5449
 * def interval(start, end, left_open=False, right_open=False):
 *     if isinstance(start, NegativeInfinity):
 *         left_open = True             # <<<<<<<<<<<<<<
 *     if isinstance(end, Infinity):
 *         right_open = True
*/
    __Pyx_INCREF(Py_True);
    __Pyx_DECREF_SET(__pyx_v_left_open, Py_True);

    /* "symengine/lib/symengine_wrapper.pyx":5448
 * 
 * def interval(start, end, left_open=False, right_open=False):
 *     if isinstance(start, NegativeInfinity):             # <<<<<<<<<<<<<<
 *         left_open = True
 *     if isinstance(end, Infinity):
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":5450
 *     if isinstance(start, NegativeInfinity):
 *         left_open = True
 *     if isinstance(end, Infinity):             # <<<<<<<<<<<<<<
 *         right_open = True
 *     cdef Number start_ = sympify(start)
*/
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_end, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Infinity); 
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":5451
 *         left_open = True
 *     if isinstance(end, Infinity):
 *         right_open = True             # <<<<<<<<<<<<<<
 *     cdef Number start_ = sympify(start)
 *     cdef Number end_ = sympify(end)
*/
    __Pyx_INCREF(Py_True);
    __Pyx_DECREF_SET(__pyx_v_right_open, Py_True);

    /* "symengine/lib/symengine_wrapper.pyx":5450
 *     if isinstance(start, NegativeInfinity):
 *         left_open = True
 *     if isinstance(end, Infinity):             # <<<<<<<<<<<<<<
 *         right_open = True
 *     cdef Number start_ = sympify(start)
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":5452
 *     if isinstance(end, Infinity):
 *         right_open = True
 *     cdef Number start_ = sympify(start)             # <<<<<<<<<<<<<<
 *     cdef Number end_ = sympify(end)
 *     cdef cppbool left_open_ = left_open
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5452, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_start};
    __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5452, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Number))))) __PYX_ERR(0, 5452, __pyx_L1_error)
  __pyx_v_start_ = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Number *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5453
 *         right_open = True
 *     cdef Number start_ = sympify(start)
 *     cdef Number end_ = sympify(end)             # <<<<<<<<<<<<<<
 *     cdef cppbool left_open_ = left_open
 *     cdef cppbool right_open_ = right_open
*/
  __pyx_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5453, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_end};
    __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5453, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Number))))) __PYX_ERR(0, 5453, __pyx_L1_error)
  __pyx_v_end_ = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Number *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5454
 *     cdef Number start_ = sympify(start)
 *     cdef Number end_ = sympify(end)
 *     cdef cppbool left_open_ = left_open             # <<<<<<<<<<<<<<
 *     cdef cppbool right_open_ = right_open
 *     cdef RCP[const symengine.Number] n1 = symengine.rcp_static_cast_Number(start_.thisptr)
*/
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_left_open); if (unlikely((__pyx_t_6 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 5454, __pyx_L1_error)
  __pyx_v_left_open_ = __pyx_t_6;

  /* "symengine/lib/symengine_wrapper.pyx":5455
 *     cdef Number end_ = sympify(end)
 *     cdef cppbool left_open_ = left_open
 *     cdef cppbool right_open_ = right_open             # <<<<<<<<<<<<<<
 *     cdef RCP[const symengine.Number] n1 = symengine.rcp_static_cast_Number(start_.thisptr)
 *     cdef RCP[const symengine.Number] n2 = symengine.rcp_static_cast_Number(end_.thisptr)
*/
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_right_open); if (unlikely((__pyx_t_6 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 5455, __pyx_L1_error)
  __pyx_v_right_open_ = __pyx_t_6;

  /* "symengine/lib/symengine_wrapper.pyx":5456
 *     cdef cppbool left_open_ = left_open
 *     cdef cppbool right_open_ = right_open
 *     cdef RCP[const symengine.Number] n1 = symengine.rcp_static_cast_Number(start_.thisptr)             # <<<<<<<<<<<<<<
 *     cdef RCP[const symengine.Number] n2 = symengine.rcp_static_cast_Number(end_.thisptr)
 *     return c2py(symengine.interval(n1, n2, left_open_, right_open_))
*/
  __pyx_v_n1 = SymEngine::rcp_static_cast<const SymEngine::Number>(__pyx_v_start_->__pyx_base.__pyx_base.thisptr);

  /* "symengine/lib/symengine_wrapper.pyx":5457
 *     cdef cppbool right_open_ = right_open
 *     cdef RCP[const symengine.Number] n1 = symengine.rcp_static_cast_Number(start_.thisptr)
 *     cdef RCP[const symengine.Number] n2 = symengine.rcp_static_cast_Number(end_.thisptr)             # <<<<<<<<<<<<<<
 *     return c2py(symengine.interval(n1, n2, left_open_, right_open_))
 * 
*/
  __pyx_v_n2 = SymEngine::rcp_static_cast<const SymEngine::Number>(__pyx_v_end_->__pyx_base.__pyx_base.thisptr);

  /* "symengine/lib/symengine_wrapper.pyx":5458
 *     cdef RCP[const symengine.Number] n1 = symengine.rcp_static_cast_Number(start_.thisptr)
 *     cdef RCP[const symengine.Number] n2 = symengine.rcp_static_cast_Number(end_.thisptr)
 *     return c2py(symengine.interval(n1, n2, left_open_, right_open_))             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_7 = SymEngine::interval(__pyx_v_n1, __pyx_v_n2, __pyx_v_left_open_, __pyx_v_right_open_);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 5458, __pyx_L1_error)
  }
  __pyx_t_2 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_7)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5458, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":5447
 * 
 * 
 * def interval(start, end, left_open=False, right_open=False):             # <<<<<<<<<<<<<<
 *     if isinstance(start, NegativeInfinity):
 *         left_open = True
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.interval", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_start_);
  __Pyx_XDECREF((PyObject *)__pyx_v_end_);
  __Pyx_XDECREF(__pyx_v_left_open);
  __Pyx_XDECREF(__pyx_v_right_open);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":5461
 * 
 * 
 * def emptyset():             # <<<<<<<<<<<<<<
 *     return c2py(<rcp_const_basic>(symengine.emptyset()))
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_203emptyset(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_203emptyset = {"emptyset", (PyCFunction)__pyx_pw_9symengine_3lib_17symengine_wrapper_203emptyset, METH_NOARGS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_203emptyset(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("emptyset (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_202emptyset(__pyx_self);

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_202emptyset(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  SymEngine::RCP<SymEngine::EmptySet const >  __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("emptyset", 0);

  /* "symengine/lib/symengine_wrapper.pyx":5462
 * 
 * def emptyset():
 *     return c2py(<rcp_const_basic>(symengine.emptyset()))             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_1 = SymEngine::emptyset();
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 5462, __pyx_L1_error)
  }
  __pyx_t_2 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5462, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":5461
 * 
 * 
 * def emptyset():             # <<<<<<<<<<<<<<
 *     return c2py(<rcp_const_basic>(symengine.emptyset()))
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.emptyset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":5465
 * 
 * 
 * def universalset():             # <<<<<<<<<<<<<<
 *     return c2py(<rcp_const_basic>(symengine.universalset()))
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_205universalset(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_205universalset = {"universalset", (PyCFunction)__pyx_pw_9symengine_3lib_17symengine_wrapper_205universalset, METH_NOARGS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_205universalset(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("universalset (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_204universalset(__pyx_self);

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_204universalset(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  SymEngine::RCP<SymEngine::UniversalSet const >  __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("universalset", 0);

  /* "symengine/lib/symengine_wrapper.pyx":5466
 * 
 * def universalset():
 *     return c2py(<rcp_const_basic>(symengine.universalset()))             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_1 = SymEngine::universalset();
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 5466, __pyx_L1_error)
  }
  __pyx_t_2 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5466, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":5465
 * 
 * 
 * def universalset():             # <<<<<<<<<<<<<<
 *     return c2py(<rcp_const_basic>(symengine.universalset()))
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.universalset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":5469
 * 
 * 
 * def reals():             # <<<<<<<<<<<<<<
 *     return c2py(<rcp_const_basic>(symengine.reals()))
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_207reals(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_207reals = {"reals", (PyCFunction)__pyx_pw_9symengine_3lib_17symengine_wrapper_207reals, METH_NOARGS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_207reals(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("reals (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_206reals(__pyx_self);

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_206reals(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  SymEngine::RCP<SymEngine::Reals const >  __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("reals", 0);

  /* "symengine/lib/symengine_wrapper.pyx":5470
 * 
 * def reals():
 *     return c2py(<rcp_const_basic>(symengine.reals()))             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_1 = SymEngine::reals();
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 5470, __pyx_L1_error)
  }
  __pyx_t_2 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5470, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":5469
 * 
 * 
 * def reals():             # <<<<<<<<<<<<<<
 *     return c2py(<rcp_const_basic>(symengine.reals()))
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.reals", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":5473
 * 
 * 
 * def rationals():             # <<<<<<<<<<<<<<
 *     return c2py(<rcp_const_basic>(symengine.rationals()))
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_209rationals(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_209rationals = {"rationals", (PyCFunction)__pyx_pw_9symengine_3lib_17symengine_wrapper_209rationals, METH_NOARGS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_209rationals(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("rationals (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_208rationals(__pyx_self);

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_208rationals(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  SymEngine::RCP<SymEngine::Rationals const >  __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("rationals", 0);

  /* "symengine/lib/symengine_wrapper.pyx":5474
 * 
 * def rationals():
 *     return c2py(<rcp_const_basic>(symengine.rationals()))             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_1 = SymEngine::rationals();
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 5474, __pyx_L1_error)
  }
  __pyx_t_2 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5474, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":5473
 * 
 * 
 * def rationals():             # <<<<<<<<<<<<<<
 *     return c2py(<rcp_const_basic>(symengine.rationals()))
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.rationals", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":5477
 * 
 * 
 * def integers():             # <<<<<<<<<<<<<<
 *     return c2py(<rcp_const_basic>(symengine.integers()))
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_211integers(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_211integers = {"integers", (PyCFunction)__pyx_pw_9symengine_3lib_17symengine_wrapper_211integers, METH_NOARGS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_211integers(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("integers (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_210integers(__pyx_self);

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_210integers(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  SymEngine::RCP<SymEngine::Integers const >  __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("integers", 0);

  /* "symengine/lib/symengine_wrapper.pyx":5478
 * 
 * def integers():
 *     return c2py(<rcp_const_basic>(symengine.integers()))             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_1 = SymEngine::integers();
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 5478, __pyx_L1_error)
  }
  __pyx_t_2 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5478, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":5477
 * 
 * 
 * def integers():             # <<<<<<<<<<<<<<
 *     return c2py(<rcp_const_basic>(symengine.integers()))
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.integers", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":5481
 * 
 * 
 * def finiteset(*args):             # <<<<<<<<<<<<<<
 *     cdef symengine.set_basic s
 *     cdef Basic e_
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_213finiteset(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_213finiteset = {"finiteset", (PyCFunction)(void(*)(void))(PyCFunctionWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_213finiteset, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_213finiteset(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_args = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("finiteset (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("finiteset", __pyx_kwds); return NULL;}
  __Pyx_INCREF(__pyx_args);
  __pyx_v_args = __pyx_args;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_212finiteset(__pyx_self, __pyx_v_args);

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_212finiteset(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_args) {
  SymEngine::set_basic __pyx_v_s;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_e_ = 0;
  PyObject *__pyx_v_e = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  SymEngine::RCP<SymEngine::Set const >  __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("finiteset", 0);

  /* "symengine/lib/symengine_wrapper.pyx":5484
 *     cdef symengine.set_basic s
 *     cdef Basic e_
 *     for e in args:             # <<<<<<<<<<<<<<
 *         e_ = sympify(e)
 *         s.insert(<rcp_const_basic>(e_.thisptr))
*/
  __pyx_t_1 = __pyx_v_args; __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = 0;
  for (;;) {
    {
      Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
      #if !CYTHON_ASSUME_SAFE_SIZE
      if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 5484, __pyx_L1_error)
      #endif
      if (__pyx_t_2 >= __pyx_temp) break;
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_3 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2));
    #else
    __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2);
    #endif
    ++__pyx_t_2;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5484, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_XDECREF_SET(__pyx_v_e, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":5485
 *     cdef Basic e_
 *     for e in args:
 *         e_ = sympify(e)             # <<<<<<<<<<<<<<
 *         s.insert(<rcp_const_basic>(e_.thisptr))
 *     return c2py(<rcp_const_basic>(symengine.finiteset(s)))
*/
    __pyx_t_4 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5485, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
      assert(__pyx_t_4);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
      __pyx_t_6 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_e};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5485, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 5485, __pyx_L1_error)
    __Pyx_XDECREF_SET(__pyx_v_e_, ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":5486
 *     for e in args:
 *         e_ = sympify(e)
 *         s.insert(<rcp_const_basic>(e_.thisptr))             # <<<<<<<<<<<<<<
 *     return c2py(<rcp_const_basic>(symengine.finiteset(s)))
 * 
*/
    try {
      __pyx_v_s.insert(((SymEngine::RCP<const SymEngine::Basic>)__pyx_v_e_->thisptr));
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(0, 5486, __pyx_L1_error)
    }

    /* "symengine/lib/symengine_wrapper.pyx":5484
 *     cdef symengine.set_basic s
 *     cdef Basic e_
 *     for e in args:             # <<<<<<<<<<<<<<
 *         e_ = sympify(e)
 *         s.insert(<rcp_const_basic>(e_.thisptr))
*/
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5487
 *         e_ = sympify(e)
 *         s.insert(<rcp_const_basic>(e_.thisptr))
 *     return c2py(<rcp_const_basic>(symengine.finiteset(s)))             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_7 = SymEngine::finiteset(__pyx_v_s);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 5487, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)__pyx_t_7)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5487, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":5481
 * 
 * 
 * def finiteset(*args):             # <<<<<<<<<<<<<<
 *     cdef symengine.set_basic s
 *     cdef Basic e_
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.finiteset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_e_);
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":5490
 * 
 * 
 * def contains(expr, sset):             # <<<<<<<<<<<<<<
 *     cdef Basic expr_ = sympify(expr)
 *     cdef Set sset_ = sympify(sset)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_215contains(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_215contains = {"contains", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_215contains, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_215contains(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_expr = 0;
  PyObject *__pyx_v_sset = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("contains (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_expr,&__pyx_mstate_global->__pyx_n_u_sset,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 5490, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5490, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5490, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "contains", 0) < (0)) __PYX_ERR(0, 5490, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("contains", 1, 2, 2, i); __PYX_ERR(0, 5490, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5490, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5490, __pyx_L3_error)
    }
    __pyx_v_expr = values[0];
    __pyx_v_sset = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("contains", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 5490, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.contains", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_214contains(__pyx_self, __pyx_v_expr, __pyx_v_sset);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_214contains(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_expr, PyObject *__pyx_v_sset) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_expr_ = 0;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Set *__pyx_v_sset_ = 0;
  SymEngine::RCP<SymEngine::Set const >  __pyx_v_s;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("contains", 0);

  /* "symengine/lib/symengine_wrapper.pyx":5491
 * 
 * def contains(expr, sset):
 *     cdef Basic expr_ = sympify(expr)             # <<<<<<<<<<<<<<
 *     cdef Set sset_ = sympify(sset)
 *     cdef RCP[const symengine.Set] s = symengine.rcp_static_cast_Set(sset_.thisptr)
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5491, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_expr};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5491, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 5491, __pyx_L1_error)
  __pyx_v_expr_ = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5492
 * def contains(expr, sset):
 *     cdef Basic expr_ = sympify(expr)
 *     cdef Set sset_ = sympify(sset)             # <<<<<<<<<<<<<<
 *     cdef RCP[const symengine.Set] s = symengine.rcp_static_cast_Set(sset_.thisptr)
 *     return c2py(<rcp_const_basic>(symengine.contains(expr_.thisptr, s)))
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5492, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_sset};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5492, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Set))))) __PYX_ERR(0, 5492, __pyx_L1_error)
  __pyx_v_sset_ = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Set *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5493
 *     cdef Basic expr_ = sympify(expr)
 *     cdef Set sset_ = sympify(sset)
 *     cdef RCP[const symengine.Set] s = symengine.rcp_static_cast_Set(sset_.thisptr)             # <<<<<<<<<<<<<<
 *     return c2py(<rcp_const_basic>(symengine.contains(expr_.thisptr, s)))
 * 
*/
  __pyx_v_s = SymEngine::rcp_static_cast<const SymEngine::Set>(__pyx_v_sset_->__pyx_base.__pyx_base.thisptr);

  /* "symengine/lib/symengine_wrapper.pyx":5494
 *     cdef Set sset_ = sympify(sset)
 *     cdef RCP[const symengine.Set] s = symengine.rcp_static_cast_Set(sset_.thisptr)
 *     return c2py(<rcp_const_basic>(symengine.contains(expr_.thisptr, s)))             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)SymEngine::contains(__pyx_v_expr_->thisptr, __pyx_v_s))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5494, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":5490
 * 
 * 
 * def contains(expr, sset):             # <<<<<<<<<<<<<<
 *     cdef Basic expr_ = sympify(expr)
 *     cdef Set sset_ = sympify(sset)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.contains", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_expr_);
  __Pyx_XDECREF((PyObject *)__pyx_v_sset_);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":5497
 * 
 * 
 * cdef tribool_py(tribool value):             # <<<<<<<<<<<<<<
 *     if is_indeterminate(value):
 *         return None
*/

static PyObject *__pyx_f_9symengine_3lib_17symengine_wrapper_tribool_py(SymEngine::tribool __pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("tribool_py", 0);

  /* "symengine/lib/symengine_wrapper.pyx":5498
 * 
 * cdef tribool_py(tribool value):
 *     if is_indeterminate(value):             # <<<<<<<<<<<<<<
 *         return None
 *     elif is_true(value):
*/
  __pyx_t_1 = (SymEngine::is_indeterminate(__pyx_v_value) != 0);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":5499
 * cdef tribool_py(tribool value):
 *     if is_indeterminate(value):
 *         return None             # <<<<<<<<<<<<<<
 *     elif is_true(value):
 *         return True
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":5498
 * 
 * cdef tribool_py(tribool value):
 *     if is_indeterminate(value):             # <<<<<<<<<<<<<<
 *         return None
 *     elif is_true(value):
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":5500
 *     if is_indeterminate(value):
 *         return None
 *     elif is_true(value):             # <<<<<<<<<<<<<<
 *         return True
 *     elif is_false(value):
*/
  __pyx_t_1 = (SymEngine::is_true(__pyx_v_value) != 0);
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":5501
 *         return None
 *     elif is_true(value):
 *         return True             # <<<<<<<<<<<<<<
 *     elif is_false(value):
 *         return False
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_True);
    __pyx_r = Py_True;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":5500
 *     if is_indeterminate(value):
 *         return None
 *     elif is_true(value):             # <<<<<<<<<<<<<<
 *         return True
 *     elif is_false(value):
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":5502
 *     elif is_true(value):
 *         return True
 *     elif is_false(value):             # <<<<<<<<<<<<<<
 *         return False
 *     else:
*/
  __pyx_t_1 = (SymEngine::is_false(__pyx_v_value) != 0);
  if (likely(__pyx_t_1)) {

    /* "symengine/lib/symengine_wrapper.pyx":5503
 *         return True
 *     elif is_false(value):
 *         return False             # <<<<<<<<<<<<<<
 *     else:
 *         raise RuntimeError("Internal error in symengine.py, tribool got a fourth value.")
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_False);
    __pyx_r = Py_False;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":5502
 *     elif is_true(value):
 *         return True
 *     elif is_false(value):             # <<<<<<<<<<<<<<
 *         return False
 *     else:
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":5505
 *         return False
 *     else:
 *         raise RuntimeError("Internal error in symengine.py, tribool got a fourth value.")             # <<<<<<<<<<<<<<
 * 
 * 
*/
  /*else*/ {
    __pyx_t_3 = NULL;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Internal_error_in_symengine_py_t};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5505, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 5505, __pyx_L1_error)
  }

  /* "symengine/lib/symengine_wrapper.pyx":5497
 * 
 * 
 * cdef tribool_py(tribool value):             # <<<<<<<<<<<<<<
 *     if is_indeterminate(value):
 *         return None
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.tribool_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":5508
 * 
 * 
 * def is_zero(expr):             # <<<<<<<<<<<<<<
 *     cdef Basic expr_ = sympify(expr)
 *     cdef tribool tbool = symengine.is_zero(deref(expr_.thisptr))
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_217is_zero(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_217is_zero = {"is_zero", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_217is_zero, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_217is_zero(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_expr = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_zero (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_expr,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 5508, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5508, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "is_zero", 0) < (0)) __PYX_ERR(0, 5508, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("is_zero", 1, 1, 1, i); __PYX_ERR(0, 5508, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5508, __pyx_L3_error)
    }
    __pyx_v_expr = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_zero", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 5508, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.is_zero", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_216is_zero(__pyx_self, __pyx_v_expr);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_216is_zero(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_expr) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_expr_ = 0;
  SymEngine::tribool __pyx_v_tbool;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_zero", 0);

  /* "symengine/lib/symengine_wrapper.pyx":5509
 * 
 * def is_zero(expr):
 *     cdef Basic expr_ = sympify(expr)             # <<<<<<<<<<<<<<
 *     cdef tribool tbool = symengine.is_zero(deref(expr_.thisptr))
 *     return tribool_py(tbool)
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5509, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_expr};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5509, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 5509, __pyx_L1_error)
  __pyx_v_expr_ = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5510
 * def is_zero(expr):
 *     cdef Basic expr_ = sympify(expr)
 *     cdef tribool tbool = symengine.is_zero(deref(expr_.thisptr))             # <<<<<<<<<<<<<<
 *     return tribool_py(tbool)
 * 
*/
  __pyx_v_tbool = SymEngine::is_zero((*__pyx_v_expr_->thisptr));

  /* "symengine/lib/symengine_wrapper.pyx":5511
 *     cdef Basic expr_ = sympify(expr)
 *     cdef tribool tbool = symengine.is_zero(deref(expr_.thisptr))
 *     return tribool_py(tbool)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_tribool_py(__pyx_v_tbool); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5511, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":5508
 * 
 * 
 * def is_zero(expr):             # <<<<<<<<<<<<<<
 *     cdef Basic expr_ = sympify(expr)
 *     cdef tribool tbool = symengine.is_zero(deref(expr_.thisptr))
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.is_zero", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_expr_);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":5514
 * 
 * 
 * def is_positive(expr):             # <<<<<<<<<<<<<<
 *     cdef Basic expr_ = sympify(expr)
 *     cdef tribool tbool = symengine.is_positive(deref(expr_.thisptr))
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_219is_positive(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_219is_positive = {"is_positive", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_219is_positive, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_219is_positive(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_expr = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_positive (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_expr,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 5514, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5514, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "is_positive", 0) < (0)) __PYX_ERR(0, 5514, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("is_positive", 1, 1, 1, i); __PYX_ERR(0, 5514, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5514, __pyx_L3_error)
    }
    __pyx_v_expr = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_positive", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 5514, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.is_positive", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_218is_positive(__pyx_self, __pyx_v_expr);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_218is_positive(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_expr) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_expr_ = 0;
  SymEngine::tribool __pyx_v_tbool;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_positive", 0);

  /* "symengine/lib/symengine_wrapper.pyx":5515
 * 
 * def is_positive(expr):
 *     cdef Basic expr_ = sympify(expr)             # <<<<<<<<<<<<<<
 *     cdef tribool tbool = symengine.is_positive(deref(expr_.thisptr))
 *     return tribool_py(tbool)
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5515, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_expr};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5515, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 5515, __pyx_L1_error)
  __pyx_v_expr_ = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5516
 * def is_positive(expr):
 *     cdef Basic expr_ = sympify(expr)
 *     cdef tribool tbool = symengine.is_positive(deref(expr_.thisptr))             # <<<<<<<<<<<<<<
 *     return tribool_py(tbool)
 * 
*/
  __pyx_v_tbool = SymEngine::is_positive((*__pyx_v_expr_->thisptr));

  /* "symengine/lib/symengine_wrapper.pyx":5517
 *     cdef Basic expr_ = sympify(expr)
 *     cdef tribool tbool = symengine.is_positive(deref(expr_.thisptr))
 *     return tribool_py(tbool)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_tribool_py(__pyx_v_tbool); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5517, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":5514
 * 
 * 
 * def is_positive(expr):             # <<<<<<<<<<<<<<
 *     cdef Basic expr_ = sympify(expr)
 *     cdef tribool tbool = symengine.is_positive(deref(expr_.thisptr))
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.is_positive", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_expr_);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":5520
 * 
 * 
 * def is_negative(expr):             # <<<<<<<<<<<<<<
 *     cdef Basic expr_ = sympify(expr)
 *     cdef tribool tbool = symengine.is_negative(deref(expr_.thisptr))
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_221is_negative(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_221is_negative = {"is_negative", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_221is_negative, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_221is_negative(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_expr = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_negative (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_expr,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 5520, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5520, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "is_negative", 0) < (0)) __PYX_ERR(0, 5520, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("is_negative", 1, 1, 1, i); __PYX_ERR(0, 5520, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5520, __pyx_L3_error)
    }
    __pyx_v_expr = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_negative", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 5520, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.is_negative", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_220is_negative(__pyx_self, __pyx_v_expr);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_220is_negative(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_expr) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_expr_ = 0;
  SymEngine::tribool __pyx_v_tbool;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_negative", 0);

  /* "symengine/lib/symengine_wrapper.pyx":5521
 * 
 * def is_negative(expr):
 *     cdef Basic expr_ = sympify(expr)             # <<<<<<<<<<<<<<
 *     cdef tribool tbool = symengine.is_negative(deref(expr_.thisptr))
 *     return tribool_py(tbool)
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5521, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_expr};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5521, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 5521, __pyx_L1_error)
  __pyx_v_expr_ = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5522
 * def is_negative(expr):
 *     cdef Basic expr_ = sympify(expr)
 *     cdef tribool tbool = symengine.is_negative(deref(expr_.thisptr))             # <<<<<<<<<<<<<<
 *     return tribool_py(tbool)
 * 
*/
  __pyx_v_tbool = SymEngine::is_negative((*__pyx_v_expr_->thisptr));

  /* "symengine/lib/symengine_wrapper.pyx":5523
 *     cdef Basic expr_ = sympify(expr)
 *     cdef tribool tbool = symengine.is_negative(deref(expr_.thisptr))
 *     return tribool_py(tbool)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_tribool_py(__pyx_v_tbool); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5523, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":5520
 * 
 * 
 * def is_negative(expr):             # <<<<<<<<<<<<<<
 *     cdef Basic expr_ = sympify(expr)
 *     cdef tribool tbool = symengine.is_negative(deref(expr_.thisptr))
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.is_negative", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_expr_);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":5526
 * 
 * 
 * def is_nonpositive(expr):             # <<<<<<<<<<<<<<
 *     cdef Basic expr_ = sympify(expr)
 *     cdef tribool tbool = symengine.is_nonpositive(deref(expr_.thisptr))
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_223is_nonpositive(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_223is_nonpositive = {"is_nonpositive", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_223is_nonpositive, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_223is_nonpositive(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_expr = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_nonpositive (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_expr,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 5526, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5526, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "is_nonpositive", 0) < (0)) __PYX_ERR(0, 5526, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("is_nonpositive", 1, 1, 1, i); __PYX_ERR(0, 5526, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5526, __pyx_L3_error)
    }
    __pyx_v_expr = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_nonpositive", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 5526, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.is_nonpositive", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_222is_nonpositive(__pyx_self, __pyx_v_expr);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_222is_nonpositive(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_expr) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_expr_ = 0;
  SymEngine::tribool __pyx_v_tbool;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_nonpositive", 0);

  /* "symengine/lib/symengine_wrapper.pyx":5527
 * 
 * def is_nonpositive(expr):
 *     cdef Basic expr_ = sympify(expr)             # <<<<<<<<<<<<<<
 *     cdef tribool tbool = symengine.is_nonpositive(deref(expr_.thisptr))
 *     return tribool_py(tbool)
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5527, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_expr};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5527, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 5527, __pyx_L1_error)
  __pyx_v_expr_ = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5528
 * def is_nonpositive(expr):
 *     cdef Basic expr_ = sympify(expr)
 *     cdef tribool tbool = symengine.is_nonpositive(deref(expr_.thisptr))             # <<<<<<<<<<<<<<
 *     return tribool_py(tbool)
 * 
*/
  __pyx_v_tbool = SymEngine::is_nonpositive((*__pyx_v_expr_->thisptr));

  /* "symengine/lib/symengine_wrapper.pyx":5529
 *     cdef Basic expr_ = sympify(expr)
 *     cdef tribool tbool = symengine.is_nonpositive(deref(expr_.thisptr))
 *     return tribool_py(tbool)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_tribool_py(__pyx_v_tbool); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5529, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":5526
 * 
 * 
 * def is_nonpositive(expr):             # <<<<<<<<<<<<<<
 *     cdef Basic expr_ = sympify(expr)
 *     cdef tribool tbool = symengine.is_nonpositive(deref(expr_.thisptr))
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.is_nonpositive", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_expr_);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":5532
 * 
 * 
 * def is_nonnegative(expr):             # <<<<<<<<<<<<<<
 *     cdef Basic expr_ = sympify(expr)
 *     cdef tribool tbool = symengine.is_nonnegative(deref(expr_.thisptr))
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_225is_nonnegative(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_225is_nonnegative = {"is_nonnegative", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_225is_nonnegative, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_225is_nonnegative(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_expr = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_nonnegative (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_expr,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 5532, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5532, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "is_nonnegative", 0) < (0)) __PYX_ERR(0, 5532, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("is_nonnegative", 1, 1, 1, i); __PYX_ERR(0, 5532, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5532, __pyx_L3_error)
    }
    __pyx_v_expr = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_nonnegative", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 5532, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.is_nonnegative", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_224is_nonnegative(__pyx_self, __pyx_v_expr);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_224is_nonnegative(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_expr) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_expr_ = 0;
  SymEngine::tribool __pyx_v_tbool;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_nonnegative", 0);

  /* "symengine/lib/symengine_wrapper.pyx":5533
 * 
 * def is_nonnegative(expr):
 *     cdef Basic expr_ = sympify(expr)             # <<<<<<<<<<<<<<
 *     cdef tribool tbool = symengine.is_nonnegative(deref(expr_.thisptr))
 *     return tribool_py(tbool)
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5533, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_expr};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5533, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 5533, __pyx_L1_error)
  __pyx_v_expr_ = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5534
 * def is_nonnegative(expr):
 *     cdef Basic expr_ = sympify(expr)
 *     cdef tribool tbool = symengine.is_nonnegative(deref(expr_.thisptr))             # <<<<<<<<<<<<<<
 *     return tribool_py(tbool)
 * 
*/
  __pyx_v_tbool = SymEngine::is_nonnegative((*__pyx_v_expr_->thisptr));

  /* "symengine/lib/symengine_wrapper.pyx":5535
 *     cdef Basic expr_ = sympify(expr)
 *     cdef tribool tbool = symengine.is_nonnegative(deref(expr_.thisptr))
 *     return tribool_py(tbool)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_tribool_py(__pyx_v_tbool); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5535, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":5532
 * 
 * 
 * def is_nonnegative(expr):             # <<<<<<<<<<<<<<
 *     cdef Basic expr_ = sympify(expr)
 *     cdef tribool tbool = symengine.is_nonnegative(deref(expr_.thisptr))
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.is_nonnegative", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_expr_);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":5538
 * 
 * 
 * def is_real(expr):             # <<<<<<<<<<<<<<
 *     cdef Basic expr_ = sympify(expr)
 *     cdef tribool tbool = symengine.is_real(deref(expr_.thisptr))
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_227is_real(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_227is_real = {"is_real", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_227is_real, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_227is_real(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_expr = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_real (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_expr,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 5538, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5538, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "is_real", 0) < (0)) __PYX_ERR(0, 5538, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("is_real", 1, 1, 1, i); __PYX_ERR(0, 5538, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5538, __pyx_L3_error)
    }
    __pyx_v_expr = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_real", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 5538, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.is_real", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_226is_real(__pyx_self, __pyx_v_expr);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_226is_real(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_expr) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_expr_ = 0;
  SymEngine::tribool __pyx_v_tbool;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_real", 0);

  /* "symengine/lib/symengine_wrapper.pyx":5539
 * 
 * def is_real(expr):
 *     cdef Basic expr_ = sympify(expr)             # <<<<<<<<<<<<<<
 *     cdef tribool tbool = symengine.is_real(deref(expr_.thisptr))
 *     return tribool_py(tbool)
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5539, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_expr};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5539, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 5539, __pyx_L1_error)
  __pyx_v_expr_ = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5540
 * def is_real(expr):
 *     cdef Basic expr_ = sympify(expr)
 *     cdef tribool tbool = symengine.is_real(deref(expr_.thisptr))             # <<<<<<<<<<<<<<
 *     return tribool_py(tbool)
 * 
*/
  __pyx_v_tbool = SymEngine::is_real((*__pyx_v_expr_->thisptr));

  /* "symengine/lib/symengine_wrapper.pyx":5541
 *     cdef Basic expr_ = sympify(expr)
 *     cdef tribool tbool = symengine.is_real(deref(expr_.thisptr))
 *     return tribool_py(tbool)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_tribool_py(__pyx_v_tbool); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5541, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":5538
 * 
 * 
 * def is_real(expr):             # <<<<<<<<<<<<<<
 *     cdef Basic expr_ = sympify(expr)
 *     cdef tribool tbool = symengine.is_real(deref(expr_.thisptr))
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.is_real", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_expr_);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":5544
 * 
 * 
 * def set_union(*args):             # <<<<<<<<<<<<<<
 *     cdef symengine.set_set s
 *     cdef Set e_
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_229set_union(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_229set_union = {"set_union", (PyCFunction)(void(*)(void))(PyCFunctionWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_229set_union, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_229set_union(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_args = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_union (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("set_union", __pyx_kwds); return NULL;}
  __Pyx_INCREF(__pyx_args);
  __pyx_v_args = __pyx_args;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_228set_union(__pyx_self, __pyx_v_args);

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_228set_union(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_args) {
  SymEngine::set_set __pyx_v_s;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Set *__pyx_v_e_ = 0;
  PyObject *__pyx_v_e = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  SymEngine::RCP<SymEngine::Set const >  __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_union", 0);

  /* "symengine/lib/symengine_wrapper.pyx":5547
 *     cdef symengine.set_set s
 *     cdef Set e_
 *     for e in args:             # <<<<<<<<<<<<<<
 *         e_ = sympify(e)
 *         s.insert(symengine.rcp_static_cast_Set(e_.thisptr))
*/
  __pyx_t_1 = __pyx_v_args; __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = 0;
  for (;;) {
    {
      Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
      #if !CYTHON_ASSUME_SAFE_SIZE
      if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 5547, __pyx_L1_error)
      #endif
      if (__pyx_t_2 >= __pyx_temp) break;
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_3 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2));
    #else
    __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2);
    #endif
    ++__pyx_t_2;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5547, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_XDECREF_SET(__pyx_v_e, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":5548
 *     cdef Set e_
 *     for e in args:
 *         e_ = sympify(e)             # <<<<<<<<<<<<<<
 *         s.insert(symengine.rcp_static_cast_Set(e_.thisptr))
 *     return c2py(<rcp_const_basic>(symengine.set_union(s)))
*/
    __pyx_t_4 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5548, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
      assert(__pyx_t_4);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
      __pyx_t_6 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_e};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5548, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Set))))) __PYX_ERR(0, 5548, __pyx_L1_error)
    __Pyx_XDECREF_SET(__pyx_v_e_, ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Set *)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":5549
 *     for e in args:
 *         e_ = sympify(e)
 *         s.insert(symengine.rcp_static_cast_Set(e_.thisptr))             # <<<<<<<<<<<<<<
 *     return c2py(<rcp_const_basic>(symengine.set_union(s)))
 * 
*/
    try {
      __pyx_v_s.insert(SymEngine::rcp_static_cast<const SymEngine::Set>(__pyx_v_e_->__pyx_base.__pyx_base.thisptr));
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(0, 5549, __pyx_L1_error)
    }

    /* "symengine/lib/symengine_wrapper.pyx":5547
 *     cdef symengine.set_set s
 *     cdef Set e_
 *     for e in args:             # <<<<<<<<<<<<<<
 *         e_ = sympify(e)
 *         s.insert(symengine.rcp_static_cast_Set(e_.thisptr))
*/
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5550
 *         e_ = sympify(e)
 *         s.insert(symengine.rcp_static_cast_Set(e_.thisptr))
 *     return c2py(<rcp_const_basic>(symengine.set_union(s)))             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_7 = SymEngine::set_union(__pyx_v_s);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 5550, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)__pyx_t_7)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5550, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":5544
 * 
 * 
 * def set_union(*args):             # <<<<<<<<<<<<<<
 *     cdef symengine.set_set s
 *     cdef Set e_
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.set_union", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_e_);
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":5553
 * 
 * 
 * def set_intersection(*args):             # <<<<<<<<<<<<<<
 *     cdef symengine.set_set s
 *     cdef Set e_
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_231set_intersection(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_231set_intersection = {"set_intersection", (PyCFunction)(void(*)(void))(PyCFunctionWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_231set_intersection, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_231set_intersection(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_args = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_intersection (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("set_intersection", __pyx_kwds); return NULL;}
  __Pyx_INCREF(__pyx_args);
  __pyx_v_args = __pyx_args;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_230set_intersection(__pyx_self, __pyx_v_args);

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_230set_intersection(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_args) {
  SymEngine::set_set __pyx_v_s;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Set *__pyx_v_e_ = 0;
  PyObject *__pyx_v_e = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  SymEngine::RCP<SymEngine::Set const >  __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_intersection", 0);

  /* "symengine/lib/symengine_wrapper.pyx":5556
 *     cdef symengine.set_set s
 *     cdef Set e_
 *     for e in args:             # <<<<<<<<<<<<<<
 *         e_ = sympify(e)
 *         s.insert(symengine.rcp_static_cast_Set(e_.thisptr))
*/
  __pyx_t_1 = __pyx_v_args; __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = 0;
  for (;;) {
    {
      Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
      #if !CYTHON_ASSUME_SAFE_SIZE
      if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 5556, __pyx_L1_error)
      #endif
      if (__pyx_t_2 >= __pyx_temp) break;
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_3 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2));
    #else
    __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2);
    #endif
    ++__pyx_t_2;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5556, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_XDECREF_SET(__pyx_v_e, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":5557
 *     cdef Set e_
 *     for e in args:
 *         e_ = sympify(e)             # <<<<<<<<<<<<<<
 *         s.insert(symengine.rcp_static_cast_Set(e_.thisptr))
 *     return c2py(<rcp_const_basic>(symengine.set_intersection(s)))
*/
    __pyx_t_4 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5557, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
      assert(__pyx_t_4);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
      __pyx_t_6 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_e};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5557, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Set))))) __PYX_ERR(0, 5557, __pyx_L1_error)
    __Pyx_XDECREF_SET(__pyx_v_e_, ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Set *)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":5558
 *     for e in args:
 *         e_ = sympify(e)
 *         s.insert(symengine.rcp_static_cast_Set(e_.thisptr))             # <<<<<<<<<<<<<<
 *     return c2py(<rcp_const_basic>(symengine.set_intersection(s)))
 * 
*/
    try {
      __pyx_v_s.insert(SymEngine::rcp_static_cast<const SymEngine::Set>(__pyx_v_e_->__pyx_base.__pyx_base.thisptr));
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(0, 5558, __pyx_L1_error)
    }

    /* "symengine/lib/symengine_wrapper.pyx":5556
 *     cdef symengine.set_set s
 *     cdef Set e_
 *     for e in args:             # <<<<<<<<<<<<<<
 *         e_ = sympify(e)
 *         s.insert(symengine.rcp_static_cast_Set(e_.thisptr))
*/
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5559
 *         e_ = sympify(e)
 *         s.insert(symengine.rcp_static_cast_Set(e_.thisptr))
 *     return c2py(<rcp_const_basic>(symengine.set_intersection(s)))             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_7 = SymEngine::set_intersection(__pyx_v_s);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 5559, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)__pyx_t_7)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5559, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":5553
 * 
 * 
 * def set_intersection(*args):             # <<<<<<<<<<<<<<
 *     cdef symengine.set_set s
 *     cdef Set e_
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.set_intersection", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_e_);
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":5562
 * 
 * 
 * def set_complement(universe, container):             # <<<<<<<<<<<<<<
 *     cdef Set universe_ = sympify(universe)
 *     cdef Set container_ = sympify(container)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_233set_complement(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_233set_complement = {"set_complement", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_233set_complement, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_233set_complement(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_universe = 0;
  PyObject *__pyx_v_container = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_complement (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_universe,&__pyx_mstate_global->__pyx_n_u_container,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 5562, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5562, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5562, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "set_complement", 0) < (0)) __PYX_ERR(0, 5562, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("set_complement", 1, 2, 2, i); __PYX_ERR(0, 5562, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5562, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5562, __pyx_L3_error)
    }
    __pyx_v_universe = values[0];
    __pyx_v_container = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set_complement", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 5562, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.set_complement", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_232set_complement(__pyx_self, __pyx_v_universe, __pyx_v_container);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_232set_complement(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_universe, PyObject *__pyx_v_container) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Set *__pyx_v_universe_ = 0;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Set *__pyx_v_container_ = 0;
  SymEngine::RCP<SymEngine::Set const >  __pyx_v_u;
  SymEngine::RCP<SymEngine::Set const >  __pyx_v_c;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  SymEngine::RCP<SymEngine::Set const >  __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_complement", 0);

  /* "symengine/lib/symengine_wrapper.pyx":5563
 * 
 * def set_complement(universe, container):
 *     cdef Set universe_ = sympify(universe)             # <<<<<<<<<<<<<<
 *     cdef Set container_ = sympify(container)
 *     cdef RCP[const symengine.Set] u = symengine.rcp_static_cast_Set(universe_.thisptr)
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5563, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_universe};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5563, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Set))))) __PYX_ERR(0, 5563, __pyx_L1_error)
  __pyx_v_universe_ = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Set *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5564
 * def set_complement(universe, container):
 *     cdef Set universe_ = sympify(universe)
 *     cdef Set container_ = sympify(container)             # <<<<<<<<<<<<<<
 *     cdef RCP[const symengine.Set] u = symengine.rcp_static_cast_Set(universe_.thisptr)
 *     cdef RCP[const symengine.Set] c = symengine.rcp_static_cast_Set(container_.thisptr)
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5564, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_container};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5564, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Set))))) __PYX_ERR(0, 5564, __pyx_L1_error)
  __pyx_v_container_ = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Set *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5565
 *     cdef Set universe_ = sympify(universe)
 *     cdef Set container_ = sympify(container)
 *     cdef RCP[const symengine.Set] u = symengine.rcp_static_cast_Set(universe_.thisptr)             # <<<<<<<<<<<<<<
 *     cdef RCP[const symengine.Set] c = symengine.rcp_static_cast_Set(container_.thisptr)
 *     return c2py(<rcp_const_basic>(symengine.set_complement(u, c)))
*/
  __pyx_v_u = SymEngine::rcp_static_cast<const SymEngine::Set>(__pyx_v_universe_->__pyx_base.__pyx_base.thisptr);

  /* "symengine/lib/symengine_wrapper.pyx":5566
 *     cdef Set container_ = sympify(container)
 *     cdef RCP[const symengine.Set] u = symengine.rcp_static_cast_Set(universe_.thisptr)
 *     cdef RCP[const symengine.Set] c = symengine.rcp_static_cast_Set(container_.thisptr)             # <<<<<<<<<<<<<<
 *     return c2py(<rcp_const_basic>(symengine.set_complement(u, c)))
 * 
*/
  __pyx_v_c = SymEngine::rcp_static_cast<const SymEngine::Set>(__pyx_v_container_->__pyx_base.__pyx_base.thisptr);

  /* "symengine/lib/symengine_wrapper.pyx":5567
 *     cdef RCP[const symengine.Set] u = symengine.rcp_static_cast_Set(universe_.thisptr)
 *     cdef RCP[const symengine.Set] c = symengine.rcp_static_cast_Set(container_.thisptr)
 *     return c2py(<rcp_const_basic>(symengine.set_complement(u, c)))             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_5 = SymEngine::set_complement(__pyx_v_u, __pyx_v_c);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 5567, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)__pyx_t_5)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5567, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":5562
 * 
 * 
 * def set_complement(universe, container):             # <<<<<<<<<<<<<<
 *     cdef Set universe_ = sympify(universe)
 *     cdef Set container_ = sympify(container)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.set_complement", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_universe_);
  __Pyx_XDECREF((PyObject *)__pyx_v_container_);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":5570
 * 
 * 
 * def set_complement_helper(container, universe):             # <<<<<<<<<<<<<<
 *     cdef Set container_ = sympify(container)
 *     cdef Set universe_ = sympify(universe)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_235set_complement_helper(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_235set_complement_helper = {"set_complement_helper", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_235set_complement_helper, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_235set_complement_helper(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_container = 0;
  PyObject *__pyx_v_universe = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_complement_helper (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_container,&__pyx_mstate_global->__pyx_n_u_universe,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 5570, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5570, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5570, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "set_complement_helper", 0) < (0)) __PYX_ERR(0, 5570, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("set_complement_helper", 1, 2, 2, i); __PYX_ERR(0, 5570, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5570, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5570, __pyx_L3_error)
    }
    __pyx_v_container = values[0];
    __pyx_v_universe = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set_complement_helper", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 5570, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.set_complement_helper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_234set_complement_helper(__pyx_self, __pyx_v_container, __pyx_v_universe);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_234set_complement_helper(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_container, PyObject *__pyx_v_universe) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Set *__pyx_v_container_ = 0;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Set *__pyx_v_universe_ = 0;
  SymEngine::RCP<SymEngine::Set const >  __pyx_v_c;
  SymEngine::RCP<SymEngine::Set const >  __pyx_v_u;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  SymEngine::RCP<SymEngine::Set const >  __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_complement_helper", 0);

  /* "symengine/lib/symengine_wrapper.pyx":5571
 * 
 * def set_complement_helper(container, universe):
 *     cdef Set container_ = sympify(container)             # <<<<<<<<<<<<<<
 *     cdef Set universe_ = sympify(universe)
 *     cdef RCP[const symengine.Set] c = symengine.rcp_static_cast_Set(container_.thisptr)
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5571, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_container};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5571, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Set))))) __PYX_ERR(0, 5571, __pyx_L1_error)
  __pyx_v_container_ = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Set *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5572
 * def set_complement_helper(container, universe):
 *     cdef Set container_ = sympify(container)
 *     cdef Set universe_ = sympify(universe)             # <<<<<<<<<<<<<<
 *     cdef RCP[const symengine.Set] c = symengine.rcp_static_cast_Set(container_.thisptr)
 *     cdef RCP[const symengine.Set] u = symengine.rcp_static_cast_Set(universe_.thisptr)
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5572, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_universe};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5572, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Set))))) __PYX_ERR(0, 5572, __pyx_L1_error)
  __pyx_v_universe_ = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Set *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5573
 *     cdef Set container_ = sympify(container)
 *     cdef Set universe_ = sympify(universe)
 *     cdef RCP[const symengine.Set] c = symengine.rcp_static_cast_Set(container_.thisptr)             # <<<<<<<<<<<<<<
 *     cdef RCP[const symengine.Set] u = symengine.rcp_static_cast_Set(universe_.thisptr)
 *     return c2py(<rcp_const_basic>(symengine.set_complement_helper(c, u)))
*/
  __pyx_v_c = SymEngine::rcp_static_cast<const SymEngine::Set>(__pyx_v_container_->__pyx_base.__pyx_base.thisptr);

  /* "symengine/lib/symengine_wrapper.pyx":5574
 *     cdef Set universe_ = sympify(universe)
 *     cdef RCP[const symengine.Set] c = symengine.rcp_static_cast_Set(container_.thisptr)
 *     cdef RCP[const symengine.Set] u = symengine.rcp_static_cast_Set(universe_.thisptr)             # <<<<<<<<<<<<<<
 *     return c2py(<rcp_const_basic>(symengine.set_complement_helper(c, u)))
 * 
*/
  __pyx_v_u = SymEngine::rcp_static_cast<const SymEngine::Set>(__pyx_v_universe_->__pyx_base.__pyx_base.thisptr);

  /* "symengine/lib/symengine_wrapper.pyx":5575
 *     cdef RCP[const symengine.Set] c = symengine.rcp_static_cast_Set(container_.thisptr)
 *     cdef RCP[const symengine.Set] u = symengine.rcp_static_cast_Set(universe_.thisptr)
 *     return c2py(<rcp_const_basic>(symengine.set_complement_helper(c, u)))             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_5 = SymEngine::set_complement_helper(__pyx_v_c, __pyx_v_u);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 5575, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)__pyx_t_5)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5575, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":5570
 * 
 * 
 * def set_complement_helper(container, universe):             # <<<<<<<<<<<<<<
 *     cdef Set container_ = sympify(container)
 *     cdef Set universe_ = sympify(universe)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.set_complement_helper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_container_);
  __Pyx_XDECREF((PyObject *)__pyx_v_universe_);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":5578
 * 
 * 
 * def conditionset(sym, condition):             # <<<<<<<<<<<<<<
 *     cdef Basic sym_ = sympify(sym)
 *     cdef Boolean condition_ = sympify(condition)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_237conditionset(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_237conditionset = {"conditionset", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_237conditionset, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_237conditionset(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_sym = 0;
  PyObject *__pyx_v_condition = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("conditionset (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_sym,&__pyx_mstate_global->__pyx_n_u_condition,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 5578, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5578, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5578, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "conditionset", 0) < (0)) __PYX_ERR(0, 5578, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("conditionset", 1, 2, 2, i); __PYX_ERR(0, 5578, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5578, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5578, __pyx_L3_error)
    }
    __pyx_v_sym = values[0];
    __pyx_v_condition = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("conditionset", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 5578, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.conditionset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_236conditionset(__pyx_self, __pyx_v_sym, __pyx_v_condition);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_236conditionset(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_sym, PyObject *__pyx_v_condition) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_sym_ = 0;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Boolean *__pyx_v_condition_ = 0;
  SymEngine::RCP<SymEngine::Boolean const >  __pyx_v_c;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  SymEngine::RCP<SymEngine::Set const >  __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("conditionset", 0);

  /* "symengine/lib/symengine_wrapper.pyx":5579
 * 
 * def conditionset(sym, condition):
 *     cdef Basic sym_ = sympify(sym)             # <<<<<<<<<<<<<<
 *     cdef Boolean condition_ = sympify(condition)
 *     cdef RCP[const symengine.Boolean] c = symengine.rcp_static_cast_Boolean(condition_.thisptr)
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5579, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_sym};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5579, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 5579, __pyx_L1_error)
  __pyx_v_sym_ = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5580
 * def conditionset(sym, condition):
 *     cdef Basic sym_ = sympify(sym)
 *     cdef Boolean condition_ = sympify(condition)             # <<<<<<<<<<<<<<
 *     cdef RCP[const symengine.Boolean] c = symengine.rcp_static_cast_Boolean(condition_.thisptr)
 *     return c2py(<rcp_const_basic>(symengine.conditionset(sym_.thisptr, c)))
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5580, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_condition};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5580, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Boolean))))) __PYX_ERR(0, 5580, __pyx_L1_error)
  __pyx_v_condition_ = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Boolean *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5581
 *     cdef Basic sym_ = sympify(sym)
 *     cdef Boolean condition_ = sympify(condition)
 *     cdef RCP[const symengine.Boolean] c = symengine.rcp_static_cast_Boolean(condition_.thisptr)             # <<<<<<<<<<<<<<
 *     return c2py(<rcp_const_basic>(symengine.conditionset(sym_.thisptr, c)))
 * 
*/
  __pyx_v_c = SymEngine::rcp_static_cast<const SymEngine::Boolean>(__pyx_v_condition_->__pyx_base.__pyx_base.thisptr);

  /* "symengine/lib/symengine_wrapper.pyx":5582
 *     cdef Boolean condition_ = sympify(condition)
 *     cdef RCP[const symengine.Boolean] c = symengine.rcp_static_cast_Boolean(condition_.thisptr)
 *     return c2py(<rcp_const_basic>(symengine.conditionset(sym_.thisptr, c)))             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_5 = SymEngine::conditionset(__pyx_v_sym_->thisptr, __pyx_v_c);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 5582, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)__pyx_t_5)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5582, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":5578
 * 
 * 
 * def conditionset(sym, condition):             # <<<<<<<<<<<<<<
 *     cdef Basic sym_ = sympify(sym)
 *     cdef Boolean condition_ = sympify(condition)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.conditionset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_sym_);
  __Pyx_XDECREF((PyObject *)__pyx_v_condition_);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":5585
 * 
 * 
 * def imageset(sym, expr, base):             # <<<<<<<<<<<<<<
 *     cdef Basic sym_ = sympify(sym)
 *     cdef Basic expr_ = sympify(expr)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_239imageset(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_239imageset = {"imageset", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_239imageset, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_239imageset(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_sym = 0;
  PyObject *__pyx_v_expr = 0;
  PyObject *__pyx_v_base = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("imageset (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_sym,&__pyx_mstate_global->__pyx_n_u_expr,&__pyx_mstate_global->__pyx_n_u_base,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 5585, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 5585, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5585, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5585, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "imageset", 0) < (0)) __PYX_ERR(0, 5585, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("imageset", 1, 3, 3, i); __PYX_ERR(0, 5585, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5585, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5585, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 5585, __pyx_L3_error)
    }
    __pyx_v_sym = values[0];
    __pyx_v_expr = values[1];
    __pyx_v_base = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("imageset", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 5585, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.imageset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_238imageset(__pyx_self, __pyx_v_sym, __pyx_v_expr, __pyx_v_base);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_238imageset(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_sym, PyObject *__pyx_v_expr, PyObject *__pyx_v_base) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_sym_ = 0;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_expr_ = 0;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Set *__pyx_v_base_ = 0;
  SymEngine::RCP<SymEngine::Set const >  __pyx_v_b;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  SymEngine::RCP<SymEngine::Set const >  __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("imageset", 0);

  /* "symengine/lib/symengine_wrapper.pyx":5586
 * 
 * def imageset(sym, expr, base):
 *     cdef Basic sym_ = sympify(sym)             # <<<<<<<<<<<<<<
 *     cdef Basic expr_ = sympify(expr)
 *     cdef Set base_ = sympify(base)
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5586, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_sym};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5586, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 5586, __pyx_L1_error)
  __pyx_v_sym_ = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5587
 * def imageset(sym, expr, base):
 *     cdef Basic sym_ = sympify(sym)
 *     cdef Basic expr_ = sympify(expr)             # <<<<<<<<<<<<<<
 *     cdef Set base_ = sympify(base)
 *     cdef RCP[const symengine.Set] b = symengine.rcp_static_cast_Set(base_.thisptr)
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5587, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_expr};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5587, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 5587, __pyx_L1_error)
  __pyx_v_expr_ = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5588
 *     cdef Basic sym_ = sympify(sym)
 *     cdef Basic expr_ = sympify(expr)
 *     cdef Set base_ = sympify(base)             # <<<<<<<<<<<<<<
 *     cdef RCP[const symengine.Set] b = symengine.rcp_static_cast_Set(base_.thisptr)
 *     return c2py(<rcp_const_basic>(symengine.imageset(sym_.thisptr, expr_.thisptr, b)))
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5588, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_base};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5588, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Set))))) __PYX_ERR(0, 5588, __pyx_L1_error)
  __pyx_v_base_ = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Set *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5589
 *     cdef Basic expr_ = sympify(expr)
 *     cdef Set base_ = sympify(base)
 *     cdef RCP[const symengine.Set] b = symengine.rcp_static_cast_Set(base_.thisptr)             # <<<<<<<<<<<<<<
 *     return c2py(<rcp_const_basic>(symengine.imageset(sym_.thisptr, expr_.thisptr, b)))
 * 
*/
  __pyx_v_b = SymEngine::rcp_static_cast<const SymEngine::Set>(__pyx_v_base_->__pyx_base.__pyx_base.thisptr);

  /* "symengine/lib/symengine_wrapper.pyx":5590
 *     cdef Set base_ = sympify(base)
 *     cdef RCP[const symengine.Set] b = symengine.rcp_static_cast_Set(base_.thisptr)
 *     return c2py(<rcp_const_basic>(symengine.imageset(sym_.thisptr, expr_.thisptr, b)))             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_5 = SymEngine::imageset(__pyx_v_sym_->thisptr, __pyx_v_expr_->thisptr, __pyx_v_b);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 5590, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)__pyx_t_5)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5590, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":5585
 * 
 * 
 * def imageset(sym, expr, base):             # <<<<<<<<<<<<<<
 *     cdef Basic sym_ = sympify(sym)
 *     cdef Basic expr_ = sympify(expr)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.imageset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_sym_);
  __Pyx_XDECREF((PyObject *)__pyx_v_expr_);
  __Pyx_XDECREF((PyObject *)__pyx_v_base_);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":5600
 * 
 * 
 * def solve(f, sym, domain=None):             # <<<<<<<<<<<<<<
 *     cdef Basic f_ = sympify(f)
 *     cdef Basic sym_ = sympify(sym)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_241solve(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_241solve = {"solve", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_241solve, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_241solve(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_f = 0;
  PyObject *__pyx_v_sym = 0;
  PyObject *__pyx_v_domain = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("solve (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_f,&__pyx_mstate_global->__pyx_n_u_sym,&__pyx_mstate_global->__pyx_n_u_domain,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 5600, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 5600, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5600, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5600, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "solve", 0) < (0)) __PYX_ERR(0, 5600, __pyx_L3_error)
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("solve", 0, 2, 3, i); __PYX_ERR(0, 5600, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 5600, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5600, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5600, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_f = values[0];
    __pyx_v_sym = values[1];
    __pyx_v_domain = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("solve", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 5600, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.solve", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_240solve(__pyx_self, __pyx_v_f, __pyx_v_sym, __pyx_v_domain);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_240solve(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_f, PyObject *__pyx_v_sym, PyObject *__pyx_v_domain) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_f_ = 0;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_sym_ = 0;
  SymEngine::RCP<SymEngine::Symbol const >  __pyx_v_x;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Set *__pyx_v_domain_ = 0;
  SymEngine::RCP<SymEngine::Set const >  __pyx_v_d;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_t_5;
  SymEngine::RCP<SymEngine::Set const >  __pyx_t_6;
  SymEngine::RCP<SymEngine::Set const >  __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("solve", 0);

  /* "symengine/lib/symengine_wrapper.pyx":5601
 * 
 * def solve(f, sym, domain=None):
 *     cdef Basic f_ = sympify(f)             # <<<<<<<<<<<<<<
 *     cdef Basic sym_ = sympify(sym)
 *     require(sym_, Symbol)
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5601, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_f};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5601, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 5601, __pyx_L1_error)
  __pyx_v_f_ = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5602
 * def solve(f, sym, domain=None):
 *     cdef Basic f_ = sympify(f)
 *     cdef Basic sym_ = sympify(sym)             # <<<<<<<<<<<<<<
 *     require(sym_, Symbol)
 *     cdef RCP[const symengine.Symbol] x = symengine.rcp_static_cast_Symbol(sym_.thisptr)
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5602, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_sym};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5602, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 5602, __pyx_L1_error)
  __pyx_v_sym_ = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5603
 *     cdef Basic f_ = sympify(f)
 *     cdef Basic sym_ = sympify(sym)
 *     require(sym_, Symbol)             # <<<<<<<<<<<<<<
 *     cdef RCP[const symengine.Symbol] x = symengine.rcp_static_cast_Symbol(sym_.thisptr)
 *     if domain is None:
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_require); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5603, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, ((PyObject *)__pyx_v_sym_), ((PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Symbol)};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5603, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5604
 *     cdef Basic sym_ = sympify(sym)
 *     require(sym_, Symbol)
 *     cdef RCP[const symengine.Symbol] x = symengine.rcp_static_cast_Symbol(sym_.thisptr)             # <<<<<<<<<<<<<<
 *     if domain is None:
 *         return c2py(<rcp_const_basic>(symengine.solve(f_.thisptr, x)))
*/
  __pyx_v_x = SymEngine::rcp_static_cast<const SymEngine::Symbol>(__pyx_v_sym_->thisptr);

  /* "symengine/lib/symengine_wrapper.pyx":5605
 *     require(sym_, Symbol)
 *     cdef RCP[const symengine.Symbol] x = symengine.rcp_static_cast_Symbol(sym_.thisptr)
 *     if domain is None:             # <<<<<<<<<<<<<<
 *         return c2py(<rcp_const_basic>(symengine.solve(f_.thisptr, x)))
 *     cdef Set domain_ = sympify(domain)
*/
  __pyx_t_5 = (__pyx_v_domain == Py_None);
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":5606
 *     cdef RCP[const symengine.Symbol] x = symengine.rcp_static_cast_Symbol(sym_.thisptr)
 *     if domain is None:
 *         return c2py(<rcp_const_basic>(symengine.solve(f_.thisptr, x)))             # <<<<<<<<<<<<<<
 *     cdef Set domain_ = sympify(domain)
 *     cdef RCP[const symengine.Set] d = symengine.rcp_static_cast_Set(domain_.thisptr)
*/
    __Pyx_XDECREF(__pyx_r);
    try {
      __pyx_t_6 = SymEngine::solve(__pyx_v_f_->thisptr, __pyx_v_x);
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(0, 5606, __pyx_L1_error)
    }
    __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)__pyx_t_6)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5606, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":5605
 *     require(sym_, Symbol)
 *     cdef RCP[const symengine.Symbol] x = symengine.rcp_static_cast_Symbol(sym_.thisptr)
 *     if domain is None:             # <<<<<<<<<<<<<<
 *         return c2py(<rcp_const_basic>(symengine.solve(f_.thisptr, x)))
 *     cdef Set domain_ = sympify(domain)
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":5607
 *     if domain is None:
 *         return c2py(<rcp_const_basic>(symengine.solve(f_.thisptr, x)))
 *     cdef Set domain_ = sympify(domain)             # <<<<<<<<<<<<<<
 *     cdef RCP[const symengine.Set] d = symengine.rcp_static_cast_Set(domain_.thisptr)
 *     return c2py(<rcp_const_basic>(symengine.solve(f_.thisptr, x, d)))
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5607, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_domain};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5607, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Set))))) __PYX_ERR(0, 5607, __pyx_L1_error)
  __pyx_v_domain_ = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Set *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5608
 *         return c2py(<rcp_const_basic>(symengine.solve(f_.thisptr, x)))
 *     cdef Set domain_ = sympify(domain)
 *     cdef RCP[const symengine.Set] d = symengine.rcp_static_cast_Set(domain_.thisptr)             # <<<<<<<<<<<<<<
 *     return c2py(<rcp_const_basic>(symengine.solve(f_.thisptr, x, d)))
 * 
*/
  __pyx_v_d = SymEngine::rcp_static_cast<const SymEngine::Set>(__pyx_v_domain_->__pyx_base.__pyx_base.thisptr);

  /* "symengine/lib/symengine_wrapper.pyx":5609
 *     cdef Set domain_ = sympify(domain)
 *     cdef RCP[const symengine.Set] d = symengine.rcp_static_cast_Set(domain_.thisptr)
 *     return c2py(<rcp_const_basic>(symengine.solve(f_.thisptr, x, d)))             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_7 = SymEngine::solve(__pyx_v_f_->thisptr, __pyx_v_x, __pyx_v_d);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 5609, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_c2py(((SymEngine::RCP<const SymEngine::Basic>)__pyx_t_7)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5609, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":5600
 * 
 * 
 * def solve(f, sym, domain=None):             # <<<<<<<<<<<<<<
 *     cdef Basic f_ = sympify(f)
 *     cdef Basic sym_ = sympify(sym)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.solve", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_f_);
  __Pyx_XDECREF((PyObject *)__pyx_v_sym_);
  __Pyx_XDECREF((PyObject *)__pyx_v_domain_);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":5612
 * 
 * 
 * def linsolve(eqs, syms):             # <<<<<<<<<<<<<<
 *     """
 *     Solve a set of linear equations given as an iterable `eqs`
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_243linsolve(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_9symengine_3lib_17symengine_wrapper_242linsolve, "\n    Solve a set of linear equations given as an iterable `eqs`\n    which are linear w.r.t the symbols given as an iterable `syms`\n    ");
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_243linsolve = {"linsolve", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_243linsolve, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9symengine_3lib_17symengine_wrapper_242linsolve};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_243linsolve(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_eqs = 0;
  PyObject *__pyx_v_syms = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("linsolve (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_eqs,&__pyx_mstate_global->__pyx_n_u_syms,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 5612, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5612, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5612, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "linsolve", 0) < (0)) __PYX_ERR(0, 5612, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("linsolve", 1, 2, 2, i); __PYX_ERR(0, 5612, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5612, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5612, __pyx_L3_error)
    }
    __pyx_v_eqs = values[0];
    __pyx_v_syms = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("linsolve", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 5612, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.linsolve", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_242linsolve(__pyx_self, __pyx_v_eqs, __pyx_v_syms);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_242linsolve(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_eqs, PyObject *__pyx_v_syms) {
  SymEngine::vec_basic __pyx_v_eqs_;
  SymEngine::vec_sym __pyx_v_syms_;
  SymEngine::RCP<SymEngine::Symbol const >  __pyx_v_sym_;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Symbol *__pyx_v_B = 0;
  PyObject *__pyx_v_sym = NULL;
  SymEngine::vec_basic __pyx_v_ret;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  SymEngine::vec_basic __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("linsolve", 0);

  /* "symengine/lib/symengine_wrapper.pyx":5617
 *     which are linear w.r.t the symbols given as an iterable `syms`
 *     """
 *     cdef symengine.vec_basic eqs_ = iter_to_vec_basic(eqs)             # <<<<<<<<<<<<<<
 *     cdef symengine.vec_sym syms_
 *     cdef RCP[const symengine.Symbol] sym_
*/
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_iter_to_vec_basic(__pyx_v_eqs); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 5617, __pyx_L1_error)
  __pyx_v_eqs_ = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_1);

  /* "symengine/lib/symengine_wrapper.pyx":5621
 *     cdef RCP[const symengine.Symbol] sym_
 *     cdef Symbol B
 *     for sym in syms:             # <<<<<<<<<<<<<<
 *         B = sympify(sym)
 *         sym_ = symengine.rcp_static_cast_Symbol(B.thisptr)
*/
  if (likely(PyList_CheckExact(__pyx_v_syms)) || PyTuple_CheckExact(__pyx_v_syms)) {
    __pyx_t_2 = __pyx_v_syms; __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_syms); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5621, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5621, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
          #if !CYTHON_ASSUME_SAFE_SIZE
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 5621, __pyx_L1_error)
          #endif
          if (__pyx_t_3 >= __pyx_temp) break;
        }
        __pyx_t_5 = __Pyx_PyList_GetItemRefFast(__pyx_t_2, __pyx_t_3, __Pyx_ReferenceSharing_OwnStrongReference);
        ++__pyx_t_3;
      } else {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
          #if !CYTHON_ASSUME_SAFE_SIZE
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 5621, __pyx_L1_error)
          #endif
          if (__pyx_t_3 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_5 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3));
        #else
        __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3);
        #endif
        ++__pyx_t_3;
      }
      if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5621, __pyx_L1_error)
    } else {
      __pyx_t_5 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_5)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 5621, __pyx_L1_error)
          PyErr_Clear();
        }
        break;
      }
    }
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_XDECREF_SET(__pyx_v_sym, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":5622
 *     cdef Symbol B
 *     for sym in syms:
 *         B = sympify(sym)             # <<<<<<<<<<<<<<
 *         sym_ = symengine.rcp_static_cast_Symbol(B.thisptr)
 *         syms_.push_back(sym_)
*/
    __pyx_t_6 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5622, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
      assert(__pyx_t_6);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
      __pyx_t_8 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_sym};
      __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5622, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
    }
    if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Symbol))))) __PYX_ERR(0, 5622, __pyx_L1_error)
    __Pyx_XDECREF_SET(__pyx_v_B, ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Symbol *)__pyx_t_5));
    __pyx_t_5 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":5623
 *     for sym in syms:
 *         B = sympify(sym)
 *         sym_ = symengine.rcp_static_cast_Symbol(B.thisptr)             # <<<<<<<<<<<<<<
 *         syms_.push_back(sym_)
 *     if syms_.size() != eqs_.size():
*/
    __pyx_v_sym_ = SymEngine::rcp_static_cast<const SymEngine::Symbol>(__pyx_v_B->__pyx_base.__pyx_base.thisptr);

    /* "symengine/lib/symengine_wrapper.pyx":5624
 *         B = sympify(sym)
 *         sym_ = symengine.rcp_static_cast_Symbol(B.thisptr)
 *         syms_.push_back(sym_)             # <<<<<<<<<<<<<<
 *     if syms_.size() != eqs_.size():
 *         raise RuntimeError("Number of equations and symbols do not match")
*/
    try {
      __pyx_v_syms_.push_back(__pyx_v_sym_);
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(0, 5624, __pyx_L1_error)
    }

    /* "symengine/lib/symengine_wrapper.pyx":5621
 *     cdef RCP[const symengine.Symbol] sym_
 *     cdef Symbol B
 *     for sym in syms:             # <<<<<<<<<<<<<<
 *         B = sympify(sym)
 *         sym_ = symengine.rcp_static_cast_Symbol(B.thisptr)
*/
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5625
 *         sym_ = symengine.rcp_static_cast_Symbol(B.thisptr)
 *         syms_.push_back(sym_)
 *     if syms_.size() != eqs_.size():             # <<<<<<<<<<<<<<
 *         raise RuntimeError("Number of equations and symbols do not match")
 *     cdef symengine.vec_basic ret = symengine.linsolve(eqs_, syms_)
*/
  __pyx_t_9 = (__pyx_v_syms_.size() != __pyx_v_eqs_.size());
  if (unlikely(__pyx_t_9)) {

    /* "symengine/lib/symengine_wrapper.pyx":5626
 *         syms_.push_back(sym_)
 *     if syms_.size() != eqs_.size():
 *         raise RuntimeError("Number of equations and symbols do not match")             # <<<<<<<<<<<<<<
 *     cdef symengine.vec_basic ret = symengine.linsolve(eqs_, syms_)
 *     return vec_basic_to_tuple(ret)
*/
    __pyx_t_5 = NULL;
    __pyx_t_8 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_Number_of_equations_and_symbols};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5626, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 5626, __pyx_L1_error)

    /* "symengine/lib/symengine_wrapper.pyx":5625
 *         sym_ = symengine.rcp_static_cast_Symbol(B.thisptr)
 *         syms_.push_back(sym_)
 *     if syms_.size() != eqs_.size():             # <<<<<<<<<<<<<<
 *         raise RuntimeError("Number of equations and symbols do not match")
 *     cdef symengine.vec_basic ret = symengine.linsolve(eqs_, syms_)
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":5627
 *     if syms_.size() != eqs_.size():
 *         raise RuntimeError("Number of equations and symbols do not match")
 *     cdef symengine.vec_basic ret = symengine.linsolve(eqs_, syms_)             # <<<<<<<<<<<<<<
 *     return vec_basic_to_tuple(ret)
 * 
*/
  try {
    __pyx_t_1 = SymEngine::linsolve(__pyx_v_eqs_, __pyx_v_syms_);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 5627, __pyx_L1_error)
  }
  __pyx_v_ret = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_1);

  /* "symengine/lib/symengine_wrapper.pyx":5628
 *         raise RuntimeError("Number of equations and symbols do not match")
 *     cdef symengine.vec_basic ret = symengine.linsolve(eqs_, syms_)
 *     return vec_basic_to_tuple(ret)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_f_9symengine_3lib_17symengine_wrapper_vec_basic_to_tuple(__pyx_v_ret); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5628, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":5612
 * 
 * 
 * def linsolve(eqs, syms):             # <<<<<<<<<<<<<<
 *     """
 *     Solve a set of linear equations given as an iterable `eqs`
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.linsolve", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_B);
  __Pyx_XDECREF(__pyx_v_sym);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":5631
 * 
 * 
 * def cse(exprs):             # <<<<<<<<<<<<<<
 *     cdef symengine.vec_basic vec
 *     cdef symengine.vec_pair replacements
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_245cse(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_245cse = {"cse", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_245cse, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_245cse(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_exprs = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cse (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_exprs,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 5631, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5631, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "cse", 0) < (0)) __PYX_ERR(0, 5631, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("cse", 1, 1, 1, i); __PYX_ERR(0, 5631, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5631, __pyx_L3_error)
    }
    __pyx_v_exprs = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cse", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 5631, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.cse", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_244cse(__pyx_self, __pyx_v_exprs);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_244cse(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_exprs) {
  SymEngine::vec_basic __pyx_v_vec;
  SymEngine::vec_pair __pyx_v_replacements;
  SymEngine::vec_basic __pyx_v_reduced_exprs;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_b = 0;
  PyObject *__pyx_v_expr = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  size_t __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("cse", 0);

  /* "symengine/lib/symengine_wrapper.pyx":5636
 *     cdef symengine.vec_basic reduced_exprs
 *     cdef Basic b
 *     for expr in exprs:             # <<<<<<<<<<<<<<
 *         b = sympify(expr)
 *         vec.push_back(b.thisptr)
*/
  if (likely(PyList_CheckExact(__pyx_v_exprs)) || PyTuple_CheckExact(__pyx_v_exprs)) {
    __pyx_t_1 = __pyx_v_exprs; __Pyx_INCREF(__pyx_t_1);
    __pyx_t_2 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_exprs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5636, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5636, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_3)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
          #if !CYTHON_ASSUME_SAFE_SIZE
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 5636, __pyx_L1_error)
          #endif
          if (__pyx_t_2 >= __pyx_temp) break;
        }
        __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_2, __Pyx_ReferenceSharing_OwnStrongReference);
        ++__pyx_t_2;
      } else {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
          #if !CYTHON_ASSUME_SAFE_SIZE
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 5636, __pyx_L1_error)
          #endif
          if (__pyx_t_2 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2));
        #else
        __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2);
        #endif
        ++__pyx_t_2;
      }
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5636, __pyx_L1_error)
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 5636, __pyx_L1_error)
          PyErr_Clear();
        }
        break;
      }
    }
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_XDECREF_SET(__pyx_v_expr, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":5637
 *     cdef Basic b
 *     for expr in exprs:
 *         b = sympify(expr)             # <<<<<<<<<<<<<<
 *         vec.push_back(b.thisptr)
 *     symengine.cse(replacements, reduced_exprs, vec)
*/
    __pyx_t_5 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5637, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
      assert(__pyx_t_5);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
      __pyx_t_7 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_expr};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5637, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 5637, __pyx_L1_error)
    __Pyx_XDECREF_SET(__pyx_v_b, ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":5638
 *     for expr in exprs:
 *         b = sympify(expr)
 *         vec.push_back(b.thisptr)             # <<<<<<<<<<<<<<
 *     symengine.cse(replacements, reduced_exprs, vec)
 *     return (vec_pair_to_list(replacements), vec_basic_to_list(reduced_exprs))
*/
    try {
      __pyx_v_vec.push_back(__pyx_v_b->thisptr);
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(0, 5638, __pyx_L1_error)
    }

    /* "symengine/lib/symengine_wrapper.pyx":5636
 *     cdef symengine.vec_basic reduced_exprs
 *     cdef Basic b
 *     for expr in exprs:             # <<<<<<<<<<<<<<
 *         b = sympify(expr)
 *         vec.push_back(b.thisptr)
*/
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5639
 *         b = sympify(expr)
 *         vec.push_back(b.thisptr)
 *     symengine.cse(replacements, reduced_exprs, vec)             # <<<<<<<<<<<<<<
 *     return (vec_pair_to_list(replacements), vec_basic_to_list(reduced_exprs))
 * 
*/
  try {
    SymEngine::cse(__pyx_v_replacements, __pyx_v_reduced_exprs, __pyx_v_vec);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 5639, __pyx_L1_error)
  }

  /* "symengine/lib/symengine_wrapper.pyx":5640
 *         vec.push_back(b.thisptr)
 *     symengine.cse(replacements, reduced_exprs, vec)
 *     return (vec_pair_to_list(replacements), vec_basic_to_list(reduced_exprs))             # <<<<<<<<<<<<<<
 * 
 * def latex(expr):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper_vec_pair_to_list(__pyx_v_replacements); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5640, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __pyx_f_9symengine_3lib_17symengine_wrapper_vec_basic_to_list(__pyx_v_reduced_exprs); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5640, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5640, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 5640, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_4);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_4) != (0)) __PYX_ERR(0, 5640, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_4 = 0;
  __pyx_r = __pyx_t_6;
  __pyx_t_6 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":5631
 * 
 * 
 * def cse(exprs):             # <<<<<<<<<<<<<<
 *     cdef symengine.vec_basic vec
 *     cdef symengine.vec_pair replacements
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.cse", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_b);
  __Pyx_XDECREF(__pyx_v_expr);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":5642
 *     return (vec_pair_to_list(replacements), vec_basic_to_list(reduced_exprs))
 * 
 * def latex(expr):             # <<<<<<<<<<<<<<
 *     cdef DenseMatrixBase mat_expr
 *     cdef Basic basic_expr
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_247latex(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_247latex = {"latex", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_247latex, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_247latex(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_expr = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("latex (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_expr,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 5642, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5642, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "latex", 0) < (0)) __PYX_ERR(0, 5642, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("latex", 1, 1, 1, i); __PYX_ERR(0, 5642, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5642, __pyx_L3_error)
    }
    __pyx_v_expr = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("latex", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 5642, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.latex", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_246latex(__pyx_self, __pyx_v_expr);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_246latex(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_expr) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *__pyx_v_mat_expr = 0;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_basic_expr = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  std::string __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("latex", 0);

  /* "symengine/lib/symengine_wrapper.pyx":5645
 *     cdef DenseMatrixBase mat_expr
 *     cdef Basic basic_expr
 *     if isinstance(expr, DenseMatrixBase):             # <<<<<<<<<<<<<<
 *         mat_expr = expr
 *         return symengine.latex(deref(symengine.static_cast_DenseMatrix(mat_expr.thisptr)), 20, 12).decode("utf-8")
*/
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_expr, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase); 
  if (__pyx_t_1) {

    /* "symengine/lib/symengine_wrapper.pyx":5646
 *     cdef Basic basic_expr
 *     if isinstance(expr, DenseMatrixBase):
 *         mat_expr = expr             # <<<<<<<<<<<<<<
 *         return symengine.latex(deref(symengine.static_cast_DenseMatrix(mat_expr.thisptr)), 20, 12).decode("utf-8")
 *     else:
*/
    __pyx_t_2 = __pyx_v_expr;
    __Pyx_INCREF(__pyx_t_2);
    if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase))))) __PYX_ERR(0, 5646, __pyx_L1_error)
    __pyx_v_mat_expr = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":5647
 *     if isinstance(expr, DenseMatrixBase):
 *         mat_expr = expr
 *         return symengine.latex(deref(symengine.static_cast_DenseMatrix(mat_expr.thisptr)), 20, 12).decode("utf-8")             # <<<<<<<<<<<<<<
 *     else:
 *         basic_expr = sympify(expr)
*/
    __Pyx_XDECREF(__pyx_r);
    try {
      __pyx_t_3 = SymEngine::latex((*static_cast<SymEngine::DenseMatrix*>(__pyx_v_mat_expr->__pyx_base.thisptr)), 20, 12);
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(0, 5647, __pyx_L1_error)
    }
    __pyx_t_2 = __Pyx_decode_cpp_string(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_3), 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5647, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "symengine/lib/symengine_wrapper.pyx":5645
 *     cdef DenseMatrixBase mat_expr
 *     cdef Basic basic_expr
 *     if isinstance(expr, DenseMatrixBase):             # <<<<<<<<<<<<<<
 *         mat_expr = expr
 *         return symengine.latex(deref(symengine.static_cast_DenseMatrix(mat_expr.thisptr)), 20, 12).decode("utf-8")
*/
  }

  /* "symengine/lib/symengine_wrapper.pyx":5649
 *         return symengine.latex(deref(symengine.static_cast_DenseMatrix(mat_expr.thisptr)), 20, 12).decode("utf-8")
 *     else:
 *         basic_expr = sympify(expr)             # <<<<<<<<<<<<<<
 *         return symengine.latex(deref(basic_expr.thisptr)).decode("utf-8")
 * 
*/
  /*else*/ {
    __pyx_t_4 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5649, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
      assert(__pyx_t_4);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
      __pyx_t_6 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_expr};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5649, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 5649, __pyx_L1_error)
    __pyx_v_basic_expr = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":5650
 *     else:
 *         basic_expr = sympify(expr)
 *         return symengine.latex(deref(basic_expr.thisptr)).decode("utf-8")             # <<<<<<<<<<<<<<
 * 
 * def unicode(expr):
*/
    __Pyx_XDECREF(__pyx_r);
    try {
      __pyx_t_3 = SymEngine::latex((*__pyx_v_basic_expr->thisptr));
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(0, 5650, __pyx_L1_error)
    }
    __pyx_t_2 = __Pyx_decode_cpp_string(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_3), 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5650, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

  /* "symengine/lib/symengine_wrapper.pyx":5642
 *     return (vec_pair_to_list(replacements), vec_basic_to_list(reduced_exprs))
 * 
 * def latex(expr):             # <<<<<<<<<<<<<<
 *     cdef DenseMatrixBase mat_expr
 *     cdef Basic basic_expr
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.latex", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_mat_expr);
  __Pyx_XDECREF((PyObject *)__pyx_v_basic_expr);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":5652
 *         return symengine.latex(deref(basic_expr.thisptr)).decode("utf-8")
 * 
 * def unicode(expr):             # <<<<<<<<<<<<<<
 *     cdef Basic basic_expr
 *     basic_expr = sympify(expr)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_249unicode(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_249unicode = {"unicode", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_249unicode, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_249unicode(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_expr = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("unicode (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_expr,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 5652, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5652, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "unicode", 0) < (0)) __PYX_ERR(0, 5652, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("unicode", 1, 1, 1, i); __PYX_ERR(0, 5652, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5652, __pyx_L3_error)
    }
    __pyx_v_expr = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("unicode", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 5652, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.unicode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_248unicode(__pyx_self, __pyx_v_expr);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_248unicode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_expr) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_basic_expr = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  std::string __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("unicode", 0);

  /* "symengine/lib/symengine_wrapper.pyx":5654
 * def unicode(expr):
 *     cdef Basic basic_expr
 *     basic_expr = sympify(expr)             # <<<<<<<<<<<<<<
 *     return symengine.unicode(deref(basic_expr.thisptr)).decode("utf-8")
 * 
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5654, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_expr};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5654, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 5654, __pyx_L1_error)
  __pyx_v_basic_expr = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5655
 *     cdef Basic basic_expr
 *     basic_expr = sympify(expr)
 *     return symengine.unicode(deref(basic_expr.thisptr)).decode("utf-8")             # <<<<<<<<<<<<<<
 * 
 * cdef _flattened_vec(symengine.vec_basic &vec, exprs):
*/
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_5 = SymEngine::unicode((*__pyx_v_basic_expr->thisptr));
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 5655, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_decode_cpp_string(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_5), 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5655, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":5652
 *         return symengine.latex(deref(basic_expr.thisptr)).decode("utf-8")
 * 
 * def unicode(expr):             # <<<<<<<<<<<<<<
 *     cdef Basic basic_expr
 *     basic_expr = sympify(expr)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.unicode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_basic_expr);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":5657
 *     return symengine.unicode(deref(basic_expr.thisptr)).decode("utf-8")
 * 
 * cdef _flattened_vec(symengine.vec_basic &vec, exprs):             # <<<<<<<<<<<<<<
 *     cdef Basic b
 *     if is_sequence(exprs):
*/

static PyObject *__pyx_f_9symengine_3lib_17symengine_wrapper__flattened_vec(SymEngine::vec_basic &__pyx_v_vec, PyObject *__pyx_v_exprs) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *__pyx_v_b = 0;
  PyObject *__pyx_v_expr = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  PyObject *(*__pyx_t_7)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_flattened_vec", 0);

  /* "symengine/lib/symengine_wrapper.pyx":5659
 * cdef _flattened_vec(symengine.vec_basic &vec, exprs):
 *     cdef Basic b
 *     if is_sequence(exprs):             # <<<<<<<<<<<<<<
 *         for expr in exprs:
 *             _flattened_vec(vec, expr)
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_is_sequence); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5659, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_exprs};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5659, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 5659, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_5) {

    /* "symengine/lib/symengine_wrapper.pyx":5660
 *     cdef Basic b
 *     if is_sequence(exprs):
 *         for expr in exprs:             # <<<<<<<<<<<<<<
 *             _flattened_vec(vec, expr)
 *     else:
*/
    if (likely(PyList_CheckExact(__pyx_v_exprs)) || PyTuple_CheckExact(__pyx_v_exprs)) {
      __pyx_t_1 = __pyx_v_exprs; __Pyx_INCREF(__pyx_t_1);
      __pyx_t_6 = 0;
      __pyx_t_7 = NULL;
    } else {
      __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_exprs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5660, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5660, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_7)) {
        if (likely(PyList_CheckExact(__pyx_t_1))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
            #if !CYTHON_ASSUME_SAFE_SIZE
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 5660, __pyx_L1_error)
            #endif
            if (__pyx_t_6 >= __pyx_temp) break;
          }
          __pyx_t_3 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_6, __Pyx_ReferenceSharing_OwnStrongReference);
          ++__pyx_t_6;
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
            #if !CYTHON_ASSUME_SAFE_SIZE
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 5660, __pyx_L1_error)
            #endif
            if (__pyx_t_6 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_3 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_6));
          #else
          __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_6);
          #endif
          ++__pyx_t_6;
        }
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5660, __pyx_L1_error)
      } else {
        __pyx_t_3 = __pyx_t_7(__pyx_t_1);
        if (unlikely(!__pyx_t_3)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 5660, __pyx_L1_error)
            PyErr_Clear();
          }
          break;
        }
      }
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_XDECREF_SET(__pyx_v_expr, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "symengine/lib/symengine_wrapper.pyx":5661
 *     if is_sequence(exprs):
 *         for expr in exprs:
 *             _flattened_vec(vec, expr)             # <<<<<<<<<<<<<<
 *     else:
 *         b = sympify(exprs)
*/
      __pyx_t_3 = __pyx_f_9symengine_3lib_17symengine_wrapper__flattened_vec(__pyx_v_vec, __pyx_v_expr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5661, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "symengine/lib/symengine_wrapper.pyx":5660
 *     cdef Basic b
 *     if is_sequence(exprs):
 *         for expr in exprs:             # <<<<<<<<<<<<<<
 *             _flattened_vec(vec, expr)
 *     else:
*/
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":5659
 * cdef _flattened_vec(symengine.vec_basic &vec, exprs):
 *     cdef Basic b
 *     if is_sequence(exprs):             # <<<<<<<<<<<<<<
 *         for expr in exprs:
 *             _flattened_vec(vec, expr)
*/
    goto __pyx_L3;
  }

  /* "symengine/lib/symengine_wrapper.pyx":5663
 *             _flattened_vec(vec, expr)
 *     else:
 *         b = sympify(exprs)             # <<<<<<<<<<<<<<
 *         vec.push_back(b.thisptr)
 * 
*/
  /*else*/ {
    __pyx_t_3 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5663, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      assert(__pyx_t_3);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
      __pyx_t_4 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_exprs};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5663, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic))))) __PYX_ERR(0, 5663, __pyx_L1_error)
    __pyx_v_b = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":5664
 *     else:
 *         b = sympify(exprs)
 *         vec.push_back(b.thisptr)             # <<<<<<<<<<<<<<
 * 
 * 
*/
    try {
      __pyx_v_vec.push_back(__pyx_v_b->thisptr);
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(0, 5664, __pyx_L1_error)
    }
  }
  __pyx_L3:;

  /* "symengine/lib/symengine_wrapper.pyx":5657
 *     return symengine.unicode(deref(basic_expr.thisptr)).decode("utf-8")
 * 
 * cdef _flattened_vec(symengine.vec_basic &vec, exprs):             # <<<<<<<<<<<<<<
 *     cdef Basic b
 *     if is_sequence(exprs):
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper._flattened_vec", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_b);
  __Pyx_XDECREF(__pyx_v_expr);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "symengine/lib/symengine_wrapper.pyx":5667
 * 
 * 
 * def count_ops(*exprs):             # <<<<<<<<<<<<<<
 *     cdef symengine.vec_basic vec
 *     _flattened_vec(vec, exprs)
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_251count_ops(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_251count_ops = {"count_ops", (PyCFunction)(void(*)(void))(PyCFunctionWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_251count_ops, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_251count_ops(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_exprs = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("count_ops (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("count_ops", __pyx_kwds); return NULL;}
  __Pyx_INCREF(__pyx_args);
  __pyx_v_exprs = __pyx_args;
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_250count_ops(__pyx_self, __pyx_v_exprs);

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

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_250count_ops(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_exprs) {
  SymEngine::vec_basic __pyx_v_vec;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("count_ops", 0);

  /* "symengine/lib/symengine_wrapper.pyx":5669
 * def count_ops(*exprs):
 *     cdef symengine.vec_basic vec
 *     _flattened_vec(vec, exprs)             # <<<<<<<<<<<<<<
 *     return symengine.count_ops(vec)
 * 
*/
  __pyx_t_1 = __pyx_f_9symengine_3lib_17symengine_wrapper__flattened_vec(__pyx_v_vec, __pyx_v_exprs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5669, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5670
 *     cdef symengine.vec_basic vec
 *     _flattened_vec(vec, exprs)
 *     return symengine.count_ops(vec)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_int(SymEngine::count_ops(__pyx_v_vec)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5670, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "symengine/lib/symengine_wrapper.pyx":5667
 * 
 * 
 * def count_ops(*exprs):             # <<<<<<<<<<<<<<
 *     cdef symengine.vec_basic vec
 *     _flattened_vec(vec, exprs)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.count_ops", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":4
 *     int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1
 *     int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1
 * def __pyx_unpickle_Sieve(__pyx_type, long __pyx_checksum, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_result
 *     __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'')
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_253__pyx_unpickle_Sieve(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_253__pyx_unpickle_Sieve = {"__pyx_unpickle_Sieve", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_253__pyx_unpickle_Sieve, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_253__pyx_unpickle_Sieve(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_Sieve (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(1, 4, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle_Sieve", 0) < (0)) __PYX_ERR(1, 4, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Sieve", 1, 3, 3, i); __PYX_ERR(1, 4, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error)
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 4, __pyx_L3_error)
    __pyx_v___pyx_state = ((PyObject*)values[2]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Sieve", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 4, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.__pyx_unpickle_Sieve", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(1, 4, __pyx_L1_error)
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_252__pyx_unpickle_Sieve(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_252__pyx_unpickle_Sieve(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_Sieve", 0);

  /* "(tree fragment)":6
 * def __pyx_unpickle_Sieve(__pyx_type, long __pyx_checksum, tuple __pyx_state):
 *     cdef object __pyx_result
 *     __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'')             # <<<<<<<<<<<<<<
 *     __pyx_result = Sieve.__new__(__pyx_type)
 *     if __pyx_state is not None:
*/
  __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, __pyx_k__13); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 6, __pyx_L1_error)

  /* "(tree fragment)":7
 *     cdef object __pyx_result
 *     __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'')
 *     __pyx_result = Sieve.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_Sieve__set_state(<Sieve> __pyx_result, __pyx_state)
*/
  __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Sieve);
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type};
    __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  __pyx_v___pyx_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":8
 *     __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'')
 *     __pyx_result = Sieve.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_Sieve__set_state(<Sieve> __pyx_result, __pyx_state)
 *     return __pyx_result
*/
  __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None));
  if (__pyx_t_5) {

    /* "(tree fragment)":9
 *     __pyx_result = Sieve.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_Sieve__set_state(<Sieve> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_Sieve__set_state(Sieve __pyx_result, __pyx_state: tuple):
*/
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'");
      __PYX_ERR(1, 9, __pyx_L1_error)
    }
    __pyx_t_2 = __pyx_f_9symengine_3lib_17symengine_wrapper___pyx_unpickle_Sieve__set_state(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Sieve *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "(tree fragment)":8
 *     __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'')
 *     __pyx_result = Sieve.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_Sieve__set_state(<Sieve> __pyx_result, __pyx_state)
 *     return __pyx_result
*/
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_Sieve__set_state(<Sieve> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_Sieve__set_state(Sieve __pyx_result, __pyx_state: tuple):
 *     __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 0)
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":4
 *     int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1
 *     int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1
 * def __pyx_unpickle_Sieve(__pyx_type, long __pyx_checksum, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_result
 *     __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'')
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.__pyx_unpickle_Sieve", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_Sieve__set_state(<Sieve> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_Sieve__set_state(Sieve __pyx_result, __pyx_state: tuple):             # <<<<<<<<<<<<<<
 *     __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 0)
*/

static PyObject *__pyx_f_9symengine_3lib_17symengine_wrapper___pyx_unpickle_Sieve__set_state(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Sieve *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_Sieve__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_Sieve__set_state(Sieve __pyx_result, __pyx_state: tuple):
 *     __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 0)             # <<<<<<<<<<<<<<
*/
  __pyx_t_1 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 0); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 12, __pyx_L1_error)

  /* "(tree fragment)":11
 *         __pyx_unpickle_Sieve__set_state(<Sieve> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_Sieve__set_state(Sieve __pyx_result, __pyx_state: tuple):             # <<<<<<<<<<<<<<
 *     __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 0)
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.__pyx_unpickle_Sieve__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":4
 *     int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1
 *     int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1
 * def __pyx_unpickle__Lambdify(__pyx_type, long __pyx_checksum, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_result
 *     __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x9ba3967, 0x34b410c, 0x5e4bb09, b'accum_out_sizes, args_size, n_exprs, numpy_dtype, order, out_shapes, real, tot_out_size')
*/

/* Python wrapper */
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_255__pyx_unpickle__Lambdify(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_9symengine_3lib_17symengine_wrapper_255__pyx_unpickle__Lambdify = {"__pyx_unpickle__Lambdify", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_255__pyx_unpickle__Lambdify, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9symengine_3lib_17symengine_wrapper_255__pyx_unpickle__Lambdify(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle__Lambdify (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(1, 4, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle__Lambdify", 0) < (0)) __PYX_ERR(1, 4, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle__Lambdify", 1, 3, 3, i); __PYX_ERR(1, 4, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 4, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 4, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 4, __pyx_L3_error)
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 4, __pyx_L3_error)
    __pyx_v___pyx_state = ((PyObject*)values[2]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle__Lambdify", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 4, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.__pyx_unpickle__Lambdify", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(1, 4, __pyx_L1_error)
  __pyx_r = __pyx_pf_9symengine_3lib_17symengine_wrapper_254__pyx_unpickle__Lambdify(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9symengine_3lib_17symengine_wrapper_254__pyx_unpickle__Lambdify(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle__Lambdify", 0);

  /* "(tree fragment)":6
 * def __pyx_unpickle__Lambdify(__pyx_type, long __pyx_checksum, tuple __pyx_state):
 *     cdef object __pyx_result
 *     __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x9ba3967, 0x34b410c, 0x5e4bb09, b'accum_out_sizes, args_size, n_exprs, numpy_dtype, order, out_shapes, real, tot_out_size')             # <<<<<<<<<<<<<<
 *     __pyx_result = _Lambdify.__new__(__pyx_type)
 *     if __pyx_state is not None:
*/
  __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0x9ba3967, 0x34b410c, 0x5e4bb09, __pyx_k_accum_out_sizes_args_size_n_expr); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 6, __pyx_L1_error)

  /* "(tree fragment)":7
 *     cdef object __pyx_result
 *     __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x9ba3967, 0x34b410c, 0x5e4bb09, b'accum_out_sizes, args_size, n_exprs, numpy_dtype, order, out_shapes, real, tot_out_size')
 *     __pyx_result = _Lambdify.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle__Lambdify__set_state(<_Lambdify> __pyx_result, __pyx_state)
*/
  __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper__Lambdify);
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type};
    __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  __pyx_v___pyx_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":8
 *     __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x9ba3967, 0x34b410c, 0x5e4bb09, b'accum_out_sizes, args_size, n_exprs, numpy_dtype, order, out_shapes, real, tot_out_size')
 *     __pyx_result = _Lambdify.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle__Lambdify__set_state(<_Lambdify> __pyx_result, __pyx_state)
 *     return __pyx_result
*/
  __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None));
  if (__pyx_t_5) {

    /* "(tree fragment)":9
 *     __pyx_result = _Lambdify.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle__Lambdify__set_state(<_Lambdify> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle__Lambdify__set_state(_Lambdify __pyx_result, __pyx_state: tuple):
*/
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'");
      __PYX_ERR(1, 9, __pyx_L1_error)
    }
    __pyx_t_2 = __pyx_f_9symengine_3lib_17symengine_wrapper___pyx_unpickle__Lambdify__set_state(((struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "(tree fragment)":8
 *     __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x9ba3967, 0x34b410c, 0x5e4bb09, b'accum_out_sizes, args_size, n_exprs, numpy_dtype, order, out_shapes, real, tot_out_size')
 *     __pyx_result = _Lambdify.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle__Lambdify__set_state(<_Lambdify> __pyx_result, __pyx_state)
 *     return __pyx_result
*/
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle__Lambdify__set_state(<_Lambdify> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle__Lambdify__set_state(_Lambdify __pyx_result, __pyx_state: tuple):
 *     __pyx_result.accum_out_sizes = __pyx_state[0]; __pyx_result.args_size = __pyx_state[1]; __pyx_result.n_exprs = __pyx_state[2]; __pyx_result.numpy_dtype = __pyx_state[3]; __pyx_result.order = __pyx_state[4]; __pyx_result.out_shapes = __pyx_state[5]; __pyx_result.real = __pyx_state[6]; __pyx_result.tot_out_size = __pyx_state[7]
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":4
 *     int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1
 *     int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1
 * def __pyx_unpickle__Lambdify(__pyx_type, long __pyx_checksum, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_result
 *     __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x9ba3967, 0x34b410c, 0x5e4bb09, b'accum_out_sizes, args_size, n_exprs, numpy_dtype, order, out_shapes, real, tot_out_size')
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.__pyx_unpickle__Lambdify", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle__Lambdify__set_state(<_Lambdify> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle__Lambdify__set_state(_Lambdify __pyx_result, __pyx_state: tuple):             # <<<<<<<<<<<<<<
 *     __pyx_result.accum_out_sizes = __pyx_state[0]; __pyx_result.args_size = __pyx_state[1]; __pyx_result.n_exprs = __pyx_state[2]; __pyx_result.numpy_dtype = __pyx_state[3]; __pyx_result.order = __pyx_state[4]; __pyx_result.out_shapes = __pyx_state[5]; __pyx_result.real = __pyx_state[6]; __pyx_result.tot_out_size = __pyx_state[7]
 *     __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 8)
*/

static PyObject *__pyx_f_9symengine_3lib_17symengine_wrapper___pyx_unpickle__Lambdify__set_state(struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  std::vector<int>  __pyx_t_2;
  size_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle__Lambdify__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle__Lambdify__set_state(_Lambdify __pyx_result, __pyx_state: tuple):
 *     __pyx_result.accum_out_sizes = __pyx_state[0]; __pyx_result.args_size = __pyx_state[1]; __pyx_result.n_exprs = __pyx_state[2]; __pyx_result.numpy_dtype = __pyx_state[3]; __pyx_result.order = __pyx_state[4]; __pyx_result.out_shapes = __pyx_state[5]; __pyx_result.real = __pyx_state[6]; __pyx_result.tot_out_size = __pyx_state[7]             # <<<<<<<<<<<<<<
 *     __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 8)
*/
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_convert_vector_from_py_int(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->accum_out_sizes = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_2);
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyLong_As_size_t(__pyx_t_1); if (unlikely((__pyx_t_3 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->args_size = __pyx_t_3;
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyLong_As_size_t(__pyx_t_1); if (unlikely((__pyx_t_3 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->n_exprs = __pyx_t_3;
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->numpy_dtype);
  __Pyx_DECREF(__pyx_v___pyx_result->numpy_dtype);
  __pyx_v___pyx_result->numpy_dtype = __pyx_t_1;
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_1))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->order);
  __Pyx_DECREF(__pyx_v___pyx_result->order);
  __pyx_v___pyx_result->order = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_1))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->out_shapes);
  __Pyx_DECREF(__pyx_v___pyx_result->out_shapes);
  __pyx_v___pyx_result->out_shapes = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 6, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->real = __pyx_t_4;
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 7, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyLong_As_size_t(__pyx_t_1); if (unlikely((__pyx_t_3 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->tot_out_size = __pyx_t_3;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle__Lambdify__set_state(_Lambdify __pyx_result, __pyx_state: tuple):
 *     __pyx_result.accum_out_sizes = __pyx_state[0]; __pyx_result.args_size = __pyx_state[1]; __pyx_result.n_exprs = __pyx_state[2]; __pyx_result.numpy_dtype = __pyx_state[3]; __pyx_result.order = __pyx_state[4]; __pyx_result.out_shapes = __pyx_state[5]; __pyx_result.real = __pyx_state[6]; __pyx_result.tot_out_size = __pyx_state[7]
 *     __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 8)             # <<<<<<<<<<<<<<
*/
  __pyx_t_5 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 8); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)

  /* "(tree fragment)":11
 *         __pyx_unpickle__Lambdify__set_state(<_Lambdify> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle__Lambdify__set_state(_Lambdify __pyx_result, __pyx_state: tuple):             # <<<<<<<<<<<<<<
 *     __pyx_result.accum_out_sizes = __pyx_state[0]; __pyx_result.args_size = __pyx_state[1]; __pyx_result.n_exprs = __pyx_state[2]; __pyx_result.numpy_dtype = __pyx_state[3]; __pyx_result.order = __pyx_state[4]; __pyx_result.out_shapes = __pyx_state[5]; __pyx_result.real = __pyx_state[6]; __pyx_result.tot_out_size = __pyx_state[7]
 *     __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 8)
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("symengine.lib.symengine_wrapper.__pyx_unpickle__Lambdify__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
/* #### Code section: module_exttypes ### */

static PyObject *__pyx_tp_new_9symengine_3lib_17symengine_wrapper_Basic(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *p;
  PyObject *o;
  o = __Pyx_AllocateExtensionType(t, 0);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)o);
  __Pyx_default_placement_construct(&(p->thisptr));
  return o;
}

static void __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_Basic(PyObject *o) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *p = (struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_Basic) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_11__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  __Pyx_call_destructor(p->thisptr);
  PyTypeObject *tp = Py_TYPE(o);
  #if CYTHON_USE_TYPE_SLOTS
  (*tp->tp_free)(o);
  #else
  {
    freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free);
    if (tp_free) tp_free(o);
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  Py_DECREF(tp);
  #endif
}

static CYTHON_INLINE PyObject *__pyx_nb_add_9symengine_3lib_17symengine_wrapper_Basic_maybe_call_slot(PyTypeObject* type, PyObject *left, PyObject *right ) {
    binaryfunc slot;
#if CYTHON_USE_TYPE_SLOTS
    slot = type->tp_as_number ? type->tp_as_number->nb_add : NULL;
#else
    slot = (binaryfunc) PyType_GetSlot(type, Py_nb_add);
#endif
    return slot ? slot(left, right ) : __Pyx_NewRef(Py_NotImplemented);
}
static PyObject *__pyx_nb_add_9symengine_3lib_17symengine_wrapper_Basic(PyObject *left, PyObject *right ) {
    int maybe_self_is_left, maybe_self_is_right = 0;
    maybe_self_is_left = Py_TYPE(left) == Py_TYPE(right)
#if CYTHON_USE_TYPE_SLOTS
            || (Py_TYPE(left)->tp_as_number && Py_TYPE(left)->tp_as_number->nb_add == &__pyx_nb_add_9symengine_3lib_17symengine_wrapper_Basic)
#endif
            || __Pyx_TypeCheck(left, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic);
    if (maybe_self_is_left) {
        PyObject *res;
        res = __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_15__add__(left, right);
        if (res != Py_NotImplemented) return res;
        Py_DECREF(res);
    }
    maybe_self_is_right = Py_TYPE(left) == Py_TYPE(right)
#if CYTHON_USE_TYPE_SLOTS
            || (Py_TYPE(right)->tp_as_number && Py_TYPE(right)->tp_as_number->nb_add == &__pyx_nb_add_9symengine_3lib_17symengine_wrapper_Basic)
#endif
            || PyType_IsSubtype(Py_TYPE(right), __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic);
    if (maybe_self_is_right) {
        return __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_17__radd__(right, left);
    }
    return __Pyx_NewRef(Py_NotImplemented);
}



static CYTHON_INLINE PyObject *__pyx_nb_subtract_9symengine_3lib_17symengine_wrapper_Basic_maybe_call_slot(PyTypeObject* type, PyObject *left, PyObject *right ) {
    binaryfunc slot;
#if CYTHON_USE_TYPE_SLOTS
    slot = type->tp_as_number ? type->tp_as_number->nb_subtract : NULL;
#else
    slot = (binaryfunc) PyType_GetSlot(type, Py_nb_subtract);
#endif
    return slot ? slot(left, right ) : __Pyx_NewRef(Py_NotImplemented);
}
static PyObject *__pyx_nb_subtract_9symengine_3lib_17symengine_wrapper_Basic(PyObject *left, PyObject *right ) {
    int maybe_self_is_left, maybe_self_is_right = 0;
    maybe_self_is_left = Py_TYPE(left) == Py_TYPE(right)
#if CYTHON_USE_TYPE_SLOTS
            || (Py_TYPE(left)->tp_as_number && Py_TYPE(left)->tp_as_number->nb_subtract == &__pyx_nb_subtract_9symengine_3lib_17symengine_wrapper_Basic)
#endif
            || __Pyx_TypeCheck(left, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic);
    if (maybe_self_is_left) {
        PyObject *res;
        res = __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_19__sub__(left, right);
        if (res != Py_NotImplemented) return res;
        Py_DECREF(res);
    }
    maybe_self_is_right = Py_TYPE(left) == Py_TYPE(right)
#if CYTHON_USE_TYPE_SLOTS
            || (Py_TYPE(right)->tp_as_number && Py_TYPE(right)->tp_as_number->nb_subtract == &__pyx_nb_subtract_9symengine_3lib_17symengine_wrapper_Basic)
#endif
            || PyType_IsSubtype(Py_TYPE(right), __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic);
    if (maybe_self_is_right) {
        return __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_21__rsub__(right, left);
    }
    return __Pyx_NewRef(Py_NotImplemented);
}



static CYTHON_INLINE PyObject *__pyx_nb_multiply_9symengine_3lib_17symengine_wrapper_Basic_maybe_call_slot(PyTypeObject* type, PyObject *left, PyObject *right ) {
    binaryfunc slot;
#if CYTHON_USE_TYPE_SLOTS
    slot = type->tp_as_number ? type->tp_as_number->nb_multiply : NULL;
#else
    slot = (binaryfunc) PyType_GetSlot(type, Py_nb_multiply);
#endif
    return slot ? slot(left, right ) : __Pyx_NewRef(Py_NotImplemented);
}
static PyObject *__pyx_nb_multiply_9symengine_3lib_17symengine_wrapper_Basic(PyObject *left, PyObject *right ) {
    int maybe_self_is_left, maybe_self_is_right = 0;
    maybe_self_is_left = Py_TYPE(left) == Py_TYPE(right)
#if CYTHON_USE_TYPE_SLOTS
            || (Py_TYPE(left)->tp_as_number && Py_TYPE(left)->tp_as_number->nb_multiply == &__pyx_nb_multiply_9symengine_3lib_17symengine_wrapper_Basic)
#endif
            || __Pyx_TypeCheck(left, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic);
    if (maybe_self_is_left) {
        PyObject *res;
        res = __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_23__mul__(left, right);
        if (res != Py_NotImplemented) return res;
        Py_DECREF(res);
    }
    maybe_self_is_right = Py_TYPE(left) == Py_TYPE(right)
#if CYTHON_USE_TYPE_SLOTS
            || (Py_TYPE(right)->tp_as_number && Py_TYPE(right)->tp_as_number->nb_multiply == &__pyx_nb_multiply_9symengine_3lib_17symengine_wrapper_Basic)
#endif
            || PyType_IsSubtype(Py_TYPE(right), __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic);
    if (maybe_self_is_right) {
        return __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_25__rmul__(right, left);
    }
    return __Pyx_NewRef(Py_NotImplemented);
}



static CYTHON_INLINE PyObject *__pyx_nb_remainder_9symengine_3lib_17symengine_wrapper_Basic_maybe_call_slot(PyTypeObject* type, PyObject *left, PyObject *right ) {
    binaryfunc slot;
#if CYTHON_USE_TYPE_SLOTS
    slot = type->tp_as_number ? type->tp_as_number->nb_remainder : NULL;
#else
    slot = (binaryfunc) PyType_GetSlot(type, Py_nb_remainder);
#endif
    return slot ? slot(left, right ) : __Pyx_NewRef(Py_NotImplemented);
}
static PyObject *__pyx_nb_remainder_9symengine_3lib_17symengine_wrapper_Basic(PyObject *left, PyObject *right ) {
    int maybe_self_is_left, maybe_self_is_right = 0;
    maybe_self_is_left = Py_TYPE(left) == Py_TYPE(right)
#if CYTHON_USE_TYPE_SLOTS
            || (Py_TYPE(left)->tp_as_number && Py_TYPE(left)->tp_as_number->nb_remainder == &__pyx_nb_remainder_9symengine_3lib_17symengine_wrapper_Basic)
#endif
            || __Pyx_TypeCheck(left, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic);
    if (maybe_self_is_left) {
        PyObject *res;
        res = __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_35__mod__(left, right);
        if (res != Py_NotImplemented) return res;
        Py_DECREF(res);
    }
    maybe_self_is_right = Py_TYPE(left) == Py_TYPE(right)
#if CYTHON_USE_TYPE_SLOTS
            || (Py_TYPE(right)->tp_as_number && Py_TYPE(right)->tp_as_number->nb_remainder == &__pyx_nb_remainder_9symengine_3lib_17symengine_wrapper_Basic)
#endif
            || PyType_IsSubtype(Py_TYPE(right), __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic);
    if (maybe_self_is_right) {
        return __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_37__rmod__(right, left);
    }
    return __Pyx_NewRef(Py_NotImplemented);
}



static CYTHON_INLINE PyObject *__pyx_nb_divmod_9symengine_3lib_17symengine_wrapper_Basic_maybe_call_slot(PyTypeObject* type, PyObject *left, PyObject *right ) {
    binaryfunc slot;
#if CYTHON_USE_TYPE_SLOTS
    slot = type->tp_as_number ? type->tp_as_number->nb_divmod : NULL;
#else
    slot = (binaryfunc) PyType_GetSlot(type, Py_nb_divmod);
#endif
    return slot ? slot(left, right ) : __Pyx_NewRef(Py_NotImplemented);
}
static PyObject *__pyx_nb_divmod_9symengine_3lib_17symengine_wrapper_Basic(PyObject *left, PyObject *right ) {
    int maybe_self_is_left, maybe_self_is_right = 0;
    maybe_self_is_left = Py_TYPE(left) == Py_TYPE(right)
#if CYTHON_USE_TYPE_SLOTS
            || (Py_TYPE(left)->tp_as_number && Py_TYPE(left)->tp_as_number->nb_divmod == &__pyx_nb_divmod_9symengine_3lib_17symengine_wrapper_Basic)
#endif
            || __Pyx_TypeCheck(left, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic);
    if (maybe_self_is_left) {
        PyObject *res;
        res = __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_39__divmod__(left, right);
        if (res != Py_NotImplemented) return res;
        Py_DECREF(res);
    }
    maybe_self_is_right = Py_TYPE(left) == Py_TYPE(right)
#if CYTHON_USE_TYPE_SLOTS
            || (Py_TYPE(right)->tp_as_number && Py_TYPE(right)->tp_as_number->nb_divmod == &__pyx_nb_divmod_9symengine_3lib_17symengine_wrapper_Basic)
#endif
            || PyType_IsSubtype(Py_TYPE(right), __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic);
    if (maybe_self_is_right) {
        return __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_41__rdivmod__(right, left);
    }
    return __Pyx_NewRef(Py_NotImplemented);
}



static CYTHON_INLINE PyObject *__pyx_nb_power_9symengine_3lib_17symengine_wrapper_Basic_maybe_call_slot(PyTypeObject* type, PyObject *left, PyObject *right , PyObject* extra_arg) {
    ternaryfunc slot;
#if CYTHON_USE_TYPE_SLOTS
    slot = type->tp_as_number ? type->tp_as_number->nb_power : NULL;
#else
    slot = (ternaryfunc) PyType_GetSlot(type, Py_nb_power);
#endif
    return slot ? slot(left, right , extra_arg) : __Pyx_NewRef(Py_NotImplemented);
}
static PyObject *__pyx_nb_power_9symengine_3lib_17symengine_wrapper_Basic(PyObject *left, PyObject *right , PyObject* extra_arg) {
    int maybe_self_is_left, maybe_self_is_right = 0;
    maybe_self_is_left = Py_TYPE(left) == Py_TYPE(right)
#if CYTHON_USE_TYPE_SLOTS
            || (Py_TYPE(left)->tp_as_number && Py_TYPE(left)->tp_as_number->nb_power == &__pyx_nb_power_9symengine_3lib_17symengine_wrapper_Basic)
#endif
            || __Pyx_TypeCheck(left, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic);
    if (maybe_self_is_left) {
        PyObject *res;
        res = __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_43__pow__(left, right, extra_arg);
        if (res != Py_NotImplemented) return res;
        Py_DECREF(res);
    }
    maybe_self_is_right = Py_TYPE(left) == Py_TYPE(right)
#if CYTHON_USE_TYPE_SLOTS
            || (Py_TYPE(right)->tp_as_number && Py_TYPE(right)->tp_as_number->nb_power == &__pyx_nb_power_9symengine_3lib_17symengine_wrapper_Basic)
#endif
            || PyType_IsSubtype(Py_TYPE(right), __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic);
    if (maybe_self_is_right) {
        return __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_45__rpow__(right, left, extra_arg);
    }
    return __Pyx_NewRef(Py_NotImplemented);
}



static CYTHON_INLINE PyObject *__pyx_nb_floor_divide_9symengine_3lib_17symengine_wrapper_Basic_maybe_call_slot(PyTypeObject* type, PyObject *left, PyObject *right ) {
    binaryfunc slot;
#if CYTHON_USE_TYPE_SLOTS
    slot = type->tp_as_number ? type->tp_as_number->nb_floor_divide : NULL;
#else
    slot = (binaryfunc) PyType_GetSlot(type, Py_nb_floor_divide);
#endif
    return slot ? slot(left, right ) : __Pyx_NewRef(Py_NotImplemented);
}
static PyObject *__pyx_nb_floor_divide_9symengine_3lib_17symengine_wrapper_Basic(PyObject *left, PyObject *right ) {
    int maybe_self_is_left, maybe_self_is_right = 0;
    maybe_self_is_left = Py_TYPE(left) == Py_TYPE(right)
#if CYTHON_USE_TYPE_SLOTS
            || (Py_TYPE(left)->tp_as_number && Py_TYPE(left)->tp_as_number->nb_floor_divide == &__pyx_nb_floor_divide_9symengine_3lib_17symengine_wrapper_Basic)
#endif
            || __Pyx_TypeCheck(left, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic);
    if (maybe_self_is_left) {
        PyObject *res;
        res = __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_31__floordiv__(left, right);
        if (res != Py_NotImplemented) return res;
        Py_DECREF(res);
    }
    maybe_self_is_right = Py_TYPE(left) == Py_TYPE(right)
#if CYTHON_USE_TYPE_SLOTS
            || (Py_TYPE(right)->tp_as_number && Py_TYPE(right)->tp_as_number->nb_floor_divide == &__pyx_nb_floor_divide_9symengine_3lib_17symengine_wrapper_Basic)
#endif
            || PyType_IsSubtype(Py_TYPE(right), __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic);
    if (maybe_self_is_right) {
        return __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_33__rfloordiv__(right, left);
    }
    return __Pyx_NewRef(Py_NotImplemented);
}



static CYTHON_INLINE PyObject *__pyx_nb_true_divide_9symengine_3lib_17symengine_wrapper_Basic_maybe_call_slot(PyTypeObject* type, PyObject *left, PyObject *right ) {
    binaryfunc slot;
#if CYTHON_USE_TYPE_SLOTS
    slot = type->tp_as_number ? type->tp_as_number->nb_true_divide : NULL;
#else
    slot = (binaryfunc) PyType_GetSlot(type, Py_nb_true_divide);
#endif
    return slot ? slot(left, right ) : __Pyx_NewRef(Py_NotImplemented);
}
static PyObject *__pyx_nb_true_divide_9symengine_3lib_17symengine_wrapper_Basic(PyObject *left, PyObject *right ) {
    int maybe_self_is_left, maybe_self_is_right = 0;
    maybe_self_is_left = Py_TYPE(left) == Py_TYPE(right)
#if CYTHON_USE_TYPE_SLOTS
            || (Py_TYPE(left)->tp_as_number && Py_TYPE(left)->tp_as_number->nb_true_divide == &__pyx_nb_true_divide_9symengine_3lib_17symengine_wrapper_Basic)
#endif
            || __Pyx_TypeCheck(left, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic);
    if (maybe_self_is_left) {
        PyObject *res;
        res = __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_27__truediv__(left, right);
        if (res != Py_NotImplemented) return res;
        Py_DECREF(res);
    }
    maybe_self_is_right = Py_TYPE(left) == Py_TYPE(right)
#if CYTHON_USE_TYPE_SLOTS
            || (Py_TYPE(right)->tp_as_number && Py_TYPE(right)->tp_as_number->nb_true_divide == &__pyx_nb_true_divide_9symengine_3lib_17symengine_wrapper_Basic)
#endif
            || PyType_IsSubtype(Py_TYPE(right), __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic);
    if (maybe_self_is_right) {
        return __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_29__rtruediv__(right, left);
    }
    return __Pyx_NewRef(Py_NotImplemented);
}



static PyObject *__pyx_getprop_9symengine_3lib_17symengine_wrapper_5Basic_args(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_4args_1__get__(o);
}

static PyObject *__pyx_getprop_9symengine_3lib_17symengine_wrapper_5Basic_free_symbols(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_12free_symbols_1__get__(o);
}

static PyObject *__pyx_getprop_9symengine_3lib_17symengine_wrapper_5Basic_is_Atom(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_7is_Atom_1__get__(o);
}

static PyObject *__pyx_getprop_9symengine_3lib_17symengine_wrapper_5Basic_is_Symbol(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_9is_Symbol_1__get__(o);
}

static PyObject *__pyx_getprop_9symengine_3lib_17symengine_wrapper_5Basic_is_symbol(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_9is_symbol_1__get__(o);
}

static PyObject *__pyx_getprop_9symengine_3lib_17symengine_wrapper_5Basic_is_Dummy(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_8is_Dummy_1__get__(o);
}

static PyObject *__pyx_getprop_9symengine_3lib_17symengine_wrapper_5Basic_is_Function(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_11is_Function_1__get__(o);
}

static PyObject *__pyx_getprop_9symengine_3lib_17symengine_wrapper_5Basic_is_Add(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_6is_Add_1__get__(o);
}

static PyObject *__pyx_getprop_9symengine_3lib_17symengine_wrapper_5Basic_is_Mul(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_6is_Mul_1__get__(o);
}

static PyObject *__pyx_getprop_9symengine_3lib_17symengine_wrapper_5Basic_is_Pow(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_6is_Pow_1__get__(o);
}

static PyObject *__pyx_getprop_9symengine_3lib_17symengine_wrapper_5Basic_is_Number(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_9is_Number_1__get__(o);
}

static PyObject *__pyx_getprop_9symengine_3lib_17symengine_wrapper_5Basic_is_number(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_9is_number_1__get__(o);
}

static PyObject *__pyx_getprop_9symengine_3lib_17symengine_wrapper_5Basic_is_Float(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_8is_Float_1__get__(o);
}

static PyObject *__pyx_getprop_9symengine_3lib_17symengine_wrapper_5Basic_is_Rational(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_11is_Rational_1__get__(o);
}

static PyObject *__pyx_getprop_9symengine_3lib_17symengine_wrapper_5Basic_is_Integer(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_10is_Integer_1__get__(o);
}

static PyObject *__pyx_getprop_9symengine_3lib_17symengine_wrapper_5Basic_is_integer(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_10is_integer_1__get__(o);
}

static PyObject *__pyx_getprop_9symengine_3lib_17symengine_wrapper_5Basic_is_finite(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_9is_finite_1__get__(o);
}

static PyObject *__pyx_getprop_9symengine_3lib_17symengine_wrapper_5Basic_is_Derivative(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_13is_Derivative_1__get__(o);
}

static PyObject *__pyx_getprop_9symengine_3lib_17symengine_wrapper_5Basic_is_AlgebraicNumber(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_18is_AlgebraicNumber_1__get__(o);
}

static PyObject *__pyx_getprop_9symengine_3lib_17symengine_wrapper_5Basic_is_Relational(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_13is_Relational_1__get__(o);
}

static PyObject *__pyx_getprop_9symengine_3lib_17symengine_wrapper_5Basic_is_Equality(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_11is_Equality_1__get__(o);
}

static PyObject *__pyx_getprop_9symengine_3lib_17symengine_wrapper_5Basic_is_Boolean(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_10is_Boolean_1__get__(o);
}

static PyObject *__pyx_getprop_9symengine_3lib_17symengine_wrapper_5Basic_is_Not(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_6is_Not_1__get__(o);
}

static PyObject *__pyx_getprop_9symengine_3lib_17symengine_wrapper_5Basic_is_Matrix(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_9is_Matrix_1__get__(o);
}

static PyObject *__pyx_getprop_9symengine_3lib_17symengine_wrapper_5Basic_is_zero(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_7is_zero_1__get__(o);
}

static PyObject *__pyx_getprop_9symengine_3lib_17symengine_wrapper_5Basic_is_positive(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_11is_positive_1__get__(o);
}

static PyObject *__pyx_getprop_9symengine_3lib_17symengine_wrapper_5Basic_is_negative(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_11is_negative_1__get__(o);
}

static PyObject *__pyx_getprop_9symengine_3lib_17symengine_wrapper_5Basic_is_nonpositive(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_14is_nonpositive_1__get__(o);
}

static PyObject *__pyx_getprop_9symengine_3lib_17symengine_wrapper_5Basic_is_nonnegative(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_14is_nonnegative_1__get__(o);
}

static PyObject *__pyx_getprop_9symengine_3lib_17symengine_wrapper_5Basic_is_real(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_7is_real_1__get__(o);
}

static PyMethodDef __pyx_methods_9symengine_3lib_17symengine_wrapper_Basic[] = {
  {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_5__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"_repr_latex_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_7_repr_latex_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"_unsafe_reset", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_13_unsafe_reset, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__add__", (PyCFunction)__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_15__add__, METH_O|METH_COEXIST, 0},
  {"__radd__", (PyCFunction)__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_17__radd__, METH_O|METH_COEXIST, 0},
  {"__sub__", (PyCFunction)__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_19__sub__, METH_O|METH_COEXIST, 0},
  {"__rsub__", (PyCFunction)__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_21__rsub__, METH_O|METH_COEXIST, 0},
  {"__mul__", (PyCFunction)__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_23__mul__, METH_O|METH_COEXIST, 0},
  {"__rmul__", (PyCFunction)__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_25__rmul__, METH_O|METH_COEXIST, 0},
  {"__truediv__", (PyCFunction)__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_27__truediv__, METH_O|METH_COEXIST, 0},
  {"__rtruediv__", (PyCFunction)__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_29__rtruediv__, METH_O|METH_COEXIST, 0},
  {"__floordiv__", (PyCFunction)__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_31__floordiv__, METH_O|METH_COEXIST, 0},
  {"__rfloordiv__", (PyCFunction)__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_33__rfloordiv__, METH_O|METH_COEXIST, 0},
  {"__mod__", (PyCFunction)__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_35__mod__, METH_O|METH_COEXIST, 0},
  {"__rmod__", (PyCFunction)__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_37__rmod__, METH_O|METH_COEXIST, 0},
  {"__divmod__", (PyCFunction)__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_39__divmod__, METH_O|METH_COEXIST, 0},
  {"__rdivmod__", (PyCFunction)__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_41__rdivmod__, METH_O|METH_COEXIST, 0},
  {"_richcmp_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_55_richcmp_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"expand", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_57expand, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"_diff", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_59_diff, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"diff", (PyCFunction)(void(*)(void))(PyCFunctionWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_61diff, METH_VARARGS|METH_KEYWORDS, 0},
  {"subs_dict", (PyCFunction)(void(*)(void))(PyCFunctionWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_63subs_dict, METH_VARARGS|METH_KEYWORDS, 0},
  {"subs_oldnew", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_65subs_oldnew, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"subs", (PyCFunction)(void(*)(void))(PyCFunctionWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_67subs, METH_VARARGS|METH_KEYWORDS, 0},
  {"xreplace", (PyCFunction)(void(*)(void))(PyCFunctionWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_69xreplace, METH_VARARGS|METH_KEYWORDS, 0},
  {"msubs", (PyCFunction)(void(*)(void))(PyCFunctionWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_71msubs, METH_VARARGS|METH_KEYWORDS, 0},
  {"as_numer_denom", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_73as_numer_denom, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"as_real_imag", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_75as_real_imag, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"n", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_77n, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"copy", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_79copy, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"_symbolic_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_81_symbolic_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"atoms", (PyCFunction)(void(*)(void))(PyCFunctionWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_83atoms, METH_VARARGS|METH_KEYWORDS, 0},
  {"simplify", (PyCFunction)(void(*)(void))(PyCFunctionWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_85simplify, METH_VARARGS|METH_KEYWORDS, 0},
  {"as_coefficients_dict", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_87as_coefficients_dict, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"coeff", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_89coeff, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"has", (PyCFunction)(void(*)(void))(PyCFunctionWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_91has, METH_VARARGS|METH_KEYWORDS, 0},
  {"args_as_sage", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_93args_as_sage, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"args_as_sympy", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_95args_as_sympy, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__complex__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_101__complex__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"as_powers_dict", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_103as_powers_dict, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_9symengine_3lib_17symengine_wrapper_Basic[] = {
  {"args", __pyx_getprop_9symengine_3lib_17symengine_wrapper_5Basic_args, 0, 0, 0},
  {"free_symbols", __pyx_getprop_9symengine_3lib_17symengine_wrapper_5Basic_free_symbols, 0, 0, 0},
  {"is_Atom", __pyx_getprop_9symengine_3lib_17symengine_wrapper_5Basic_is_Atom, 0, 0, 0},
  {"is_Symbol", __pyx_getprop_9symengine_3lib_17symengine_wrapper_5Basic_is_Symbol, 0, 0, 0},
  {"is_symbol", __pyx_getprop_9symengine_3lib_17symengine_wrapper_5Basic_is_symbol, 0, 0, 0},
  {"is_Dummy", __pyx_getprop_9symengine_3lib_17symengine_wrapper_5Basic_is_Dummy, 0, 0, 0},
  {"is_Function", __pyx_getprop_9symengine_3lib_17symengine_wrapper_5Basic_is_Function, 0, 0, 0},
  {"is_Add", __pyx_getprop_9symengine_3lib_17symengine_wrapper_5Basic_is_Add, 0, 0, 0},
  {"is_Mul", __pyx_getprop_9symengine_3lib_17symengine_wrapper_5Basic_is_Mul, 0, 0, 0},
  {"is_Pow", __pyx_getprop_9symengine_3lib_17symengine_wrapper_5Basic_is_Pow, 0, 0, 0},
  {"is_Number", __pyx_getprop_9symengine_3lib_17symengine_wrapper_5Basic_is_Number, 0, 0, 0},
  {"is_number", __pyx_getprop_9symengine_3lib_17symengine_wrapper_5Basic_is_number, 0, 0, 0},
  {"is_Float", __pyx_getprop_9symengine_3lib_17symengine_wrapper_5Basic_is_Float, 0, 0, 0},
  {"is_Rational", __pyx_getprop_9symengine_3lib_17symengine_wrapper_5Basic_is_Rational, 0, 0, 0},
  {"is_Integer", __pyx_getprop_9symengine_3lib_17symengine_wrapper_5Basic_is_Integer, 0, 0, 0},
  {"is_integer", __pyx_getprop_9symengine_3lib_17symengine_wrapper_5Basic_is_integer, 0, 0, 0},
  {"is_finite", __pyx_getprop_9symengine_3lib_17symengine_wrapper_5Basic_is_finite, 0, 0, 0},
  {"is_Derivative", __pyx_getprop_9symengine_3lib_17symengine_wrapper_5Basic_is_Derivative, 0, 0, 0},
  {"is_AlgebraicNumber", __pyx_getprop_9symengine_3lib_17symengine_wrapper_5Basic_is_AlgebraicNumber, 0, 0, 0},
  {"is_Relational", __pyx_getprop_9symengine_3lib_17symengine_wrapper_5Basic_is_Relational, 0, 0, 0},
  {"is_Equality", __pyx_getprop_9symengine_3lib_17symengine_wrapper_5Basic_is_Equality, 0, 0, 0},
  {"is_Boolean", __pyx_getprop_9symengine_3lib_17symengine_wrapper_5Basic_is_Boolean, 0, 0, 0},
  {"is_Not", __pyx_getprop_9symengine_3lib_17symengine_wrapper_5Basic_is_Not, 0, 0, 0},
  {"is_Matrix", __pyx_getprop_9symengine_3lib_17symengine_wrapper_5Basic_is_Matrix, 0, 0, 0},
  {"is_zero", __pyx_getprop_9symengine_3lib_17symengine_wrapper_5Basic_is_zero, 0, 0, 0},
  {"is_positive", __pyx_getprop_9symengine_3lib_17symengine_wrapper_5Basic_is_positive, 0, 0, 0},
  {"is_negative", __pyx_getprop_9symengine_3lib_17symengine_wrapper_5Basic_is_negative, 0, 0, 0},
  {"is_nonpositive", __pyx_getprop_9symengine_3lib_17symengine_wrapper_5Basic_is_nonpositive, 0, 0, 0},
  {"is_nonnegative", __pyx_getprop_9symengine_3lib_17symengine_wrapper_5Basic_is_nonnegative, 0, 0, 0},
  {"is_real", __pyx_getprop_9symengine_3lib_17symengine_wrapper_5Basic_is_real, 0, 0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9symengine_3lib_17symengine_wrapper_Basic_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_Basic},
  {Py_tp_repr, (void *)__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_3__repr__},
  {Py_nb_add, (void *)__pyx_nb_add_9symengine_3lib_17symengine_wrapper_Basic},
  {Py_nb_subtract, (void *)__pyx_nb_subtract_9symengine_3lib_17symengine_wrapper_Basic},
  {Py_nb_multiply, (void *)__pyx_nb_multiply_9symengine_3lib_17symengine_wrapper_Basic},
  {Py_nb_remainder, (void *)__pyx_nb_remainder_9symengine_3lib_17symengine_wrapper_Basic},
  {Py_nb_divmod, (void *)__pyx_nb_divmod_9symengine_3lib_17symengine_wrapper_Basic},
  {Py_nb_power, (void *)__pyx_nb_power_9symengine_3lib_17symengine_wrapper_Basic},
  {Py_nb_negative, (void *)__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_47__neg__},
  {Py_nb_positive, (void *)__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_49__pos__},
  {Py_nb_absolute, (void *)__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_51__abs__},
  {Py_nb_int, (void *)__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_99__int__},
  {Py_nb_float, (void *)__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_97__float__},
  {Py_nb_floor_divide, (void *)__pyx_nb_floor_divide_9symengine_3lib_17symengine_wrapper_Basic},
  {Py_nb_true_divide, (void *)__pyx_nb_true_divide_9symengine_3lib_17symengine_wrapper_Basic},
  {Py_tp_hash, (void *)__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_9__hash__},
  {Py_tp_str, (void *)__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_1__str__},
  {Py_tp_richcompare, (void *)__pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_53__richcmp__},
  {Py_tp_methods, (void *)__pyx_methods_9symengine_3lib_17symengine_wrapper_Basic},
  {Py_tp_getset, (void *)__pyx_getsets_9symengine_3lib_17symengine_wrapper_Basic},
  {Py_tp_new, (void *)__pyx_tp_new_9symengine_3lib_17symengine_wrapper_Basic},
  {0, 0},
};
static PyType_Spec __pyx_type_9symengine_3lib_17symengine_wrapper_Basic_spec = {
  "symengine.lib.symengine_wrapper.Basic",
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
  __pyx_type_9symengine_3lib_17symengine_wrapper_Basic_slots,
};
#else

static PyNumberMethods __pyx_tp_as_number_Basic = {
  __pyx_nb_add_9symengine_3lib_17symengine_wrapper_Basic, /*nb_add*/
  __pyx_nb_subtract_9symengine_3lib_17symengine_wrapper_Basic, /*nb_subtract*/
  __pyx_nb_multiply_9symengine_3lib_17symengine_wrapper_Basic, /*nb_multiply*/
  __pyx_nb_remainder_9symengine_3lib_17symengine_wrapper_Basic, /*nb_remainder*/
  __pyx_nb_divmod_9symengine_3lib_17symengine_wrapper_Basic, /*nb_divmod*/
  __pyx_nb_power_9symengine_3lib_17symengine_wrapper_Basic, /*nb_power*/
  __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_47__neg__, /*nb_negative*/
  __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_49__pos__, /*nb_positive*/
  __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_51__abs__, /*nb_absolute*/
  0, /*nb_bool*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_99__int__, /*nb_int*/
  0, /*nb_long (reserved)*/
  __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_97__float__, /*nb_float*/
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  __pyx_nb_floor_divide_9symengine_3lib_17symengine_wrapper_Basic, /*nb_floor_divide*/
  __pyx_nb_true_divide_9symengine_3lib_17symengine_wrapper_Basic, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  0, /*nb_index*/
  0, /*nb_matrix_multiply*/
  0, /*nb_inplace_matrix_multiply*/
};

static PyTypeObject __pyx_type_9symengine_3lib_17symengine_wrapper_Basic = {
  PyVarObject_HEAD_INIT(0, 0)
  "symengine.lib.symengine_wrapper.""Basic", /*tp_name*/
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Basic), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_Basic, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_3__repr__, /*tp_repr*/
  &__pyx_tp_as_number_Basic, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_9__hash__, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_1__str__, /*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*/
  __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_53__richcmp__, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9symengine_3lib_17symengine_wrapper_Basic, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_9symengine_3lib_17symengine_wrapper_Basic, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9symengine_3lib_17symengine_wrapper_Basic, /*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 CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static PyObject *__pyx_tp_new_9symengine_3lib_17symengine_wrapper_MatrixBase(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  o = __Pyx_AllocateExtensionType(t, 0);
  if (unlikely(!o)) return 0;
  return o;
}

static void __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_MatrixBase(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_MatrixBase) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_9symengine_3lib_17symengine_wrapper_10MatrixBase_5__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  PyTypeObject *tp = Py_TYPE(o);
  #if CYTHON_USE_TYPE_SLOTS
  (*tp->tp_free)(o);
  #else
  {
    freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free);
    if (tp_free) tp_free(o);
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  Py_DECREF(tp);
  #endif
}

static PyObject *__pyx_getprop_9symengine_3lib_17symengine_wrapper_10MatrixBase_is_Matrix(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9symengine_3lib_17symengine_wrapper_10MatrixBase_9is_Matrix_1__get__(o);
}

static PyMethodDef __pyx_methods_9symengine_3lib_17symengine_wrapper_MatrixBase[] = {
  {"_richcmp_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_10MatrixBase_3_richcmp_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"_symbolic_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_10MatrixBase_7_symbolic_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_10MatrixBase_11__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_10MatrixBase_13__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_9symengine_3lib_17symengine_wrapper_MatrixBase[] = {
  {"is_Matrix", __pyx_getprop_9symengine_3lib_17symengine_wrapper_10MatrixBase_is_Matrix, 0, 0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9symengine_3lib_17symengine_wrapper_MatrixBase_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_MatrixBase},
  {Py_tp_hash, (void *)__pyx_pw_9symengine_3lib_17symengine_wrapper_10MatrixBase_9__hash__},
  {Py_tp_richcompare, (void *)__pyx_pw_9symengine_3lib_17symengine_wrapper_10MatrixBase_1__richcmp__},
  {Py_tp_methods, (void *)__pyx_methods_9symengine_3lib_17symengine_wrapper_MatrixBase},
  {Py_tp_getset, (void *)__pyx_getsets_9symengine_3lib_17symengine_wrapper_MatrixBase},
  {Py_tp_new, (void *)__pyx_tp_new_9symengine_3lib_17symengine_wrapper_MatrixBase},
  {0, 0},
};
static PyType_Spec __pyx_type_9symengine_3lib_17symengine_wrapper_MatrixBase_spec = {
  "symengine.lib.symengine_wrapper.MatrixBase",
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_MatrixBase),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
  __pyx_type_9symengine_3lib_17symengine_wrapper_MatrixBase_slots,
};
#else

static PyTypeObject __pyx_type_9symengine_3lib_17symengine_wrapper_MatrixBase = {
  PyVarObject_HEAD_INIT(0, 0)
  "symengine.lib.symengine_wrapper.""MatrixBase", /*tp_name*/
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_MatrixBase), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_MatrixBase, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  __pyx_pw_9symengine_3lib_17symengine_wrapper_10MatrixBase_9__hash__, /*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*/
  __pyx_pw_9symengine_3lib_17symengine_wrapper_10MatrixBase_1__richcmp__, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9symengine_3lib_17symengine_wrapper_MatrixBase, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_9symengine_3lib_17symengine_wrapper_MatrixBase, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9symengine_3lib_17symengine_wrapper_MatrixBase, /*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 CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static PyObject *__pyx_tp_new_9symengine_3lib_17symengine_wrapper_PyFunctionClass(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_PyFunctionClass *p;
  PyObject *o;
  o = __Pyx_AllocateExtensionType(t, 0);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_PyFunctionClass *)o);
  __Pyx_default_placement_construct(&(p->thisptr));
  if (unlikely(__pyx_pw_9symengine_3lib_17symengine_wrapper_15PyFunctionClass_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_PyFunctionClass(PyObject *o) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_PyFunctionClass *p = (struct __pyx_obj_9symengine_3lib_17symengine_wrapper_PyFunctionClass *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_PyFunctionClass) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  __Pyx_call_destructor(p->thisptr);
  PyTypeObject *tp = Py_TYPE(o);
  #if CYTHON_USE_TYPE_SLOTS
  (*tp->tp_free)(o);
  #else
  {
    freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free);
    if (tp_free) tp_free(o);
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  Py_DECREF(tp);
  #endif
}

static PyMethodDef __pyx_methods_9symengine_3lib_17symengine_wrapper_PyFunctionClass[] = {
  {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15PyFunctionClass_3__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15PyFunctionClass_5__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9symengine_3lib_17symengine_wrapper_PyFunctionClass_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_PyFunctionClass},
  {Py_tp_methods, (void *)__pyx_methods_9symengine_3lib_17symengine_wrapper_PyFunctionClass},
  {Py_tp_new, (void *)__pyx_tp_new_9symengine_3lib_17symengine_wrapper_PyFunctionClass},
  {0, 0},
};
static PyType_Spec __pyx_type_9symengine_3lib_17symengine_wrapper_PyFunctionClass_spec = {
  "symengine.lib.symengine_wrapper.PyFunctionClass",
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_PyFunctionClass),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
  __pyx_type_9symengine_3lib_17symengine_wrapper_PyFunctionClass_slots,
};
#else

static PyTypeObject __pyx_type_9symengine_3lib_17symengine_wrapper_PyFunctionClass = {
  PyVarObject_HEAD_INIT(0, 0)
  "symengine.lib.symengine_wrapper.""PyFunctionClass", /*tp_name*/
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_PyFunctionClass), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_PyFunctionClass, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  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_9symengine_3lib_17symengine_wrapper_PyFunctionClass, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9symengine_3lib_17symengine_wrapper_PyFunctionClass, /*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 CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static PyObject *__pyx_tp_new_9symengine_3lib_17symengine_wrapper_PyModule(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_PyModule *p;
  PyObject *o;
  o = __Pyx_AllocateExtensionType(t, 0);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_PyModule *)o);
  __Pyx_default_placement_construct(&(p->thisptr));
  return o;
}

static void __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_PyModule(PyObject *o) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_PyModule *p = (struct __pyx_obj_9symengine_3lib_17symengine_wrapper_PyModule *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_PyModule) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  __Pyx_call_destructor(p->thisptr);
  PyTypeObject *tp = Py_TYPE(o);
  #if CYTHON_USE_TYPE_SLOTS
  (*tp->tp_free)(o);
  #else
  {
    freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free);
    if (tp_free) tp_free(o);
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  Py_DECREF(tp);
  #endif
}
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9symengine_3lib_17symengine_wrapper_PyModule_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_PyModule},
  {Py_tp_new, (void *)__pyx_tp_new_9symengine_3lib_17symengine_wrapper_PyModule},
  {0, 0},
};
static PyType_Spec __pyx_type_9symengine_3lib_17symengine_wrapper_PyModule_spec = {
  "symengine.lib.symengine_wrapper.PyModule",
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_PyModule),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
  __pyx_type_9symengine_3lib_17symengine_wrapper_PyModule_slots,
};
#else

static PyTypeObject __pyx_type_9symengine_3lib_17symengine_wrapper_PyModule = {
  PyVarObject_HEAD_INIT(0, 0)
  "symengine.lib.symengine_wrapper.""PyModule", /*tp_name*/
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_PyModule), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_PyModule, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  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*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9symengine_3lib_17symengine_wrapper_PyModule, /*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 CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static PyObject *__pyx_tp_new_9symengine_3lib_17symengine_wrapper__DictBasic(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper__DictBasic *p;
  PyObject *o;
  o = __Pyx_AllocateExtensionType(t, 0);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper__DictBasic *)o);
  __Pyx_default_placement_construct(&(p->c));
  return o;
}

static void __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper__DictBasic(PyObject *o) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper__DictBasic *p = (struct __pyx_obj_9symengine_3lib_17symengine_wrapper__DictBasic *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper__DictBasic) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  __Pyx_call_destructor(p->c);
  PyTypeObject *tp = Py_TYPE(o);
  #if CYTHON_USE_TYPE_SLOTS
  (*tp->tp_free)(o);
  #else
  {
    freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free);
    if (tp_free) tp_free(o);
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  Py_DECREF(tp);
  #endif
}

static PyObject *__pyx_sq_item_9symengine_3lib_17symengine_wrapper__DictBasic(PyObject *o, Py_ssize_t i) {
  PyObject *r;
  PyObject *x = PyLong_FromSsize_t(i); if(!x) return 0;
  #if CYTHON_USE_TYPE_SLOTS || (!CYTHON_USE_TYPE_SPECS && __PYX_LIMITED_VERSION_HEX < 0x030A0000)
  r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
  #else
  r = ((binaryfunc)PyType_GetSlot(Py_TYPE(o), Py_mp_subscript))(o, x);
  #endif
  Py_DECREF(x);
  return r;
}

static int __pyx_mp_ass_subscript_9symengine_3lib_17symengine_wrapper__DictBasic(PyObject *o, PyObject *i, PyObject *v) {
  if (v) {
    return __pyx_pw_9symengine_3lib_17symengine_wrapper_10_DictBasic_15__setitem__(o, i, v);
  }
  else {
    return __pyx_pw_9symengine_3lib_17symengine_wrapper_10_DictBasic_19__delitem__(o, i);
  }
}

static PyMethodDef __pyx_methods_9symengine_3lib_17symengine_wrapper__DictBasic[] = {
  {"as_dict", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_10_DictBasic_3as_dict, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"add_dict", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_10_DictBasic_5add_dict, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"add", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_10_DictBasic_7add, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"copy", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_10_DictBasic_9copy, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"clear", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_10_DictBasic_17clear, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_10_DictBasic_25__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_10_DictBasic_27__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9symengine_3lib_17symengine_wrapper__DictBasic_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper__DictBasic},
  {Py_sq_length, (void *)__pyx_pw_9symengine_3lib_17symengine_wrapper_10_DictBasic_11__len__},
  {Py_sq_item, (void *)__pyx_sq_item_9symengine_3lib_17symengine_wrapper__DictBasic},
  {Py_sq_contains, (void *)__pyx_pw_9symengine_3lib_17symengine_wrapper_10_DictBasic_21__contains__},
  {Py_mp_length, (void *)__pyx_pw_9symengine_3lib_17symengine_wrapper_10_DictBasic_11__len__},
  {Py_mp_subscript, (void *)__pyx_pw_9symengine_3lib_17symengine_wrapper_10_DictBasic_13__getitem__},
  {Py_mp_ass_subscript, (void *)__pyx_mp_ass_subscript_9symengine_3lib_17symengine_wrapper__DictBasic},
  {Py_tp_iter, (void *)__pyx_pw_9symengine_3lib_17symengine_wrapper_10_DictBasic_23__iter__},
  {Py_tp_methods, (void *)__pyx_methods_9symengine_3lib_17symengine_wrapper__DictBasic},
  {Py_tp_init, (void *)__pyx_pw_9symengine_3lib_17symengine_wrapper_10_DictBasic_1__init__},
  {Py_tp_new, (void *)__pyx_tp_new_9symengine_3lib_17symengine_wrapper__DictBasic},
  {0, 0},
};
static PyType_Spec __pyx_type_9symengine_3lib_17symengine_wrapper__DictBasic_spec = {
  "symengine.lib.symengine_wrapper._DictBasic",
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper__DictBasic),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
  __pyx_type_9symengine_3lib_17symengine_wrapper__DictBasic_slots,
};
#else

static PySequenceMethods __pyx_tp_as_sequence__DictBasic = {
  __pyx_pw_9symengine_3lib_17symengine_wrapper_10_DictBasic_11__len__, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  __pyx_sq_item_9symengine_3lib_17symengine_wrapper__DictBasic, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  __pyx_pw_9symengine_3lib_17symengine_wrapper_10_DictBasic_21__contains__, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping__DictBasic = {
  __pyx_pw_9symengine_3lib_17symengine_wrapper_10_DictBasic_11__len__, /*mp_length*/
  __pyx_pw_9symengine_3lib_17symengine_wrapper_10_DictBasic_13__getitem__, /*mp_subscript*/
  __pyx_mp_ass_subscript_9symengine_3lib_17symengine_wrapper__DictBasic, /*mp_ass_subscript*/
};

static PyTypeObject __pyx_type_9symengine_3lib_17symengine_wrapper__DictBasic = {
  PyVarObject_HEAD_INIT(0, 0)
  "symengine.lib.symengine_wrapper.""_DictBasic", /*tp_name*/
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper__DictBasic), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper__DictBasic, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  0, /*tp_repr*/
  0, /*tp_as_number*/
  &__pyx_tp_as_sequence__DictBasic, /*tp_as_sequence*/
  &__pyx_tp_as_mapping__DictBasic, /*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*/
  __pyx_pw_9symengine_3lib_17symengine_wrapper_10_DictBasic_23__iter__, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9symengine_3lib_17symengine_wrapper__DictBasic, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  __pyx_pw_9symengine_3lib_17symengine_wrapper_10_DictBasic_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9symengine_3lib_17symengine_wrapper__DictBasic, /*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 CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_9symengine_3lib_17symengine_wrapper_DictBasicIter __pyx_vtable_9symengine_3lib_17symengine_wrapper_DictBasicIter;

static PyObject *__pyx_tp_new_9symengine_3lib_17symengine_wrapper_DictBasicIter(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DictBasicIter *p;
  PyObject *o;
  o = __Pyx_AllocateExtensionType(t, 0);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DictBasicIter *)o);
  p->__pyx_vtab = __pyx_vtabptr_9symengine_3lib_17symengine_wrapper_DictBasicIter;
  __Pyx_default_placement_construct(&(p->begin));
  __Pyx_default_placement_construct(&(p->end));
  return o;
}

static void __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_DictBasicIter(PyObject *o) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DictBasicIter *p = (struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DictBasicIter *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_DictBasicIter) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  __Pyx_call_destructor(p->begin);
  __Pyx_call_destructor(p->end);
  PyTypeObject *tp = Py_TYPE(o);
  #if CYTHON_USE_TYPE_SLOTS
  (*tp->tp_free)(o);
  #else
  {
    freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free);
    if (tp_free) tp_free(o);
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  Py_DECREF(tp);
  #endif
}

static PyObject *__pyx_specialmethod___pyx_pw_9symengine_3lib_17symengine_wrapper_13DictBasicIter_3__next__(PyObject *self, CYTHON_UNUSED PyObject *arg) {
  PyObject *res = __pyx_pw_9symengine_3lib_17symengine_wrapper_13DictBasicIter_3__next__(self);
  if (!res && !PyErr_Occurred()) { PyErr_SetNone(PyExc_StopIteration); }
  return res;
}

static PyMethodDef __pyx_methods_9symengine_3lib_17symengine_wrapper_DictBasicIter[] = {
  {"__next__", (PyCFunction)__pyx_specialmethod___pyx_pw_9symengine_3lib_17symengine_wrapper_13DictBasicIter_3__next__, METH_NOARGS|METH_COEXIST, 0},
  {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_13DictBasicIter_5__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_13DictBasicIter_7__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9symengine_3lib_17symengine_wrapper_DictBasicIter_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_DictBasicIter},
  {Py_tp_iter, (void *)__pyx_pw_9symengine_3lib_17symengine_wrapper_13DictBasicIter_1__iter__},
  {Py_tp_iternext, (void *)__pyx_pw_9symengine_3lib_17symengine_wrapper_13DictBasicIter_3__next__},
  {Py_tp_methods, (void *)__pyx_methods_9symengine_3lib_17symengine_wrapper_DictBasicIter},
  {Py_tp_new, (void *)__pyx_tp_new_9symengine_3lib_17symengine_wrapper_DictBasicIter},
  {0, 0},
};
static PyType_Spec __pyx_type_9symengine_3lib_17symengine_wrapper_DictBasicIter_spec = {
  "symengine.lib.symengine_wrapper.DictBasicIter",
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DictBasicIter),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
  __pyx_type_9symengine_3lib_17symengine_wrapper_DictBasicIter_slots,
};
#else

static PyTypeObject __pyx_type_9symengine_3lib_17symengine_wrapper_DictBasicIter = {
  PyVarObject_HEAD_INIT(0, 0)
  "symengine.lib.symengine_wrapper.""DictBasicIter", /*tp_name*/
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DictBasicIter), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_DictBasicIter, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  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*/
  __pyx_pw_9symengine_3lib_17symengine_wrapper_13DictBasicIter_1__iter__, /*tp_iter*/
  __pyx_pw_9symengine_3lib_17symengine_wrapper_13DictBasicIter_3__next__, /*tp_iternext*/
  __pyx_methods_9symengine_3lib_17symengine_wrapper_DictBasicIter, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9symengine_3lib_17symengine_wrapper_DictBasicIter, /*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 CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_9symengine_3lib_17symengine_wrapper__Lambdify __pyx_vtable_9symengine_3lib_17symengine_wrapper__Lambdify;

static PyObject *__pyx_tp_new_9symengine_3lib_17symengine_wrapper__Lambdify(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify *p;
  PyObject *o;
  o = __Pyx_AllocateExtensionType(t, 0);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify *)o);
  p->__pyx_vtab = __pyx_vtabptr_9symengine_3lib_17symengine_wrapper__Lambdify;
  __Pyx_default_placement_construct(&(p->accum_out_sizes));
  p->out_shapes = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->order = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->numpy_dtype = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper__Lambdify(PyObject *o) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify *p = (struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper__Lambdify) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  __Pyx_call_destructor(p->accum_out_sizes);
  Py_CLEAR(p->out_shapes);
  Py_CLEAR(p->order);
  Py_CLEAR(p->numpy_dtype);
  PyTypeObject *tp = Py_TYPE(o);
  #if CYTHON_USE_TYPE_SLOTS
  (*tp->tp_free)(o);
  #else
  {
    freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free);
    if (tp_free) tp_free(o);
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  Py_DECREF(tp);
  #endif
}

static int __pyx_tp_traverse_9symengine_3lib_17symengine_wrapper__Lambdify(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify *p = (struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify *)o;
  {
    e = __Pyx_call_type_traverse(o, 1, v, a);
    if (e) return e;
  }
  if (p->out_shapes) {
    e = (*v)(p->out_shapes, a); if (e) return e;
  }
  if (p->numpy_dtype) {
    e = (*v)(p->numpy_dtype, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_9symengine_3lib_17symengine_wrapper__Lambdify(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify *p = (struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify *)o;
  tmp = ((PyObject*)p->out_shapes);
  p->out_shapes = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->numpy_dtype);
  p->numpy_dtype = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_9symengine_3lib_17symengine_wrapper_9_Lambdify_real(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9symengine_3lib_17symengine_wrapper_9_Lambdify_4real_1__get__(o);
}

static PyObject *__pyx_getprop_9symengine_3lib_17symengine_wrapper_9_Lambdify_n_exprs(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9symengine_3lib_17symengine_wrapper_9_Lambdify_7n_exprs_1__get__(o);
}

static PyObject *__pyx_getprop_9symengine_3lib_17symengine_wrapper_9_Lambdify_order(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9symengine_3lib_17symengine_wrapper_9_Lambdify_5order_1__get__(o);
}

static int __pyx_setprop_9symengine_3lib_17symengine_wrapper_9_Lambdify_order(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_9symengine_3lib_17symengine_wrapper_9_Lambdify_5order_3__set__(o, v);
  }
  else {
    return __pyx_pw_9symengine_3lib_17symengine_wrapper_9_Lambdify_5order_5__del__(o);
  }
}

static PyMethodDef __pyx_methods_9symengine_3lib_17symengine_wrapper__Lambdify[] = {
  {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_9_Lambdify_11__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_9_Lambdify_13__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_9symengine_3lib_17symengine_wrapper__Lambdify[] = {
  {"real", __pyx_getprop_9symengine_3lib_17symengine_wrapper_9_Lambdify_real, 0, 0, 0},
  {"n_exprs", __pyx_getprop_9symengine_3lib_17symengine_wrapper_9_Lambdify_n_exprs, 0, 0, 0},
  {"order", __pyx_getprop_9symengine_3lib_17symengine_wrapper_9_Lambdify_order, __pyx_setprop_9symengine_3lib_17symengine_wrapper_9_Lambdify_order, 0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9symengine_3lib_17symengine_wrapper__Lambdify_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper__Lambdify},
  {Py_tp_call, (void *)__pyx_pw_9symengine_3lib_17symengine_wrapper_9_Lambdify_9__call__},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9symengine_3lib_17symengine_wrapper__Lambdify},
  {Py_tp_clear, (void *)__pyx_tp_clear_9symengine_3lib_17symengine_wrapper__Lambdify},
  {Py_tp_methods, (void *)__pyx_methods_9symengine_3lib_17symengine_wrapper__Lambdify},
  {Py_tp_getset, (void *)__pyx_getsets_9symengine_3lib_17symengine_wrapper__Lambdify},
  {Py_tp_init, (void *)__pyx_pw_9symengine_3lib_17symengine_wrapper_9_Lambdify_1__init__},
  {Py_tp_new, (void *)__pyx_tp_new_9symengine_3lib_17symengine_wrapper__Lambdify},
  {0, 0},
};
static PyType_Spec __pyx_type_9symengine_3lib_17symengine_wrapper__Lambdify_spec = {
  "symengine.lib.symengine_wrapper._Lambdify",
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9symengine_3lib_17symengine_wrapper__Lambdify_slots,
};
#else

static PyTypeObject __pyx_type_9symengine_3lib_17symengine_wrapper__Lambdify = {
  PyVarObject_HEAD_INIT(0, 0)
  "symengine.lib.symengine_wrapper.""_Lambdify", /*tp_name*/
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper__Lambdify, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  __pyx_pw_9symengine_3lib_17symengine_wrapper_9_Lambdify_9__call__, /*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*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9symengine_3lib_17symengine_wrapper__Lambdify, /*tp_traverse*/
  __pyx_tp_clear_9symengine_3lib_17symengine_wrapper__Lambdify, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9symengine_3lib_17symengine_wrapper__Lambdify, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_9symengine_3lib_17symengine_wrapper__Lambdify, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  __pyx_pw_9symengine_3lib_17symengine_wrapper_9_Lambdify_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9symengine_3lib_17symengine_wrapper__Lambdify, /*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 CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_9symengine_3lib_17symengine_wrapper_LambdaDouble __pyx_vtable_9symengine_3lib_17symengine_wrapper_LambdaDouble;

static PyObject *__pyx_tp_new_9symengine_3lib_17symengine_wrapper_LambdaDouble(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LambdaDouble *p;
  PyObject *o = __pyx_tp_new_9symengine_3lib_17symengine_wrapper__Lambdify(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LambdaDouble *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_9symengine_3lib_17symengine_wrapper__Lambdify*)__pyx_vtabptr_9symengine_3lib_17symengine_wrapper_LambdaDouble;
  __Pyx_default_placement_construct(&(p->lambda_visitor));
  if (unlikely(__pyx_pw_9symengine_3lib_17symengine_wrapper_12LambdaDouble_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_LambdaDouble(PyObject *o) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LambdaDouble *p = (struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LambdaDouble *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_LambdaDouble) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  __Pyx_call_destructor(p->lambda_visitor);
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper__Lambdify(o);
}

static PyMethodDef __pyx_methods_9symengine_3lib_17symengine_wrapper_LambdaDouble[] = {
  {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_12LambdaDouble_11__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_12LambdaDouble_13__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9symengine_3lib_17symengine_wrapper_LambdaDouble_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_LambdaDouble},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9symengine_3lib_17symengine_wrapper__Lambdify},
  {Py_tp_clear, (void *)__pyx_tp_clear_9symengine_3lib_17symengine_wrapper__Lambdify},
  {Py_tp_methods, (void *)__pyx_methods_9symengine_3lib_17symengine_wrapper_LambdaDouble},
  {Py_tp_new, (void *)__pyx_tp_new_9symengine_3lib_17symengine_wrapper_LambdaDouble},
  {0, 0},
};
static PyType_Spec __pyx_type_9symengine_3lib_17symengine_wrapper_LambdaDouble_spec = {
  "symengine.lib.symengine_wrapper.LambdaDouble",
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LambdaDouble),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9symengine_3lib_17symengine_wrapper_LambdaDouble_slots,
};
#else

static PyTypeObject __pyx_type_9symengine_3lib_17symengine_wrapper_LambdaDouble = {
  PyVarObject_HEAD_INIT(0, 0)
  "symengine.lib.symengine_wrapper.""LambdaDouble", /*tp_name*/
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LambdaDouble), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_LambdaDouble, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9symengine_3lib_17symengine_wrapper_9_Lambdify_9__call__, /*tp_call*/
  #else
  0, /*tp_call*/
  #endif
  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*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9symengine_3lib_17symengine_wrapper__Lambdify, /*tp_traverse*/
  __pyx_tp_clear_9symengine_3lib_17symengine_wrapper__Lambdify, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9symengine_3lib_17symengine_wrapper_LambdaDouble, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9symengine_3lib_17symengine_wrapper_9_Lambdify_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_9symengine_3lib_17symengine_wrapper_LambdaDouble, /*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 CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_9symengine_3lib_17symengine_wrapper_LambdaComplexDouble __pyx_vtable_9symengine_3lib_17symengine_wrapper_LambdaComplexDouble;

static PyObject *__pyx_tp_new_9symengine_3lib_17symengine_wrapper_LambdaComplexDouble(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LambdaComplexDouble *p;
  PyObject *o = __pyx_tp_new_9symengine_3lib_17symengine_wrapper__Lambdify(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LambdaComplexDouble *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_9symengine_3lib_17symengine_wrapper__Lambdify*)__pyx_vtabptr_9symengine_3lib_17symengine_wrapper_LambdaComplexDouble;
  __Pyx_default_placement_construct(&(p->lambda_visitor));
  if (unlikely(__pyx_pw_9symengine_3lib_17symengine_wrapper_19LambdaComplexDouble_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_LambdaComplexDouble(PyObject *o) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LambdaComplexDouble *p = (struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LambdaComplexDouble *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_LambdaComplexDouble) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  __Pyx_call_destructor(p->lambda_visitor);
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper__Lambdify(o);
}

static PyMethodDef __pyx_methods_9symengine_3lib_17symengine_wrapper_LambdaComplexDouble[] = {
  {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_19LambdaComplexDouble_7__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_19LambdaComplexDouble_9__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9symengine_3lib_17symengine_wrapper_LambdaComplexDouble_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_LambdaComplexDouble},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9symengine_3lib_17symengine_wrapper__Lambdify},
  {Py_tp_clear, (void *)__pyx_tp_clear_9symengine_3lib_17symengine_wrapper__Lambdify},
  {Py_tp_methods, (void *)__pyx_methods_9symengine_3lib_17symengine_wrapper_LambdaComplexDouble},
  {Py_tp_new, (void *)__pyx_tp_new_9symengine_3lib_17symengine_wrapper_LambdaComplexDouble},
  {0, 0},
};
static PyType_Spec __pyx_type_9symengine_3lib_17symengine_wrapper_LambdaComplexDouble_spec = {
  "symengine.lib.symengine_wrapper.LambdaComplexDouble",
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LambdaComplexDouble),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9symengine_3lib_17symengine_wrapper_LambdaComplexDouble_slots,
};
#else

static PyTypeObject __pyx_type_9symengine_3lib_17symengine_wrapper_LambdaComplexDouble = {
  PyVarObject_HEAD_INIT(0, 0)
  "symengine.lib.symengine_wrapper.""LambdaComplexDouble", /*tp_name*/
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LambdaComplexDouble), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_LambdaComplexDouble, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9symengine_3lib_17symengine_wrapper_9_Lambdify_9__call__, /*tp_call*/
  #else
  0, /*tp_call*/
  #endif
  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*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9symengine_3lib_17symengine_wrapper__Lambdify, /*tp_traverse*/
  __pyx_tp_clear_9symengine_3lib_17symengine_wrapper__Lambdify, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9symengine_3lib_17symengine_wrapper_LambdaComplexDouble, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9symengine_3lib_17symengine_wrapper_9_Lambdify_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_9symengine_3lib_17symengine_wrapper_LambdaComplexDouble, /*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 CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_9symengine_3lib_17symengine_wrapper__LLVMLambdify __pyx_vtable_9symengine_3lib_17symengine_wrapper__LLVMLambdify;

static PyObject *__pyx_tp_new_9symengine_3lib_17symengine_wrapper__LLVMLambdify(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper__LLVMLambdify *p;
  PyObject *o = __pyx_tp_new_9symengine_3lib_17symengine_wrapper__Lambdify(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper__LLVMLambdify *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_9symengine_3lib_17symengine_wrapper__Lambdify*)__pyx_vtabptr_9symengine_3lib_17symengine_wrapper__LLVMLambdify;
  return o;
}
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9symengine_3lib_17symengine_wrapper__LLVMLambdify_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper__Lambdify},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9symengine_3lib_17symengine_wrapper__Lambdify},
  {Py_tp_clear, (void *)__pyx_tp_clear_9symengine_3lib_17symengine_wrapper__Lambdify},
  {Py_tp_new, (void *)__pyx_tp_new_9symengine_3lib_17symengine_wrapper__LLVMLambdify},
  {0, 0},
};
static PyType_Spec __pyx_type_9symengine_3lib_17symengine_wrapper__LLVMLambdify_spec = {
  "symengine.lib.symengine_wrapper._LLVMLambdify",
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper__LLVMLambdify),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9symengine_3lib_17symengine_wrapper__LLVMLambdify_slots,
};
#else

static PyTypeObject __pyx_type_9symengine_3lib_17symengine_wrapper__LLVMLambdify = {
  PyVarObject_HEAD_INIT(0, 0)
  "symengine.lib.symengine_wrapper.""_LLVMLambdify", /*tp_name*/
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper__LLVMLambdify), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper__Lambdify, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9symengine_3lib_17symengine_wrapper_9_Lambdify_9__call__, /*tp_call*/
  #else
  0, /*tp_call*/
  #endif
  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*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9symengine_3lib_17symengine_wrapper__Lambdify, /*tp_traverse*/
  __pyx_tp_clear_9symengine_3lib_17symengine_wrapper__Lambdify, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9symengine_3lib_17symengine_wrapper_9_Lambdify_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_9symengine_3lib_17symengine_wrapper__LLVMLambdify, /*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 CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_9symengine_3lib_17symengine_wrapper_LLVMDouble __pyx_vtable_9symengine_3lib_17symengine_wrapper_LLVMDouble;

static PyObject *__pyx_tp_new_9symengine_3lib_17symengine_wrapper_LLVMDouble(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMDouble *p;
  PyObject *o = __pyx_tp_new_9symengine_3lib_17symengine_wrapper__LLVMLambdify(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMDouble *)o);
  p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_9symengine_3lib_17symengine_wrapper__Lambdify*)__pyx_vtabptr_9symengine_3lib_17symengine_wrapper_LLVMDouble;
  __Pyx_default_placement_construct(&(p->lambda_visitor));
  if (unlikely(__pyx_pw_9symengine_3lib_17symengine_wrapper_10LLVMDouble_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_LLVMDouble(PyObject *o) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMDouble *p = (struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMDouble *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_LLVMDouble) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  __Pyx_call_destructor(p->lambda_visitor);
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper__Lambdify(o);
}

static PyMethodDef __pyx_methods_9symengine_3lib_17symengine_wrapper_LLVMDouble[] = {
  {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_10LLVMDouble_3__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9symengine_3lib_17symengine_wrapper_10LLVMDouble_2__reduce__},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9symengine_3lib_17symengine_wrapper_LLVMDouble_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_LLVMDouble},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9symengine_3lib_17symengine_wrapper__Lambdify},
  {Py_tp_clear, (void *)__pyx_tp_clear_9symengine_3lib_17symengine_wrapper__Lambdify},
  {Py_tp_methods, (void *)__pyx_methods_9symengine_3lib_17symengine_wrapper_LLVMDouble},
  {Py_tp_new, (void *)__pyx_tp_new_9symengine_3lib_17symengine_wrapper_LLVMDouble},
  {0, 0},
};
static PyType_Spec __pyx_type_9symengine_3lib_17symengine_wrapper_LLVMDouble_spec = {
  "symengine.lib.symengine_wrapper.LLVMDouble",
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMDouble),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9symengine_3lib_17symengine_wrapper_LLVMDouble_slots,
};
#else

static PyTypeObject __pyx_type_9symengine_3lib_17symengine_wrapper_LLVMDouble = {
  PyVarObject_HEAD_INIT(0, 0)
  "symengine.lib.symengine_wrapper.""LLVMDouble", /*tp_name*/
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMDouble), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_LLVMDouble, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9symengine_3lib_17symengine_wrapper_9_Lambdify_9__call__, /*tp_call*/
  #else
  0, /*tp_call*/
  #endif
  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*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9symengine_3lib_17symengine_wrapper__Lambdify, /*tp_traverse*/
  __pyx_tp_clear_9symengine_3lib_17symengine_wrapper__Lambdify, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9symengine_3lib_17symengine_wrapper_LLVMDouble, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9symengine_3lib_17symengine_wrapper_9_Lambdify_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_9symengine_3lib_17symengine_wrapper_LLVMDouble, /*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 CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_9symengine_3lib_17symengine_wrapper_LLVMFloat __pyx_vtable_9symengine_3lib_17symengine_wrapper_LLVMFloat;

static PyObject *__pyx_tp_new_9symengine_3lib_17symengine_wrapper_LLVMFloat(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMFloat *p;
  PyObject *o = __pyx_tp_new_9symengine_3lib_17symengine_wrapper__LLVMLambdify(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMFloat *)o);
  p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_9symengine_3lib_17symengine_wrapper__Lambdify*)__pyx_vtabptr_9symengine_3lib_17symengine_wrapper_LLVMFloat;
  __Pyx_default_placement_construct(&(p->lambda_visitor));
  if (unlikely(__pyx_pw_9symengine_3lib_17symengine_wrapper_9LLVMFloat_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_LLVMFloat(PyObject *o) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMFloat *p = (struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMFloat *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_LLVMFloat) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  __Pyx_call_destructor(p->lambda_visitor);
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper__Lambdify(o);
}

static PyMethodDef __pyx_methods_9symengine_3lib_17symengine_wrapper_LLVMFloat[] = {
  {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_9LLVMFloat_3__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9symengine_3lib_17symengine_wrapper_9LLVMFloat_2__reduce__},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9symengine_3lib_17symengine_wrapper_LLVMFloat_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_LLVMFloat},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9symengine_3lib_17symengine_wrapper__Lambdify},
  {Py_tp_clear, (void *)__pyx_tp_clear_9symengine_3lib_17symengine_wrapper__Lambdify},
  {Py_tp_methods, (void *)__pyx_methods_9symengine_3lib_17symengine_wrapper_LLVMFloat},
  {Py_tp_new, (void *)__pyx_tp_new_9symengine_3lib_17symengine_wrapper_LLVMFloat},
  {0, 0},
};
static PyType_Spec __pyx_type_9symengine_3lib_17symengine_wrapper_LLVMFloat_spec = {
  "symengine.lib.symengine_wrapper.LLVMFloat",
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMFloat),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9symengine_3lib_17symengine_wrapper_LLVMFloat_slots,
};
#else

static PyTypeObject __pyx_type_9symengine_3lib_17symengine_wrapper_LLVMFloat = {
  PyVarObject_HEAD_INIT(0, 0)
  "symengine.lib.symengine_wrapper.""LLVMFloat", /*tp_name*/
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMFloat), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_LLVMFloat, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9symengine_3lib_17symengine_wrapper_9_Lambdify_9__call__, /*tp_call*/
  #else
  0, /*tp_call*/
  #endif
  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*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9symengine_3lib_17symengine_wrapper__Lambdify, /*tp_traverse*/
  __pyx_tp_clear_9symengine_3lib_17symengine_wrapper__Lambdify, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9symengine_3lib_17symengine_wrapper_LLVMFloat, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9symengine_3lib_17symengine_wrapper_9_Lambdify_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_9symengine_3lib_17symengine_wrapper_LLVMFloat, /*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 CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_9symengine_3lib_17symengine_wrapper_LLVMLongDouble __pyx_vtable_9symengine_3lib_17symengine_wrapper_LLVMLongDouble;

static PyObject *__pyx_tp_new_9symengine_3lib_17symengine_wrapper_LLVMLongDouble(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMLongDouble *p;
  PyObject *o = __pyx_tp_new_9symengine_3lib_17symengine_wrapper__LLVMLambdify(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMLongDouble *)o);
  p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_9symengine_3lib_17symengine_wrapper__Lambdify*)__pyx_vtabptr_9symengine_3lib_17symengine_wrapper_LLVMLongDouble;
  __Pyx_default_placement_construct(&(p->lambda_visitor));
  if (unlikely(__pyx_pw_9symengine_3lib_17symengine_wrapper_14LLVMLongDouble_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_LLVMLongDouble(PyObject *o) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMLongDouble *p = (struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMLongDouble *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_LLVMLongDouble) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  __Pyx_call_destructor(p->lambda_visitor);
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper__Lambdify(o);
}

static PyMethodDef __pyx_methods_9symengine_3lib_17symengine_wrapper_LLVMLongDouble[] = {
  {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_14LLVMLongDouble_3__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9symengine_3lib_17symengine_wrapper_14LLVMLongDouble_2__reduce__},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9symengine_3lib_17symengine_wrapper_LLVMLongDouble_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_LLVMLongDouble},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9symengine_3lib_17symengine_wrapper__Lambdify},
  {Py_tp_clear, (void *)__pyx_tp_clear_9symengine_3lib_17symengine_wrapper__Lambdify},
  {Py_tp_methods, (void *)__pyx_methods_9symengine_3lib_17symengine_wrapper_LLVMLongDouble},
  {Py_tp_new, (void *)__pyx_tp_new_9symengine_3lib_17symengine_wrapper_LLVMLongDouble},
  {0, 0},
};
static PyType_Spec __pyx_type_9symengine_3lib_17symengine_wrapper_LLVMLongDouble_spec = {
  "symengine.lib.symengine_wrapper.LLVMLongDouble",
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMLongDouble),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9symengine_3lib_17symengine_wrapper_LLVMLongDouble_slots,
};
#else

static PyTypeObject __pyx_type_9symengine_3lib_17symengine_wrapper_LLVMLongDouble = {
  PyVarObject_HEAD_INIT(0, 0)
  "symengine.lib.symengine_wrapper.""LLVMLongDouble", /*tp_name*/
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMLongDouble), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_LLVMLongDouble, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9symengine_3lib_17symengine_wrapper_9_Lambdify_9__call__, /*tp_call*/
  #else
  0, /*tp_call*/
  #endif
  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*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9symengine_3lib_17symengine_wrapper__Lambdify, /*tp_traverse*/
  __pyx_tp_clear_9symengine_3lib_17symengine_wrapper__Lambdify, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9symengine_3lib_17symengine_wrapper_LLVMLongDouble, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9symengine_3lib_17symengine_wrapper_9_Lambdify_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_9symengine_3lib_17symengine_wrapper_LLVMLongDouble, /*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 CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9symengine_3lib_17symengine_wrapper_Expr_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_Basic},
  {Py_tp_new, (void *)__pyx_tp_new_9symengine_3lib_17symengine_wrapper_Basic},
  {0, 0},
};
static PyType_Spec __pyx_type_9symengine_3lib_17symengine_wrapper_Expr_spec = {
  "symengine.lib.symengine_wrapper.Expr",
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Expr),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
  __pyx_type_9symengine_3lib_17symengine_wrapper_Expr_slots,
};
#else

static PyTypeObject __pyx_type_9symengine_3lib_17symengine_wrapper_Expr = {
  PyVarObject_HEAD_INIT(0, 0)
  "symengine.lib.symengine_wrapper.""Expr", /*tp_name*/
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Expr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_Basic, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_3__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_1__str__, /*tp_str*/
  #else
  0, /*tp_str*/
  #endif
  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*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9symengine_3lib_17symengine_wrapper_Basic, /*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 CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static PyObject *__pyx_getprop_9symengine_3lib_17symengine_wrapper_6Symbol_name(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9symengine_3lib_17symengine_wrapper_6Symbol_4name_1__get__(o);
}

static PyObject *__pyx_getprop_9symengine_3lib_17symengine_wrapper_6Symbol_is_Atom(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9symengine_3lib_17symengine_wrapper_6Symbol_7is_Atom_1__get__(o);
}

static PyObject *__pyx_getprop_9symengine_3lib_17symengine_wrapper_6Symbol_is_Symbol(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9symengine_3lib_17symengine_wrapper_6Symbol_9is_Symbol_1__get__(o);
}

static PyObject *__pyx_getprop_9symengine_3lib_17symengine_wrapper_6Symbol_is_symbol(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9symengine_3lib_17symengine_wrapper_6Symbol_9is_symbol_1__get__(o);
}

static PyObject *__pyx_getprop_9symengine_3lib_17symengine_wrapper_6Symbol_is_commutative(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9symengine_3lib_17symengine_wrapper_6Symbol_14is_commutative_1__get__(o);
}

static PyObject *__pyx_getprop_9symengine_3lib_17symengine_wrapper_6Symbol_func(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9symengine_3lib_17symengine_wrapper_6Symbol_4func_1__get__(o);
}

static PyMethodDef __pyx_methods_9symengine_3lib_17symengine_wrapper_Symbol[] = {
  {"_sympy_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_6Symbol_3_sympy_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_6Symbol_5__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"_sage_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_6Symbol_7_sage_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_9symengine_3lib_17symengine_wrapper_Symbol[] = {
  {"name", __pyx_getprop_9symengine_3lib_17symengine_wrapper_6Symbol_name, 0, 0, 0},
  {"is_Atom", __pyx_getprop_9symengine_3lib_17symengine_wrapper_6Symbol_is_Atom, 0, 0, 0},
  {"is_Symbol", __pyx_getprop_9symengine_3lib_17symengine_wrapper_6Symbol_is_Symbol, 0, 0, 0},
  {"is_symbol", __pyx_getprop_9symengine_3lib_17symengine_wrapper_6Symbol_is_symbol, 0, 0, 0},
  {"is_commutative", __pyx_getprop_9symengine_3lib_17symengine_wrapper_6Symbol_is_commutative, 0, 0, 0},
  {"func", __pyx_getprop_9symengine_3lib_17symengine_wrapper_6Symbol_func, 0, 0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9symengine_3lib_17symengine_wrapper_Symbol_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_Basic},
  {Py_tp_doc, (void *)PyDoc_STR("\n    Symbol is a class to store a symbolic variable with a given name.\n    Subclassing Symbol leads to a memory leak due to a cycle in reference counting.\n    To avoid this with a performance penalty, set the kwarg store_pickle=True\n    in the constructor and support the pickle protocol in the subclass by\n    implmenting __reduce__.\n    ")},
  {Py_tp_methods, (void *)__pyx_methods_9symengine_3lib_17symengine_wrapper_Symbol},
  {Py_tp_getset, (void *)__pyx_getsets_9symengine_3lib_17symengine_wrapper_Symbol},
  {Py_tp_init, (void *)__pyx_pw_9symengine_3lib_17symengine_wrapper_6Symbol_1__init__},
  {Py_tp_new, (void *)__pyx_tp_new_9symengine_3lib_17symengine_wrapper_Basic},
  {0, 0},
};
static PyType_Spec __pyx_type_9symengine_3lib_17symengine_wrapper_Symbol_spec = {
  "symengine.lib.symengine_wrapper.Symbol",
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Symbol),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
  __pyx_type_9symengine_3lib_17symengine_wrapper_Symbol_slots,
};
#else

static PyTypeObject __pyx_type_9symengine_3lib_17symengine_wrapper_Symbol = {
  PyVarObject_HEAD_INIT(0, 0)
  "symengine.lib.symengine_wrapper.""Symbol", /*tp_name*/
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Symbol), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_Basic, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_3__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_1__str__, /*tp_str*/
  #else
  0, /*tp_str*/
  #endif
  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*/
  PyDoc_STR("\n    Symbol is a class to store a symbolic variable with a given name.\n    Subclassing Symbol leads to a memory leak due to a cycle in reference counting.\n    To avoid this with a performance penalty, set the kwarg store_pickle=True\n    in the constructor and support the pickle protocol in the subclass by\n    implmenting __reduce__.\n    "), /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9symengine_3lib_17symengine_wrapper_Symbol, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_9symengine_3lib_17symengine_wrapper_Symbol, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  __pyx_pw_9symengine_3lib_17symengine_wrapper_6Symbol_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9symengine_3lib_17symengine_wrapper_Basic, /*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 CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static PyObject *__pyx_getprop_9symengine_3lib_17symengine_wrapper_5Dummy_is_Dummy(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9symengine_3lib_17symengine_wrapper_5Dummy_8is_Dummy_1__get__(o);
}

static PyObject *__pyx_getprop_9symengine_3lib_17symengine_wrapper_5Dummy_func(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9symengine_3lib_17symengine_wrapper_5Dummy_4func_1__get__(o);
}

static PyMethodDef __pyx_methods_9symengine_3lib_17symengine_wrapper_Dummy[] = {
  {"_sympy_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_5Dummy_3_sympy_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_9symengine_3lib_17symengine_wrapper_Dummy[] = {
  {"is_Dummy", __pyx_getprop_9symengine_3lib_17symengine_wrapper_5Dummy_is_Dummy, 0, 0, 0},
  {"func", __pyx_getprop_9symengine_3lib_17symengine_wrapper_5Dummy_func, 0, 0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9symengine_3lib_17symengine_wrapper_Dummy_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_Basic},
  {Py_tp_methods, (void *)__pyx_methods_9symengine_3lib_17symengine_wrapper_Dummy},
  {Py_tp_getset, (void *)__pyx_getsets_9symengine_3lib_17symengine_wrapper_Dummy},
  {Py_tp_init, (void *)__pyx_pw_9symengine_3lib_17symengine_wrapper_5Dummy_1__init__},
  {Py_tp_new, (void *)__pyx_tp_new_9symengine_3lib_17symengine_wrapper_Basic},
  {0, 0},
};
static PyType_Spec __pyx_type_9symengine_3lib_17symengine_wrapper_Dummy_spec = {
  "symengine.lib.symengine_wrapper.Dummy",
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Dummy),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
  __pyx_type_9symengine_3lib_17symengine_wrapper_Dummy_slots,
};
#else

static PyTypeObject __pyx_type_9symengine_3lib_17symengine_wrapper_Dummy = {
  PyVarObject_HEAD_INIT(0, 0)
  "symengine.lib.symengine_wrapper.""Dummy", /*tp_name*/
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Dummy), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_Basic, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_3__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_1__str__, /*tp_str*/
  #else
  0, /*tp_str*/
  #endif
  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_9symengine_3lib_17symengine_wrapper_Dummy, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_9symengine_3lib_17symengine_wrapper_Dummy, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  __pyx_pw_9symengine_3lib_17symengine_wrapper_5Dummy_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9symengine_3lib_17symengine_wrapper_Basic, /*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 CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static PyObject *__pyx_tp_new_9symengine_3lib_17symengine_wrapper_Constant(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_9symengine_3lib_17symengine_wrapper_Basic(t, a, k);
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_9symengine_3lib_17symengine_wrapper_8Constant_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static PyObject *__pyx_getprop_9symengine_3lib_17symengine_wrapper_8Constant_is_number(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9symengine_3lib_17symengine_wrapper_8Constant_9is_number_1__get__(o);
}

static PyMethodDef __pyx_methods_9symengine_3lib_17symengine_wrapper_Constant[] = {
  {"_sympy_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_8Constant_3_sympy_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"_sage_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_8Constant_5_sage_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_9symengine_3lib_17symengine_wrapper_Constant[] = {
  {"is_number", __pyx_getprop_9symengine_3lib_17symengine_wrapper_8Constant_is_number, 0, 0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9symengine_3lib_17symengine_wrapper_Constant_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_Basic},
  {Py_tp_methods, (void *)__pyx_methods_9symengine_3lib_17symengine_wrapper_Constant},
  {Py_tp_getset, (void *)__pyx_getsets_9symengine_3lib_17symengine_wrapper_Constant},
  {Py_tp_new, (void *)__pyx_tp_new_9symengine_3lib_17symengine_wrapper_Constant},
  {0, 0},
};
static PyType_Spec __pyx_type_9symengine_3lib_17symengine_wrapper_Constant_spec = {
  "symengine.lib.symengine_wrapper.Constant",
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Constant),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
  __pyx_type_9symengine_3lib_17symengine_wrapper_Constant_slots,
};
#else

static PyTypeObject __pyx_type_9symengine_3lib_17symengine_wrapper_Constant = {
  PyVarObject_HEAD_INIT(0, 0)
  "symengine.lib.symengine_wrapper.""Constant", /*tp_name*/
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Constant), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_Basic, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_3__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_1__str__, /*tp_str*/
  #else
  0, /*tp_str*/
  #endif
  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_9symengine_3lib_17symengine_wrapper_Constant, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_9symengine_3lib_17symengine_wrapper_Constant, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9symengine_3lib_17symengine_wrapper_Constant, /*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 CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static PyObject *__pyx_tp_new_9symengine_3lib_17symengine_wrapper_Pi(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_9symengine_3lib_17symengine_wrapper_Constant(t, a, k);
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_9symengine_3lib_17symengine_wrapper_2Pi_1__cinit__(o, __pyx_mstate_global->__pyx_empty_tuple, NULL) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static PyMethodDef __pyx_methods_9symengine_3lib_17symengine_wrapper_Pi[] = {
  {"_sympy_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_2Pi_3_sympy_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"_sage_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_2Pi_5_sage_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9symengine_3lib_17symengine_wrapper_Pi_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_Basic},
  {Py_tp_methods, (void *)__pyx_methods_9symengine_3lib_17symengine_wrapper_Pi},
  {Py_tp_new, (void *)__pyx_tp_new_9symengine_3lib_17symengine_wrapper_Pi},
  {0, 0},
};
static PyType_Spec __pyx_type_9symengine_3lib_17symengine_wrapper_Pi_spec = {
  "symengine.lib.symengine_wrapper.Pi",
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Pi),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
  __pyx_type_9symengine_3lib_17symengine_wrapper_Pi_slots,
};
#else

static PyTypeObject __pyx_type_9symengine_3lib_17symengine_wrapper_Pi = {
  PyVarObject_HEAD_INIT(0, 0)
  "symengine.lib.symengine_wrapper.""Pi", /*tp_name*/
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Pi), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_Basic, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_3__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_1__str__, /*tp_str*/
  #else
  0, /*tp_str*/
  #endif
  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_9symengine_3lib_17symengine_wrapper_Pi, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9symengine_3lib_17symengine_wrapper_Pi, /*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 CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static PyObject *__pyx_tp_new_9symengine_3lib_17symengine_wrapper_Exp1(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_9symengine_3lib_17symengine_wrapper_Constant(t, a, k);
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_9symengine_3lib_17symengine_wrapper_4Exp1_1__cinit__(o, __pyx_mstate_global->__pyx_empty_tuple, NULL) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static PyMethodDef __pyx_methods_9symengine_3lib_17symengine_wrapper_Exp1[] = {
  {"_sympy_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_4Exp1_3_sympy_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"_sage_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_4Exp1_5_sage_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9symengine_3lib_17symengine_wrapper_Exp1_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_Basic},
  {Py_tp_methods, (void *)__pyx_methods_9symengine_3lib_17symengine_wrapper_Exp1},
  {Py_tp_new, (void *)__pyx_tp_new_9symengine_3lib_17symengine_wrapper_Exp1},
  {0, 0},
};
static PyType_Spec __pyx_type_9symengine_3lib_17symengine_wrapper_Exp1_spec = {
  "symengine.lib.symengine_wrapper.Exp1",
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Exp1),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
  __pyx_type_9symengine_3lib_17symengine_wrapper_Exp1_slots,
};
#else

static PyTypeObject __pyx_type_9symengine_3lib_17symengine_wrapper_Exp1 = {
  PyVarObject_HEAD_INIT(0, 0)
  "symengine.lib.symengine_wrapper.""Exp1", /*tp_name*/
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Exp1), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_Basic, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_3__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_1__str__, /*tp_str*/
  #else
  0, /*tp_str*/
  #endif
  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_9symengine_3lib_17symengine_wrapper_Exp1, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9symengine_3lib_17symengine_wrapper_Exp1, /*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 CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static PyObject *__pyx_tp_new_9symengine_3lib_17symengine_wrapper_GoldenRatio(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_9symengine_3lib_17symengine_wrapper_Constant(t, a, k);
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_9symengine_3lib_17symengine_wrapper_11GoldenRatio_1__cinit__(o, __pyx_mstate_global->__pyx_empty_tuple, NULL) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static PyMethodDef __pyx_methods_9symengine_3lib_17symengine_wrapper_GoldenRatio[] = {
  {"_sympy_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_11GoldenRatio_3_sympy_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"_sage_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_11GoldenRatio_5_sage_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9symengine_3lib_17symengine_wrapper_GoldenRatio_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_Basic},
  {Py_tp_methods, (void *)__pyx_methods_9symengine_3lib_17symengine_wrapper_GoldenRatio},
  {Py_tp_new, (void *)__pyx_tp_new_9symengine_3lib_17symengine_wrapper_GoldenRatio},
  {0, 0},
};
static PyType_Spec __pyx_type_9symengine_3lib_17symengine_wrapper_GoldenRatio_spec = {
  "symengine.lib.symengine_wrapper.GoldenRatio",
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_GoldenRatio),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
  __pyx_type_9symengine_3lib_17symengine_wrapper_GoldenRatio_slots,
};
#else

static PyTypeObject __pyx_type_9symengine_3lib_17symengine_wrapper_GoldenRatio = {
  PyVarObject_HEAD_INIT(0, 0)
  "symengine.lib.symengine_wrapper.""GoldenRatio", /*tp_name*/
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_GoldenRatio), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_Basic, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_3__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_1__str__, /*tp_str*/
  #else
  0, /*tp_str*/
  #endif
  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_9symengine_3lib_17symengine_wrapper_GoldenRatio, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9symengine_3lib_17symengine_wrapper_GoldenRatio, /*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 CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static PyObject *__pyx_tp_new_9symengine_3lib_17symengine_wrapper_Catalan(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_9symengine_3lib_17symengine_wrapper_Constant(t, a, k);
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_9symengine_3lib_17symengine_wrapper_7Catalan_1__cinit__(o, __pyx_mstate_global->__pyx_empty_tuple, NULL) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static PyMethodDef __pyx_methods_9symengine_3lib_17symengine_wrapper_Catalan[] = {
  {"_sympy_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_7Catalan_3_sympy_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"_sage_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_7Catalan_5_sage_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9symengine_3lib_17symengine_wrapper_Catalan_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_Basic},
  {Py_tp_methods, (void *)__pyx_methods_9symengine_3lib_17symengine_wrapper_Catalan},
  {Py_tp_new, (void *)__pyx_tp_new_9symengine_3lib_17symengine_wrapper_Catalan},
  {0, 0},
};
static PyType_Spec __pyx_type_9symengine_3lib_17symengine_wrapper_Catalan_spec = {
  "symengine.lib.symengine_wrapper.Catalan",
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Catalan),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
  __pyx_type_9symengine_3lib_17symengine_wrapper_Catalan_slots,
};
#else

static PyTypeObject __pyx_type_9symengine_3lib_17symengine_wrapper_Catalan = {
  PyVarObject_HEAD_INIT(0, 0)
  "symengine.lib.symengine_wrapper.""Catalan", /*tp_name*/
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Catalan), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_Basic, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_3__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_1__str__, /*tp_str*/
  #else
  0, /*tp_str*/
  #endif
  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_9symengine_3lib_17symengine_wrapper_Catalan, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9symengine_3lib_17symengine_wrapper_Catalan, /*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 CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static PyObject *__pyx_tp_new_9symengine_3lib_17symengine_wrapper_EulerGamma(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_9symengine_3lib_17symengine_wrapper_Constant(t, a, k);
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_9symengine_3lib_17symengine_wrapper_10EulerGamma_1__cinit__(o, __pyx_mstate_global->__pyx_empty_tuple, NULL) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static PyMethodDef __pyx_methods_9symengine_3lib_17symengine_wrapper_EulerGamma[] = {
  {"_sympy_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_10EulerGamma_3_sympy_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"_sage_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_10EulerGamma_5_sage_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9symengine_3lib_17symengine_wrapper_EulerGamma_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_Basic},
  {Py_tp_methods, (void *)__pyx_methods_9symengine_3lib_17symengine_wrapper_EulerGamma},
  {Py_tp_new, (void *)__pyx_tp_new_9symengine_3lib_17symengine_wrapper_EulerGamma},
  {0, 0},
};
static PyType_Spec __pyx_type_9symengine_3lib_17symengine_wrapper_EulerGamma_spec = {
  "symengine.lib.symengine_wrapper.EulerGamma",
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_EulerGamma),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
  __pyx_type_9symengine_3lib_17symengine_wrapper_EulerGamma_slots,
};
#else

static PyTypeObject __pyx_type_9symengine_3lib_17symengine_wrapper_EulerGamma = {
  PyVarObject_HEAD_INIT(0, 0)
  "symengine.lib.symengine_wrapper.""EulerGamma", /*tp_name*/
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_EulerGamma), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_Basic, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_3__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_1__str__, /*tp_str*/
  #else
  0, /*tp_str*/
  #endif
  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_9symengine_3lib_17symengine_wrapper_EulerGamma, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9symengine_3lib_17symengine_wrapper_EulerGamma, /*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 CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static PyMethodDef __pyx_methods_9symengine_3lib_17symengine_wrapper_Boolean[] = {
  {"logical_not", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_7Boolean_1logical_not, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9symengine_3lib_17symengine_wrapper_Boolean_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_Basic},
  {Py_nb_bool, (void *)__pyx_pw_9symengine_3lib_17symengine_wrapper_7Boolean_3__bool__},
  {Py_tp_methods, (void *)__pyx_methods_9symengine_3lib_17symengine_wrapper_Boolean},
  {Py_tp_new, (void *)__pyx_tp_new_9symengine_3lib_17symengine_wrapper_Basic},
  {0, 0},
};
static PyType_Spec __pyx_type_9symengine_3lib_17symengine_wrapper_Boolean_spec = {
  "symengine.lib.symengine_wrapper.Boolean",
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Boolean),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
  __pyx_type_9symengine_3lib_17symengine_wrapper_Boolean_slots,
};
#else

static PyNumberMethods __pyx_tp_as_number_Boolean = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_47__neg__, /*nb_negative*/
  #else
  0, /*nb_negative*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_49__pos__, /*nb_positive*/
  #else
  0, /*nb_positive*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_51__abs__, /*nb_absolute*/
  #else
  0, /*nb_absolute*/
  #endif
  __pyx_pw_9symengine_3lib_17symengine_wrapper_7Boolean_3__bool__, /*nb_bool*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_99__int__, /*nb_int*/
  #else
  0, /*nb_int*/
  #endif
  0, /*nb_long (reserved)*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_97__float__, /*nb_float*/
  #else
  0, /*nb_float*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  0, /*nb_index*/
  0, /*nb_matrix_multiply*/
  0, /*nb_inplace_matrix_multiply*/
};

static PyTypeObject __pyx_type_9symengine_3lib_17symengine_wrapper_Boolean = {
  PyVarObject_HEAD_INIT(0, 0)
  "symengine.lib.symengine_wrapper.""Boolean", /*tp_name*/
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Boolean), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_Basic, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_3__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  &__pyx_tp_as_number_Boolean, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_1__str__, /*tp_str*/
  #else
  0, /*tp_str*/
  #endif
  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_9symengine_3lib_17symengine_wrapper_Boolean, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9symengine_3lib_17symengine_wrapper_Basic, /*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 CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static PyObject *__pyx_getprop_9symengine_3lib_17symengine_wrapper_11BooleanAtom_is_Boolean(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9symengine_3lib_17symengine_wrapper_11BooleanAtom_10is_Boolean_1__get__(o);
}

static PyObject *__pyx_getprop_9symengine_3lib_17symengine_wrapper_11BooleanAtom_is_Atom(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9symengine_3lib_17symengine_wrapper_11BooleanAtom_7is_Atom_1__get__(o);
}

static struct PyGetSetDef __pyx_getsets_9symengine_3lib_17symengine_wrapper_BooleanAtom[] = {
  {"is_Boolean", __pyx_getprop_9symengine_3lib_17symengine_wrapper_11BooleanAtom_is_Boolean, 0, 0, 0},
  {"is_Atom", __pyx_getprop_9symengine_3lib_17symengine_wrapper_11BooleanAtom_is_Atom, 0, 0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9symengine_3lib_17symengine_wrapper_BooleanAtom_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_Basic},
  {Py_tp_getset, (void *)__pyx_getsets_9symengine_3lib_17symengine_wrapper_BooleanAtom},
  {Py_tp_new, (void *)__pyx_tp_new_9symengine_3lib_17symengine_wrapper_Basic},
  {0, 0},
};
static PyType_Spec __pyx_type_9symengine_3lib_17symengine_wrapper_BooleanAtom_spec = {
  "symengine.lib.symengine_wrapper.BooleanAtom",
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_BooleanAtom),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
  __pyx_type_9symengine_3lib_17symengine_wrapper_BooleanAtom_slots,
};
#else

static PyTypeObject __pyx_type_9symengine_3lib_17symengine_wrapper_BooleanAtom = {
  PyVarObject_HEAD_INIT(0, 0)
  "symengine.lib.symengine_wrapper.""BooleanAtom", /*tp_name*/
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_BooleanAtom), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_Basic, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_3__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_1__str__, /*tp_str*/
  #else
  0, /*tp_str*/
  #endif
  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*/
  0, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_9symengine_3lib_17symengine_wrapper_BooleanAtom, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9symengine_3lib_17symengine_wrapper_Basic, /*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 CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static PyObject *__pyx_tp_new_9symengine_3lib_17symengine_wrapper_BooleanTrue(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_9symengine_3lib_17symengine_wrapper_Basic(t, a, k);
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_9symengine_3lib_17symengine_wrapper_11BooleanTrue_1__cinit__(o, __pyx_mstate_global->__pyx_empty_tuple, NULL) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static PyMethodDef __pyx_methods_9symengine_3lib_17symengine_wrapper_BooleanTrue[] = {
  {"_sympy_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_11BooleanTrue_3_sympy_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"_sage_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_11BooleanTrue_5_sage_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9symengine_3lib_17symengine_wrapper_BooleanTrue_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_Basic},
  {Py_nb_bool, (void *)__pyx_pw_9symengine_3lib_17symengine_wrapper_11BooleanTrue_7__bool__},
  {Py_tp_methods, (void *)__pyx_methods_9symengine_3lib_17symengine_wrapper_BooleanTrue},
  {Py_tp_new, (void *)__pyx_tp_new_9symengine_3lib_17symengine_wrapper_BooleanTrue},
  {0, 0},
};
static PyType_Spec __pyx_type_9symengine_3lib_17symengine_wrapper_BooleanTrue_spec = {
  "symengine.lib.symengine_wrapper.BooleanTrue",
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_BooleanTrue),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
  __pyx_type_9symengine_3lib_17symengine_wrapper_BooleanTrue_slots,
};
#else

static PyNumberMethods __pyx_tp_as_number_BooleanTrue = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_47__neg__, /*nb_negative*/
  #else
  0, /*nb_negative*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_49__pos__, /*nb_positive*/
  #else
  0, /*nb_positive*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_51__abs__, /*nb_absolute*/
  #else
  0, /*nb_absolute*/
  #endif
  __pyx_pw_9symengine_3lib_17symengine_wrapper_11BooleanTrue_7__bool__, /*nb_bool*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_99__int__, /*nb_int*/
  #else
  0, /*nb_int*/
  #endif
  0, /*nb_long (reserved)*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_97__float__, /*nb_float*/
  #else
  0, /*nb_float*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  0, /*nb_index*/
  0, /*nb_matrix_multiply*/
  0, /*nb_inplace_matrix_multiply*/
};

static PyTypeObject __pyx_type_9symengine_3lib_17symengine_wrapper_BooleanTrue = {
  PyVarObject_HEAD_INIT(0, 0)
  "symengine.lib.symengine_wrapper.""BooleanTrue", /*tp_name*/
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_BooleanTrue), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_Basic, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_3__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  &__pyx_tp_as_number_BooleanTrue, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_1__str__, /*tp_str*/
  #else
  0, /*tp_str*/
  #endif
  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_9symengine_3lib_17symengine_wrapper_BooleanTrue, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9symengine_3lib_17symengine_wrapper_BooleanTrue, /*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 CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static PyObject *__pyx_tp_new_9symengine_3lib_17symengine_wrapper_BooleanFalse(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_9symengine_3lib_17symengine_wrapper_Basic(t, a, k);
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_9symengine_3lib_17symengine_wrapper_12BooleanFalse_1__cinit__(o, __pyx_mstate_global->__pyx_empty_tuple, NULL) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static PyMethodDef __pyx_methods_9symengine_3lib_17symengine_wrapper_BooleanFalse[] = {
  {"_sympy_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_12BooleanFalse_3_sympy_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"_sage_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_12BooleanFalse_5_sage_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9symengine_3lib_17symengine_wrapper_BooleanFalse_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_Basic},
  {Py_nb_bool, (void *)__pyx_pw_9symengine_3lib_17symengine_wrapper_12BooleanFalse_9__bool__},
  {Py_tp_methods, (void *)__pyx_methods_9symengine_3lib_17symengine_wrapper_BooleanFalse},
  {Py_tp_new, (void *)__pyx_tp_new_9symengine_3lib_17symengine_wrapper_BooleanFalse},
  {0, 0},
};
static PyType_Spec __pyx_type_9symengine_3lib_17symengine_wrapper_BooleanFalse_spec = {
  "symengine.lib.symengine_wrapper.BooleanFalse",
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_BooleanFalse),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
  __pyx_type_9symengine_3lib_17symengine_wrapper_BooleanFalse_slots,
};
#else

static PyNumberMethods __pyx_tp_as_number_BooleanFalse = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_47__neg__, /*nb_negative*/
  #else
  0, /*nb_negative*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_49__pos__, /*nb_positive*/
  #else
  0, /*nb_positive*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_51__abs__, /*nb_absolute*/
  #else
  0, /*nb_absolute*/
  #endif
  __pyx_pw_9symengine_3lib_17symengine_wrapper_12BooleanFalse_9__bool__, /*nb_bool*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_99__int__, /*nb_int*/
  #else
  0, /*nb_int*/
  #endif
  0, /*nb_long (reserved)*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_97__float__, /*nb_float*/
  #else
  0, /*nb_float*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  0, /*nb_index*/
  0, /*nb_matrix_multiply*/
  0, /*nb_inplace_matrix_multiply*/
};

static PyTypeObject __pyx_type_9symengine_3lib_17symengine_wrapper_BooleanFalse = {
  PyVarObject_HEAD_INIT(0, 0)
  "symengine.lib.symengine_wrapper.""BooleanFalse", /*tp_name*/
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_BooleanFalse), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_Basic, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_3__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  &__pyx_tp_as_number_BooleanFalse, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_1__str__, /*tp_str*/
  #else
  0, /*tp_str*/
  #endif
  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_9symengine_3lib_17symengine_wrapper_BooleanFalse, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9symengine_3lib_17symengine_wrapper_BooleanFalse, /*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 CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static PyObject *__pyx_getprop_9symengine_3lib_17symengine_wrapper_6Number_is_Atom(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9symengine_3lib_17symengine_wrapper_6Number_7is_Atom_1__get__(o);
}

static PyObject *__pyx_getprop_9symengine_3lib_17symengine_wrapper_6Number_is_Number(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9symengine_3lib_17symengine_wrapper_6Number_9is_Number_1__get__(o);
}

static PyObject *__pyx_getprop_9symengine_3lib_17symengine_wrapper_6Number_is_number(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9symengine_3lib_17symengine_wrapper_6Number_9is_number_1__get__(o);
}

static PyObject *__pyx_getprop_9symengine_3lib_17symengine_wrapper_6Number_is_commutative(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9symengine_3lib_17symengine_wrapper_6Number_14is_commutative_1__get__(o);
}

static PyObject *__pyx_getprop_9symengine_3lib_17symengine_wrapper_6Number_is_positive(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9symengine_3lib_17symengine_wrapper_6Number_11is_positive_1__get__(o);
}

static PyObject *__pyx_getprop_9symengine_3lib_17symengine_wrapper_6Number_is_negative(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9symengine_3lib_17symengine_wrapper_6Number_11is_negative_1__get__(o);
}

static PyObject *__pyx_getprop_9symengine_3lib_17symengine_wrapper_6Number_is_nonzero(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9symengine_3lib_17symengine_wrapper_6Number_10is_nonzero_1__get__(o);
}

static PyObject *__pyx_getprop_9symengine_3lib_17symengine_wrapper_6Number_is_nonnegative(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9symengine_3lib_17symengine_wrapper_6Number_14is_nonnegative_1__get__(o);
}

static PyObject *__pyx_getprop_9symengine_3lib_17symengine_wrapper_6Number_is_nonpositive(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9symengine_3lib_17symengine_wrapper_6Number_14is_nonpositive_1__get__(o);
}

static PyObject *__pyx_getprop_9symengine_3lib_17symengine_wrapper_6Number_is_complex(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9symengine_3lib_17symengine_wrapper_6Number_10is_complex_1__get__(o);
}

static PyObject *__pyx_getprop_9symengine_3lib_17symengine_wrapper_6Number_real(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9symengine_3lib_17symengine_wrapper_6Number_4real_1__get__(o);
}

static PyObject *__pyx_getprop_9symengine_3lib_17symengine_wrapper_6Number_imag(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9symengine_3lib_17symengine_wrapper_6Number_4imag_1__get__(o);
}

static struct PyGetSetDef __pyx_getsets_9symengine_3lib_17symengine_wrapper_Number[] = {
  {"is_Atom", __pyx_getprop_9symengine_3lib_17symengine_wrapper_6Number_is_Atom, 0, 0, 0},
  {"is_Number", __pyx_getprop_9symengine_3lib_17symengine_wrapper_6Number_is_Number, 0, 0, 0},
  {"is_number", __pyx_getprop_9symengine_3lib_17symengine_wrapper_6Number_is_number, 0, 0, 0},
  {"is_commutative", __pyx_getprop_9symengine_3lib_17symengine_wrapper_6Number_is_commutative, 0, 0, 0},
  {"is_positive", __pyx_getprop_9symengine_3lib_17symengine_wrapper_6Number_is_positive, 0, 0, 0},
  {"is_negative", __pyx_getprop_9symengine_3lib_17symengine_wrapper_6Number_is_negative, 0, 0, 0},
  {"is_nonzero", __pyx_getprop_9symengine_3lib_17symengine_wrapper_6Number_is_nonzero, 0, 0, 0},
  {"is_nonnegative", __pyx_getprop_9symengine_3lib_17symengine_wrapper_6Number_is_nonnegative, 0, 0, 0},
  {"is_nonpositive", __pyx_getprop_9symengine_3lib_17symengine_wrapper_6Number_is_nonpositive, 0, 0, 0},
  {"is_complex", __pyx_getprop_9symengine_3lib_17symengine_wrapper_6Number_is_complex, 0, 0, 0},
  {"real", __pyx_getprop_9symengine_3lib_17symengine_wrapper_6Number_real, 0, 0, 0},
  {"imag", __pyx_getprop_9symengine_3lib_17symengine_wrapper_6Number_imag, 0, 0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9symengine_3lib_17symengine_wrapper_Number_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_Basic},
  {Py_tp_getset, (void *)__pyx_getsets_9symengine_3lib_17symengine_wrapper_Number},
  {Py_tp_new, (void *)__pyx_tp_new_9symengine_3lib_17symengine_wrapper_Basic},
  {0, 0},
};
static PyType_Spec __pyx_type_9symengine_3lib_17symengine_wrapper_Number_spec = {
  "symengine.lib.symengine_wrapper.Number",
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Number),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
  __pyx_type_9symengine_3lib_17symengine_wrapper_Number_slots,
};
#else

static PyTypeObject __pyx_type_9symengine_3lib_17symengine_wrapper_Number = {
  PyVarObject_HEAD_INIT(0, 0)
  "symengine.lib.symengine_wrapper.""Number", /*tp_name*/
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Number), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_Basic, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_3__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_1__str__, /*tp_str*/
  #else
  0, /*tp_str*/
  #endif
  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*/
  0, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_9symengine_3lib_17symengine_wrapper_Number, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9symengine_3lib_17symengine_wrapper_Basic, /*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 CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static PyObject *__pyx_getprop_9symengine_3lib_17symengine_wrapper_11ComplexBase_real(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9symengine_3lib_17symengine_wrapper_11ComplexBase_4real_1__get__(o);
}

static PyObject *__pyx_getprop_9symengine_3lib_17symengine_wrapper_11ComplexBase_imag(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9symengine_3lib_17symengine_wrapper_11ComplexBase_4imag_1__get__(o);
}

static PyMethodDef __pyx_methods_9symengine_3lib_17symengine_wrapper_ComplexBase[] = {
  {"real_part", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_11ComplexBase_1real_part, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"imaginary_part", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_11ComplexBase_3imaginary_part, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_9symengine_3lib_17symengine_wrapper_ComplexBase[] = {
  {"real", __pyx_getprop_9symengine_3lib_17symengine_wrapper_11ComplexBase_real, 0, 0, 0},
  {"imag", __pyx_getprop_9symengine_3lib_17symengine_wrapper_11ComplexBase_imag, 0, 0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9symengine_3lib_17symengine_wrapper_ComplexBase_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_Basic},
  {Py_tp_methods, (void *)__pyx_methods_9symengine_3lib_17symengine_wrapper_ComplexBase},
  {Py_tp_getset, (void *)__pyx_getsets_9symengine_3lib_17symengine_wrapper_ComplexBase},
  {Py_tp_new, (void *)__pyx_tp_new_9symengine_3lib_17symengine_wrapper_Basic},
  {0, 0},
};
static PyType_Spec __pyx_type_9symengine_3lib_17symengine_wrapper_ComplexBase_spec = {
  "symengine.lib.symengine_wrapper.ComplexBase",
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_ComplexBase),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
  __pyx_type_9symengine_3lib_17symengine_wrapper_ComplexBase_slots,
};
#else

static PyTypeObject __pyx_type_9symengine_3lib_17symengine_wrapper_ComplexBase = {
  PyVarObject_HEAD_INIT(0, 0)
  "symengine.lib.symengine_wrapper.""ComplexBase", /*tp_name*/
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_ComplexBase), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_Basic, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_3__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_1__str__, /*tp_str*/
  #else
  0, /*tp_str*/
  #endif
  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_9symengine_3lib_17symengine_wrapper_ComplexBase, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_9symengine_3lib_17symengine_wrapper_ComplexBase, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9symengine_3lib_17symengine_wrapper_Basic, /*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 CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static PyObject *__pyx_tp_new_9symengine_3lib_17symengine_wrapper_ComplexDouble(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_9symengine_3lib_17symengine_wrapper_Basic(t, a, k);
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_9symengine_3lib_17symengine_wrapper_13ComplexDouble_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static PyMethodDef __pyx_methods_9symengine_3lib_17symengine_wrapper_ComplexDouble[] = {
  {"_sympy_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_13ComplexDouble_3_sympy_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"_sage_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_13ComplexDouble_5_sage_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__complex__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_13ComplexDouble_7__complex__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9symengine_3lib_17symengine_wrapper_ComplexDouble_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_Basic},
  {Py_tp_methods, (void *)__pyx_methods_9symengine_3lib_17symengine_wrapper_ComplexDouble},
  {Py_tp_new, (void *)__pyx_tp_new_9symengine_3lib_17symengine_wrapper_ComplexDouble},
  {0, 0},
};
static PyType_Spec __pyx_type_9symengine_3lib_17symengine_wrapper_ComplexDouble_spec = {
  "symengine.lib.symengine_wrapper.ComplexDouble",
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_ComplexDouble),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
  __pyx_type_9symengine_3lib_17symengine_wrapper_ComplexDouble_slots,
};
#else

static PyTypeObject __pyx_type_9symengine_3lib_17symengine_wrapper_ComplexDouble = {
  PyVarObject_HEAD_INIT(0, 0)
  "symengine.lib.symengine_wrapper.""ComplexDouble", /*tp_name*/
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_ComplexDouble), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_Basic, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_3__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_1__str__, /*tp_str*/
  #else
  0, /*tp_str*/
  #endif
  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_9symengine_3lib_17symengine_wrapper_ComplexDouble, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9symengine_3lib_17symengine_wrapper_ComplexDouble, /*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 CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static PyObject *__pyx_tp_new_9symengine_3lib_17symengine_wrapper_ComplexMPC(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_9symengine_3lib_17symengine_wrapper_Basic(t, a, k);
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_9symengine_3lib_17symengine_wrapper_10ComplexMPC_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static PyMethodDef __pyx_methods_9symengine_3lib_17symengine_wrapper_ComplexMPC[] = {
  {"_sympy_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_10ComplexMPC_3_sympy_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"_sage_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_10ComplexMPC_5_sage_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9symengine_3lib_17symengine_wrapper_ComplexMPC_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_Basic},
  {Py_tp_methods, (void *)__pyx_methods_9symengine_3lib_17symengine_wrapper_ComplexMPC},
  {Py_tp_new, (void *)__pyx_tp_new_9symengine_3lib_17symengine_wrapper_ComplexMPC},
  {0, 0},
};
static PyType_Spec __pyx_type_9symengine_3lib_17symengine_wrapper_ComplexMPC_spec = {
  "symengine.lib.symengine_wrapper.ComplexMPC",
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_ComplexMPC),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
  __pyx_type_9symengine_3lib_17symengine_wrapper_ComplexMPC_slots,
};
#else

static PyTypeObject __pyx_type_9symengine_3lib_17symengine_wrapper_ComplexMPC = {
  PyVarObject_HEAD_INIT(0, 0)
  "symengine.lib.symengine_wrapper.""ComplexMPC", /*tp_name*/
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_ComplexMPC), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_Basic, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_3__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_1__str__, /*tp_str*/
  #else
  0, /*tp_str*/
  #endif
  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_9symengine_3lib_17symengine_wrapper_ComplexMPC, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9symengine_3lib_17symengine_wrapper_ComplexMPC, /*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 CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static PyMethodDef __pyx_methods_9symengine_3lib_17symengine_wrapper_Complex[] = {
  {"_sympy_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_7Complex_1_sympy_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"_sage_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_7Complex_3_sage_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9symengine_3lib_17symengine_wrapper_Complex_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_Basic},
  {Py_tp_methods, (void *)__pyx_methods_9symengine_3lib_17symengine_wrapper_Complex},
  {Py_tp_new, (void *)__pyx_tp_new_9symengine_3lib_17symengine_wrapper_Basic},
  {0, 0},
};
static PyType_Spec __pyx_type_9symengine_3lib_17symengine_wrapper_Complex_spec = {
  "symengine.lib.symengine_wrapper.Complex",
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Complex),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
  __pyx_type_9symengine_3lib_17symengine_wrapper_Complex_slots,
};
#else

static PyTypeObject __pyx_type_9symengine_3lib_17symengine_wrapper_Complex = {
  PyVarObject_HEAD_INIT(0, 0)
  "symengine.lib.symengine_wrapper.""Complex", /*tp_name*/
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Complex), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_Basic, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_3__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_1__str__, /*tp_str*/
  #else
  0, /*tp_str*/
  #endif
  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_9symengine_3lib_17symengine_wrapper_Complex, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9symengine_3lib_17symengine_wrapper_Basic, /*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 CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static PyObject *__pyx_tp_new_9symengine_3lib_17symengine_wrapper_ImaginaryUnit(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_9symengine_3lib_17symengine_wrapper_Basic(t, a, k);
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_9symengine_3lib_17symengine_wrapper_13ImaginaryUnit_1__cinit__(o, __pyx_mstate_global->__pyx_empty_tuple, NULL) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static PyMethodDef __pyx_methods_9symengine_3lib_17symengine_wrapper_ImaginaryUnit[] = {
  {"as_powers_dict", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_13ImaginaryUnit_3as_powers_dict, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9symengine_3lib_17symengine_wrapper_ImaginaryUnit_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_Basic},
  {Py_tp_methods, (void *)__pyx_methods_9symengine_3lib_17symengine_wrapper_ImaginaryUnit},
  {Py_tp_new, (void *)__pyx_tp_new_9symengine_3lib_17symengine_wrapper_ImaginaryUnit},
  {0, 0},
};
static PyType_Spec __pyx_type_9symengine_3lib_17symengine_wrapper_ImaginaryUnit_spec = {
  "symengine.lib.symengine_wrapper.ImaginaryUnit",
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_ImaginaryUnit),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
  __pyx_type_9symengine_3lib_17symengine_wrapper_ImaginaryUnit_slots,
};
#else

static PyTypeObject __pyx_type_9symengine_3lib_17symengine_wrapper_ImaginaryUnit = {
  PyVarObject_HEAD_INIT(0, 0)
  "symengine.lib.symengine_wrapper.""ImaginaryUnit", /*tp_name*/
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_ImaginaryUnit), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_Basic, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_3__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_1__str__, /*tp_str*/
  #else
  0, /*tp_str*/
  #endif
  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_9symengine_3lib_17symengine_wrapper_ImaginaryUnit, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9symengine_3lib_17symengine_wrapper_ImaginaryUnit, /*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 CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static PyObject *__pyx_tp_new_9symengine_3lib_17symengine_wrapper_Infinity(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_9symengine_3lib_17symengine_wrapper_Basic(t, a, k);
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_9symengine_3lib_17symengine_wrapper_8Infinity_1__cinit__(o, __pyx_mstate_global->__pyx_empty_tuple, NULL) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static PyObject *__pyx_getprop_9symengine_3lib_17symengine_wrapper_8Infinity_is_infinite(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9symengine_3lib_17symengine_wrapper_8Infinity_11is_infinite_1__get__(o);
}

static PyMethodDef __pyx_methods_9symengine_3lib_17symengine_wrapper_Infinity[] = {
  {"_sympy_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_8Infinity_3_sympy_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"_sage_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_8Infinity_5_sage_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_9symengine_3lib_17symengine_wrapper_Infinity[] = {
  {"is_infinite", __pyx_getprop_9symengine_3lib_17symengine_wrapper_8Infinity_is_infinite, 0, 0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9symengine_3lib_17symengine_wrapper_Infinity_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_Basic},
  {Py_tp_methods, (void *)__pyx_methods_9symengine_3lib_17symengine_wrapper_Infinity},
  {Py_tp_getset, (void *)__pyx_getsets_9symengine_3lib_17symengine_wrapper_Infinity},
  {Py_tp_new, (void *)__pyx_tp_new_9symengine_3lib_17symengine_wrapper_Infinity},
  {0, 0},
};
static PyType_Spec __pyx_type_9symengine_3lib_17symengine_wrapper_Infinity_spec = {
  "symengine.lib.symengine_wrapper.Infinity",
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Infinity),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
  __pyx_type_9symengine_3lib_17symengine_wrapper_Infinity_slots,
};
#else

static PyTypeObject __pyx_type_9symengine_3lib_17symengine_wrapper_Infinity = {
  PyVarObject_HEAD_INIT(0, 0)
  "symengine.lib.symengine_wrapper.""Infinity", /*tp_name*/
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Infinity), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_Basic, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_3__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_1__str__, /*tp_str*/
  #else
  0, /*tp_str*/
  #endif
  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_9symengine_3lib_17symengine_wrapper_Infinity, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_9symengine_3lib_17symengine_wrapper_Infinity, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9symengine_3lib_17symengine_wrapper_Infinity, /*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 CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static PyObject *__pyx_tp_new_9symengine_3lib_17symengine_wrapper_NegativeInfinity(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_9symengine_3lib_17symengine_wrapper_Basic(t, a, k);
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_9symengine_3lib_17symengine_wrapper_16NegativeInfinity_1__cinit__(o, __pyx_mstate_global->__pyx_empty_tuple, NULL) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static PyObject *__pyx_getprop_9symengine_3lib_17symengine_wrapper_16NegativeInfinity_is_infinite(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9symengine_3lib_17symengine_wrapper_16NegativeInfinity_11is_infinite_1__get__(o);
}

static PyMethodDef __pyx_methods_9symengine_3lib_17symengine_wrapper_NegativeInfinity[] = {
  {"_sympy_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_16NegativeInfinity_3_sympy_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"_sage_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_16NegativeInfinity_5_sage_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"as_powers_dict", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_16NegativeInfinity_7as_powers_dict, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_9symengine_3lib_17symengine_wrapper_NegativeInfinity[] = {
  {"is_infinite", __pyx_getprop_9symengine_3lib_17symengine_wrapper_16NegativeInfinity_is_infinite, 0, 0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9symengine_3lib_17symengine_wrapper_NegativeInfinity_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_Basic},
  {Py_tp_methods, (void *)__pyx_methods_9symengine_3lib_17symengine_wrapper_NegativeInfinity},
  {Py_tp_getset, (void *)__pyx_getsets_9symengine_3lib_17symengine_wrapper_NegativeInfinity},
  {Py_tp_new, (void *)__pyx_tp_new_9symengine_3lib_17symengine_wrapper_NegativeInfinity},
  {0, 0},
};
static PyType_Spec __pyx_type_9symengine_3lib_17symengine_wrapper_NegativeInfinity_spec = {
  "symengine.lib.symengine_wrapper.NegativeInfinity",
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_NegativeInfinity),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
  __pyx_type_9symengine_3lib_17symengine_wrapper_NegativeInfinity_slots,
};
#else

static PyTypeObject __pyx_type_9symengine_3lib_17symengine_wrapper_NegativeInfinity = {
  PyVarObject_HEAD_INIT(0, 0)
  "symengine.lib.symengine_wrapper.""NegativeInfinity", /*tp_name*/
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_NegativeInfinity), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_Basic, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_3__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_1__str__, /*tp_str*/
  #else
  0, /*tp_str*/
  #endif
  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_9symengine_3lib_17symengine_wrapper_NegativeInfinity, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_9symengine_3lib_17symengine_wrapper_NegativeInfinity, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9symengine_3lib_17symengine_wrapper_NegativeInfinity, /*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 CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static PyObject *__pyx_tp_new_9symengine_3lib_17symengine_wrapper_ComplexInfinity(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_9symengine_3lib_17symengine_wrapper_Basic(t, a, k);
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_9symengine_3lib_17symengine_wrapper_15ComplexInfinity_1__cinit__(o, __pyx_mstate_global->__pyx_empty_tuple, NULL) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static PyObject *__pyx_getprop_9symengine_3lib_17symengine_wrapper_15ComplexInfinity_is_infinite(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9symengine_3lib_17symengine_wrapper_15ComplexInfinity_11is_infinite_1__get__(o);
}

static PyMethodDef __pyx_methods_9symengine_3lib_17symengine_wrapper_ComplexInfinity[] = {
  {"_sympy_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15ComplexInfinity_3_sympy_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"_sage_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15ComplexInfinity_5_sage_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_9symengine_3lib_17symengine_wrapper_ComplexInfinity[] = {
  {"is_infinite", __pyx_getprop_9symengine_3lib_17symengine_wrapper_15ComplexInfinity_is_infinite, 0, 0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9symengine_3lib_17symengine_wrapper_ComplexInfinity_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_Basic},
  {Py_tp_methods, (void *)__pyx_methods_9symengine_3lib_17symengine_wrapper_ComplexInfinity},
  {Py_tp_getset, (void *)__pyx_getsets_9symengine_3lib_17symengine_wrapper_ComplexInfinity},
  {Py_tp_new, (void *)__pyx_tp_new_9symengine_3lib_17symengine_wrapper_ComplexInfinity},
  {0, 0},
};
static PyType_Spec __pyx_type_9symengine_3lib_17symengine_wrapper_ComplexInfinity_spec = {
  "symengine.lib.symengine_wrapper.ComplexInfinity",
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_ComplexInfinity),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
  __pyx_type_9symengine_3lib_17symengine_wrapper_ComplexInfinity_slots,
};
#else

static PyTypeObject __pyx_type_9symengine_3lib_17symengine_wrapper_ComplexInfinity = {
  PyVarObject_HEAD_INIT(0, 0)
  "symengine.lib.symengine_wrapper.""ComplexInfinity", /*tp_name*/
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_ComplexInfinity), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_Basic, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_3__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_1__str__, /*tp_str*/
  #else
  0, /*tp_str*/
  #endif
  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_9symengine_3lib_17symengine_wrapper_ComplexInfinity, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_9symengine_3lib_17symengine_wrapper_ComplexInfinity, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9symengine_3lib_17symengine_wrapper_ComplexInfinity, /*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 CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static PyObject *__pyx_tp_new_9symengine_3lib_17symengine_wrapper_NaN(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_9symengine_3lib_17symengine_wrapper_Basic(t, a, k);
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_9symengine_3lib_17symengine_wrapper_3NaN_1__cinit__(o, __pyx_mstate_global->__pyx_empty_tuple, NULL) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static PyObject *__pyx_getprop_9symengine_3lib_17symengine_wrapper_3NaN_is_rational(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9symengine_3lib_17symengine_wrapper_3NaN_11is_rational_1__get__(o);
}

static PyObject *__pyx_getprop_9symengine_3lib_17symengine_wrapper_3NaN_is_integer(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9symengine_3lib_17symengine_wrapper_3NaN_10is_integer_1__get__(o);
}

static PyObject *__pyx_getprop_9symengine_3lib_17symengine_wrapper_3NaN_is_real(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9symengine_3lib_17symengine_wrapper_3NaN_7is_real_1__get__(o);
}

static PyObject *__pyx_getprop_9symengine_3lib_17symengine_wrapper_3NaN_is_finite(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9symengine_3lib_17symengine_wrapper_3NaN_9is_finite_1__get__(o);
}

static PyMethodDef __pyx_methods_9symengine_3lib_17symengine_wrapper_NaN[] = {
  {"_sympy_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_3NaN_3_sympy_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"_sage_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_3NaN_5_sage_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_9symengine_3lib_17symengine_wrapper_NaN[] = {
  {"is_rational", __pyx_getprop_9symengine_3lib_17symengine_wrapper_3NaN_is_rational, 0, 0, 0},
  {"is_integer", __pyx_getprop_9symengine_3lib_17symengine_wrapper_3NaN_is_integer, 0, 0, 0},
  {"is_real", __pyx_getprop_9symengine_3lib_17symengine_wrapper_3NaN_is_real, 0, 0, 0},
  {"is_finite", __pyx_getprop_9symengine_3lib_17symengine_wrapper_3NaN_is_finite, 0, 0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9symengine_3lib_17symengine_wrapper_NaN_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_Basic},
  {Py_tp_methods, (void *)__pyx_methods_9symengine_3lib_17symengine_wrapper_NaN},
  {Py_tp_getset, (void *)__pyx_getsets_9symengine_3lib_17symengine_wrapper_NaN},
  {Py_tp_new, (void *)__pyx_tp_new_9symengine_3lib_17symengine_wrapper_NaN},
  {0, 0},
};
static PyType_Spec __pyx_type_9symengine_3lib_17symengine_wrapper_NaN_spec = {
  "symengine.lib.symengine_wrapper.NaN",
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_NaN),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
  __pyx_type_9symengine_3lib_17symengine_wrapper_NaN_slots,
};
#else

static PyTypeObject __pyx_type_9symengine_3lib_17symengine_wrapper_NaN = {
  PyVarObject_HEAD_INIT(0, 0)
  "symengine.lib.symengine_wrapper.""NaN", /*tp_name*/
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_NaN), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_Basic, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_3__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_1__str__, /*tp_str*/
  #else
  0, /*tp_str*/
  #endif
  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_9symengine_3lib_17symengine_wrapper_NaN, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_9symengine_3lib_17symengine_wrapper_NaN, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9symengine_3lib_17symengine_wrapper_NaN, /*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 CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static PyObject *__pyx_tp_new_9symengine_3lib_17symengine_wrapper_PyNumber(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_9symengine_3lib_17symengine_wrapper_Basic(t, a, k);
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_9symengine_3lib_17symengine_wrapper_8PyNumber_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static PyMethodDef __pyx_methods_9symengine_3lib_17symengine_wrapper_PyNumber[] = {
  {"_sympy_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_8PyNumber_3_sympy_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"_sage_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_8PyNumber_5_sage_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"pyobject", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_8PyNumber_7pyobject, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9symengine_3lib_17symengine_wrapper_PyNumber_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_Basic},
  {Py_tp_methods, (void *)__pyx_methods_9symengine_3lib_17symengine_wrapper_PyNumber},
  {Py_tp_new, (void *)__pyx_tp_new_9symengine_3lib_17symengine_wrapper_PyNumber},
  {0, 0},
};
static PyType_Spec __pyx_type_9symengine_3lib_17symengine_wrapper_PyNumber_spec = {
  "symengine.lib.symengine_wrapper.PyNumber",
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_PyNumber),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
  __pyx_type_9symengine_3lib_17symengine_wrapper_PyNumber_slots,
};
#else

static PyTypeObject __pyx_type_9symengine_3lib_17symengine_wrapper_PyNumber = {
  PyVarObject_HEAD_INIT(0, 0)
  "symengine.lib.symengine_wrapper.""PyNumber", /*tp_name*/
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_PyNumber), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_Basic, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_3__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_1__str__, /*tp_str*/
  #else
  0, /*tp_str*/
  #endif
  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_9symengine_3lib_17symengine_wrapper_PyNumber, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9symengine_3lib_17symengine_wrapper_PyNumber, /*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 CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static PyMethodDef __pyx_methods_9symengine_3lib_17symengine_wrapper_Set[] = {
  {"intersection", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_3Set_1intersection, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"union", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_3Set_3union, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"complement", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_3Set_5complement, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"contains", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_3Set_7contains, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9symengine_3lib_17symengine_wrapper_Set_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_Basic},
  {Py_tp_methods, (void *)__pyx_methods_9symengine_3lib_17symengine_wrapper_Set},
  {Py_tp_new, (void *)__pyx_tp_new_9symengine_3lib_17symengine_wrapper_Basic},
  {0, 0},
};
static PyType_Spec __pyx_type_9symengine_3lib_17symengine_wrapper_Set_spec = {
  "symengine.lib.symengine_wrapper.Set",
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Set),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
  __pyx_type_9symengine_3lib_17symengine_wrapper_Set_slots,
};
#else

static PyTypeObject __pyx_type_9symengine_3lib_17symengine_wrapper_Set = {
  PyVarObject_HEAD_INIT(0, 0)
  "symengine.lib.symengine_wrapper.""Set", /*tp_name*/
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Set), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_Basic, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_3__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9symengine_3lib_17symengine_wrapper_5Basic_1__str__, /*tp_str*/
  #else
  0, /*tp_str*/
  #endif
  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_9symengine_3lib_17symengine_wrapper_Set, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9symengine_3lib_17symengine_wrapper_Basic, /*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 CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static PyObject *__pyx_tp_new_9symengine_3lib_17symengine_wrapper_DenseMatrixBase(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_9symengine_3lib_17symengine_wrapper_MatrixBase(t, a, k);
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static PyObject *__pyx_sq_item_9symengine_3lib_17symengine_wrapper_DenseMatrixBase(PyObject *o, Py_ssize_t i) {
  PyObject *r;
  PyObject *x = PyLong_FromSsize_t(i); if(!x) return 0;
  #if CYTHON_USE_TYPE_SLOTS || (!CYTHON_USE_TYPE_SPECS && __PYX_LIMITED_VERSION_HEX < 0x030A0000)
  r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
  #else
  r = ((binaryfunc)PyType_GetSlot(Py_TYPE(o), Py_mp_subscript))(o, x);
  #endif
  Py_DECREF(x);
  return r;
}

static int __pyx_mp_ass_subscript_9symengine_3lib_17symengine_wrapper_DenseMatrixBase(PyObject *o, PyObject *i, PyObject *v) {
  if (v) {
    return __pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_35__setitem__(o, i, v);
  }
  else {
    __Pyx_TypeName o_type_name;
    objobjargproc f = __Pyx_PyType_TryGetSubSlot(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_MatrixBase, tp_as_mapping, mp_ass_subscript, objobjargproc);
    if (f)
    return f(o, i, v);
    o_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(o));
    PyErr_Format(PyExc_NotImplementedError,
      "Subscript deletion not supported by " __Pyx_FMT_TYPENAME, o_type_name);
    __Pyx_DECREF_TypeName(o_type_name);
    return -1;
  }
}

static CYTHON_INLINE PyObject *__pyx_nb_add_9symengine_3lib_17symengine_wrapper_DenseMatrixBase_maybe_call_slot(PyTypeObject* type, PyObject *left, PyObject *right ) {
    binaryfunc slot;
#if CYTHON_USE_TYPE_SLOTS
    slot = type->tp_as_number ? type->tp_as_number->nb_add : NULL;
#else
    slot = (binaryfunc) PyType_GetSlot(type, Py_nb_add);
#endif
    return slot ? slot(left, right ) : __Pyx_NewRef(Py_NotImplemented);
}
static PyObject *__pyx_nb_add_9symengine_3lib_17symengine_wrapper_DenseMatrixBase(PyObject *left, PyObject *right ) {
    int maybe_self_is_left, maybe_self_is_right = 0;
    maybe_self_is_left = Py_TYPE(left) == Py_TYPE(right)
#if CYTHON_USE_TYPE_SLOTS
            || (Py_TYPE(left)->tp_as_number && Py_TYPE(left)->tp_as_number->nb_add == &__pyx_nb_add_9symengine_3lib_17symengine_wrapper_DenseMatrixBase)
#endif
            || __Pyx_TypeCheck(left, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase);
    if (maybe_self_is_left) {
        PyObject *res;
        res = __pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_9__add__(left, right);
        if (res != Py_NotImplemented) return res;
        Py_DECREF(res);
    }
    maybe_self_is_right = Py_TYPE(left) == Py_TYPE(right)
#if CYTHON_USE_TYPE_SLOTS
            || (Py_TYPE(right)->tp_as_number && Py_TYPE(right)->tp_as_number->nb_add == &__pyx_nb_add_9symengine_3lib_17symengine_wrapper_DenseMatrixBase)
#endif
            || PyType_IsSubtype(Py_TYPE(right), __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase);
    if (maybe_self_is_right) {
        return __pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_11__radd__(right, left);
    }
    return __Pyx_NewRef(Py_NotImplemented);
}



static CYTHON_INLINE PyObject *__pyx_nb_subtract_9symengine_3lib_17symengine_wrapper_DenseMatrixBase_maybe_call_slot(PyTypeObject* type, PyObject *left, PyObject *right ) {
    binaryfunc slot;
#if CYTHON_USE_TYPE_SLOTS
    slot = type->tp_as_number ? type->tp_as_number->nb_subtract : NULL;
#else
    slot = (binaryfunc) PyType_GetSlot(type, Py_nb_subtract);
#endif
    return slot ? slot(left, right ) : __Pyx_NewRef(Py_NotImplemented);
}
static PyObject *__pyx_nb_subtract_9symengine_3lib_17symengine_wrapper_DenseMatrixBase(PyObject *left, PyObject *right ) {
    int maybe_self_is_left, maybe_self_is_right = 0;
    maybe_self_is_left = Py_TYPE(left) == Py_TYPE(right)
#if CYTHON_USE_TYPE_SLOTS
            || (Py_TYPE(left)->tp_as_number && Py_TYPE(left)->tp_as_number->nb_subtract == &__pyx_nb_subtract_9symengine_3lib_17symengine_wrapper_DenseMatrixBase)
#endif
            || __Pyx_TypeCheck(left, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase);
    if (maybe_self_is_left) {
        PyObject *res;
        res = __pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_25__sub__(left, right);
        if (res != Py_NotImplemented) return res;
        Py_DECREF(res);
    }
    maybe_self_is_right = Py_TYPE(left) == Py_TYPE(right)
#if CYTHON_USE_TYPE_SLOTS
            || (Py_TYPE(right)->tp_as_number && Py_TYPE(right)->tp_as_number->nb_subtract == &__pyx_nb_subtract_9symengine_3lib_17symengine_wrapper_DenseMatrixBase)
#endif
            || PyType_IsSubtype(Py_TYPE(right), __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase);
    if (maybe_self_is_right) {
        return __pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_27__rsub__(right, left);
    }
    return __Pyx_NewRef(Py_NotImplemented);
}



static CYTHON_INLINE PyObject *__pyx_nb_multiply_9symengine_3lib_17symengine_wrapper_DenseMatrixBase_maybe_call_slot(PyTypeObject* type, PyObject *left, PyObject *right ) {
    binaryfunc slot;
#if CYTHON_USE_TYPE_SLOTS
    slot = type->tp_as_number ? type->tp_as_number->nb_multiply : NULL;
#else
    slot = (binaryfunc) PyType_GetSlot(type, Py_nb_multiply);
#endif
    return slot ? slot(left, right ) : __Pyx_NewRef(Py_NotImplemented);
}
static PyObject *__pyx_nb_multiply_9symengine_3lib_17symengine_wrapper_DenseMatrixBase(PyObject *left, PyObject *right ) {
    int maybe_self_is_left, maybe_self_is_right = 0;
    maybe_self_is_left = Py_TYPE(left) == Py_TYPE(right)
#if CYTHON_USE_TYPE_SLOTS
            || (Py_TYPE(left)->tp_as_number && Py_TYPE(left)->tp_as_number->nb_multiply == &__pyx_nb_multiply_9symengine_3lib_17symengine_wrapper_DenseMatrixBase)
#endif
            || __Pyx_TypeCheck(left, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase);
    if (maybe_self_is_left) {
        PyObject *res;
        res = __pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_13__mul__(left, right);
        if (res != Py_NotImplemented) return res;
        Py_DECREF(res);
    }
    maybe_self_is_right = Py_TYPE(left) == Py_TYPE(right)
#if CYTHON_USE_TYPE_SLOTS
            || (Py_TYPE(right)->tp_as_number && Py_TYPE(right)->tp_as_number->nb_multiply == &__pyx_nb_multiply_9symengine_3lib_17symengine_wrapper_DenseMatrixBase)
#endif
            || PyType_IsSubtype(Py_TYPE(right), __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase);
    if (maybe_self_is_right) {
        return __pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_15__rmul__(right, left);
    }
    return __Pyx_NewRef(Py_NotImplemented);
}



static CYTHON_INLINE PyObject *__pyx_nb_true_divide_9symengine_3lib_17symengine_wrapper_DenseMatrixBase_maybe_call_slot(PyTypeObject* type, PyObject *left, PyObject *right ) {
    binaryfunc slot;
#if CYTHON_USE_TYPE_SLOTS
    slot = type->tp_as_number ? type->tp_as_number->nb_true_divide : NULL;
#else
    slot = (binaryfunc) PyType_GetSlot(type, Py_nb_true_divide);
#endif
    return slot ? slot(left, right ) : __Pyx_NewRef(Py_NotImplemented);
}
static PyObject *__pyx_nb_true_divide_9symengine_3lib_17symengine_wrapper_DenseMatrixBase(PyObject *left, PyObject *right ) {
    int maybe_self_is_left, maybe_self_is_right = 0;
    maybe_self_is_left = Py_TYPE(left) == Py_TYPE(right)
#if CYTHON_USE_TYPE_SLOTS
            || (Py_TYPE(left)->tp_as_number && Py_TYPE(left)->tp_as_number->nb_true_divide == &__pyx_nb_true_divide_9symengine_3lib_17symengine_wrapper_DenseMatrixBase)
#endif
            || __Pyx_TypeCheck(left, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase);
    if (maybe_self_is_left) {
        PyObject *res;
        res = __pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_21__truediv__(left, right);
        if (res != Py_NotImplemented) return res;
        Py_DECREF(res);
    }
    maybe_self_is_right = Py_TYPE(left) == Py_TYPE(right)
#if CYTHON_USE_TYPE_SLOTS
            || (Py_TYPE(right)->tp_as_number && Py_TYPE(right)->tp_as_number->nb_true_divide == &__pyx_nb_true_divide_9symengine_3lib_17symengine_wrapper_DenseMatrixBase)
#endif
            || PyType_IsSubtype(Py_TYPE(right), __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase);
    if (maybe_self_is_right) {
        return __pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_23__rtruediv__(right, left);
    }
    return __Pyx_NewRef(Py_NotImplemented);
}



static CYTHON_INLINE PyObject *__pyx_nb_matrix_multiply_9symengine_3lib_17symengine_wrapper_DenseMatrixBase_maybe_call_slot(PyTypeObject* type, PyObject *left, PyObject *right ) {
    binaryfunc slot;
#if CYTHON_USE_TYPE_SLOTS
    slot = type->tp_as_number ? type->tp_as_number->nb_matrix_multiply : NULL;
#else
    slot = (binaryfunc) PyType_GetSlot(type, Py_nb_matrix_multiply);
#endif
    return slot ? slot(left, right ) : __Pyx_NewRef(Py_NotImplemented);
}
static PyObject *__pyx_nb_matrix_multiply_9symengine_3lib_17symengine_wrapper_DenseMatrixBase(PyObject *left, PyObject *right ) {
    int maybe_self_is_left, maybe_self_is_right = 0;
    maybe_self_is_left = Py_TYPE(left) == Py_TYPE(right)
#if CYTHON_USE_TYPE_SLOTS
            || (Py_TYPE(left)->tp_as_number && Py_TYPE(left)->tp_as_number->nb_matrix_multiply == &__pyx_nb_matrix_multiply_9symengine_3lib_17symengine_wrapper_DenseMatrixBase)
#endif
            || __Pyx_TypeCheck(left, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase);
    if (maybe_self_is_left) {
        PyObject *res;
        res = __pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_17__matmul__(left, right);
        if (res != Py_NotImplemented) return res;
        Py_DECREF(res);
    }
    maybe_self_is_right = Py_TYPE(left) == Py_TYPE(right)
#if CYTHON_USE_TYPE_SLOTS
            || (Py_TYPE(right)->tp_as_number && Py_TYPE(right)->tp_as_number->nb_matrix_multiply == &__pyx_nb_matrix_multiply_9symengine_3lib_17symengine_wrapper_DenseMatrixBase)
#endif
            || PyType_IsSubtype(Py_TYPE(right), __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase);
    if (maybe_self_is_right) {
        return __pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_19__rmatmul__(right, left);
    }
    return __Pyx_NewRef(Py_NotImplemented);
}



static PyObject *__pyx_getprop_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_rows(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_4rows_1__get__(o);
}

static PyObject *__pyx_getprop_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_cols(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_4cols_1__get__(o);
}

static PyObject *__pyx_getprop_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_is_square(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_9is_square_1__get__(o);
}

static PyObject *__pyx_getprop_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_shape(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_5shape_1__get__(o);
}

static PyObject *__pyx_getprop_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_size(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_4size_1__get__(o);
}

static PyObject *__pyx_getprop_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_H(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_1H_1__get__(o);
}

static PyObject *__pyx_getprop_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_is_zero_matrix(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_14is_zero_matrix_1__get__(o);
}

static PyObject *__pyx_getprop_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_is_real_matrix(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_14is_real_matrix_1__get__(o);
}

static PyObject *__pyx_getprop_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_is_diagonal(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_11is_diagonal_1__get__(o);
}

static PyObject *__pyx_getprop_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_is_symmetric(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_12is_symmetric_1__get__(o);
}

static PyObject *__pyx_getprop_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_is_hermitian(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_12is_hermitian_1__get__(o);
}

static PyObject *__pyx_getprop_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_is_weakly_diagonally_dominant(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_29is_weakly_diagonally_dominant_1__get__(o);
}

static PyObject *__pyx_getprop_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_is_strongly_diagonally_dominant(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_31is_strongly_diagonally_dominant_1__get__(o);
}

static PyObject *__pyx_getprop_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_is_positive_definite(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_20is_positive_definite_1__get__(o);
}

static PyObject *__pyx_getprop_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_is_negative_definite(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_20is_negative_definite_1__get__(o);
}

static PyObject *__pyx_getprop_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_T(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_1T_1__get__(o);
}

static PyObject *__pyx_getprop_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_free_symbols(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_12free_symbols_1__get__(o);
}

static PyMethodDef __pyx_methods_9symengine_3lib_17symengine_wrapper_DenseMatrixBase[] = {
  {"_repr_latex_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_7_repr_latex_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__add__", (PyCFunction)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_9__add__, METH_O|METH_COEXIST, 0},
  {"__radd__", (PyCFunction)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_11__radd__, METH_O|METH_COEXIST, 0},
  {"__mul__", (PyCFunction)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_13__mul__, METH_O|METH_COEXIST, 0},
  {"__rmul__", (PyCFunction)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_15__rmul__, METH_O|METH_COEXIST, 0},
  {"__matmul__", (PyCFunction)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_17__matmul__, METH_O|METH_COEXIST, 0},
  {"__rmatmul__", (PyCFunction)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_19__rmatmul__, METH_O|METH_COEXIST, 0},
  {"__truediv__", (PyCFunction)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_21__truediv__, METH_O|METH_COEXIST, 0},
  {"__rtruediv__", (PyCFunction)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_23__rtruediv__, METH_O|METH_COEXIST, 0},
  {"__sub__", (PyCFunction)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_25__sub__, METH_O|METH_COEXIST, 0},
  {"__rsub__", (PyCFunction)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_27__rsub__, METH_O|METH_COEXIST, 0},
  {"row_join", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_37row_join, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"col_join", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_39col_join, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"row_insert", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_41row_insert, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"col_insert", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_43col_insert, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"dot", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_45dot, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"cross", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_47cross, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"nrows", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_49nrows, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"ncols", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_51ncols, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"ravel", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_55ravel, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"reshape", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_57reshape, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"_get_index", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_59_get_index, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"get", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_61get, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"_get", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_63_get, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"col", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_65col, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"row", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_67row, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"set", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_69set, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"_set", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_71_set, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"det", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_73det, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"inv", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_75inv, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"add_matrix", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_77add_matrix, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"mul_matrix", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_79mul_matrix, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"multiply_elementwise", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_81multiply_elementwise, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"add_scalar", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_83add_scalar, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"mul_scalar", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_85mul_scalar, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"transpose", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_87transpose, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"conjugate", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_89conjugate, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"conjugate_transpose", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_91conjugate_transpose, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"trace", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_93trace, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"applyfunc", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_95applyfunc, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"_applyfunc", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_97_applyfunc, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"msubs", (PyCFunction)(void(*)(void))(PyCFunctionWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_99msubs, METH_VARARGS|METH_KEYWORDS, 0},
  {"_diff", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_101_diff, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"diff", (PyCFunction)(void(*)(void))(PyCFunctionWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_103diff, METH_VARARGS|METH_KEYWORDS, 0},
  {"subs", (PyCFunction)(void(*)(void))(PyCFunctionWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_105subs, METH_VARARGS|METH_KEYWORDS, 0},
  {"xreplace", (PyCFunction)(void(*)(void))(PyCFunctionWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_107xreplace, METH_VARARGS|METH_KEYWORDS, 0},
  {"_submatrix", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_109_submatrix, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"LU", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_111LU, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"LUdecomposition", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_113LUdecomposition, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"LDL", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_115LDL, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"solve", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_117solve, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"LUsolve", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_119LUsolve, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"FFLU", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_121FFLU, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"FFLDU", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_123FFLDU, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"QR", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_125QR, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"cholesky", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_127cholesky, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"jacobian", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_129jacobian, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"_sympy_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_131_sympy_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"_sage_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_133_sage_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"dump_real", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_135dump_real, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"dump_complex", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_137dump_complex, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"as_mutable", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_141as_mutable, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"as_immutable", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_143as_immutable, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"tolist", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_145tolist, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__array__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_147__array__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"_mat", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_149_mat, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"atoms", (PyCFunction)(void(*)(void))(PyCFunctionWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_151atoms, METH_VARARGS|METH_KEYWORDS, 0},
  {"simplify", (PyCFunction)(void(*)(void))(PyCFunctionWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_153simplify, METH_VARARGS|METH_KEYWORDS, 0},
  {"expand", (PyCFunction)(void(*)(void))(PyCFunctionWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_155expand, METH_VARARGS|METH_KEYWORDS, 0},
  {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_157__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_159__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_9symengine_3lib_17symengine_wrapper_DenseMatrixBase[] = {
  {"rows", __pyx_getprop_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_rows, 0, 0, 0},
  {"cols", __pyx_getprop_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_cols, 0, 0, 0},
  {"is_square", __pyx_getprop_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_is_square, 0, 0, 0},
  {"shape", __pyx_getprop_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_shape, 0, 0, 0},
  {"size", __pyx_getprop_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_size, 0, 0, 0},
  {"H", __pyx_getprop_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_H, 0, 0, 0},
  {"is_zero_matrix", __pyx_getprop_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_is_zero_matrix, 0, 0, 0},
  {"is_real_matrix", __pyx_getprop_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_is_real_matrix, 0, 0, 0},
  {"is_diagonal", __pyx_getprop_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_is_diagonal, 0, 0, 0},
  {"is_symmetric", __pyx_getprop_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_is_symmetric, 0, 0, 0},
  {"is_hermitian", __pyx_getprop_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_is_hermitian, 0, 0, 0},
  {"is_weakly_diagonally_dominant", __pyx_getprop_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_is_weakly_diagonally_dominant, 0, 0, 0},
  {"is_strongly_diagonally_dominant", __pyx_getprop_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_is_strongly_diagonally_dominant, 0, 0, 0},
  {"is_positive_definite", __pyx_getprop_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_is_positive_definite, 0, 0, 0},
  {"is_negative_definite", __pyx_getprop_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_is_negative_definite, 0, 0, 0},
  {"T", __pyx_getprop_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_T, 0, 0, 0},
  {"free_symbols", __pyx_getprop_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_free_symbols, 0, 0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9symengine_3lib_17symengine_wrapper_DenseMatrixBase_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_MatrixBase},
  {Py_tp_repr, (void *)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_3__repr__},
  {Py_nb_add, (void *)__pyx_nb_add_9symengine_3lib_17symengine_wrapper_DenseMatrixBase},
  {Py_nb_subtract, (void *)__pyx_nb_subtract_9symengine_3lib_17symengine_wrapper_DenseMatrixBase},
  {Py_nb_multiply, (void *)__pyx_nb_multiply_9symengine_3lib_17symengine_wrapper_DenseMatrixBase},
  {Py_nb_negative, (void *)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_29__neg__},
  {Py_nb_absolute, (void *)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_31__abs__},
  {Py_nb_true_divide, (void *)__pyx_nb_true_divide_9symengine_3lib_17symengine_wrapper_DenseMatrixBase},
  {Py_nb_matrix_multiply, (void *)__pyx_nb_matrix_multiply_9symengine_3lib_17symengine_wrapper_DenseMatrixBase},
  {Py_sq_length, (void *)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_53__len__},
  {Py_sq_item, (void *)__pyx_sq_item_9symengine_3lib_17symengine_wrapper_DenseMatrixBase},
  {Py_mp_length, (void *)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_53__len__},
  {Py_mp_subscript, (void *)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_33__getitem__},
  {Py_mp_ass_subscript, (void *)__pyx_mp_ass_subscript_9symengine_3lib_17symengine_wrapper_DenseMatrixBase},
  {Py_tp_str, (void *)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_5__str__},
  {Py_tp_doc, (void *)PyDoc_STR("\n    Represents a two-dimensional dense matrix.\n\n    Examples\n    ========\n\n    Empty matrix:\n\n    >>> DenseMatrix(3, 2)\n\n    2D Matrix:\n\n    >>> DenseMatrix(3, 2, [1, 2, 3, 4, 5, 6])\n    [1, 2]\n    [3, 4]\n    [5, 6]\n\n    >>> DenseMatrix([[1, 2], [3, 4], [5, 6]])\n    [1, 2]\n    [3, 4]\n    [5, 6]\n\n    ")},
  {Py_tp_iter, (void *)__pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_139__iter__},
  {Py_tp_methods, (void *)__pyx_methods_9symengine_3lib_17symengine_wrapper_DenseMatrixBase},
  {Py_tp_getset, (void *)__pyx_getsets_9symengine_3lib_17symengine_wrapper_DenseMatrixBase},
  {Py_tp_new, (void *)__pyx_tp_new_9symengine_3lib_17symengine_wrapper_DenseMatrixBase},
  {0, 0},
};
static PyType_Spec __pyx_type_9symengine_3lib_17symengine_wrapper_DenseMatrixBase_spec = {
  "symengine.lib.symengine_wrapper.DenseMatrixBase",
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
  __pyx_type_9symengine_3lib_17symengine_wrapper_DenseMatrixBase_slots,
};
#else

static PyNumberMethods __pyx_tp_as_number_DenseMatrixBase = {
  __pyx_nb_add_9symengine_3lib_17symengine_wrapper_DenseMatrixBase, /*nb_add*/
  __pyx_nb_subtract_9symengine_3lib_17symengine_wrapper_DenseMatrixBase, /*nb_subtract*/
  __pyx_nb_multiply_9symengine_3lib_17symengine_wrapper_DenseMatrixBase, /*nb_multiply*/
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  __pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_29__neg__, /*nb_negative*/
  0, /*nb_positive*/
  __pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_31__abs__, /*nb_absolute*/
  0, /*nb_bool*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  0, /*nb_int*/
  0, /*nb_long (reserved)*/
  0, /*nb_float*/
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  __pyx_nb_true_divide_9symengine_3lib_17symengine_wrapper_DenseMatrixBase, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  0, /*nb_index*/
  __pyx_nb_matrix_multiply_9symengine_3lib_17symengine_wrapper_DenseMatrixBase, /*nb_matrix_multiply*/
  0, /*nb_inplace_matrix_multiply*/
};

static PySequenceMethods __pyx_tp_as_sequence_DenseMatrixBase = {
  __pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_53__len__, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  __pyx_sq_item_9symengine_3lib_17symengine_wrapper_DenseMatrixBase, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_DenseMatrixBase = {
  __pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_53__len__, /*mp_length*/
  __pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_33__getitem__, /*mp_subscript*/
  __pyx_mp_ass_subscript_9symengine_3lib_17symengine_wrapper_DenseMatrixBase, /*mp_ass_subscript*/
};

static PyTypeObject __pyx_type_9symengine_3lib_17symengine_wrapper_DenseMatrixBase = {
  PyVarObject_HEAD_INIT(0, 0)
  "symengine.lib.symengine_wrapper.""DenseMatrixBase", /*tp_name*/
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DenseMatrixBase), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_MatrixBase, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  __pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_3__repr__, /*tp_repr*/
  &__pyx_tp_as_number_DenseMatrixBase, /*tp_as_number*/
  &__pyx_tp_as_sequence_DenseMatrixBase, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_DenseMatrixBase, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_5__str__, /*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*/
  PyDoc_STR("\n    Represents a two-dimensional dense matrix.\n\n    Examples\n    ========\n\n    Empty matrix:\n\n    >>> DenseMatrix(3, 2)\n\n    2D Matrix:\n\n    >>> DenseMatrix(3, 2, [1, 2, 3, 4, 5, 6])\n    [1, 2]\n    [3, 4]\n    [5, 6]\n\n    >>> DenseMatrix([[1, 2], [3, 4], [5, 6]])\n    [1, 2]\n    [3, 4]\n    [5, 6]\n\n    "), /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  __pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_139__iter__, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9symengine_3lib_17symengine_wrapper_DenseMatrixBase, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_9symengine_3lib_17symengine_wrapper_DenseMatrixBase, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9symengine_3lib_17symengine_wrapper_DenseMatrixBase, /*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 CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static PyMethodDef __pyx_methods_9symengine_3lib_17symengine_wrapper_MutableDenseMatrix[] = {
  {"col_swap", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_18MutableDenseMatrix_1col_swap, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"fill", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_18MutableDenseMatrix_3fill, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"row_swap", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_18MutableDenseMatrix_5row_swap, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"rowmul", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_18MutableDenseMatrix_7rowmul, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"rowadd", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_18MutableDenseMatrix_9rowadd, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"row_del", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_18MutableDenseMatrix_11row_del, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"col_del", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_18MutableDenseMatrix_13col_del, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_18MutableDenseMatrix_15__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_18MutableDenseMatrix_17__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9symengine_3lib_17symengine_wrapper_MutableDenseMatrix_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_MatrixBase},
  {Py_tp_methods, (void *)__pyx_methods_9symengine_3lib_17symengine_wrapper_MutableDenseMatrix},
  {Py_tp_new, (void *)__pyx_tp_new_9symengine_3lib_17symengine_wrapper_DenseMatrixBase},
  {0, 0},
};
static PyType_Spec __pyx_type_9symengine_3lib_17symengine_wrapper_MutableDenseMatrix_spec = {
  "symengine.lib.symengine_wrapper.MutableDenseMatrix",
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_MutableDenseMatrix),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
  __pyx_type_9symengine_3lib_17symengine_wrapper_MutableDenseMatrix_slots,
};
#else

static PyTypeObject __pyx_type_9symengine_3lib_17symengine_wrapper_MutableDenseMatrix = {
  PyVarObject_HEAD_INIT(0, 0)
  "symengine.lib.symengine_wrapper.""MutableDenseMatrix", /*tp_name*/
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_MutableDenseMatrix), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_MatrixBase, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_3__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_5__str__, /*tp_str*/
  #else
  0, /*tp_str*/
  #endif
  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*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_139__iter__, /*tp_iter*/
  #else
  0, /*tp_iter*/
  #endif
  0, /*tp_iternext*/
  __pyx_methods_9symengine_3lib_17symengine_wrapper_MutableDenseMatrix, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9symengine_3lib_17symengine_wrapper_DenseMatrixBase, /*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 CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static int __pyx_mp_ass_subscript_9symengine_3lib_17symengine_wrapper_ImmutableDenseMatrix(PyObject *o, PyObject *i, PyObject *v) {
  if (v) {
    return __pyx_pw_9symengine_3lib_17symengine_wrapper_20ImmutableDenseMatrix_1__setitem__(o, i, v);
  }
  else {
    __Pyx_TypeName o_type_name;
    objobjargproc f = __Pyx_PyType_TryGetSubSlot(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase, tp_as_mapping, mp_ass_subscript, objobjargproc);
    if (f)
    return f(o, i, v);
    o_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(o));
    PyErr_Format(PyExc_NotImplementedError,
      "Subscript deletion not supported by " __Pyx_FMT_TYPENAME, o_type_name);
    __Pyx_DECREF_TypeName(o_type_name);
    return -1;
  }
}

static PyMethodDef __pyx_methods_9symengine_3lib_17symengine_wrapper_ImmutableDenseMatrix[] = {
  {"_applyfunc", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_20ImmutableDenseMatrix_3_applyfunc, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_20ImmutableDenseMatrix_5__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_20ImmutableDenseMatrix_7__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9symengine_3lib_17symengine_wrapper_ImmutableDenseMatrix_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_MatrixBase},
  {Py_mp_ass_subscript, (void *)__pyx_mp_ass_subscript_9symengine_3lib_17symengine_wrapper_ImmutableDenseMatrix},
  {Py_tp_methods, (void *)__pyx_methods_9symengine_3lib_17symengine_wrapper_ImmutableDenseMatrix},
  {Py_tp_new, (void *)__pyx_tp_new_9symengine_3lib_17symengine_wrapper_DenseMatrixBase},
  {0, 0},
};
static PyType_Spec __pyx_type_9symengine_3lib_17symengine_wrapper_ImmutableDenseMatrix_spec = {
  "symengine.lib.symengine_wrapper.ImmutableDenseMatrix",
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_ImmutableDenseMatrix),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
  __pyx_type_9symengine_3lib_17symengine_wrapper_ImmutableDenseMatrix_slots,
};
#else

static PyMappingMethods __pyx_tp_as_mapping_ImmutableDenseMatrix = {
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_53__len__, /*mp_length*/
  #else
  0, /*mp_length*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_33__getitem__, /*mp_subscript*/
  #else
  0, /*mp_subscript*/
  #endif
  __pyx_mp_ass_subscript_9symengine_3lib_17symengine_wrapper_ImmutableDenseMatrix, /*mp_ass_subscript*/
};

static PyTypeObject __pyx_type_9symengine_3lib_17symengine_wrapper_ImmutableDenseMatrix = {
  PyVarObject_HEAD_INIT(0, 0)
  "symengine.lib.symengine_wrapper.""ImmutableDenseMatrix", /*tp_name*/
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_ImmutableDenseMatrix), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_MatrixBase, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_3__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_ImmutableDenseMatrix, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_5__str__, /*tp_str*/
  #else
  0, /*tp_str*/
  #endif
  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*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_139__iter__, /*tp_iter*/
  #else
  0, /*tp_iter*/
  #endif
  0, /*tp_iternext*/
  __pyx_methods_9symengine_3lib_17symengine_wrapper_ImmutableDenseMatrix, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9symengine_3lib_17symengine_wrapper_DenseMatrixBase, /*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 CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static PyObject *__pyx_tp_new_9symengine_3lib_17symengine_wrapper_Sieve(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  o = __Pyx_AllocateExtensionType(t, 0);
  if (unlikely(!o)) return 0;
  return o;
}

static void __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_Sieve(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_Sieve) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyTypeObject *tp = Py_TYPE(o);
  #if CYTHON_USE_TYPE_SLOTS
  (*tp->tp_free)(o);
  #else
  {
    freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free);
    if (tp_free) tp_free(o);
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  Py_DECREF(tp);
  #endif
}

static PyMethodDef __pyx_methods_9symengine_3lib_17symengine_wrapper_Sieve[] = {
  {"generate_primes", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_5Sieve_1generate_primes, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_5Sieve_3__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_5Sieve_5__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9symengine_3lib_17symengine_wrapper_Sieve_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_Sieve},
  {Py_tp_methods, (void *)__pyx_methods_9symengine_3lib_17symengine_wrapper_Sieve},
  {Py_tp_new, (void *)__pyx_tp_new_9symengine_3lib_17symengine_wrapper_Sieve},
  {0, 0},
};
static PyType_Spec __pyx_type_9symengine_3lib_17symengine_wrapper_Sieve_spec = {
  "symengine.lib.symengine_wrapper.Sieve",
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Sieve),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
  __pyx_type_9symengine_3lib_17symengine_wrapper_Sieve_slots,
};
#else

static PyTypeObject __pyx_type_9symengine_3lib_17symengine_wrapper_Sieve = {
  PyVarObject_HEAD_INIT(0, 0)
  "symengine.lib.symengine_wrapper.""Sieve", /*tp_name*/
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Sieve), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_Sieve, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  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_9symengine_3lib_17symengine_wrapper_Sieve, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9symengine_3lib_17symengine_wrapper_Sieve, /*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 CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static PyObject *__pyx_tp_new_9symengine_3lib_17symengine_wrapper_Sieve_iterator(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o;
  o = __Pyx_AllocateExtensionType(t, 0);
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_9symengine_3lib_17symengine_wrapper_14Sieve_iterator_3__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_Sieve_iterator(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_Sieve_iterator) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyTypeObject *tp = Py_TYPE(o);
  #if CYTHON_USE_TYPE_SLOTS
  (*tp->tp_free)(o);
  #else
  {
    freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free);
    if (tp_free) tp_free(o);
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  Py_DECREF(tp);
  #endif
}

static PyObject *__pyx_specialmethod___pyx_pw_9symengine_3lib_17symengine_wrapper_14Sieve_iterator_7__next__(PyObject *self, CYTHON_UNUSED PyObject *arg) {
  PyObject *res = __pyx_pw_9symengine_3lib_17symengine_wrapper_14Sieve_iterator_7__next__(self);
  if (!res && !PyErr_Occurred()) { PyErr_SetNone(PyExc_StopIteration); }
  return res;
}

static PyMethodDef __pyx_methods_9symengine_3lib_17symengine_wrapper_Sieve_iterator[] = {
  {"__next__", (PyCFunction)__pyx_specialmethod___pyx_pw_9symengine_3lib_17symengine_wrapper_14Sieve_iterator_7__next__, METH_NOARGS|METH_COEXIST, 0},
  {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_14Sieve_iterator_9__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9symengine_3lib_17symengine_wrapper_14Sieve_iterator_11__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9symengine_3lib_17symengine_wrapper_Sieve_iterator_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_Sieve_iterator},
  {Py_tp_iter, (void *)__pyx_pw_9symengine_3lib_17symengine_wrapper_14Sieve_iterator_5__iter__},
  {Py_tp_iternext, (void *)__pyx_pw_9symengine_3lib_17symengine_wrapper_14Sieve_iterator_7__next__},
  {Py_tp_methods, (void *)__pyx_methods_9symengine_3lib_17symengine_wrapper_Sieve_iterator},
  {Py_tp_new, (void *)__pyx_tp_new_9symengine_3lib_17symengine_wrapper_Sieve_iterator},
  {0, 0},
};
static PyType_Spec __pyx_type_9symengine_3lib_17symengine_wrapper_Sieve_iterator_spec = {
  "symengine.lib.symengine_wrapper.Sieve_iterator",
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Sieve_iterator),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
  __pyx_type_9symengine_3lib_17symengine_wrapper_Sieve_iterator_slots,
};
#else

static PyTypeObject __pyx_type_9symengine_3lib_17symengine_wrapper_Sieve_iterator = {
  PyVarObject_HEAD_INIT(0, 0)
  "symengine.lib.symengine_wrapper.""Sieve_iterator", /*tp_name*/
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_Sieve_iterator), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper_Sieve_iterator, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  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*/
  __pyx_pw_9symengine_3lib_17symengine_wrapper_14Sieve_iterator_5__iter__, /*tp_iter*/
  __pyx_pw_9symengine_3lib_17symengine_wrapper_14Sieve_iterator_7__next__, /*tp_iternext*/
  __pyx_methods_9symengine_3lib_17symengine_wrapper_Sieve_iterator, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9symengine_3lib_17symengine_wrapper_Sieve_iterator, /*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 CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static PyObject *__pyx_tp_new_9symengine_3lib_17symengine_wrapper___pyx_scope_struct__msubs(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  #if CYTHON_USE_FREELISTS
  if (likely((int)(__pyx_mstate_global->__pyx_freecount_9symengine_3lib_17symengine_wrapper___pyx_scope_struct__msubs > 0) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct__msubs, sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct__msubs))))
  {
    o = (PyObject*)__pyx_mstate_global->__pyx_freelist_9symengine_3lib_17symengine_wrapper___pyx_scope_struct__msubs[--__pyx_mstate_global->__pyx_freecount_9symengine_3lib_17symengine_wrapper___pyx_scope_struct__msubs];
    #if CYTHON_USE_TYPE_SPECS
    Py_DECREF(Py_TYPE(o));
    #endif
    memset(o, 0, sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct__msubs));
    #if CYTHON_COMPILING_IN_LIMITED_API
    (void) PyObject_Init(o, t);
    #else
    (void) PyObject_INIT(o, t);
    #endif
    PyObject_GC_Track(o);
  } else
  #endif
  {
    o = __Pyx_AllocateExtensionType(t, 1);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper___pyx_scope_struct__msubs(PyObject *o) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct__msubs *p = (struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct__msubs *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper___pyx_scope_struct__msubs) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_D);
  #if CYTHON_USE_FREELISTS
  if (likely((int)(__pyx_mstate_global->__pyx_freecount_9symengine_3lib_17symengine_wrapper___pyx_scope_struct__msubs < 8) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(Py_TYPE(o), __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct__msubs, sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct__msubs))))
  {
    __pyx_mstate_global->__pyx_freelist_9symengine_3lib_17symengine_wrapper___pyx_scope_struct__msubs[__pyx_mstate_global->__pyx_freecount_9symengine_3lib_17symengine_wrapper___pyx_scope_struct__msubs++] = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct__msubs *)o);
  } else
  #endif
  {
    PyTypeObject *tp = Py_TYPE(o);
    #if CYTHON_USE_TYPE_SLOTS
    (*tp->tp_free)(o);
    #else
    {
      freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free);
      if (tp_free) tp_free(o);
    }
    #endif
    #if CYTHON_USE_TYPE_SPECS
    Py_DECREF(tp);
    #endif
  }
}

static int __pyx_tp_traverse_9symengine_3lib_17symengine_wrapper___pyx_scope_struct__msubs(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct__msubs *p = (struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct__msubs *)o;
  {
    e = __Pyx_call_type_traverse(o, 1, v, a);
    if (e) return e;
  }
  if (p->__pyx_v_D) {
    e = (*v)(((PyObject *)p->__pyx_v_D), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_9symengine_3lib_17symengine_wrapper___pyx_scope_struct__msubs(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct__msubs *p = (struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct__msubs *)o;
  tmp = ((PyObject*)p->__pyx_v_D);
  p->__pyx_v_D = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper__DictBasic *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9symengine_3lib_17symengine_wrapper___pyx_scope_struct__msubs_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper___pyx_scope_struct__msubs},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9symengine_3lib_17symengine_wrapper___pyx_scope_struct__msubs},
  {Py_tp_clear, (void *)__pyx_tp_clear_9symengine_3lib_17symengine_wrapper___pyx_scope_struct__msubs},
  {Py_tp_new, (void *)__pyx_tp_new_9symengine_3lib_17symengine_wrapper___pyx_scope_struct__msubs},
  {0, 0},
};
static PyType_Spec __pyx_type_9symengine_3lib_17symengine_wrapper___pyx_scope_struct__msubs_spec = {
  "symengine.lib.symengine_wrapper.__pyx_scope_struct__msubs",
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct__msubs),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9symengine_3lib_17symengine_wrapper___pyx_scope_struct__msubs_slots,
};
#else

static PyTypeObject __pyx_type_9symengine_3lib_17symengine_wrapper___pyx_scope_struct__msubs = {
  PyVarObject_HEAD_INIT(0, 0)
  "symengine.lib.symengine_wrapper.""__pyx_scope_struct__msubs", /*tp_name*/
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct__msubs), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper___pyx_scope_struct__msubs, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  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_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9symengine_3lib_17symengine_wrapper___pyx_scope_struct__msubs, /*tp_traverse*/
  __pyx_tp_clear_9symengine_3lib_17symengine_wrapper___pyx_scope_struct__msubs, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9symengine_3lib_17symengine_wrapper___pyx_scope_struct__msubs, /*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 CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static PyObject *__pyx_tp_new_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_1_subs(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  #if CYTHON_USE_FREELISTS
  if (likely((int)(__pyx_mstate_global->__pyx_freecount_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_1_subs > 0) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_1_subs, sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_1_subs))))
  {
    o = (PyObject*)__pyx_mstate_global->__pyx_freelist_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_1_subs[--__pyx_mstate_global->__pyx_freecount_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_1_subs];
    #if CYTHON_USE_TYPE_SPECS
    Py_DECREF(Py_TYPE(o));
    #endif
    memset(o, 0, sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_1_subs));
    #if CYTHON_COMPILING_IN_LIMITED_API
    (void) PyObject_Init(o, t);
    #else
    (void) PyObject_INIT(o, t);
    #endif
    PyObject_GC_Track(o);
  } else
  #endif
  {
    o = __Pyx_AllocateExtensionType(t, 1);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_1_subs(PyObject *o) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_1_subs *p = (struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_1_subs *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_1_subs) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_D);
  #if CYTHON_USE_FREELISTS
  if (likely((int)(__pyx_mstate_global->__pyx_freecount_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_1_subs < 8) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(Py_TYPE(o), __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_1_subs, sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_1_subs))))
  {
    __pyx_mstate_global->__pyx_freelist_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_1_subs[__pyx_mstate_global->__pyx_freecount_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_1_subs++] = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_1_subs *)o);
  } else
  #endif
  {
    PyTypeObject *tp = Py_TYPE(o);
    #if CYTHON_USE_TYPE_SLOTS
    (*tp->tp_free)(o);
    #else
    {
      freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free);
      if (tp_free) tp_free(o);
    }
    #endif
    #if CYTHON_USE_TYPE_SPECS
    Py_DECREF(tp);
    #endif
  }
}

static int __pyx_tp_traverse_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_1_subs(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_1_subs *p = (struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_1_subs *)o;
  {
    e = __Pyx_call_type_traverse(o, 1, v, a);
    if (e) return e;
  }
  if (p->__pyx_v_D) {
    e = (*v)(((PyObject *)p->__pyx_v_D), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_1_subs(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_1_subs *p = (struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_1_subs *)o;
  tmp = ((PyObject*)p->__pyx_v_D);
  p->__pyx_v_D = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper__DictBasic *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_1_subs_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_1_subs},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_1_subs},
  {Py_tp_clear, (void *)__pyx_tp_clear_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_1_subs},
  {Py_tp_new, (void *)__pyx_tp_new_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_1_subs},
  {0, 0},
};
static PyType_Spec __pyx_type_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_1_subs_spec = {
  "symengine.lib.symengine_wrapper.__pyx_scope_struct_1_subs",
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_1_subs),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_1_subs_slots,
};
#else

static PyTypeObject __pyx_type_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_1_subs = {
  PyVarObject_HEAD_INIT(0, 0)
  "symengine.lib.symengine_wrapper.""__pyx_scope_struct_1_subs", /*tp_name*/
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_1_subs), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_1_subs, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  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_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_1_subs, /*tp_traverse*/
  __pyx_tp_clear_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_1_subs, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_1_subs, /*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 CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static PyObject *__pyx_tp_new_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_2_xreplace(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  #if CYTHON_USE_FREELISTS
  if (likely((int)(__pyx_mstate_global->__pyx_freecount_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_2_xreplace > 0) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_2_xreplace, sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_2_xreplace))))
  {
    o = (PyObject*)__pyx_mstate_global->__pyx_freelist_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_2_xreplace[--__pyx_mstate_global->__pyx_freecount_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_2_xreplace];
    #if CYTHON_USE_TYPE_SPECS
    Py_DECREF(Py_TYPE(o));
    #endif
    memset(o, 0, sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_2_xreplace));
    #if CYTHON_COMPILING_IN_LIMITED_API
    (void) PyObject_Init(o, t);
    #else
    (void) PyObject_INIT(o, t);
    #endif
    PyObject_GC_Track(o);
  } else
  #endif
  {
    o = __Pyx_AllocateExtensionType(t, 1);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_2_xreplace(PyObject *o) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_2_xreplace *p = (struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_2_xreplace *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_2_xreplace) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_D);
  #if CYTHON_USE_FREELISTS
  if (likely((int)(__pyx_mstate_global->__pyx_freecount_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_2_xreplace < 8) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(Py_TYPE(o), __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_2_xreplace, sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_2_xreplace))))
  {
    __pyx_mstate_global->__pyx_freelist_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_2_xreplace[__pyx_mstate_global->__pyx_freecount_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_2_xreplace++] = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_2_xreplace *)o);
  } else
  #endif
  {
    PyTypeObject *tp = Py_TYPE(o);
    #if CYTHON_USE_TYPE_SLOTS
    (*tp->tp_free)(o);
    #else
    {
      freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free);
      if (tp_free) tp_free(o);
    }
    #endif
    #if CYTHON_USE_TYPE_SPECS
    Py_DECREF(tp);
    #endif
  }
}

static int __pyx_tp_traverse_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_2_xreplace(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_2_xreplace *p = (struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_2_xreplace *)o;
  {
    e = __Pyx_call_type_traverse(o, 1, v, a);
    if (e) return e;
  }
  if (p->__pyx_v_D) {
    e = (*v)(((PyObject *)p->__pyx_v_D), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_2_xreplace(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_2_xreplace *p = (struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_2_xreplace *)o;
  tmp = ((PyObject*)p->__pyx_v_D);
  p->__pyx_v_D = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper__DictBasic *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_2_xreplace_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_2_xreplace},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_2_xreplace},
  {Py_tp_clear, (void *)__pyx_tp_clear_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_2_xreplace},
  {Py_tp_new, (void *)__pyx_tp_new_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_2_xreplace},
  {0, 0},
};
static PyType_Spec __pyx_type_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_2_xreplace_spec = {
  "symengine.lib.symengine_wrapper.__pyx_scope_struct_2_xreplace",
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_2_xreplace),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_2_xreplace_slots,
};
#else

static PyTypeObject __pyx_type_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_2_xreplace = {
  PyVarObject_HEAD_INIT(0, 0)
  "symengine.lib.symengine_wrapper.""__pyx_scope_struct_2_xreplace", /*tp_name*/
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_2_xreplace), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_2_xreplace, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  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_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_2_xreplace, /*tp_traverse*/
  __pyx_tp_clear_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_2_xreplace, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_2_xreplace, /*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 CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static PyObject *__pyx_tp_new_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_3_simplify(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  #if CYTHON_USE_FREELISTS
  if (likely((int)(__pyx_mstate_global->__pyx_freecount_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_3_simplify > 0) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_3_simplify, sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_3_simplify))))
  {
    o = (PyObject*)__pyx_mstate_global->__pyx_freelist_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_3_simplify[--__pyx_mstate_global->__pyx_freecount_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_3_simplify];
    #if CYTHON_USE_TYPE_SPECS
    Py_DECREF(Py_TYPE(o));
    #endif
    memset(o, 0, sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_3_simplify));
    #if CYTHON_COMPILING_IN_LIMITED_API
    (void) PyObject_Init(o, t);
    #else
    (void) PyObject_INIT(o, t);
    #endif
    PyObject_GC_Track(o);
  } else
  #endif
  {
    o = __Pyx_AllocateExtensionType(t, 1);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_3_simplify(PyObject *o) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_3_simplify *p = (struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_3_simplify *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_3_simplify) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_args);
  Py_CLEAR(p->__pyx_v_kwargs);
  #if CYTHON_USE_FREELISTS
  if (likely((int)(__pyx_mstate_global->__pyx_freecount_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_3_simplify < 8) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(Py_TYPE(o), __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_3_simplify, sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_3_simplify))))
  {
    __pyx_mstate_global->__pyx_freelist_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_3_simplify[__pyx_mstate_global->__pyx_freecount_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_3_simplify++] = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_3_simplify *)o);
  } else
  #endif
  {
    PyTypeObject *tp = Py_TYPE(o);
    #if CYTHON_USE_TYPE_SLOTS
    (*tp->tp_free)(o);
    #else
    {
      freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free);
      if (tp_free) tp_free(o);
    }
    #endif
    #if CYTHON_USE_TYPE_SPECS
    Py_DECREF(tp);
    #endif
  }
}

static int __pyx_tp_traverse_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_3_simplify(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_3_simplify *p = (struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_3_simplify *)o;
  {
    e = __Pyx_call_type_traverse(o, 1, v, a);
    if (e) return e;
  }
  if (p->__pyx_v_args) {
    e = (*v)(p->__pyx_v_args, a); if (e) return e;
  }
  if (p->__pyx_v_kwargs) {
    e = (*v)(p->__pyx_v_kwargs, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_3_simplify(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_3_simplify *p = (struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_3_simplify *)o;
  tmp = ((PyObject*)p->__pyx_v_args);
  p->__pyx_v_args = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_kwargs);
  p->__pyx_v_kwargs = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_3_simplify_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_3_simplify},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_3_simplify},
  {Py_tp_clear, (void *)__pyx_tp_clear_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_3_simplify},
  {Py_tp_new, (void *)__pyx_tp_new_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_3_simplify},
  {0, 0},
};
static PyType_Spec __pyx_type_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_3_simplify_spec = {
  "symengine.lib.symengine_wrapper.__pyx_scope_struct_3_simplify",
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_3_simplify),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_3_simplify_slots,
};
#else

static PyTypeObject __pyx_type_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_3_simplify = {
  PyVarObject_HEAD_INIT(0, 0)
  "symengine.lib.symengine_wrapper.""__pyx_scope_struct_3_simplify", /*tp_name*/
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_3_simplify), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_3_simplify, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  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_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_3_simplify, /*tp_traverse*/
  __pyx_tp_clear_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_3_simplify, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_3_simplify, /*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 CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static PyObject *__pyx_tp_new_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_4_expand(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  #if CYTHON_USE_FREELISTS
  if (likely((int)(__pyx_mstate_global->__pyx_freecount_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_4_expand > 0) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_4_expand, sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_4_expand))))
  {
    o = (PyObject*)__pyx_mstate_global->__pyx_freelist_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_4_expand[--__pyx_mstate_global->__pyx_freecount_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_4_expand];
    #if CYTHON_USE_TYPE_SPECS
    Py_DECREF(Py_TYPE(o));
    #endif
    memset(o, 0, sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_4_expand));
    #if CYTHON_COMPILING_IN_LIMITED_API
    (void) PyObject_Init(o, t);
    #else
    (void) PyObject_INIT(o, t);
    #endif
    PyObject_GC_Track(o);
  } else
  #endif
  {
    o = __Pyx_AllocateExtensionType(t, 1);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_4_expand(PyObject *o) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_4_expand *p = (struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_4_expand *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_4_expand) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_args);
  Py_CLEAR(p->__pyx_v_kwargs);
  #if CYTHON_USE_FREELISTS
  if (likely((int)(__pyx_mstate_global->__pyx_freecount_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_4_expand < 8) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(Py_TYPE(o), __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_4_expand, sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_4_expand))))
  {
    __pyx_mstate_global->__pyx_freelist_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_4_expand[__pyx_mstate_global->__pyx_freecount_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_4_expand++] = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_4_expand *)o);
  } else
  #endif
  {
    PyTypeObject *tp = Py_TYPE(o);
    #if CYTHON_USE_TYPE_SLOTS
    (*tp->tp_free)(o);
    #else
    {
      freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free);
      if (tp_free) tp_free(o);
    }
    #endif
    #if CYTHON_USE_TYPE_SPECS
    Py_DECREF(tp);
    #endif
  }
}

static int __pyx_tp_traverse_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_4_expand(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_4_expand *p = (struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_4_expand *)o;
  {
    e = __Pyx_call_type_traverse(o, 1, v, a);
    if (e) return e;
  }
  if (p->__pyx_v_args) {
    e = (*v)(p->__pyx_v_args, a); if (e) return e;
  }
  if (p->__pyx_v_kwargs) {
    e = (*v)(p->__pyx_v_kwargs, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_4_expand(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_4_expand *p = (struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_4_expand *)o;
  tmp = ((PyObject*)p->__pyx_v_args);
  p->__pyx_v_args = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_kwargs);
  p->__pyx_v_kwargs = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_4_expand_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_4_expand},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_4_expand},
  {Py_tp_clear, (void *)__pyx_tp_clear_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_4_expand},
  {Py_tp_new, (void *)__pyx_tp_new_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_4_expand},
  {0, 0},
};
static PyType_Spec __pyx_type_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_4_expand_spec = {
  "symengine.lib.symengine_wrapper.__pyx_scope_struct_4_expand",
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_4_expand),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_4_expand_slots,
};
#else

static PyTypeObject __pyx_type_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_4_expand = {
  PyVarObject_HEAD_INIT(0, 0)
  "symengine.lib.symengine_wrapper.""__pyx_scope_struct_4_expand", /*tp_name*/
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_4_expand), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_4_expand, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  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_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_4_expand, /*tp_traverse*/
  __pyx_tp_clear_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_4_expand, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_4_expand, /*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 CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static PyObject *__pyx_tp_new_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_5_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  #if CYTHON_USE_FREELISTS
  if (likely((int)(__pyx_mstate_global->__pyx_freecount_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_5_genexpr > 0) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_5_genexpr, sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_5_genexpr))))
  {
    o = (PyObject*)__pyx_mstate_global->__pyx_freelist_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_5_genexpr[--__pyx_mstate_global->__pyx_freecount_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_5_genexpr];
    #if CYTHON_USE_TYPE_SPECS
    Py_DECREF(Py_TYPE(o));
    #endif
    memset(o, 0, sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_5_genexpr));
    #if CYTHON_COMPILING_IN_LIMITED_API
    (void) PyObject_Init(o, t);
    #else
    (void) PyObject_INIT(o, t);
    #endif
    PyObject_GC_Track(o);
  } else
  #endif
  {
    o = __Pyx_AllocateExtensionType(t, 1);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_5_genexpr(PyObject *o) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_5_genexpr *p = (struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_5_genexpr *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_5_genexpr) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_genexpr_arg_0);
  Py_CLEAR(p->__pyx_v_expr);
  Py_CLEAR(p->__pyx_t_0);
  #if CYTHON_USE_FREELISTS
  if (likely((int)(__pyx_mstate_global->__pyx_freecount_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_5_genexpr < 8) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(Py_TYPE(o), __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_5_genexpr, sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_5_genexpr))))
  {
    __pyx_mstate_global->__pyx_freelist_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_5_genexpr[__pyx_mstate_global->__pyx_freecount_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_5_genexpr++] = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_5_genexpr *)o);
  } else
  #endif
  {
    PyTypeObject *tp = Py_TYPE(o);
    #if CYTHON_USE_TYPE_SLOTS
    (*tp->tp_free)(o);
    #else
    {
      freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free);
      if (tp_free) tp_free(o);
    }
    #endif
    #if CYTHON_USE_TYPE_SPECS
    Py_DECREF(tp);
    #endif
  }
}

static int __pyx_tp_traverse_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_5_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_5_genexpr *p = (struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_5_genexpr *)o;
  {
    e = __Pyx_call_type_traverse(o, 1, v, a);
    if (e) return e;
  }
  if (p->__pyx_genexpr_arg_0) {
    e = (*v)(p->__pyx_genexpr_arg_0, a); if (e) return e;
  }
  if (p->__pyx_v_expr) {
    e = (*v)(p->__pyx_v_expr, a); if (e) return e;
  }
  if (p->__pyx_t_0) {
    e = (*v)(p->__pyx_t_0, a); if (e) return e;
  }
  return 0;
}
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_5_genexpr_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_5_genexpr},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_5_genexpr},
  {Py_tp_new, (void *)__pyx_tp_new_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_5_genexpr},
  {0, 0},
};
static PyType_Spec __pyx_type_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_5_genexpr_spec = {
  "symengine.lib.symengine_wrapper.__pyx_scope_struct_5_genexpr",
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_5_genexpr),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_5_genexpr_slots,
};
#else

static PyTypeObject __pyx_type_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_5_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  "symengine.lib.symengine_wrapper.""__pyx_scope_struct_5_genexpr", /*tp_name*/
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_5_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_5_genexpr, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  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_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_5_genexpr, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_5_genexpr, /*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 CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static PyObject *__pyx_tp_new_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_6_create_low_level_callable(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  #if CYTHON_USE_FREELISTS
  if (likely((int)(__pyx_mstate_global->__pyx_freecount_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_6_create_low_level_callable > 0) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_6_create_low_level_callable, sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_6_create_low_level_callable))))
  {
    o = (PyObject*)__pyx_mstate_global->__pyx_freelist_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_6_create_low_level_callable[--__pyx_mstate_global->__pyx_freecount_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_6_create_low_level_callable];
    #if CYTHON_USE_TYPE_SPECS
    Py_DECREF(Py_TYPE(o));
    #endif
    memset(o, 0, sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_6_create_low_level_callable));
    #if CYTHON_COMPILING_IN_LIMITED_API
    (void) PyObject_Init(o, t);
    #else
    (void) PyObject_INIT(o, t);
    #endif
    PyObject_GC_Track(o);
  } else
  #endif
  {
    o = __Pyx_AllocateExtensionType(t, 1);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_6_create_low_level_callable(PyObject *o) {
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_6_create_low_level_callable *p = (struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_6_create_low_level_callable *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_6_create_low_level_callable) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_LambdifyLowLevelCallable);
  #if CYTHON_USE_FREELISTS
  if (likely((int)(__pyx_mstate_global->__pyx_freecount_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_6_create_low_level_callable < 8) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(Py_TYPE(o), __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_6_create_low_level_callable, sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_6_create_low_level_callable))))
  {
    __pyx_mstate_global->__pyx_freelist_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_6_create_low_level_callable[__pyx_mstate_global->__pyx_freecount_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_6_create_low_level_callable++] = ((struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_6_create_low_level_callable *)o);
  } else
  #endif
  {
    PyTypeObject *tp = Py_TYPE(o);
    #if CYTHON_USE_TYPE_SLOTS
    (*tp->tp_free)(o);
    #else
    {
      freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free);
      if (tp_free) tp_free(o);
    }
    #endif
    #if CYTHON_USE_TYPE_SPECS
    Py_DECREF(tp);
    #endif
  }
}

static int __pyx_tp_traverse_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_6_create_low_level_callable(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_6_create_low_level_callable *p = (struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_6_create_low_level_callable *)o;
  {
    e = __Pyx_call_type_traverse(o, 1, v, a);
    if (e) return e;
  }
  if (p->__pyx_v_LambdifyLowLevelCallable) {
    e = (*v)(p->__pyx_v_LambdifyLowLevelCallable, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_6_create_low_level_callable(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_6_create_low_level_callable *p = (struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_6_create_low_level_callable *)o;
  tmp = ((PyObject*)p->__pyx_v_LambdifyLowLevelCallable);
  p->__pyx_v_LambdifyLowLevelCallable = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_6_create_low_level_callable_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_6_create_low_level_callable},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_6_create_low_level_callable},
  {Py_tp_clear, (void *)__pyx_tp_clear_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_6_create_low_level_callable},
  {Py_tp_new, (void *)__pyx_tp_new_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_6_create_low_level_callable},
  {0, 0},
};
static PyType_Spec __pyx_type_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_6_create_low_level_callable_spec = {
  "symengine.lib.symengine_wrapper.__pyx_scope_struct_6_create_low_level_callable",
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_6_create_low_level_callable),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
  __pyx_type_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_6_create_low_level_callable_slots,
};
#else

static PyTypeObject __pyx_type_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_6_create_low_level_callable = {
  PyVarObject_HEAD_INIT(0, 0)
  "symengine.lib.symengine_wrapper.""__pyx_scope_struct_6_create_low_level_callable", /*tp_name*/
  sizeof(struct __pyx_obj_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_6_create_low_level_callable), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_6_create_low_level_callable, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  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_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_6_create_low_level_callable, /*tp_traverse*/
  __pyx_tp_clear_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_6_create_low_level_callable, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_6_create_low_level_callable, /*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 CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_array __pyx_vtable_array;

static PyObject *__pyx_tp_new_array(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_array_obj *p;
  PyObject *o;
  o = __Pyx_AllocateExtensionType(t, 0);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_array_obj *)o);
  p->__pyx_vtab = __pyx_vtabptr_array;
  p->mode = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->_format = ((PyObject*)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_array___cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_array(PyObject *o) {
  struct __pyx_array_obj *p = (struct __pyx_array_obj *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_array) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_array___dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->mode);
  Py_CLEAR(p->_format);
  PyTypeObject *tp = Py_TYPE(o);
  #if CYTHON_USE_TYPE_SLOTS
  (*tp->tp_free)(o);
  #else
  {
    freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free);
    if (tp_free) tp_free(o);
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  Py_DECREF(tp);
  #endif
}

static PyObject *__pyx_sq_item_array(PyObject *o, Py_ssize_t i) {
  PyObject *r;
  PyObject *x = PyLong_FromSsize_t(i); if(!x) return 0;
  #if CYTHON_USE_TYPE_SLOTS || (!CYTHON_USE_TYPE_SPECS && __PYX_LIMITED_VERSION_HEX < 0x030A0000)
  r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
  #else
  r = ((binaryfunc)PyType_GetSlot(Py_TYPE(o), Py_mp_subscript))(o, x);
  #endif
  Py_DECREF(x);
  return r;
}

static int __pyx_mp_ass_subscript_array(PyObject *o, PyObject *i, PyObject *v) {
  if (v) {
    return __pyx_array___setitem__(o, i, v);
  }
  else {
    __Pyx_TypeName o_type_name;
    o_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(o));
    PyErr_Format(PyExc_NotImplementedError,
      "Subscript deletion not supported by " __Pyx_FMT_TYPENAME, o_type_name);
    __Pyx_DECREF_TypeName(o_type_name);
    return -1;
  }
}

static PyObject *__pyx_tp_getattro_array(PyObject *o, PyObject *n) {
  PyObject *v = PyObject_GenericGetAttr(o, n);
  if (!v && PyErr_ExceptionMatches(PyExc_AttributeError)) {
    PyErr_Clear();
    v = __pyx_array___getattr__(o, n);
  }
  return v;
}

static PyObject *__pyx_getprop___pyx_array_memview(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__(o);
}

static PyMethodDef __pyx_methods_array[] = {
  {"__getattr__", (PyCFunction)__pyx_array___getattr__, METH_O|METH_COEXIST, 0},
  {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_array_1__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_array_3__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_array[] = {
  {"memview", __pyx_getprop___pyx_array_memview, 0, 0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
#if !CYTHON_COMPILING_IN_LIMITED_API

static PyBufferProcs __pyx_tp_as_buffer_array = {
  __pyx_array_getbuffer, /*bf_getbuffer*/
  0, /*bf_releasebuffer*/
};
#endif
static PyType_Slot __pyx_type___pyx_array_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_array},
  {Py_sq_length, (void *)__pyx_array___len__},
  {Py_sq_item, (void *)__pyx_sq_item_array},
  {Py_mp_length, (void *)__pyx_array___len__},
  {Py_mp_subscript, (void *)__pyx_array___getitem__},
  {Py_mp_ass_subscript, (void *)__pyx_mp_ass_subscript_array},
  {Py_tp_getattro, (void *)__pyx_tp_getattro_array},
  #if defined(Py_bf_getbuffer)
  {Py_bf_getbuffer, (void *)__pyx_array_getbuffer},
  #endif
  {Py_tp_methods, (void *)__pyx_methods_array},
  {Py_tp_getset, (void *)__pyx_getsets_array},
  {Py_tp_new, (void *)__pyx_tp_new_array},
  {0, 0},
};
static PyType_Spec __pyx_type___pyx_array_spec = {
  "symengine.lib.symengine_wrapper.array",
  sizeof(struct __pyx_array_obj),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_SEQUENCE,
  __pyx_type___pyx_array_slots,
};
#else

static PySequenceMethods __pyx_tp_as_sequence_array = {
  __pyx_array___len__, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  __pyx_sq_item_array, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_array = {
  __pyx_array___len__, /*mp_length*/
  __pyx_array___getitem__, /*mp_subscript*/
  __pyx_mp_ass_subscript_array, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_array = {
  __pyx_array_getbuffer, /*bf_getbuffer*/
  0, /*bf_releasebuffer*/
};

static PyTypeObject __pyx_type___pyx_array = {
  PyVarObject_HEAD_INIT(0, 0)
  "symengine.lib.symengine_wrapper.""array", /*tp_name*/
  sizeof(struct __pyx_array_obj), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_array, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  0, /*tp_repr*/
  0, /*tp_as_number*/
  &__pyx_tp_as_sequence_array, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_array, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  __pyx_tp_getattro_array, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_array, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_SEQUENCE, /*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_array, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_array, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_array, /*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 CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static PyObject *__pyx_tp_new_Enum(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_MemviewEnum_obj *p;
  PyObject *o;
  o = __Pyx_AllocateExtensionType(t, 0);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_MemviewEnum_obj *)o);
  p->name = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_Enum(PyObject *o) {
  struct __pyx_MemviewEnum_obj *p = (struct __pyx_MemviewEnum_obj *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_Enum) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->name);
  PyTypeObject *tp = Py_TYPE(o);
  #if CYTHON_USE_TYPE_SLOTS
  (*tp->tp_free)(o);
  #else
  {
    freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free);
    if (tp_free) tp_free(o);
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  Py_DECREF(tp);
  #endif
}

static int __pyx_tp_traverse_Enum(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_MemviewEnum_obj *p = (struct __pyx_MemviewEnum_obj *)o;
  {
    e = __Pyx_call_type_traverse(o, 1, v, a);
    if (e) return e;
  }
  if (p->name) {
    e = (*v)(p->name, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_Enum(PyObject *o) {
  PyObject* tmp;
  struct __pyx_MemviewEnum_obj *p = (struct __pyx_MemviewEnum_obj *)o;
  tmp = ((PyObject*)p->name);
  p->name = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyMethodDef __pyx_methods_Enum[] = {
  {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_MemviewEnum_1__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_MemviewEnum_3__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type___pyx_MemviewEnum_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_Enum},
  {Py_tp_repr, (void *)__pyx_MemviewEnum___repr__},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_Enum},
  {Py_tp_clear, (void *)__pyx_tp_clear_Enum},
  {Py_tp_methods, (void *)__pyx_methods_Enum},
  {Py_tp_init, (void *)__pyx_MemviewEnum___init__},
  {Py_tp_new, (void *)__pyx_tp_new_Enum},
  {0, 0},
};
static PyType_Spec __pyx_type___pyx_MemviewEnum_spec = {
  "symengine.lib.symengine_wrapper.Enum",
  sizeof(struct __pyx_MemviewEnum_obj),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type___pyx_MemviewEnum_slots,
};
#else

static PyTypeObject __pyx_type___pyx_MemviewEnum = {
  PyVarObject_HEAD_INIT(0, 0)
  "symengine.lib.symengine_wrapper.""Enum", /*tp_name*/
  sizeof(struct __pyx_MemviewEnum_obj), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_Enum, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  __pyx_MemviewEnum___repr__, /*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*/
  0, /*tp_doc*/
  __pyx_tp_traverse_Enum, /*tp_traverse*/
  __pyx_tp_clear_Enum, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_Enum, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  __pyx_MemviewEnum___init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_Enum, /*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 CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_memoryview __pyx_vtable_memoryview;

static PyObject *__pyx_tp_new_memoryview(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_memoryview_obj *p;
  PyObject *o;
  o = __Pyx_AllocateExtensionType(t, 0);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_memoryview_obj *)o);
  p->__pyx_vtab = __pyx_vtabptr_memoryview;
  p->obj = Py_None; Py_INCREF(Py_None);
  p->_size = Py_None; Py_INCREF(Py_None);
  p->view.obj = NULL;
  if (unlikely(__pyx_memoryview___cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_memoryview(PyObject *o) {
  struct __pyx_memoryview_obj *p = (struct __pyx_memoryview_obj *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_memoryview) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_memoryview___dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->obj);
  Py_CLEAR(p->_size);
  PyTypeObject *tp = Py_TYPE(o);
  #if CYTHON_USE_TYPE_SLOTS
  (*tp->tp_free)(o);
  #else
  {
    freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free);
    if (tp_free) tp_free(o);
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  Py_DECREF(tp);
  #endif
}

static int __pyx_tp_traverse_memoryview(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_memoryview_obj *p = (struct __pyx_memoryview_obj *)o;
  {
    e = __Pyx_call_type_traverse(o, 1, v, a);
    if (e) return e;
  }
  if (p->obj) {
    e = (*v)(p->obj, a); if (e) return e;
  }
  if (p->_size) {
    e = (*v)(p->_size, a); if (e) return e;
  }
  if (p->view.obj) {
    e = (*v)(p->view.obj, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_memoryview(PyObject *o) {
  PyObject* tmp;
  struct __pyx_memoryview_obj *p = (struct __pyx_memoryview_obj *)o;
  tmp = ((PyObject*)p->obj);
  p->obj = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_size);
  p->_size = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  Py_CLEAR(p->view.obj);
  return 0;
}

static PyObject *__pyx_sq_item_memoryview(PyObject *o, Py_ssize_t i) {
  PyObject *r;
  PyObject *x = PyLong_FromSsize_t(i); if(!x) return 0;
  #if CYTHON_USE_TYPE_SLOTS || (!CYTHON_USE_TYPE_SPECS && __PYX_LIMITED_VERSION_HEX < 0x030A0000)
  r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
  #else
  r = ((binaryfunc)PyType_GetSlot(Py_TYPE(o), Py_mp_subscript))(o, x);
  #endif
  Py_DECREF(x);
  return r;
}

static int __pyx_mp_ass_subscript_memoryview(PyObject *o, PyObject *i, PyObject *v) {
  if (v) {
    return __pyx_memoryview___setitem__(o, i, v);
  }
  else {
    __Pyx_TypeName o_type_name;
    o_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(o));
    PyErr_Format(PyExc_NotImplementedError,
      "Subscript deletion not supported by " __Pyx_FMT_TYPENAME, o_type_name);
    __Pyx_DECREF_TypeName(o_type_name);
    return -1;
  }
}

static PyObject *__pyx_getprop___pyx_memoryview_T(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_15View_dot_MemoryView_10memoryview_1T_1__get__(o);
}

static PyObject *__pyx_getprop___pyx_memoryview_base(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_15View_dot_MemoryView_10memoryview_4base_1__get__(o);
}

static PyObject *__pyx_getprop___pyx_memoryview_shape(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_15View_dot_MemoryView_10memoryview_5shape_1__get__(o);
}

static PyObject *__pyx_getprop___pyx_memoryview_strides(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_15View_dot_MemoryView_10memoryview_7strides_1__get__(o);
}

static PyObject *__pyx_getprop___pyx_memoryview_suboffsets(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_15View_dot_MemoryView_10memoryview_10suboffsets_1__get__(o);
}

static PyObject *__pyx_getprop___pyx_memoryview_ndim(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_15View_dot_MemoryView_10memoryview_4ndim_1__get__(o);
}

static PyObject *__pyx_getprop___pyx_memoryview_itemsize(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_15View_dot_MemoryView_10memoryview_8itemsize_1__get__(o);
}

static PyObject *__pyx_getprop___pyx_memoryview_nbytes(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_15View_dot_MemoryView_10memoryview_6nbytes_1__get__(o);
}

static PyObject *__pyx_getprop___pyx_memoryview_size(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_15View_dot_MemoryView_10memoryview_4size_1__get__(o);
}

static PyMethodDef __pyx_methods_memoryview[] = {
  {"is_c_contig", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_memoryview_is_c_contig, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"is_f_contig", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_memoryview_is_f_contig, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"copy", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_memoryview_copy, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"copy_fortran", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_memoryview_copy_fortran, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_memoryview_1__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_memoryview_3__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_memoryview[] = {
  {"T", __pyx_getprop___pyx_memoryview_T, 0, 0, 0},
  {"base", __pyx_getprop___pyx_memoryview_base, 0, 0, 0},
  {"shape", __pyx_getprop___pyx_memoryview_shape, 0, 0, 0},
  {"strides", __pyx_getprop___pyx_memoryview_strides, 0, 0, 0},
  {"suboffsets", __pyx_getprop___pyx_memoryview_suboffsets, 0, 0, 0},
  {"ndim", __pyx_getprop___pyx_memoryview_ndim, 0, 0, 0},
  {"itemsize", __pyx_getprop___pyx_memoryview_itemsize, 0, 0, 0},
  {"nbytes", __pyx_getprop___pyx_memoryview_nbytes, 0, 0, 0},
  {"size", __pyx_getprop___pyx_memoryview_size, 0, 0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
#if !CYTHON_COMPILING_IN_LIMITED_API

static PyBufferProcs __pyx_tp_as_buffer_memoryview = {
  __pyx_memoryview_getbuffer, /*bf_getbuffer*/
  0, /*bf_releasebuffer*/
};
#endif
static PyType_Slot __pyx_type___pyx_memoryview_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_memoryview},
  {Py_tp_repr, (void *)__pyx_memoryview___repr__},
  {Py_sq_length, (void *)__pyx_memoryview___len__},
  {Py_sq_item, (void *)__pyx_sq_item_memoryview},
  {Py_mp_length, (void *)__pyx_memoryview___len__},
  {Py_mp_subscript, (void *)__pyx_memoryview___getitem__},
  {Py_mp_ass_subscript, (void *)__pyx_mp_ass_subscript_memoryview},
  {Py_tp_str, (void *)__pyx_memoryview___str__},
  #if defined(Py_bf_getbuffer)
  {Py_bf_getbuffer, (void *)__pyx_memoryview_getbuffer},
  #endif
  {Py_tp_traverse, (void *)__pyx_tp_traverse_memoryview},
  {Py_tp_clear, (void *)__pyx_tp_clear_memoryview},
  {Py_tp_methods, (void *)__pyx_methods_memoryview},
  {Py_tp_getset, (void *)__pyx_getsets_memoryview},
  {Py_tp_new, (void *)__pyx_tp_new_memoryview},
  {0, 0},
};
static PyType_Spec __pyx_type___pyx_memoryview_spec = {
  "symengine.lib.symengine_wrapper.memoryview",
  sizeof(struct __pyx_memoryview_obj),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type___pyx_memoryview_slots,
};
#else

static PySequenceMethods __pyx_tp_as_sequence_memoryview = {
  __pyx_memoryview___len__, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  __pyx_sq_item_memoryview, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_memoryview = {
  __pyx_memoryview___len__, /*mp_length*/
  __pyx_memoryview___getitem__, /*mp_subscript*/
  __pyx_mp_ass_subscript_memoryview, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_memoryview = {
  __pyx_memoryview_getbuffer, /*bf_getbuffer*/
  0, /*bf_releasebuffer*/
};

static PyTypeObject __pyx_type___pyx_memoryview = {
  PyVarObject_HEAD_INIT(0, 0)
  "symengine.lib.symengine_wrapper.""memoryview", /*tp_name*/
  sizeof(struct __pyx_memoryview_obj), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_memoryview, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  __pyx_memoryview___repr__, /*tp_repr*/
  0, /*tp_as_number*/
  &__pyx_tp_as_sequence_memoryview, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_memoryview, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  __pyx_memoryview___str__, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_memoryview, /*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*/
  0, /*tp_doc*/
  __pyx_tp_traverse_memoryview, /*tp_traverse*/
  __pyx_tp_clear_memoryview, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_memoryview, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_memoryview, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_memoryview, /*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 CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct__memoryviewslice __pyx_vtable__memoryviewslice;

static PyObject *__pyx_tp_new__memoryviewslice(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_memoryviewslice_obj *p;
  PyObject *o = __pyx_tp_new_memoryview(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_memoryviewslice_obj *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_memoryview*)__pyx_vtabptr__memoryviewslice;
  __Pyx_default_placement_construct(&(p->from_slice));
  p->from_object = Py_None; Py_INCREF(Py_None);
  p->from_slice.memview = NULL;
  return o;
}

static void __pyx_tp_dealloc__memoryviewslice(PyObject *o) {
  struct __pyx_memoryviewslice_obj *p = (struct __pyx_memoryviewslice_obj *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc__memoryviewslice) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_memoryviewslice___dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  __Pyx_call_destructor(p->from_slice);
  Py_CLEAR(p->from_object);
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_memoryview(o);
}

static int __pyx_tp_traverse__memoryviewslice(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_memoryviewslice_obj *p = (struct __pyx_memoryviewslice_obj *)o;
  e = __pyx_tp_traverse_memoryview(o, v, a); if (e) return e;
  if (p->from_object) {
    e = (*v)(p->from_object, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear__memoryviewslice(PyObject *o) {
  PyObject* tmp;
  struct __pyx_memoryviewslice_obj *p = (struct __pyx_memoryviewslice_obj *)o;
  __pyx_tp_clear_memoryview(o);
  tmp = ((PyObject*)p->from_object);
  p->from_object = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  __PYX_XCLEAR_MEMVIEW(&p->from_slice, 1);
  return 0;
}

static PyMethodDef __pyx_methods__memoryviewslice[] = {
  {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_memoryviewslice_1__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_memoryviewslice_3__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type___pyx_memoryviewslice_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc__memoryviewslice},
  {Py_tp_doc, (void *)PyDoc_STR("Internal class for passing memoryview slices to Python")},
  {Py_tp_traverse, (void *)__pyx_tp_traverse__memoryviewslice},
  {Py_tp_clear, (void *)__pyx_tp_clear__memoryviewslice},
  {Py_tp_methods, (void *)__pyx_methods__memoryviewslice},
  {Py_tp_new, (void *)__pyx_tp_new__memoryviewslice},
  {0, 0},
};
static PyType_Spec __pyx_type___pyx_memoryviewslice_spec = {
  "symengine.lib.symengine_wrapper._memoryviewslice",
  sizeof(struct __pyx_memoryviewslice_obj),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_SEQUENCE,
  __pyx_type___pyx_memoryviewslice_slots,
};
#else

static PyTypeObject __pyx_type___pyx_memoryviewslice = {
  PyVarObject_HEAD_INIT(0, 0)
  "symengine.lib.symengine_wrapper.""_memoryviewslice", /*tp_name*/
  sizeof(struct __pyx_memoryviewslice_obj), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc__memoryviewslice, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_memoryview___repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_memoryview___str__, /*tp_str*/
  #else
  0, /*tp_str*/
  #endif
  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|Py_TPFLAGS_SEQUENCE, /*tp_flags*/
  PyDoc_STR("Internal class for passing memoryview slices to Python"), /*tp_doc*/
  __pyx_tp_traverse__memoryviewslice, /*tp_traverse*/
  __pyx_tp_clear__memoryviewslice, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods__memoryviewslice, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new__memoryviewslice, /*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 CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static PyMethodDef __pyx_methods[] = {
  {0, 0, 0, 0}
};
/* #### Code section: initfunc_declarations ### */
static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate); /*proto*/
/* #### Code section: init_module ### */

static int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate) {
  __Pyx_RefNannyDeclarations
  CYTHON_UNUSED_VAR(__pyx_mstate);
  __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
  /*--- Global init code ---*/
  __pyx_collections_abc_Sequence = Py_None; Py_INCREF(Py_None);
  generic = Py_None; Py_INCREF(Py_None);
  strided = Py_None; Py_INCREF(Py_None);
  indirect = Py_None; Py_INCREF(Py_None);
  contiguous = Py_None; Py_INCREF(Py_None);
  indirect_contiguous = Py_None; Py_INCREF(Py_None);
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate) {
  __Pyx_RefNannyDeclarations
  CYTHON_UNUSED_VAR(__pyx_mstate);
  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
  /*--- Variable export code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate) {
  __Pyx_RefNannyDeclarations
  CYTHON_UNUSED_VAR(__pyx_mstate);
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
  /*--- Function export code ---*/
  {
    __pyx_t_1 = __Pyx_ApiExport_GetApiDict(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    const char * __pyx_export_signature = __Pyx_PyBytes_AsString(__pyx_mstate_global->__pyx_kp_b_PyObject_SymEngine_RCP_const_Sym);
    #if !CYTHON_ASSUME_SAFE_MACROS
    if (unlikely(!__pyx_export_signature)) __PYX_ERR(0, 1, __pyx_L1_error)
    #endif
    const char * __pyx_export_name = __pyx_export_signature + 51;
    void (*const __pyx_export_pointers[])(void) = {(void (*)(void))&__pyx_f_9symengine_3lib_17symengine_wrapper_c2py, (void (*)(void)) NULL};
    void (*const *__pyx_export_pointer)(void) = __pyx_export_pointers;
    const char *__pyx_export_current_signature = __pyx_export_signature;
    while (*__pyx_export_pointer) {
      if (__Pyx_ExportFunction(__pyx_t_1, __pyx_export_name, *__pyx_export_pointer, __pyx_export_current_signature) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
      ++__pyx_export_pointer;
      __pyx_export_name = strchr(__pyx_export_name, '\0') + 1;
      __pyx_export_signature = strchr(__pyx_export_signature, '\0') + 1;
      if (*__pyx_export_signature != '\0') __pyx_export_current_signature = __pyx_export_signature;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate) {
  __Pyx_RefNannyDeclarations
  CYTHON_UNUSED_VAR(__pyx_mstate);
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
  /*--- Type init code ---*/
  #if CYTHON_USE_TYPE_SPECS
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9symengine_3lib_17symengine_wrapper_Basic_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic)) __PYX_ERR(0, 836, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9symengine_3lib_17symengine_wrapper_Basic_spec, __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic) < (0)) __PYX_ERR(0, 836, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic = &__pyx_type_9symengine_3lib_17symengine_wrapper_Basic;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic) < (0)) __PYX_ERR(0, 836, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic->tp_dictoffset && __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_Basic, (PyObject *) __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic) < (0)) __PYX_ERR(0, 836, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SPECS
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_MatrixBase = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9symengine_3lib_17symengine_wrapper_MatrixBase_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_MatrixBase)) __PYX_ERR(0, 3288, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9symengine_3lib_17symengine_wrapper_MatrixBase_spec, __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_MatrixBase) < (0)) __PYX_ERR(0, 3288, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_MatrixBase = &__pyx_type_9symengine_3lib_17symengine_wrapper_MatrixBase;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_MatrixBase) < (0)) __PYX_ERR(0, 3288, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_MatrixBase);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_MatrixBase->tp_dictoffset && __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_MatrixBase->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_MatrixBase->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_MatrixBase, (PyObject *) __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_MatrixBase) < (0)) __PYX_ERR(0, 3288, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_MatrixBase) < (0)) __PYX_ERR(0, 3288, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SPECS
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_PyFunctionClass = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9symengine_3lib_17symengine_wrapper_PyFunctionClass_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_PyFunctionClass)) __PYX_ERR(0, 2953, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9symengine_3lib_17symengine_wrapper_PyFunctionClass_spec, __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_PyFunctionClass) < (0)) __PYX_ERR(0, 2953, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_PyFunctionClass = &__pyx_type_9symengine_3lib_17symengine_wrapper_PyFunctionClass;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_PyFunctionClass) < (0)) __PYX_ERR(0, 2953, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_PyFunctionClass);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_PyFunctionClass->tp_dictoffset && __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_PyFunctionClass->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_PyFunctionClass->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_PyFunctionClass, (PyObject *) __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_PyFunctionClass) < (0)) __PYX_ERR(0, 2953, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_PyFunctionClass) < (0)) __PYX_ERR(0, 2953, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SPECS
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_PyModule = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9symengine_3lib_17symengine_wrapper_PyModule_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_PyModule)) __PYX_ERR(3, 19, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9symengine_3lib_17symengine_wrapper_PyModule_spec, __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_PyModule) < (0)) __PYX_ERR(3, 19, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_PyModule = &__pyx_type_9symengine_3lib_17symengine_wrapper_PyModule;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_PyModule) < (0)) __PYX_ERR(3, 19, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_PyModule);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_PyModule->tp_dictoffset && __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_PyModule->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_PyModule->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_PyModule, (PyObject *) __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_PyModule) < (0)) __PYX_ERR(3, 19, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SPECS
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper__DictBasic = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9symengine_3lib_17symengine_wrapper__DictBasic_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper__DictBasic)) __PYX_ERR(0, 704, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9symengine_3lib_17symengine_wrapper__DictBasic_spec, __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper__DictBasic) < (0)) __PYX_ERR(0, 704, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper__DictBasic = &__pyx_type_9symengine_3lib_17symengine_wrapper__DictBasic;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper__DictBasic) < (0)) __PYX_ERR(0, 704, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper__DictBasic);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper__DictBasic->tp_dictoffset && __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper__DictBasic->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper__DictBasic->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_DictBasic_2, (PyObject *) __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper__DictBasic) < (0)) __PYX_ERR(0, 704, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper__DictBasic) < (0)) __PYX_ERR(0, 704, __pyx_L1_error)
  __pyx_vtabptr_9symengine_3lib_17symengine_wrapper_DictBasicIter = &__pyx_vtable_9symengine_3lib_17symengine_wrapper_DictBasicIter;
  __pyx_vtable_9symengine_3lib_17symengine_wrapper_DictBasicIter.init = (PyObject *(*)(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_DictBasicIter *, SymEngine::map_basic_basic::iterator, SymEngine::map_basic_basic::iterator))__pyx_f_9symengine_3lib_17symengine_wrapper_13DictBasicIter_init;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DictBasicIter = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9symengine_3lib_17symengine_wrapper_DictBasicIter_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DictBasicIter)) __PYX_ERR(0, 686, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9symengine_3lib_17symengine_wrapper_DictBasicIter_spec, __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DictBasicIter) < (0)) __PYX_ERR(0, 686, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DictBasicIter = &__pyx_type_9symengine_3lib_17symengine_wrapper_DictBasicIter;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DictBasicIter) < (0)) __PYX_ERR(0, 686, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DictBasicIter);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DictBasicIter->tp_dictoffset && __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DictBasicIter->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DictBasicIter->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DictBasicIter, __pyx_vtabptr_9symengine_3lib_17symengine_wrapper_DictBasicIter) < (0)) __PYX_ERR(0, 686, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DictBasicIter) < (0)) __PYX_ERR(0, 686, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_DictBasicIter, (PyObject *) __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DictBasicIter) < (0)) __PYX_ERR(0, 686, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DictBasicIter) < (0)) __PYX_ERR(0, 686, __pyx_L1_error)
  __pyx_vtabptr_9symengine_3lib_17symengine_wrapper__Lambdify = &__pyx_vtable_9symengine_3lib_17symengine_wrapper__Lambdify;
  __pyx_vtable_9symengine_3lib_17symengine_wrapper__Lambdify._init = (PyObject *(*)(struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify *, SymEngine::vec_basic &, SymEngine::vec_basic &, bool))__pyx_f_9symengine_3lib_17symengine_wrapper_9_Lambdify__init;
  __pyx_vtable_9symengine_3lib_17symengine_wrapper__Lambdify._load = (PyObject *(*)(struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify *, std::string const &))__pyx_f_9symengine_3lib_17symengine_wrapper_9_Lambdify__load;
  __pyx_vtable_9symengine_3lib_17symengine_wrapper__Lambdify.eval_real = (PyObject *(*)(struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_9symengine_3lib_17symengine_wrapper_9_Lambdify_eval_real;
  __pyx_vtable_9symengine_3lib_17symengine_wrapper__Lambdify.eval_complex = (PyObject *(*)(struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_9symengine_3lib_17symengine_wrapper_9_Lambdify_eval_complex;
  __pyx_vtable_9symengine_3lib_17symengine_wrapper__Lambdify.unsafe_eval = (PyObject *(*)(struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify *, PyObject *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_9symengine_3lib_17symengine_wrapper_9_Lambdify_unsafe_eval *__pyx_optional_args))__pyx_f_9symengine_3lib_17symengine_wrapper_9_Lambdify_unsafe_eval;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper__Lambdify = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9symengine_3lib_17symengine_wrapper__Lambdify_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper__Lambdify)) __PYX_ERR(0, 4937, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9symengine_3lib_17symengine_wrapper__Lambdify_spec, __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper__Lambdify) < (0)) __PYX_ERR(0, 4937, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper__Lambdify = &__pyx_type_9symengine_3lib_17symengine_wrapper__Lambdify;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper__Lambdify) < (0)) __PYX_ERR(0, 4937, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper__Lambdify);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper__Lambdify->tp_dictoffset && __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper__Lambdify->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper__Lambdify->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  #if CYTHON_UPDATE_DESCRIPTOR_DOC
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper__Lambdify, "__call__"); if (unlikely(!wrapper)) __PYX_ERR(0, 4937, __pyx_L1_error)
    if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
      __pyx_wrapperbase_9symengine_3lib_17symengine_wrapper_9_Lambdify_8__call__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_9symengine_3lib_17symengine_wrapper_9_Lambdify_8__call__.doc = __pyx_doc_9symengine_3lib_17symengine_wrapper_9_Lambdify_8__call__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_9symengine_3lib_17symengine_wrapper_9_Lambdify_8__call__;
    }
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper__Lambdify, __pyx_vtabptr_9symengine_3lib_17symengine_wrapper__Lambdify) < (0)) __PYX_ERR(0, 4937, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper__Lambdify) < (0)) __PYX_ERR(0, 4937, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_Lambdify_2, (PyObject *) __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper__Lambdify) < (0)) __PYX_ERR(0, 4937, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper__Lambdify) < (0)) __PYX_ERR(0, 4937, __pyx_L1_error)
  __pyx_vtabptr_9symengine_3lib_17symengine_wrapper_LambdaDouble = &__pyx_vtable_9symengine_3lib_17symengine_wrapper_LambdaDouble;
  __pyx_vtable_9symengine_3lib_17symengine_wrapper_LambdaDouble.__pyx_base = *__pyx_vtabptr_9symengine_3lib_17symengine_wrapper__Lambdify;
  __pyx_vtable_9symengine_3lib_17symengine_wrapper_LambdaDouble.__pyx_base._init = (PyObject *(*)(struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify *, SymEngine::vec_basic &, SymEngine::vec_basic &, bool))__pyx_f_9symengine_3lib_17symengine_wrapper_12LambdaDouble__init;
  __pyx_vtable_9symengine_3lib_17symengine_wrapper_LambdaDouble.__pyx_base.unsafe_eval = (PyObject *(*)(struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify *, PyObject *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_9symengine_3lib_17symengine_wrapper_9_Lambdify_unsafe_eval *__pyx_optional_args))__pyx_f_9symengine_3lib_17symengine_wrapper_12LambdaDouble_unsafe_eval;
  __pyx_vtable_9symengine_3lib_17symengine_wrapper_LambdaDouble.unsafe_real = (PyObject *(*)(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LambdaDouble *, __Pyx_memviewslice, __Pyx_memviewslice, int __pyx_skip_dispatch, struct __pyx_opt_args_9symengine_3lib_17symengine_wrapper_12LambdaDouble_unsafe_real *__pyx_optional_args))__pyx_f_9symengine_3lib_17symengine_wrapper_12LambdaDouble_unsafe_real;
  __pyx_vtable_9symengine_3lib_17symengine_wrapper_LambdaDouble.as_scipy_low_level_callable = (PyObject *(*)(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LambdaDouble *, int __pyx_skip_dispatch))__pyx_f_9symengine_3lib_17symengine_wrapper_12LambdaDouble_as_scipy_low_level_callable;
  __pyx_vtable_9symengine_3lib_17symengine_wrapper_LambdaDouble.as_ctypes = (PyObject *(*)(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LambdaDouble *, int __pyx_skip_dispatch))__pyx_f_9symengine_3lib_17symengine_wrapper_12LambdaDouble_as_ctypes;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper__Lambdify); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5146, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LambdaDouble = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9symengine_3lib_17symengine_wrapper_LambdaDouble_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LambdaDouble)) __PYX_ERR(0, 5146, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9symengine_3lib_17symengine_wrapper_LambdaDouble_spec, __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LambdaDouble) < (0)) __PYX_ERR(0, 5146, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LambdaDouble = &__pyx_type_9symengine_3lib_17symengine_wrapper_LambdaDouble;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LambdaDouble->tp_base = __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper__Lambdify;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LambdaDouble) < (0)) __PYX_ERR(0, 5146, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LambdaDouble);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LambdaDouble->tp_dictoffset && __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LambdaDouble->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LambdaDouble->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LambdaDouble, __pyx_vtabptr_9symengine_3lib_17symengine_wrapper_LambdaDouble) < (0)) __PYX_ERR(0, 5146, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LambdaDouble) < (0)) __PYX_ERR(0, 5146, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_LambdaDouble, (PyObject *) __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LambdaDouble) < (0)) __PYX_ERR(0, 5146, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LambdaDouble) < (0)) __PYX_ERR(0, 5146, __pyx_L1_error)
  __pyx_vtabptr_9symengine_3lib_17symengine_wrapper_LambdaComplexDouble = &__pyx_vtable_9symengine_3lib_17symengine_wrapper_LambdaComplexDouble;
  __pyx_vtable_9symengine_3lib_17symengine_wrapper_LambdaComplexDouble.__pyx_base = *__pyx_vtabptr_9symengine_3lib_17symengine_wrapper__Lambdify;
  __pyx_vtable_9symengine_3lib_17symengine_wrapper_LambdaComplexDouble.__pyx_base._init = (PyObject *(*)(struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify *, SymEngine::vec_basic &, SymEngine::vec_basic &, bool))__pyx_f_9symengine_3lib_17symengine_wrapper_19LambdaComplexDouble__init;
  __pyx_vtable_9symengine_3lib_17symengine_wrapper_LambdaComplexDouble.__pyx_base.unsafe_eval = (PyObject *(*)(struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify *, PyObject *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_9symengine_3lib_17symengine_wrapper_9_Lambdify_unsafe_eval *__pyx_optional_args))__pyx_f_9symengine_3lib_17symengine_wrapper_19LambdaComplexDouble_unsafe_eval;
  __pyx_vtable_9symengine_3lib_17symengine_wrapper_LambdaComplexDouble.unsafe_complex = (PyObject *(*)(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LambdaComplexDouble *, __Pyx_memviewslice, __Pyx_memviewslice, int __pyx_skip_dispatch, struct __pyx_opt_args_9symengine_3lib_17symengine_wrapper_19LambdaComplexDouble_unsafe_complex *__pyx_optional_args))__pyx_f_9symengine_3lib_17symengine_wrapper_19LambdaComplexDouble_unsafe_complex;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper__Lambdify); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5191, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LambdaComplexDouble = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9symengine_3lib_17symengine_wrapper_LambdaComplexDouble_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LambdaComplexDouble)) __PYX_ERR(0, 5191, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9symengine_3lib_17symengine_wrapper_LambdaComplexDouble_spec, __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LambdaComplexDouble) < (0)) __PYX_ERR(0, 5191, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LambdaComplexDouble = &__pyx_type_9symengine_3lib_17symengine_wrapper_LambdaComplexDouble;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LambdaComplexDouble->tp_base = __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper__Lambdify;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LambdaComplexDouble) < (0)) __PYX_ERR(0, 5191, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LambdaComplexDouble);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LambdaComplexDouble->tp_dictoffset && __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LambdaComplexDouble->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LambdaComplexDouble->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LambdaComplexDouble, __pyx_vtabptr_9symengine_3lib_17symengine_wrapper_LambdaComplexDouble) < (0)) __PYX_ERR(0, 5191, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LambdaComplexDouble) < (0)) __PYX_ERR(0, 5191, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_LambdaComplexDouble, (PyObject *) __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LambdaComplexDouble) < (0)) __PYX_ERR(0, 5191, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LambdaComplexDouble) < (0)) __PYX_ERR(0, 5191, __pyx_L1_error)
  __pyx_vtabptr_9symengine_3lib_17symengine_wrapper__LLVMLambdify = &__pyx_vtable_9symengine_3lib_17symengine_wrapper__LLVMLambdify;
  __pyx_vtable_9symengine_3lib_17symengine_wrapper__LLVMLambdify.__pyx_base = *__pyx_vtabptr_9symengine_3lib_17symengine_wrapper__Lambdify;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper__Lambdify); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 62, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper__LLVMLambdify = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9symengine_3lib_17symengine_wrapper__LLVMLambdify_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper__LLVMLambdify)) __PYX_ERR(3, 62, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9symengine_3lib_17symengine_wrapper__LLVMLambdify_spec, __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper__LLVMLambdify) < (0)) __PYX_ERR(3, 62, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper__LLVMLambdify = &__pyx_type_9symengine_3lib_17symengine_wrapper__LLVMLambdify;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper__LLVMLambdify->tp_base = __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper__Lambdify;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper__LLVMLambdify) < (0)) __PYX_ERR(3, 62, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper__LLVMLambdify);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper__LLVMLambdify->tp_dictoffset && __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper__LLVMLambdify->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper__LLVMLambdify->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper__LLVMLambdify, __pyx_vtabptr_9symengine_3lib_17symengine_wrapper__LLVMLambdify) < (0)) __PYX_ERR(3, 62, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper__LLVMLambdify) < (0)) __PYX_ERR(3, 62, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_LLVMLambdify, (PyObject *) __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper__LLVMLambdify) < (0)) __PYX_ERR(3, 62, __pyx_L1_error)
  __pyx_vtabptr_9symengine_3lib_17symengine_wrapper_LLVMDouble = &__pyx_vtable_9symengine_3lib_17symengine_wrapper_LLVMDouble;
  __pyx_vtable_9symengine_3lib_17symengine_wrapper_LLVMDouble.__pyx_base = *__pyx_vtabptr_9symengine_3lib_17symengine_wrapper__LLVMLambdify;
  __pyx_vtable_9symengine_3lib_17symengine_wrapper_LLVMDouble.__pyx_base.__pyx_base._init = (PyObject *(*)(struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify *, SymEngine::vec_basic &, SymEngine::vec_basic &, bool))__pyx_f_9symengine_3lib_17symengine_wrapper_10LLVMDouble__init;
  __pyx_vtable_9symengine_3lib_17symengine_wrapper_LLVMDouble.__pyx_base.__pyx_base._load = (PyObject *(*)(struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify *, std::string const &))__pyx_f_9symengine_3lib_17symengine_wrapper_10LLVMDouble__load;
  __pyx_vtable_9symengine_3lib_17symengine_wrapper_LLVMDouble.__pyx_base.__pyx_base.unsafe_eval = (PyObject *(*)(struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify *, PyObject *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_9symengine_3lib_17symengine_wrapper_9_Lambdify_unsafe_eval *__pyx_optional_args))__pyx_f_9symengine_3lib_17symengine_wrapper_10LLVMDouble_unsafe_eval;
  __pyx_vtable_9symengine_3lib_17symengine_wrapper_LLVMDouble.unsafe_real = (PyObject *(*)(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMDouble *, __Pyx_memviewslice, __Pyx_memviewslice, int __pyx_skip_dispatch, struct __pyx_opt_args_9symengine_3lib_17symengine_wrapper_10LLVMDouble_unsafe_real *__pyx_optional_args))__pyx_f_9symengine_3lib_17symengine_wrapper_10LLVMDouble_unsafe_real;
  __pyx_vtable_9symengine_3lib_17symengine_wrapper_LLVMDouble.as_scipy_low_level_callable = (PyObject *(*)(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMDouble *, int __pyx_skip_dispatch))__pyx_f_9symengine_3lib_17symengine_wrapper_10LLVMDouble_as_scipy_low_level_callable;
  __pyx_vtable_9symengine_3lib_17symengine_wrapper_LLVMDouble.as_ctypes = (PyObject *(*)(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMDouble *, int __pyx_skip_dispatch))__pyx_f_9symengine_3lib_17symengine_wrapper_10LLVMDouble_as_ctypes;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper__LLVMLambdify); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5212, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LLVMDouble = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9symengine_3lib_17symengine_wrapper_LLVMDouble_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LLVMDouble)) __PYX_ERR(0, 5212, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9symengine_3lib_17symengine_wrapper_LLVMDouble_spec, __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LLVMDouble) < (0)) __PYX_ERR(0, 5212, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LLVMDouble = &__pyx_type_9symengine_3lib_17symengine_wrapper_LLVMDouble;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LLVMDouble->tp_base = __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper__LLVMLambdify;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LLVMDouble) < (0)) __PYX_ERR(0, 5212, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LLVMDouble);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LLVMDouble->tp_dictoffset && __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LLVMDouble->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LLVMDouble->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LLVMDouble, __pyx_vtabptr_9symengine_3lib_17symengine_wrapper_LLVMDouble) < (0)) __PYX_ERR(0, 5212, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LLVMDouble) < (0)) __PYX_ERR(0, 5212, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_LLVMDouble, (PyObject *) __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LLVMDouble) < (0)) __PYX_ERR(0, 5212, __pyx_L1_error)
  __pyx_vtabptr_9symengine_3lib_17symengine_wrapper_LLVMFloat = &__pyx_vtable_9symengine_3lib_17symengine_wrapper_LLVMFloat;
  __pyx_vtable_9symengine_3lib_17symengine_wrapper_LLVMFloat.__pyx_base = *__pyx_vtabptr_9symengine_3lib_17symengine_wrapper__LLVMLambdify;
  __pyx_vtable_9symengine_3lib_17symengine_wrapper_LLVMFloat.__pyx_base.__pyx_base._init = (PyObject *(*)(struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify *, SymEngine::vec_basic &, SymEngine::vec_basic &, bool))__pyx_f_9symengine_3lib_17symengine_wrapper_9LLVMFloat__init;
  __pyx_vtable_9symengine_3lib_17symengine_wrapper_LLVMFloat.__pyx_base.__pyx_base._load = (PyObject *(*)(struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify *, std::string const &))__pyx_f_9symengine_3lib_17symengine_wrapper_9LLVMFloat__load;
  __pyx_vtable_9symengine_3lib_17symengine_wrapper_LLVMFloat.__pyx_base.__pyx_base.unsafe_eval = (PyObject *(*)(struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify *, PyObject *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_9symengine_3lib_17symengine_wrapper_9_Lambdify_unsafe_eval *__pyx_optional_args))__pyx_f_9symengine_3lib_17symengine_wrapper_9LLVMFloat_unsafe_eval;
  __pyx_vtable_9symengine_3lib_17symengine_wrapper_LLVMFloat.unsafe_real = (PyObject *(*)(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMFloat *, __Pyx_memviewslice, __Pyx_memviewslice, int __pyx_skip_dispatch, struct __pyx_opt_args_9symengine_3lib_17symengine_wrapper_9LLVMFloat_unsafe_real *__pyx_optional_args))__pyx_f_9symengine_3lib_17symengine_wrapper_9LLVMFloat_unsafe_real;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper__LLVMLambdify); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5271, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LLVMFloat = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9symengine_3lib_17symengine_wrapper_LLVMFloat_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LLVMFloat)) __PYX_ERR(0, 5271, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9symengine_3lib_17symengine_wrapper_LLVMFloat_spec, __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LLVMFloat) < (0)) __PYX_ERR(0, 5271, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LLVMFloat = &__pyx_type_9symengine_3lib_17symengine_wrapper_LLVMFloat;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LLVMFloat->tp_base = __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper__LLVMLambdify;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LLVMFloat) < (0)) __PYX_ERR(0, 5271, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LLVMFloat);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LLVMFloat->tp_dictoffset && __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LLVMFloat->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LLVMFloat->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LLVMFloat, __pyx_vtabptr_9symengine_3lib_17symengine_wrapper_LLVMFloat) < (0)) __PYX_ERR(0, 5271, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LLVMFloat) < (0)) __PYX_ERR(0, 5271, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_LLVMFloat, (PyObject *) __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LLVMFloat) < (0)) __PYX_ERR(0, 5271, __pyx_L1_error)
  __pyx_vtabptr_9symengine_3lib_17symengine_wrapper_LLVMLongDouble = &__pyx_vtable_9symengine_3lib_17symengine_wrapper_LLVMLongDouble;
  __pyx_vtable_9symengine_3lib_17symengine_wrapper_LLVMLongDouble.__pyx_base = *__pyx_vtabptr_9symengine_3lib_17symengine_wrapper__LLVMLambdify;
  __pyx_vtable_9symengine_3lib_17symengine_wrapper_LLVMLongDouble.__pyx_base.__pyx_base._init = (PyObject *(*)(struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify *, SymEngine::vec_basic &, SymEngine::vec_basic &, bool))__pyx_f_9symengine_3lib_17symengine_wrapper_14LLVMLongDouble__init;
  __pyx_vtable_9symengine_3lib_17symengine_wrapper_LLVMLongDouble.__pyx_base.__pyx_base._load = (PyObject *(*)(struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify *, std::string const &))__pyx_f_9symengine_3lib_17symengine_wrapper_14LLVMLongDouble__load;
  __pyx_vtable_9symengine_3lib_17symengine_wrapper_LLVMLongDouble.__pyx_base.__pyx_base.unsafe_eval = (PyObject *(*)(struct __pyx_obj_9symengine_3lib_17symengine_wrapper__Lambdify *, PyObject *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_9symengine_3lib_17symengine_wrapper_9_Lambdify_unsafe_eval *__pyx_optional_args))__pyx_f_9symengine_3lib_17symengine_wrapper_14LLVMLongDouble_unsafe_eval;
  __pyx_vtable_9symengine_3lib_17symengine_wrapper_LLVMLongDouble.unsafe_real = (PyObject *(*)(struct __pyx_obj_9symengine_3lib_17symengine_wrapper_LLVMLongDouble *, __Pyx_memviewslice, __Pyx_memviewslice, int __pyx_skip_dispatch, struct __pyx_opt_args_9symengine_3lib_17symengine_wrapper_14LLVMLongDouble_unsafe_real *__pyx_optional_args))__pyx_f_9symengine_3lib_17symengine_wrapper_14LLVMLongDouble_unsafe_real;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper__LLVMLambdify); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5302, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LLVMLongDouble = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9symengine_3lib_17symengine_wrapper_LLVMLongDouble_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LLVMLongDouble)) __PYX_ERR(0, 5302, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9symengine_3lib_17symengine_wrapper_LLVMLongDouble_spec, __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LLVMLongDouble) < (0)) __PYX_ERR(0, 5302, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LLVMLongDouble = &__pyx_type_9symengine_3lib_17symengine_wrapper_LLVMLongDouble;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LLVMLongDouble->tp_base = __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper__LLVMLambdify;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LLVMLongDouble) < (0)) __PYX_ERR(0, 5302, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LLVMLongDouble);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LLVMLongDouble->tp_dictoffset && __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LLVMLongDouble->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LLVMLongDouble->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LLVMLongDouble, __pyx_vtabptr_9symengine_3lib_17symengine_wrapper_LLVMLongDouble) < (0)) __PYX_ERR(0, 5302, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LLVMLongDouble) < (0)) __PYX_ERR(0, 5302, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_LLVMLongDouble, (PyObject *) __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LLVMLongDouble) < (0)) __PYX_ERR(0, 5302, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1270, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Expr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9symengine_3lib_17symengine_wrapper_Expr_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Expr)) __PYX_ERR(0, 1270, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9symengine_3lib_17symengine_wrapper_Expr_spec, __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Expr) < (0)) __PYX_ERR(0, 1270, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Expr = &__pyx_type_9symengine_3lib_17symengine_wrapper_Expr;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Expr->tp_base = __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Expr) < (0)) __PYX_ERR(0, 1270, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Expr);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Expr->tp_dictoffset && __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Expr->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Expr->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_Expr, (PyObject *) __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Expr) < (0)) __PYX_ERR(0, 1270, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Expr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1274, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Symbol = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9symengine_3lib_17symengine_wrapper_Symbol_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Symbol)) __PYX_ERR(0, 1274, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9symengine_3lib_17symengine_wrapper_Symbol_spec, __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Symbol) < (0)) __PYX_ERR(0, 1274, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Symbol = &__pyx_type_9symengine_3lib_17symengine_wrapper_Symbol;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Symbol->tp_base = __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Expr;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Symbol) < (0)) __PYX_ERR(0, 1274, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Symbol);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Symbol->tp_dictoffset && __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Symbol->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Symbol->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_Symbol, (PyObject *) __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Symbol) < (0)) __PYX_ERR(0, 1274, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Symbol); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1335, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Dummy = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9symengine_3lib_17symengine_wrapper_Dummy_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Dummy)) __PYX_ERR(0, 1335, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9symengine_3lib_17symengine_wrapper_Dummy_spec, __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Dummy) < (0)) __PYX_ERR(0, 1335, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Dummy = &__pyx_type_9symengine_3lib_17symengine_wrapper_Dummy;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Dummy->tp_base = __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Symbol;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Dummy) < (0)) __PYX_ERR(0, 1335, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Dummy);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Dummy->tp_dictoffset && __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Dummy->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Dummy->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_Dummy, (PyObject *) __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Dummy) < (0)) __PYX_ERR(0, 1335, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Expr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1377, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Constant = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9symengine_3lib_17symengine_wrapper_Constant_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Constant)) __PYX_ERR(0, 1377, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9symengine_3lib_17symengine_wrapper_Constant_spec, __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Constant) < (0)) __PYX_ERR(0, 1377, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Constant = &__pyx_type_9symengine_3lib_17symengine_wrapper_Constant;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Constant->tp_base = __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Expr;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Constant) < (0)) __PYX_ERR(0, 1377, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Constant);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Constant->tp_dictoffset && __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Constant->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Constant->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_Constant, (PyObject *) __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Constant) < (0)) __PYX_ERR(0, 1377, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Constant); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1408, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Pi = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9symengine_3lib_17symengine_wrapper_Pi_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Pi)) __PYX_ERR(0, 1408, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9symengine_3lib_17symengine_wrapper_Pi_spec, __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Pi) < (0)) __PYX_ERR(0, 1408, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Pi = &__pyx_type_9symengine_3lib_17symengine_wrapper_Pi;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Pi->tp_base = __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Constant;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Pi) < (0)) __PYX_ERR(0, 1408, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Pi);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Pi->tp_dictoffset && __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Pi->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Pi->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_Pi, (PyObject *) __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Pi) < (0)) __PYX_ERR(0, 1408, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Constant); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1424, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Exp1 = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9symengine_3lib_17symengine_wrapper_Exp1_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Exp1)) __PYX_ERR(0, 1424, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9symengine_3lib_17symengine_wrapper_Exp1_spec, __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Exp1) < (0)) __PYX_ERR(0, 1424, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Exp1 = &__pyx_type_9symengine_3lib_17symengine_wrapper_Exp1;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Exp1->tp_base = __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Constant;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Exp1) < (0)) __PYX_ERR(0, 1424, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Exp1);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Exp1->tp_dictoffset && __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Exp1->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Exp1->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_Exp1, (PyObject *) __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Exp1) < (0)) __PYX_ERR(0, 1424, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Constant); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1440, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_GoldenRatio = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9symengine_3lib_17symengine_wrapper_GoldenRatio_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_GoldenRatio)) __PYX_ERR(0, 1440, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9symengine_3lib_17symengine_wrapper_GoldenRatio_spec, __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_GoldenRatio) < (0)) __PYX_ERR(0, 1440, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_GoldenRatio = &__pyx_type_9symengine_3lib_17symengine_wrapper_GoldenRatio;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_GoldenRatio->tp_base = __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Constant;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_GoldenRatio) < (0)) __PYX_ERR(0, 1440, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_GoldenRatio);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_GoldenRatio->tp_dictoffset && __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_GoldenRatio->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_GoldenRatio->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_GoldenRatio, (PyObject *) __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_GoldenRatio) < (0)) __PYX_ERR(0, 1440, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Constant); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1456, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Catalan = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9symengine_3lib_17symengine_wrapper_Catalan_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Catalan)) __PYX_ERR(0, 1456, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9symengine_3lib_17symengine_wrapper_Catalan_spec, __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Catalan) < (0)) __PYX_ERR(0, 1456, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Catalan = &__pyx_type_9symengine_3lib_17symengine_wrapper_Catalan;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Catalan->tp_base = __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Constant;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Catalan) < (0)) __PYX_ERR(0, 1456, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Catalan);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Catalan->tp_dictoffset && __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Catalan->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Catalan->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_Catalan, (PyObject *) __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Catalan) < (0)) __PYX_ERR(0, 1456, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Constant); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1472, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_EulerGamma = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9symengine_3lib_17symengine_wrapper_EulerGamma_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_EulerGamma)) __PYX_ERR(0, 1472, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9symengine_3lib_17symengine_wrapper_EulerGamma_spec, __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_EulerGamma) < (0)) __PYX_ERR(0, 1472, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_EulerGamma = &__pyx_type_9symengine_3lib_17symengine_wrapper_EulerGamma;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_EulerGamma->tp_base = __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Constant;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_EulerGamma) < (0)) __PYX_ERR(0, 1472, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_EulerGamma);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_EulerGamma->tp_dictoffset && __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_EulerGamma->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_EulerGamma->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_EulerGamma, (PyObject *) __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_EulerGamma) < (0)) __PYX_ERR(0, 1472, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Expr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1488, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Boolean = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9symengine_3lib_17symengine_wrapper_Boolean_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Boolean)) __PYX_ERR(0, 1488, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9symengine_3lib_17symengine_wrapper_Boolean_spec, __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Boolean) < (0)) __PYX_ERR(0, 1488, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Boolean = &__pyx_type_9symengine_3lib_17symengine_wrapper_Boolean;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Boolean->tp_base = __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Expr;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Boolean) < (0)) __PYX_ERR(0, 1488, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Boolean);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Boolean->tp_dictoffset && __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Boolean->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Boolean->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_Boolean, (PyObject *) __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Boolean) < (0)) __PYX_ERR(0, 1488, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Boolean); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1497, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_BooleanAtom = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9symengine_3lib_17symengine_wrapper_BooleanAtom_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_BooleanAtom)) __PYX_ERR(0, 1497, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9symengine_3lib_17symengine_wrapper_BooleanAtom_spec, __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_BooleanAtom) < (0)) __PYX_ERR(0, 1497, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_BooleanAtom = &__pyx_type_9symengine_3lib_17symengine_wrapper_BooleanAtom;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_BooleanAtom->tp_base = __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Boolean;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_BooleanAtom) < (0)) __PYX_ERR(0, 1497, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_BooleanAtom);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_BooleanAtom->tp_dictoffset && __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_BooleanAtom->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_BooleanAtom->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_BooleanAtom, (PyObject *) __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_BooleanAtom) < (0)) __PYX_ERR(0, 1497, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_BooleanAtom); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1508, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_BooleanTrue = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9symengine_3lib_17symengine_wrapper_BooleanTrue_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_BooleanTrue)) __PYX_ERR(0, 1508, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9symengine_3lib_17symengine_wrapper_BooleanTrue_spec, __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_BooleanTrue) < (0)) __PYX_ERR(0, 1508, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_BooleanTrue = &__pyx_type_9symengine_3lib_17symengine_wrapper_BooleanTrue;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_BooleanTrue->tp_base = __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_BooleanAtom;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_BooleanTrue) < (0)) __PYX_ERR(0, 1508, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_BooleanTrue);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_BooleanTrue->tp_dictoffset && __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_BooleanTrue->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_BooleanTrue->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_BooleanTrue, (PyObject *) __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_BooleanTrue) < (0)) __PYX_ERR(0, 1508, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_BooleanAtom); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1527, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_BooleanFalse = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9symengine_3lib_17symengine_wrapper_BooleanFalse_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_BooleanFalse)) __PYX_ERR(0, 1527, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9symengine_3lib_17symengine_wrapper_BooleanFalse_spec, __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_BooleanFalse) < (0)) __PYX_ERR(0, 1527, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_BooleanFalse = &__pyx_type_9symengine_3lib_17symengine_wrapper_BooleanFalse;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_BooleanFalse->tp_base = __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_BooleanAtom;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_BooleanFalse) < (0)) __PYX_ERR(0, 1527, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_BooleanFalse);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_BooleanFalse->tp_dictoffset && __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_BooleanFalse->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_BooleanFalse->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_BooleanFalse, (PyObject *) __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_BooleanFalse) < (0)) __PYX_ERR(0, 1527, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Expr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1693, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Number = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9symengine_3lib_17symengine_wrapper_Number_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Number)) __PYX_ERR(0, 1693, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9symengine_3lib_17symengine_wrapper_Number_spec, __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Number) < (0)) __PYX_ERR(0, 1693, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Number = &__pyx_type_9symengine_3lib_17symengine_wrapper_Number;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Number->tp_base = __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Expr;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Number) < (0)) __PYX_ERR(0, 1693, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Number);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Number->tp_dictoffset && __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Number->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Number->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_Number, (PyObject *) __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Number) < (0)) __PYX_ERR(0, 1693, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Number); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1989, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ComplexBase = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9symengine_3lib_17symengine_wrapper_ComplexBase_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ComplexBase)) __PYX_ERR(0, 1989, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9symengine_3lib_17symengine_wrapper_ComplexBase_spec, __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ComplexBase) < (0)) __PYX_ERR(0, 1989, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ComplexBase = &__pyx_type_9symengine_3lib_17symengine_wrapper_ComplexBase;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ComplexBase->tp_base = __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Number;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ComplexBase) < (0)) __PYX_ERR(0, 1989, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ComplexBase);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ComplexBase->tp_dictoffset && __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ComplexBase->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ComplexBase->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_ComplexBase, (PyObject *) __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ComplexBase) < (0)) __PYX_ERR(0, 1989, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ComplexBase); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2006, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ComplexDouble = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9symengine_3lib_17symengine_wrapper_ComplexDouble_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ComplexDouble)) __PYX_ERR(0, 2006, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9symengine_3lib_17symengine_wrapper_ComplexDouble_spec, __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ComplexDouble) < (0)) __PYX_ERR(0, 2006, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ComplexDouble = &__pyx_type_9symengine_3lib_17symengine_wrapper_ComplexDouble;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ComplexDouble->tp_base = __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ComplexBase;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ComplexDouble) < (0)) __PYX_ERR(0, 2006, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ComplexDouble);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ComplexDouble->tp_dictoffset && __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ComplexDouble->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ComplexDouble->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_ComplexDouble, (PyObject *) __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ComplexDouble) < (0)) __PYX_ERR(0, 2006, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ComplexBase); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2054, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ComplexMPC = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9symengine_3lib_17symengine_wrapper_ComplexMPC_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ComplexMPC)) __PYX_ERR(0, 2054, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9symengine_3lib_17symengine_wrapper_ComplexMPC_spec, __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ComplexMPC) < (0)) __PYX_ERR(0, 2054, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ComplexMPC = &__pyx_type_9symengine_3lib_17symengine_wrapper_ComplexMPC;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ComplexMPC->tp_base = __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ComplexBase;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ComplexMPC) < (0)) __PYX_ERR(0, 2054, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ComplexMPC);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ComplexMPC->tp_dictoffset && __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ComplexMPC->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ComplexMPC->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_ComplexMPC, (PyObject *) __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ComplexMPC) < (0)) __PYX_ERR(0, 2054, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ComplexBase); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2075, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Complex = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9symengine_3lib_17symengine_wrapper_Complex_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Complex)) __PYX_ERR(0, 2075, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9symengine_3lib_17symengine_wrapper_Complex_spec, __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Complex) < (0)) __PYX_ERR(0, 2075, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Complex = &__pyx_type_9symengine_3lib_17symengine_wrapper_Complex;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Complex->tp_base = __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ComplexBase;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Complex) < (0)) __PYX_ERR(0, 2075, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Complex);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Complex->tp_dictoffset && __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Complex->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Complex->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_Complex, (PyObject *) __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Complex) < (0)) __PYX_ERR(0, 2075, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Complex); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1395, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ImaginaryUnit = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9symengine_3lib_17symengine_wrapper_ImaginaryUnit_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ImaginaryUnit)) __PYX_ERR(0, 1395, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9symengine_3lib_17symengine_wrapper_ImaginaryUnit_spec, __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ImaginaryUnit) < (0)) __PYX_ERR(0, 1395, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ImaginaryUnit = &__pyx_type_9symengine_3lib_17symengine_wrapper_ImaginaryUnit;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ImaginaryUnit->tp_base = __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Complex;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ImaginaryUnit) < (0)) __PYX_ERR(0, 1395, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ImaginaryUnit);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ImaginaryUnit->tp_dictoffset && __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ImaginaryUnit->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ImaginaryUnit->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_ImaginaryUnit, (PyObject *) __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ImaginaryUnit) < (0)) __PYX_ERR(0, 1395, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Number); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2086, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Infinity = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9symengine_3lib_17symengine_wrapper_Infinity_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Infinity)) __PYX_ERR(0, 2086, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9symengine_3lib_17symengine_wrapper_Infinity_spec, __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Infinity) < (0)) __PYX_ERR(0, 2086, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Infinity = &__pyx_type_9symengine_3lib_17symengine_wrapper_Infinity;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Infinity->tp_base = __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Number;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Infinity) < (0)) __PYX_ERR(0, 2086, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Infinity);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Infinity->tp_dictoffset && __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Infinity->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Infinity->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_Infinity, (PyObject *) __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Infinity) < (0)) __PYX_ERR(0, 2086, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Number); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2106, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_NegativeInfinity = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9symengine_3lib_17symengine_wrapper_NegativeInfinity_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_NegativeInfinity)) __PYX_ERR(0, 2106, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9symengine_3lib_17symengine_wrapper_NegativeInfinity_spec, __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_NegativeInfinity) < (0)) __PYX_ERR(0, 2106, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_NegativeInfinity = &__pyx_type_9symengine_3lib_17symengine_wrapper_NegativeInfinity;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_NegativeInfinity->tp_base = __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Number;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_NegativeInfinity) < (0)) __PYX_ERR(0, 2106, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_NegativeInfinity);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_NegativeInfinity->tp_dictoffset && __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_NegativeInfinity->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_NegativeInfinity->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_NegativeInfinity, (PyObject *) __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_NegativeInfinity) < (0)) __PYX_ERR(0, 2106, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Number); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2133, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ComplexInfinity = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9symengine_3lib_17symengine_wrapper_ComplexInfinity_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ComplexInfinity)) __PYX_ERR(0, 2133, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9symengine_3lib_17symengine_wrapper_ComplexInfinity_spec, __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ComplexInfinity) < (0)) __PYX_ERR(0, 2133, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ComplexInfinity = &__pyx_type_9symengine_3lib_17symengine_wrapper_ComplexInfinity;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ComplexInfinity->tp_base = __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Number;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ComplexInfinity) < (0)) __PYX_ERR(0, 2133, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ComplexInfinity);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ComplexInfinity->tp_dictoffset && __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ComplexInfinity->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ComplexInfinity->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_ComplexInfinity, (PyObject *) __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ComplexInfinity) < (0)) __PYX_ERR(0, 2133, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Number); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2153, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_NaN = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9symengine_3lib_17symengine_wrapper_NaN_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_NaN)) __PYX_ERR(0, 2153, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9symengine_3lib_17symengine_wrapper_NaN_spec, __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_NaN) < (0)) __PYX_ERR(0, 2153, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_NaN = &__pyx_type_9symengine_3lib_17symengine_wrapper_NaN;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_NaN->tp_base = __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Number;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_NaN) < (0)) __PYX_ERR(0, 2153, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_NaN);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_NaN->tp_dictoffset && __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_NaN->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_NaN->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_NaN, (PyObject *) __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_NaN) < (0)) __PYX_ERR(0, 2153, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Number); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2909, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_PyNumber = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9symengine_3lib_17symengine_wrapper_PyNumber_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_PyNumber)) __PYX_ERR(0, 2909, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9symengine_3lib_17symengine_wrapper_PyNumber_spec, __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_PyNumber) < (0)) __PYX_ERR(0, 2909, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_PyNumber = &__pyx_type_9symengine_3lib_17symengine_wrapper_PyNumber;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_PyNumber->tp_base = __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Number;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_PyNumber) < (0)) __PYX_ERR(0, 2909, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_PyNumber);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_PyNumber->tp_dictoffset && __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_PyNumber->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_PyNumber->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_PyNumber, (PyObject *) __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_PyNumber) < (0)) __PYX_ERR(0, 2909, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Expr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3114, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Set = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9symengine_3lib_17symengine_wrapper_Set_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Set)) __PYX_ERR(0, 3114, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9symengine_3lib_17symengine_wrapper_Set_spec, __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Set) < (0)) __PYX_ERR(0, 3114, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Set = &__pyx_type_9symengine_3lib_17symengine_wrapper_Set;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Set->tp_base = __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Expr;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Set) < (0)) __PYX_ERR(0, 3114, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Set);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Set->tp_dictoffset && __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Set->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Set->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_Set, (PyObject *) __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Set) < (0)) __PYX_ERR(0, 3114, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_MatrixBase); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3336, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9symengine_3lib_17symengine_wrapper_DenseMatrixBase_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase)) __PYX_ERR(0, 3336, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9symengine_3lib_17symengine_wrapper_DenseMatrixBase_spec, __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase) < (0)) __PYX_ERR(0, 3336, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase = &__pyx_type_9symengine_3lib_17symengine_wrapper_DenseMatrixBase;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase->tp_base = __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_MatrixBase;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase) < (0)) __PYX_ERR(0, 3336, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase->tp_dictoffset && __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_DenseMatrixBase, (PyObject *) __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase) < (0)) __PYX_ERR(0, 3336, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase) < (0)) __PYX_ERR(0, 3336, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4160, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_MutableDenseMatrix = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9symengine_3lib_17symengine_wrapper_MutableDenseMatrix_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_MutableDenseMatrix)) __PYX_ERR(0, 4160, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9symengine_3lib_17symengine_wrapper_MutableDenseMatrix_spec, __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_MutableDenseMatrix) < (0)) __PYX_ERR(0, 4160, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_MutableDenseMatrix = &__pyx_type_9symengine_3lib_17symengine_wrapper_MutableDenseMatrix;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_MutableDenseMatrix->tp_base = __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_MutableDenseMatrix) < (0)) __PYX_ERR(0, 4160, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_MutableDenseMatrix);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_MutableDenseMatrix->tp_dictoffset && __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_MutableDenseMatrix->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_MutableDenseMatrix->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_MutableDenseMatrix, (PyObject *) __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_MutableDenseMatrix) < (0)) __PYX_ERR(0, 4160, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_MutableDenseMatrix) < (0)) __PYX_ERR(0, 4160, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4203, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ImmutableDenseMatrix = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9symengine_3lib_17symengine_wrapper_ImmutableDenseMatrix_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ImmutableDenseMatrix)) __PYX_ERR(0, 4203, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9symengine_3lib_17symengine_wrapper_ImmutableDenseMatrix_spec, __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ImmutableDenseMatrix) < (0)) __PYX_ERR(0, 4203, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ImmutableDenseMatrix = &__pyx_type_9symengine_3lib_17symengine_wrapper_ImmutableDenseMatrix;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ImmutableDenseMatrix->tp_base = __pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ImmutableDenseMatrix) < (0)) __PYX_ERR(0, 4203, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ImmutableDenseMatrix);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ImmutableDenseMatrix->tp_dictoffset && __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ImmutableDenseMatrix->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ImmutableDenseMatrix->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_ImmutableDenseMatrix, (PyObject *) __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ImmutableDenseMatrix) < (0)) __PYX_ERR(0, 4203, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ImmutableDenseMatrix) < (0)) __PYX_ERR(0, 4203, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SPECS
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Sieve = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9symengine_3lib_17symengine_wrapper_Sieve_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Sieve)) __PYX_ERR(0, 4263, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9symengine_3lib_17symengine_wrapper_Sieve_spec, __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Sieve) < (0)) __PYX_ERR(0, 4263, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Sieve = &__pyx_type_9symengine_3lib_17symengine_wrapper_Sieve;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Sieve) < (0)) __PYX_ERR(0, 4263, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Sieve);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Sieve->tp_dictoffset && __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Sieve->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Sieve->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_Sieve, (PyObject *) __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Sieve) < (0)) __PYX_ERR(0, 4263, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Sieve) < (0)) __PYX_ERR(0, 4263, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SPECS
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Sieve_iterator = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9symengine_3lib_17symengine_wrapper_Sieve_iterator_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Sieve_iterator)) __PYX_ERR(0, 4274, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9symengine_3lib_17symengine_wrapper_Sieve_iterator_spec, __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Sieve_iterator) < (0)) __PYX_ERR(0, 4274, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Sieve_iterator = &__pyx_type_9symengine_3lib_17symengine_wrapper_Sieve_iterator;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Sieve_iterator) < (0)) __PYX_ERR(0, 4274, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Sieve_iterator);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Sieve_iterator->tp_dictoffset && __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Sieve_iterator->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Sieve_iterator->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_Sieve_iterator, (PyObject *) __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Sieve_iterator) < (0)) __PYX_ERR(0, 4274, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Sieve_iterator) < (0)) __PYX_ERR(0, 4274, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SPECS
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct__msubs = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9symengine_3lib_17symengine_wrapper___pyx_scope_struct__msubs_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct__msubs)) __PYX_ERR(0, 3928, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9symengine_3lib_17symengine_wrapper___pyx_scope_struct__msubs_spec, __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct__msubs) < (0)) __PYX_ERR(0, 3928, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct__msubs = &__pyx_type_9symengine_3lib_17symengine_wrapper___pyx_scope_struct__msubs;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct__msubs) < (0)) __PYX_ERR(0, 3928, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct__msubs);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct__msubs->tp_dictoffset && __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct__msubs->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct__msubs->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_1_subs = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_1_subs_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_1_subs)) __PYX_ERR(0, 3942, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_1_subs_spec, __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_1_subs) < (0)) __PYX_ERR(0, 3942, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_1_subs = &__pyx_type_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_1_subs;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_1_subs) < (0)) __PYX_ERR(0, 3942, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_1_subs);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_1_subs->tp_dictoffset && __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_1_subs->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_1_subs->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_2_xreplace = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_2_xreplace_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_2_xreplace)) __PYX_ERR(0, 3946, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_2_xreplace_spec, __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_2_xreplace) < (0)) __PYX_ERR(0, 3946, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_2_xreplace = &__pyx_type_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_2_xreplace;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_2_xreplace) < (0)) __PYX_ERR(0, 3946, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_2_xreplace);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_2_xreplace->tp_dictoffset && __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_2_xreplace->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_2_xreplace->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_3_simplify = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_3_simplify_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_3_simplify)) __PYX_ERR(0, 4135, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_3_simplify_spec, __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_3_simplify) < (0)) __PYX_ERR(0, 4135, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_3_simplify = &__pyx_type_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_3_simplify;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_3_simplify) < (0)) __PYX_ERR(0, 4135, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_3_simplify);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_3_simplify->tp_dictoffset && __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_3_simplify->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_3_simplify->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_4_expand = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_4_expand_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_4_expand)) __PYX_ERR(0, 4138, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_4_expand_spec, __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_4_expand) < (0)) __PYX_ERR(0, 4138, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_4_expand = &__pyx_type_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_4_expand;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_4_expand) < (0)) __PYX_ERR(0, 4138, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_4_expand);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_4_expand->tp_dictoffset && __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_4_expand->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_4_expand->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_5_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_5_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_5_genexpr)) __PYX_ERR(0, 4956, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_5_genexpr_spec, __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_5_genexpr) < (0)) __PYX_ERR(0, 4956, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_5_genexpr = &__pyx_type_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_5_genexpr;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_5_genexpr) < (0)) __PYX_ERR(0, 4956, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_5_genexpr);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_5_genexpr->tp_dictoffset && __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_5_genexpr->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_5_genexpr->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_6_create_low_level_callable = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_6_create_low_level_callable_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_6_create_low_level_callable)) __PYX_ERR(0, 5136, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_6_create_low_level_callable_spec, __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_6_create_low_level_callable) < (0)) __PYX_ERR(0, 5136, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_6_create_low_level_callable = &__pyx_type_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_6_create_low_level_callable;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_6_create_low_level_callable) < (0)) __PYX_ERR(0, 5136, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_6_create_low_level_callable);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_6_create_low_level_callable->tp_dictoffset && __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_6_create_low_level_callable->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_9symengine_3lib_17symengine_wrapper___pyx_scope_struct_6_create_low_level_callable->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  __pyx_vtabptr_array = &__pyx_vtable_array;
  __pyx_vtable_array.get_memview = (PyObject *(*)(struct __pyx_array_obj *))__pyx_array_get_memview;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_mstate->__pyx_array_type = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type___pyx_array_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_array_type)) __PYX_ERR(1, 118, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate->__pyx_array_type->tp_as_buffer = &__pyx_tp_as_buffer_array;
  if (!__pyx_mstate->__pyx_array_type->tp_as_buffer->bf_releasebuffer && __pyx_mstate->__pyx_array_type->tp_base->tp_as_buffer && __pyx_mstate->__pyx_array_type->tp_base->tp_as_buffer->bf_releasebuffer) {
    __pyx_mstate->__pyx_array_type->tp_as_buffer->bf_releasebuffer = __pyx_mstate->__pyx_array_type->tp_base->tp_as_buffer->bf_releasebuffer;
  }
  #elif defined(Py_bf_getbuffer) && defined(Py_bf_releasebuffer)
  /* PY_VERSION_HEX >= 0x03090000 || Py_LIMITED_API >= 0x030B0000 */
  #elif defined(_MSC_VER)
  #pragma message ("The buffer protocol is not supported in the Limited C-API < 3.11.")
  #else
  #warning "The buffer protocol is not supported in the Limited C-API < 3.11."
  #endif
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type___pyx_array_spec, __pyx_mstate->__pyx_array_type) < (0)) __PYX_ERR(1, 118, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_array_type = &__pyx_type___pyx_array;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_array_type) < (0)) __PYX_ERR(1, 118, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_array_type);
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_array_type, __pyx_vtabptr_array) < (0)) __PYX_ERR(1, 118, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_array_type) < (0)) __PYX_ERR(1, 118, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_array_type) < (0)) __PYX_ERR(1, 118, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SPECS
  __pyx_mstate->__pyx_MemviewEnum_type = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type___pyx_MemviewEnum_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_MemviewEnum_type)) __PYX_ERR(1, 307, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type___pyx_MemviewEnum_spec, __pyx_mstate->__pyx_MemviewEnum_type) < (0)) __PYX_ERR(1, 307, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_MemviewEnum_type = &__pyx_type___pyx_MemviewEnum;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_MemviewEnum_type) < (0)) __PYX_ERR(1, 307, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_MemviewEnum_type);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_MemviewEnum_type->tp_dictoffset && __pyx_mstate->__pyx_MemviewEnum_type->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_MemviewEnum_type->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_MemviewEnum_type) < (0)) __PYX_ERR(1, 307, __pyx_L1_error)
  __pyx_vtabptr_memoryview = &__pyx_vtable_memoryview;
  __pyx_vtable_memoryview.get_item_pointer = (char *(*)(struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_get_item_pointer;
  __pyx_vtable_memoryview.is_slice = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_is_slice;
  __pyx_vtable_memoryview.setitem_slice_assignment = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *, PyObject *))__pyx_memoryview_setitem_slice_assignment;
  __pyx_vtable_memoryview.setitem_slice_assign_scalar = (PyObject *(*)(struct __pyx_memoryview_obj *, struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_setitem_slice_assign_scalar;
  __pyx_vtable_memoryview.setitem_indexed = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *, PyObject *))__pyx_memoryview_setitem_indexed;
  __pyx_vtable_memoryview.convert_item_to_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *))__pyx_memoryview_convert_item_to_object;
  __pyx_vtable_memoryview.assign_item_from_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *, PyObject *))__pyx_memoryview_assign_item_from_object;
  __pyx_vtable_memoryview._get_base = (PyObject *(*)(struct __pyx_memoryview_obj *))__pyx_memoryview__get_base;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_mstate->__pyx_memoryview_type = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type___pyx_memoryview_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_memoryview_type)) __PYX_ERR(1, 342, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate->__pyx_memoryview_type->tp_as_buffer = &__pyx_tp_as_buffer_memoryview;
  if (!__pyx_mstate->__pyx_memoryview_type->tp_as_buffer->bf_releasebuffer && __pyx_mstate->__pyx_memoryview_type->tp_base->tp_as_buffer && __pyx_mstate->__pyx_memoryview_type->tp_base->tp_as_buffer->bf_releasebuffer) {
    __pyx_mstate->__pyx_memoryview_type->tp_as_buffer->bf_releasebuffer = __pyx_mstate->__pyx_memoryview_type->tp_base->tp_as_buffer->bf_releasebuffer;
  }
  #elif defined(Py_bf_getbuffer) && defined(Py_bf_releasebuffer)
  /* PY_VERSION_HEX >= 0x03090000 || Py_LIMITED_API >= 0x030B0000 */
  #elif defined(_MSC_VER)
  #pragma message ("The buffer protocol is not supported in the Limited C-API < 3.11.")
  #else
  #warning "The buffer protocol is not supported in the Limited C-API < 3.11."
  #endif
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type___pyx_memoryview_spec, __pyx_mstate->__pyx_memoryview_type) < (0)) __PYX_ERR(1, 342, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_memoryview_type = &__pyx_type___pyx_memoryview;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_memoryview_type) < (0)) __PYX_ERR(1, 342, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_memoryview_type);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_memoryview_type->tp_dictoffset && __pyx_mstate->__pyx_memoryview_type->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_memoryview_type->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_memoryview_type, __pyx_vtabptr_memoryview) < (0)) __PYX_ERR(1, 342, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_memoryview_type) < (0)) __PYX_ERR(1, 342, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_memoryview_type) < (0)) __PYX_ERR(1, 342, __pyx_L1_error)
  __pyx_vtabptr__memoryviewslice = &__pyx_vtable__memoryviewslice;
  __pyx_vtable__memoryviewslice.__pyx_base = *__pyx_vtabptr_memoryview;
  __pyx_vtable__memoryviewslice.__pyx_base.convert_item_to_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *))__pyx_memoryviewslice_convert_item_to_object;
  __pyx_vtable__memoryviewslice.__pyx_base.assign_item_from_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *, PyObject *))__pyx_memoryviewslice_assign_item_from_object;
  __pyx_vtable__memoryviewslice.__pyx_base._get_base = (PyObject *(*)(struct __pyx_memoryview_obj *))__pyx_memoryviewslice__get_base;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_memoryview_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 856, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_memoryviewslice_type = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type___pyx_memoryviewslice_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_mstate->__pyx_memoryviewslice_type)) __PYX_ERR(1, 856, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type___pyx_memoryviewslice_spec, __pyx_mstate->__pyx_memoryviewslice_type) < (0)) __PYX_ERR(1, 856, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_memoryviewslice_type = &__pyx_type___pyx_memoryviewslice;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_memoryviewslice_type->tp_base = __pyx_mstate_global->__pyx_memoryview_type;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_memoryviewslice_type) < (0)) __PYX_ERR(1, 856, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_memoryviewslice_type);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_memoryviewslice_type->tp_dictoffset && __pyx_mstate->__pyx_memoryviewslice_type->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_memoryviewslice_type->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_memoryviewslice_type, __pyx_vtabptr__memoryviewslice) < (0)) __PYX_ERR(1, 856, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_memoryviewslice_type) < (0)) __PYX_ERR(1, 856, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_memoryviewslice_type) < (0)) __PYX_ERR(1, 856, __pyx_L1_error)
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate) {
  __Pyx_RefNannyDeclarations
  CYTHON_UNUSED_VAR(__pyx_mstate);
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
  /*--- Type import code ---*/
  __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 9, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7cpython_4type_type = __Pyx_ImportType_3_2_5(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(PyTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_5(PyTypeObject),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  0, 0,
  #else
  sizeof(PyHeapTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_5(PyHeapTypeObject),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_5); if (!__pyx_mstate->__pyx_ptype_7cpython_4type_type) __PYX_ERR(4, 9, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 8, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7cpython_4bool_bool = __Pyx_ImportType_3_2_5(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "bool",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(PyLongObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_5(PyLongObject),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  0, 0,
  #else
  sizeof(PyLongObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_5(PyLongObject),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_5); if (!__pyx_mstate->__pyx_ptype_7cpython_4bool_bool) __PYX_ERR(5, 8, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7cpython_7complex_complex = __Pyx_ImportType_3_2_5(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "complex",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(PyComplexObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_5(PyComplexObject),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  0, 0,
  #else
  sizeof(PyComplexObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_5(PyComplexObject),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_5); if (!__pyx_mstate->__pyx_ptype_7cpython_7complex_complex) __PYX_ERR(6, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate) {
  __Pyx_RefNannyDeclarations
  CYTHON_UNUSED_VAR(__pyx_mstate);
  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
  /*--- Variable import code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate) {
  __Pyx_RefNannyDeclarations
  CYTHON_UNUSED_VAR(__pyx_mstate);
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
  /*--- Function import code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

#if CYTHON_PEP489_MULTI_PHASE_INIT
static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
static int __pyx_pymod_exec_symengine_wrapper(PyObject* module); /*proto*/
static PyModuleDef_Slot __pyx_moduledef_slots[] = {
  {Py_mod_create, (void*)__pyx_pymod_create},
  {Py_mod_exec, (void*)__pyx_pymod_exec_symengine_wrapper},
  #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
  {Py_mod_gil, __Pyx_FREETHREADING_COMPATIBLE},
  #endif
  #if PY_VERSION_HEX >= 0x030C0000 && CYTHON_USE_MODULE_STATE
  {Py_mod_multiple_interpreters, Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED},
  #endif
  {0, NULL}
};
#endif

#ifdef __cplusplus
namespace {
  struct PyModuleDef __pyx_moduledef =
  #else
  static struct PyModuleDef __pyx_moduledef =
  #endif
  {
      PyModuleDef_HEAD_INIT,
      "symengine_wrapper",
      0, /* m_doc */
    #if CYTHON_USE_MODULE_STATE
      sizeof(__pyx_mstatetype), /* m_size */
    #else
      (CYTHON_PEP489_MULTI_PHASE_INIT) ? 0 : -1, /* m_size */
    #endif
      __pyx_methods /* m_methods */,
    #if CYTHON_PEP489_MULTI_PHASE_INIT
      __pyx_moduledef_slots, /* m_slots */
    #else
      NULL, /* m_reload */
    #endif
    #if CYTHON_USE_MODULE_STATE
      __pyx_m_traverse, /* m_traverse */
      __pyx_m_clear, /* m_clear */
      NULL /* m_free */
    #else
      NULL, /* m_traverse */
      NULL, /* m_clear */
      NULL /* m_free */
    #endif
  };
  #ifdef __cplusplus
} /* anonymous namespace */
#endif

/* PyModInitFuncType */
#ifndef CYTHON_NO_PYINIT_EXPORT
  #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
#else
  #ifdef __cplusplus
  #define __Pyx_PyMODINIT_FUNC extern "C" PyObject *
  #else
  #define __Pyx_PyMODINIT_FUNC PyObject *
  #endif
#endif

__Pyx_PyMODINIT_FUNC PyInit_symengine_wrapper(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC PyInit_symengine_wrapper(void)
#if CYTHON_PEP489_MULTI_PHASE_INIT
{
  return PyModuleDef_Init(&__pyx_moduledef);
}
/* ModuleCreationPEP489 */
#if CYTHON_COMPILING_IN_LIMITED_API && (__PYX_LIMITED_VERSION_HEX < 0x03090000\
      || ((defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)) && __PYX_LIMITED_VERSION_HEX < 0x030A0000))
static PY_INT64_T __Pyx_GetCurrentInterpreterId(void) {
    {
        PyObject *module = PyImport_ImportModule("_interpreters"); // 3.13+ I think
        if (!module) {
            PyErr_Clear(); // just try the 3.8-3.12 version
            module = PyImport_ImportModule("_xxsubinterpreters");
            if (!module) goto bad;
        }
        PyObject *current = PyObject_CallMethod(module, "get_current", NULL);
        Py_DECREF(module);
        if (!current) goto bad;
        if (PyTuple_Check(current)) {
            PyObject *new_current = PySequence_GetItem(current, 0);
            Py_DECREF(current);
            current = new_current;
            if (!new_current) goto bad;
        }
        long long as_c_int = PyLong_AsLongLong(current);
        Py_DECREF(current);
        return as_c_int;
    }
  bad:
    PySys_WriteStderr("__Pyx_GetCurrentInterpreterId failed. Try setting the C define CYTHON_PEP489_MULTI_PHASE_INIT=0\n");
    return -1;
}
#endif
#if !CYTHON_USE_MODULE_STATE
static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
    static PY_INT64_T main_interpreter_id = -1;
#if CYTHON_COMPILING_IN_GRAAL && defined(GRAALPY_VERSION_NUM) && GRAALPY_VERSION_NUM > 0x19000000
    PY_INT64_T current_id = GraalPyInterpreterState_GetIDFromThreadState(PyThreadState_Get());
#elif CYTHON_COMPILING_IN_GRAAL
    PY_INT64_T current_id = PyInterpreterState_GetIDFromThreadState(PyThreadState_Get());
#elif CYTHON_COMPILING_IN_LIMITED_API && (__PYX_LIMITED_VERSION_HEX < 0x03090000\
      || ((defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)) && __PYX_LIMITED_VERSION_HEX < 0x030A0000))
    PY_INT64_T current_id = __Pyx_GetCurrentInterpreterId();
#elif CYTHON_COMPILING_IN_LIMITED_API
    PY_INT64_T current_id = PyInterpreterState_GetID(PyInterpreterState_Get());
#else
    PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
#endif
    if (unlikely(current_id == -1)) {
        return -1;
    }
    if (main_interpreter_id == -1) {
        main_interpreter_id = current_id;
        return 0;
    } else if (unlikely(main_interpreter_id != current_id)) {
        PyErr_SetString(
            PyExc_ImportError,
            "Interpreter change detected - this module can only be loaded into one interpreter per process.");
        return -1;
    }
    return 0;
}
#endif
static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none)
{
    PyObject *value = PyObject_GetAttrString(spec, from_name);
    int result = 0;
    if (likely(value)) {
        if (allow_none || value != Py_None) {
            result = PyDict_SetItemString(moddict, to_name, value);
        }
        Py_DECREF(value);
    } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
        PyErr_Clear();
    } else {
        result = -1;
    }
    return result;
}
static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def) {
    PyObject *module = NULL, *moddict, *modname;
    CYTHON_UNUSED_VAR(def);
    #if !CYTHON_USE_MODULE_STATE
    if (__Pyx_check_single_interpreter())
        return NULL;
    #endif
    if (__pyx_m)
        return __Pyx_NewRef(__pyx_m);
    modname = PyObject_GetAttrString(spec, "name");
    if (unlikely(!modname)) goto bad;
    module = PyModule_NewObject(modname);
    Py_DECREF(modname);
    if (unlikely(!module)) goto bad;
    moddict = PyModule_GetDict(module);
    if (unlikely(!moddict)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad;
    return module;
bad:
    Py_XDECREF(module);
    return NULL;
}


static CYTHON_SMALL_CODE int __pyx_pymod_exec_symengine_wrapper(PyObject *__pyx_pyinit_module)
#endif
{
  int stringtab_initialized = 0;
  #if CYTHON_USE_MODULE_STATE
  int pystate_addmodule_run = 0;
  #endif
  __pyx_mstatetype *__pyx_mstate = NULL;
  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;
  size_t __pyx_t_6;
  static PyThread_type_lock __pyx_t_7[8];
  int __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  if (__pyx_m) {
    if (__pyx_m == __pyx_pyinit_module) return 0;
    PyErr_SetString(PyExc_RuntimeError, "Module 'symengine_wrapper' has already been imported. Re-initialisation is not supported.");
    return -1;
  }
  #else
  if (__pyx_m) return __Pyx_NewRef(__pyx_m);
  #endif
  /*--- Module creation code ---*/
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  __pyx_t_1 = __pyx_pyinit_module;
  Py_INCREF(__pyx_t_1);
  #else
  __pyx_t_1 = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #if CYTHON_USE_MODULE_STATE
  {
    int add_module_result = __Pyx_State_AddModule(__pyx_t_1, &__pyx_moduledef);
    __pyx_t_1 = 0; /* transfer ownership from __pyx_t_1 to "symengine_wrapper" pseudovariable */
    if (unlikely((add_module_result < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
    pystate_addmodule_run = 1;
  }
  #else
  __pyx_m = __pyx_t_1;
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
  PyUnstable_Module_SetGIL(__pyx_m, Py_MOD_GIL_USED);
  #endif
  __pyx_mstate = __pyx_mstate_global;
  CYTHON_UNUSED_VAR(__pyx_t_1);
  __pyx_mstate->__pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_mstate->__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
  Py_INCREF(__pyx_mstate->__pyx_d);
  __pyx_mstate->__pyx_b = __Pyx_PyImport_AddModuleRef(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_mstate->__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_mstate->__pyx_cython_runtime = __Pyx_PyImport_AddModuleRef("cython_runtime"); if (unlikely(!__pyx_mstate->__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_mstate->__pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  /* ImportRefnannyAPI */
  #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("PyInit_symengine_wrapper", 0);
  __Pyx_init_runtime_version();
  if (__Pyx_check_binary_version(__PYX_LIMITED_VERSION_HEX, __Pyx_get_runtime_version(), CYTHON_COMPILING_IN_LIMITED_API) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_mstate->__pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_mstate->__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_mstate->__pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_mstate->__pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Library function declarations ---*/
  /*--- Initialize various global constants etc. ---*/
  if (__Pyx_InitConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  stringtab_initialized = 1;
  if (__Pyx_InitGlobals() < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__pyx_module_is_main_symengine__lib__symengine_wrapper) {
    if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_name_2, __pyx_mstate_global->__pyx_n_u_main) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  }
  {
    PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
    if (!PyDict_GetItemString(modules, "symengine.lib.symengine_wrapper")) {
      if (unlikely((PyDict_SetItemString(modules, "symengine.lib.symengine_wrapper", __pyx_m) < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
    }
  }
  /*--- Builtin init code ---*/
  if (__Pyx_InitCachedBuiltins(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Constants init code ---*/
  if (__Pyx_InitCachedConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_CreateCodeObjects(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Global type/function init code ---*/
  (void)__Pyx_modinit_global_init_code(__pyx_mstate);
  (void)__Pyx_modinit_variable_export_code(__pyx_mstate);
  if (unlikely((__Pyx_modinit_function_export_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
  if (unlikely((__Pyx_modinit_type_init_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
  if (unlikely((__Pyx_modinit_type_import_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
  (void)__Pyx_modinit_variable_import_code(__pyx_mstate);
  (void)__Pyx_modinit_function_import_code(__pyx_mstate);
  /*--- Execution code ---*/

  /* "View.MemoryView":108
 * 
 * cdef object __pyx_collections_abc_Sequence "__pyx_collections_abc_Sequence"
 * try:             # <<<<<<<<<<<<<<
 *     __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence
 * except:
*/
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "View.MemoryView":109
 * cdef object __pyx_collections_abc_Sequence "__pyx_collections_abc_Sequence"
 * try:
 *     __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence             # <<<<<<<<<<<<<<
 * except:
 * 
*/
      __pyx_t_5 = NULL;
      __pyx_t_6 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_collections_abc};
        __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin___import__, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 109, __pyx_L2_error)
        __Pyx_GOTREF(__pyx_t_4);
      }
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_abc); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 109, __pyx_L2_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_Sequence); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 109, __pyx_L2_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XGOTREF(__pyx_collections_abc_Sequence);
      __Pyx_DECREF_SET(__pyx_collections_abc_Sequence, __pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_4);
      __pyx_t_4 = 0;

      /* "View.MemoryView":108
 * 
 * cdef object __pyx_collections_abc_Sequence "__pyx_collections_abc_Sequence"
 * try:             # <<<<<<<<<<<<<<
 *     __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence
 * except:
*/
    }
    __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_L7_try_end;
    __pyx_L2_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "View.MemoryView":110
 * try:
 *     __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence
 * except:             # <<<<<<<<<<<<<<
 * 
 *     __pyx_collections_abc_Sequence = None
*/
    /*except:*/ {
      __Pyx_ErrRestore(0,0,0);

      /* "View.MemoryView":112
 * except:
 * 
 *     __pyx_collections_abc_Sequence = None             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_INCREF(Py_None);
      __Pyx_XGOTREF(__pyx_collections_abc_Sequence);
      __Pyx_DECREF_SET(__pyx_collections_abc_Sequence, Py_None);
      __Pyx_GIVEREF(Py_None);
      goto __pyx_L3_exception_handled;
    }
    __pyx_L3_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    __pyx_L7_try_end:;
  }

  /* "View.MemoryView":247
 * 
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         count = __pyx_collections_abc_Sequence.count
 *         index = __pyx_collections_abc_Sequence.index
*/
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_2, &__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_1);
    /*try:*/ {

      /* "View.MemoryView":248
 * 
 *     try:
 *         count = __pyx_collections_abc_Sequence.count             # <<<<<<<<<<<<<<
 *         index = __pyx_collections_abc_Sequence.index
 *     except:
*/
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_collections_abc_Sequence, __pyx_mstate_global->__pyx_n_u_count); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 248, __pyx_L10_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_array_type, __pyx_mstate_global->__pyx_n_u_count, __pyx_t_4) < (0)) __PYX_ERR(1, 248, __pyx_L10_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "View.MemoryView":249
 *     try:
 *         count = __pyx_collections_abc_Sequence.count
 *         index = __pyx_collections_abc_Sequence.index             # <<<<<<<<<<<<<<
 *     except:
 *         pass
*/
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_collections_abc_Sequence, __pyx_mstate_global->__pyx_n_u_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 249, __pyx_L10_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_array_type, __pyx_mstate_global->__pyx_n_u_index, __pyx_t_4) < (0)) __PYX_ERR(1, 249, __pyx_L10_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "View.MemoryView":247
 * 
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         count = __pyx_collections_abc_Sequence.count
 *         index = __pyx_collections_abc_Sequence.index
*/
    }
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L15_try_end;
    __pyx_L10_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "View.MemoryView":250
 *         count = __pyx_collections_abc_Sequence.count
 *         index = __pyx_collections_abc_Sequence.index
 *     except:             # <<<<<<<<<<<<<<
 *         pass
 * 
*/
    /*except:*/ {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L11_exception_handled;
    }
    __pyx_L11_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_2, __pyx_t_1);
    __pyx_L15_try_end:;
  }

  /* "View.MemoryView":315
 *         return self.name
 * 
 * cdef generic = Enum("<strided and direct or indirect>")             # <<<<<<<<<<<<<<
 * cdef strided = Enum("<strided and direct>") # default
 * cdef indirect = Enum("<strided and indirect>")
*/
  __pyx_t_5 = NULL;
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_strided_and_direct_or_indirect};
    __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_MemviewEnum_type, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 315, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_4);
  }
  __Pyx_XGOTREF(generic);
  __Pyx_DECREF_SET(generic, ((PyObject *)__pyx_t_4));
  __Pyx_GIVEREF((PyObject *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "View.MemoryView":316
 * 
 * cdef generic = Enum("<strided and direct or indirect>")
 * cdef strided = Enum("<strided and direct>") # default             # <<<<<<<<<<<<<<
 * cdef indirect = Enum("<strided and indirect>")
 * 
*/
  __pyx_t_5 = NULL;
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_strided_and_direct};
    __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_MemviewEnum_type, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 316, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_4);
  }
  __Pyx_XGOTREF(strided);
  __Pyx_DECREF_SET(strided, ((PyObject *)__pyx_t_4));
  __Pyx_GIVEREF((PyObject *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "View.MemoryView":317
 * cdef generic = Enum("<strided and direct or indirect>")
 * cdef strided = Enum("<strided and direct>") # default
 * cdef indirect = Enum("<strided and indirect>")             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_t_5 = NULL;
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_strided_and_indirect};
    __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_MemviewEnum_type, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 317, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_4);
  }
  __Pyx_XGOTREF(indirect);
  __Pyx_DECREF_SET(indirect, ((PyObject *)__pyx_t_4));
  __Pyx_GIVEREF((PyObject *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "View.MemoryView":320
 * 
 * 
 * cdef contiguous = Enum("<contiguous and direct>")             # <<<<<<<<<<<<<<
 * cdef indirect_contiguous = Enum("<contiguous and indirect>")
 * 
*/
  __pyx_t_5 = NULL;
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_contiguous_and_direct};
    __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_MemviewEnum_type, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 320, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_4);
  }
  __Pyx_XGOTREF(contiguous);
  __Pyx_DECREF_SET(contiguous, ((PyObject *)__pyx_t_4));
  __Pyx_GIVEREF((PyObject *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "View.MemoryView":321
 * 
 * cdef contiguous = Enum("<contiguous and direct>")
 * cdef indirect_contiguous = Enum("<contiguous and indirect>")             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_t_5 = NULL;
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_contiguous_and_indirect};
    __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_MemviewEnum_type, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 321, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_4);
  }
  __Pyx_XGOTREF(indirect_contiguous);
  __Pyx_DECREF_SET(indirect_contiguous, ((PyObject *)__pyx_t_4));
  __Pyx_GIVEREF((PyObject *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "View.MemoryView":329
 * 
 * 
 * cdef int __pyx_memoryview_thread_locks_used = 0             # <<<<<<<<<<<<<<
 * cdef PyThread_type_lock[8] __pyx_memoryview_thread_locks = [
 *     PyThread_allocate_lock(),
*/
  __pyx_memoryview_thread_locks_used = 0;

  /* "View.MemoryView":330
 * 
 * cdef int __pyx_memoryview_thread_locks_used = 0
 * cdef PyThread_type_lock[8] __pyx_memoryview_thread_locks = [             # <<<<<<<<<<<<<<
 *     PyThread_allocate_lock(),
 *     PyThread_allocate_lock(),
*/
  __pyx_t_7[0] = PyThread_allocate_lock();
  __pyx_t_7[1] = PyThread_allocate_lock();
  __pyx_t_7[2] = PyThread_allocate_lock();
  __pyx_t_7[3] = PyThread_allocate_lock();
  __pyx_t_7[4] = PyThread_allocate_lock();
  __pyx_t_7[5] = PyThread_allocate_lock();
  __pyx_t_7[6] = PyThread_allocate_lock();
  __pyx_t_7[7] = PyThread_allocate_lock();
  memcpy(&(__pyx_memoryview_thread_locks[0]), __pyx_t_7, sizeof(__pyx_memoryview_thread_locks[0]) * (8));

  /* "View.MemoryView":888
 * 
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         count = __pyx_collections_abc_Sequence.count
 *         index = __pyx_collections_abc_Sequence.index
*/
  {
    __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:*/ {

      /* "View.MemoryView":889
 * 
 *     try:
 *         count = __pyx_collections_abc_Sequence.count             # <<<<<<<<<<<<<<
 *         index = __pyx_collections_abc_Sequence.index
 *     except:
*/
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_collections_abc_Sequence, __pyx_mstate_global->__pyx_n_u_count); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 889, __pyx_L18_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_memoryviewslice_type, __pyx_mstate_global->__pyx_n_u_count, __pyx_t_4) < (0)) __PYX_ERR(1, 889, __pyx_L18_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "View.MemoryView":890
 *     try:
 *         count = __pyx_collections_abc_Sequence.count
 *         index = __pyx_collections_abc_Sequence.index             # <<<<<<<<<<<<<<
 *     except:
 *         pass
*/
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_collections_abc_Sequence, __pyx_mstate_global->__pyx_n_u_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 890, __pyx_L18_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_memoryviewslice_type, __pyx_mstate_global->__pyx_n_u_index, __pyx_t_4) < (0)) __PYX_ERR(1, 890, __pyx_L18_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "View.MemoryView":888
 * 
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         count = __pyx_collections_abc_Sequence.count
 *         index = __pyx_collections_abc_Sequence.index
*/
    }
    __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_L23_try_end;
    __pyx_L18_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "View.MemoryView":891
 *         count = __pyx_collections_abc_Sequence.count
 *         index = __pyx_collections_abc_Sequence.index
 *     except:             # <<<<<<<<<<<<<<
 *         pass
 * 
*/
    /*except:*/ {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L19_exception_handled;
    }
    __pyx_L19_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    __pyx_L23_try_end:;
  }

  /* "View.MemoryView":894
 *         pass
 * 
 * try:             # <<<<<<<<<<<<<<
 *     if __pyx_collections_abc_Sequence:
 * 
*/
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_2, &__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_1);
    /*try:*/ {

      /* "View.MemoryView":895
 * 
 * try:
 *     if __pyx_collections_abc_Sequence:             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_collections_abc_Sequence); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(1, 895, __pyx_L26_error)
      if (__pyx_t_8) {

        /* "View.MemoryView":899
 * 
 * 
 *         __pyx_collections_abc_Sequence.register(_memoryviewslice)             # <<<<<<<<<<<<<<
 *         __pyx_collections_abc_Sequence.register(array)
 * except:
*/
        __pyx_t_5 = __pyx_collections_abc_Sequence;
        __Pyx_INCREF(__pyx_t_5);
        __pyx_t_6 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_5, ((PyObject *)__pyx_mstate_global->__pyx_memoryviewslice_type)};
          __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_register, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 899, __pyx_L26_error)
          __Pyx_GOTREF(__pyx_t_4);
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

        /* "View.MemoryView":900
 * 
 *         __pyx_collections_abc_Sequence.register(_memoryviewslice)
 *         __pyx_collections_abc_Sequence.register(array)             # <<<<<<<<<<<<<<
 * except:
 *     pass  # ignore failure, it's a minor issue
*/
        __pyx_t_5 = __pyx_collections_abc_Sequence;
        __Pyx_INCREF(__pyx_t_5);
        __pyx_t_6 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_5, ((PyObject *)__pyx_mstate_global->__pyx_array_type)};
          __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_register, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 900, __pyx_L26_error)
          __Pyx_GOTREF(__pyx_t_4);
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

        /* "View.MemoryView":895
 * 
 * try:
 *     if __pyx_collections_abc_Sequence:             # <<<<<<<<<<<<<<
 * 
 * 
*/
      }

      /* "View.MemoryView":894
 *         pass
 * 
 * try:             # <<<<<<<<<<<<<<
 *     if __pyx_collections_abc_Sequence:
 * 
*/
    }
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L31_try_end;
    __pyx_L26_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "View.MemoryView":901
 *         __pyx_collections_abc_Sequence.register(_memoryviewslice)
 *         __pyx_collections_abc_Sequence.register(array)
 * except:             # <<<<<<<<<<<<<<
 *     pass  # ignore failure, it's a minor issue
 * 
*/
    /*except:*/ {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L27_exception_handled;
    }
    __pyx_L27_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_2, __pyx_t_1);
    __pyx_L31_try_end:;
  }

  /* "(tree fragment)":4
 *     int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1
 *     int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1
 * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_result
 *     __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x82a3537, 0x6ae9995, 0xb068931, b'name')
*/
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_15View_dot_MemoryView_1__pyx_unpickle_Enum, NULL, __pyx_mstate_global->__pyx_n_u_View_MemoryView); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_Enum, __pyx_t_4) < (0)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":15
 * from libc.string cimport memcpy
 * import cython
 * import itertools             # <<<<<<<<<<<<<<
 * import numbers
 * from operator import mul
*/
  __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_itertools, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15, __pyx_L1_error)
  __pyx_t_4 = __pyx_t_1;
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_itertools, __pyx_t_4) < (0)) __PYX_ERR(0, 15, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":16
 * import cython
 * import itertools
 * import numbers             # <<<<<<<<<<<<<<
 * from operator import mul
 * from functools import reduce
*/
  __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_numbers, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 16, __pyx_L1_error)
  __pyx_t_4 = __pyx_t_1;
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_numbers, __pyx_t_4) < (0)) __PYX_ERR(0, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":17
 * import itertools
 * import numbers
 * from operator import mul             # <<<<<<<<<<<<<<
 * from functools import reduce
 * import collections
*/
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_mul};
    __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_operator, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 17, __pyx_L1_error)
  }
  __pyx_t_4 = __pyx_t_1;
  __Pyx_GOTREF(__pyx_t_4);
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_mul};
    __pyx_t_9 = 0; {
      __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_imported_names[__pyx_t_9]); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 17, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_9], __pyx_t_5) < (0)) __PYX_ERR(0, 17, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":18
 * import numbers
 * from operator import mul
 * from functools import reduce             # <<<<<<<<<<<<<<
 * import collections
 * import warnings
*/
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_reduce_2};
    __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_functools, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 18, __pyx_L1_error)
  }
  __pyx_t_4 = __pyx_t_1;
  __Pyx_GOTREF(__pyx_t_4);
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_reduce_2};
    __pyx_t_9 = 0; {
      __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_imported_names[__pyx_t_9]); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 18, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_9], __pyx_t_5) < (0)) __PYX_ERR(0, 18, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":19
 * from operator import mul
 * from functools import reduce
 * import collections             # <<<<<<<<<<<<<<
 * import warnings
 * from symengine.utilities import is_sequence
*/
  __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_collections, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19, __pyx_L1_error)
  __pyx_t_4 = __pyx_t_1;
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_collections, __pyx_t_4) < (0)) __PYX_ERR(0, 19, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":20
 * from functools import reduce
 * import collections
 * import warnings             # <<<<<<<<<<<<<<
 * from symengine.utilities import is_sequence
 * import os
*/
  __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_warnings, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 20, __pyx_L1_error)
  __pyx_t_4 = __pyx_t_1;
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_warnings, __pyx_t_4) < (0)) __PYX_ERR(0, 20, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":21
 * import collections
 * import warnings
 * from symengine.utilities import is_sequence             # <<<<<<<<<<<<<<
 * import os
 * import sys
*/
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_is_sequence};
    __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_symengine_utilities, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 21, __pyx_L1_error)
  }
  __pyx_t_4 = __pyx_t_1;
  __Pyx_GOTREF(__pyx_t_4);
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_is_sequence};
    __pyx_t_9 = 0; {
      __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_imported_names[__pyx_t_9]); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 21, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_9], __pyx_t_5) < (0)) __PYX_ERR(0, 21, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":22
 * import warnings
 * from symengine.utilities import is_sequence
 * import os             # <<<<<<<<<<<<<<
 * import sys
 * from cpython.pycapsule cimport PyCapsule_GetPointer
*/
  __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_os, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 22, __pyx_L1_error)
  __pyx_t_4 = __pyx_t_1;
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_os, __pyx_t_4) < (0)) __PYX_ERR(0, 22, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":23
 * from symengine.utilities import is_sequence
 * import os
 * import sys             # <<<<<<<<<<<<<<
 * from cpython.pycapsule cimport PyCapsule_GetPointer
 * from collections.abc import MutableMapping
*/
  __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sys, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 23, __pyx_L1_error)
  __pyx_t_4 = __pyx_t_1;
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_sys, __pyx_t_4) < (0)) __PYX_ERR(0, 23, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":25
 * import sys
 * from cpython.pycapsule cimport PyCapsule_GetPointer
 * from collections.abc import MutableMapping             # <<<<<<<<<<<<<<
 * 
 * try:
*/
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_MutableMapping};
    __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_collections_abc, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 25, __pyx_L1_error)
  }
  __pyx_t_4 = __pyx_t_1;
  __Pyx_GOTREF(__pyx_t_4);
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_MutableMapping};
    __pyx_t_9 = 0; {
      __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_imported_names[__pyx_t_9]); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 25, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_9], __pyx_t_5) < (0)) __PYX_ERR(0, 25, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":27
 * from collections.abc import MutableMapping
 * 
 * try:             # <<<<<<<<<<<<<<
 *     import numpy as np
 *     # Lambdify requires NumPy (since b713a61, see gh-112)
*/
  {
    __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:*/ {

      /* "symengine/lib/symengine_wrapper.pyx":28
 * 
 * try:
 *     import numpy as np             # <<<<<<<<<<<<<<
 *     # Lambdify requires NumPy (since b713a61, see gh-112)
 *     have_numpy = True
*/
      __pyx_t_10 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_numpy, 0, 0, NULL, 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 28, __pyx_L35_error)
      __pyx_t_4 = __pyx_t_10;
      __Pyx_GOTREF(__pyx_t_4);
      if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_np, __pyx_t_4) < (0)) __PYX_ERR(0, 28, __pyx_L35_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "symengine/lib/symengine_wrapper.pyx":30
 *     import numpy as np
 *     # Lambdify requires NumPy (since b713a61, see gh-112)
 *     have_numpy = True             # <<<<<<<<<<<<<<
 * except ImportError:
 *     have_numpy = False
*/
      if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_have_numpy, Py_True) < (0)) __PYX_ERR(0, 30, __pyx_L35_error)

      /* "symengine/lib/symengine_wrapper.pyx":27
 * from collections.abc import MutableMapping
 * 
 * try:             # <<<<<<<<<<<<<<
 *     import numpy as np
 *     # Lambdify requires NumPy (since b713a61, see gh-112)
*/
    }
    __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_L40_try_end;
    __pyx_L35_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "symengine/lib/symengine_wrapper.pyx":31
 *     # Lambdify requires NumPy (since b713a61, see gh-112)
 *     have_numpy = True
 * except ImportError:             # <<<<<<<<<<<<<<
 *     have_numpy = False
 * 
*/
    __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_ImportError))));
    if (__pyx_t_11) {
      __Pyx_AddTraceback("symengine.lib.symengine_wrapper", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_12) < 0) __PYX_ERR(0, 31, __pyx_L37_except_error)
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_5);
      __Pyx_XGOTREF(__pyx_t_12);

      /* "symengine/lib/symengine_wrapper.pyx":32
 *     have_numpy = True
 * except ImportError:
 *     have_numpy = False             # <<<<<<<<<<<<<<
 * 
 * 
*/
      if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_have_numpy, Py_False) < (0)) __PYX_ERR(0, 32, __pyx_L37_except_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
      goto __pyx_L36_exception_handled;
    }
    goto __pyx_L37_except_error;

    /* "symengine/lib/symengine_wrapper.pyx":27
 * from collections.abc import MutableMapping
 * 
 * try:             # <<<<<<<<<<<<<<
 *     import numpy as np
 *     # Lambdify requires NumPy (since b713a61, see gh-112)
*/
    __pyx_L37_except_error:;
    __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_L36_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    __pyx_L40_try_end:;
  }

  /* "symengine/lib/symengine_wrapper.pyx":35
 * 
 * 
 * class SympifyError(Exception):             # <<<<<<<<<<<<<<
 *     pass
 * 
*/
  __pyx_t_12 = PyTuple_Pack(1, ((PyObject *)(((PyTypeObject*)PyExc_Exception)))); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 35, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_5 = __Pyx_PEP560_update_bases(__pyx_t_12); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 35, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 35, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_13 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_5, __pyx_mstate_global->__pyx_n_u_SympifyError, __pyx_mstate_global->__pyx_n_u_SympifyError, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 35, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  if (__pyx_t_5 != __pyx_t_12) {
    if (unlikely((PyDict_SetItemString(__pyx_t_13, "__orig_bases__", __pyx_t_12) < 0))) __PYX_ERR(0, 35, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __pyx_t_12 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_SympifyError, __pyx_t_5, __pyx_t_13, NULL, 0, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 35, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_SympifyError, __pyx_t_12) < (0)) __PYX_ERR(0, 35, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":38
 *     pass
 * 
 * cpdef object capsule_to_basic(object capsule):             # <<<<<<<<<<<<<<
 *     cdef CRCPBasic *p = <CRCPBasic*>PyCapsule_GetPointer(capsule, NULL)
 *     return c2py(p.m)
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_1capsule_to_basic, 0, __pyx_mstate_global->__pyx_n_u_capsule_to_basic, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[8])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 38, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_capsule_to_basic, __pyx_t_5) < (0)) __PYX_ERR(0, 38, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":42
 *     return c2py(p.m)
 * 
 * cpdef void assign_to_capsule(object capsule, object value):             # <<<<<<<<<<<<<<
 *     cdef CRCPBasic *p_cap = <CRCPBasic*>PyCapsule_GetPointer(capsule, NULL)
 *     cdef Basic v = sympify(value)
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_3assign_to_capsule, 0, __pyx_mstate_global->__pyx_n_u_assign_to_capsule, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[9])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 42, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_assign_to_capsule, __pyx_t_5) < (0)) __PYX_ERR(0, 42, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":271
 *     return r
 * 
 * def sympy2symengine(a, raise_error=False):             # <<<<<<<<<<<<<<
 *     """
 *     Converts 'a' from SymPy to SymEngine.
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_5sympy2symengine, 0, __pyx_mstate_global->__pyx_n_u_sympy2symengine, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[10])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 271, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_mstate_global->__pyx_tuple[3]);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_sympy2symengine, __pyx_t_5) < (0)) __PYX_ERR(0, 271, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":504
 * 
 * 
 * def sympify(a):             # <<<<<<<<<<<<<<
 *     """
 *     Converts an expression 'a' into a SymEngine type.
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_7sympify, 0, __pyx_mstate_global->__pyx_n_u_sympify, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[11])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 504, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_sympify, __pyx_t_5) < (0)) __PYX_ERR(0, 504, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":537
 * 
 * 
 * def _sympify(a, raise_error=True):             # <<<<<<<<<<<<<<
 *     """
 *     Converts an expression 'a' into a SymEngine type.
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_9_sympify, 0, __pyx_mstate_global->__pyx_n_u_sympify_2, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[12])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 537, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_mstate_global->__pyx_tuple[4]);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_sympify_2, __pyx_t_5) < (0)) __PYX_ERR(0, 537, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":588
 *                 a, type(a)))
 * 
 * funcs = {}             # <<<<<<<<<<<<<<
 * 
 * def get_function_class(function, module):
*/
  __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 588, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_funcs, __pyx_t_5) < (0)) __PYX_ERR(0, 588, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":590
 * funcs = {}
 * 
 * def get_function_class(function, module):             # <<<<<<<<<<<<<<
 *     if not function in funcs:
 *         funcs[function] = PyFunctionClass(function, module)
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_11get_function_class, 0, __pyx_mstate_global->__pyx_n_u_get_function_class, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[13])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 590, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_function_class, __pyx_t_5) < (0)) __PYX_ERR(0, 590, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":595
 *     return funcs[function]
 * 
 * class Singleton(object):             # <<<<<<<<<<<<<<
 * 
 *     __call__ = staticmethod(sympify)
*/
  __pyx_t_5 = __Pyx_PEP560_update_bases(__pyx_mstate_global->__pyx_tuple[6]); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 595, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 595, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_13 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_5, __pyx_mstate_global->__pyx_n_u_Singleton, __pyx_mstate_global->__pyx_n_u_Singleton, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 595, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  if (__pyx_t_5 != __pyx_mstate_global->__pyx_tuple[6]) {
    if (unlikely((PyDict_SetItemString(__pyx_t_13, "__orig_bases__", __pyx_mstate_global->__pyx_tuple[6]) < 0))) __PYX_ERR(0, 595, __pyx_L1_error)
  }

  /* "symengine/lib/symengine_wrapper.pyx":597
 * class Singleton(object):
 * 
 *     __call__ = staticmethod(sympify)             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __pyx_t_14 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_15, __pyx_mstate_global->__pyx_n_u_sympify); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 597, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_14, __pyx_t_15};
    __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 597, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
  }
  if (__Pyx_SetNameInClass(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_call, __pyx_t_12) < (0)) __PYX_ERR(0, 597, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":599
 *     __call__ = staticmethod(sympify)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def Zero(self):
 *         return zero
*/
  __pyx_t_15 = NULL;
  __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_9Singleton_1Zero, 0, __pyx_mstate_global->__pyx_n_u_Singleton_Zero, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[14])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 599, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14);
  #endif
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_15, __pyx_t_14};
    __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 599, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
  }
  if (__Pyx_SetNameInClass(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_Zero, __pyx_t_12) < (0)) __PYX_ERR(0, 599, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":603
 *         return zero
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def One(self):
 *         return one
*/
  __pyx_t_14 = NULL;
  __pyx_t_15 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_9Singleton_3One, 0, __pyx_mstate_global->__pyx_n_u_Singleton_One, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[15])); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 603, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_15);
  #endif
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_14, __pyx_t_15};
    __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 603, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
  }
  if (__Pyx_SetNameInClass(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_One, __pyx_t_12) < (0)) __PYX_ERR(0, 603, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":607
 *         return one
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def NegativeOne(self):
 *         return minus_one
*/
  __pyx_t_15 = NULL;
  __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_9Singleton_5NegativeOne, 0, __pyx_mstate_global->__pyx_n_u_Singleton_NegativeOne, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[16])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 607, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14);
  #endif
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_15, __pyx_t_14};
    __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 607, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
  }
  if (__Pyx_SetNameInClass(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_NegativeOne, __pyx_t_12) < (0)) __PYX_ERR(0, 607, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":611
 *         return minus_one
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def Half(self):
 *         return half
*/
  __pyx_t_14 = NULL;
  __pyx_t_15 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_9Singleton_7Half, 0, __pyx_mstate_global->__pyx_n_u_Singleton_Half, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[17])); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 611, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_15);
  #endif
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_14, __pyx_t_15};
    __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 611, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
  }
  if (__Pyx_SetNameInClass(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_Half, __pyx_t_12) < (0)) __PYX_ERR(0, 611, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":615
 *         return half
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def Pi(self):
 *         return pi
*/
  __pyx_t_15 = NULL;
  __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_9Singleton_9Pi, 0, __pyx_mstate_global->__pyx_n_u_Singleton_Pi, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[18])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 615, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14);
  #endif
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_15, __pyx_t_14};
    __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 615, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
  }
  if (__Pyx_SetNameInClass(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_Pi, __pyx_t_12) < (0)) __PYX_ERR(0, 615, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":619
 *         return pi
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def NaN(self):
 *         return nan
*/
  __pyx_t_14 = NULL;
  __pyx_t_15 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_9Singleton_11NaN, 0, __pyx_mstate_global->__pyx_n_u_Singleton_NaN, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[19])); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 619, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_15);
  #endif
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_14, __pyx_t_15};
    __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 619, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
  }
  if (__Pyx_SetNameInClass(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_NaN, __pyx_t_12) < (0)) __PYX_ERR(0, 619, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":623
 *         return nan
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def Infinity(self):
 *         return oo
*/
  __pyx_t_15 = NULL;
  __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_9Singleton_13Infinity, 0, __pyx_mstate_global->__pyx_n_u_Singleton_Infinity, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[20])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 623, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14);
  #endif
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_15, __pyx_t_14};
    __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 623, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
  }
  if (__Pyx_SetNameInClass(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_Infinity, __pyx_t_12) < (0)) __PYX_ERR(0, 623, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":627
 *         return oo
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def NegativeInfinity(self):
 *         return minus_oo
*/
  __pyx_t_14 = NULL;
  __pyx_t_15 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_9Singleton_15NegativeInfinity, 0, __pyx_mstate_global->__pyx_n_u_Singleton_NegativeInfinity, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[21])); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 627, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_15);
  #endif
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_14, __pyx_t_15};
    __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 627, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
  }
  if (__Pyx_SetNameInClass(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_NegativeInfinity, __pyx_t_12) < (0)) __PYX_ERR(0, 627, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":631
 *         return minus_oo
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def ComplexInfinity(self):
 *         return zoo
*/
  __pyx_t_15 = NULL;
  __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_9Singleton_17ComplexInfinity, 0, __pyx_mstate_global->__pyx_n_u_Singleton_ComplexInfinity, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[22])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 631, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14);
  #endif
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_15, __pyx_t_14};
    __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 631, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
  }
  if (__Pyx_SetNameInClass(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_ComplexInfinity, __pyx_t_12) < (0)) __PYX_ERR(0, 631, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":635
 *         return zoo
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def Exp1(self):
 *         return E
*/
  __pyx_t_14 = NULL;
  __pyx_t_15 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_9Singleton_19Exp1, 0, __pyx_mstate_global->__pyx_n_u_Singleton_Exp1, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[23])); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 635, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_15);
  #endif
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_14, __pyx_t_15};
    __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 635, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
  }
  if (__Pyx_SetNameInClass(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_Exp1, __pyx_t_12) < (0)) __PYX_ERR(0, 635, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":639
 *         return E
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def GoldenRatio(self):
 *         return golden_ratio
*/
  __pyx_t_15 = NULL;
  __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_9Singleton_21GoldenRatio, 0, __pyx_mstate_global->__pyx_n_u_Singleton_GoldenRatio, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[24])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 639, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14);
  #endif
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_15, __pyx_t_14};
    __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 639, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
  }
  if (__Pyx_SetNameInClass(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_GoldenRatio, __pyx_t_12) < (0)) __PYX_ERR(0, 639, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":643
 *         return golden_ratio
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def Catalan(self):
 *         return catalan
*/
  __pyx_t_14 = NULL;
  __pyx_t_15 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_9Singleton_23Catalan, 0, __pyx_mstate_global->__pyx_n_u_Singleton_Catalan, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[25])); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 643, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_15);
  #endif
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_14, __pyx_t_15};
    __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 643, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
  }
  if (__Pyx_SetNameInClass(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_Catalan, __pyx_t_12) < (0)) __PYX_ERR(0, 643, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":647
 *         return catalan
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def EulerGamma(self):
 *         return eulergamma
*/
  __pyx_t_15 = NULL;
  __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_9Singleton_25EulerGamma, 0, __pyx_mstate_global->__pyx_n_u_Singleton_EulerGamma, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[26])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 647, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14);
  #endif
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_15, __pyx_t_14};
    __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 647, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
  }
  if (__Pyx_SetNameInClass(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_EulerGamma, __pyx_t_12) < (0)) __PYX_ERR(0, 647, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":651
 *         return eulergamma
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def ImaginaryUnit(self):
 *         return I
*/
  __pyx_t_14 = NULL;
  __pyx_t_15 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_9Singleton_27ImaginaryUnit, 0, __pyx_mstate_global->__pyx_n_u_Singleton_ImaginaryUnit, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[27])); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 651, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_15);
  #endif
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_14, __pyx_t_15};
    __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 651, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
  }
  if (__Pyx_SetNameInClass(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_ImaginaryUnit, __pyx_t_12) < (0)) __PYX_ERR(0, 651, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":655
 *         return I
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def true(self):
 *         return true
*/
  __pyx_t_15 = NULL;
  __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_9Singleton_29true, 0, __pyx_mstate_global->__pyx_n_u_Singleton_true, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[28])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 655, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14);
  #endif
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_15, __pyx_t_14};
    __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 655, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
  }
  if (__Pyx_SetNameInClass(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_true, __pyx_t_12) < (0)) __PYX_ERR(0, 655, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":659
 *         return true
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def false(self):
 *         return false
*/
  __pyx_t_14 = NULL;
  __pyx_t_15 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_9Singleton_31false, 0, __pyx_mstate_global->__pyx_n_u_Singleton_false, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[29])); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 659, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_15);
  #endif
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_14, __pyx_t_15};
    __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 659, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
  }
  if (__Pyx_SetNameInClass(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_false, __pyx_t_12) < (0)) __PYX_ERR(0, 659, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":663
 *         return false
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def EmptySet(self):
 *         return empty_set_singleton
*/
  __pyx_t_15 = NULL;
  __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_9Singleton_33EmptySet, 0, __pyx_mstate_global->__pyx_n_u_Singleton_EmptySet, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[30])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 663, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14);
  #endif
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_15, __pyx_t_14};
    __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 663, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
  }
  if (__Pyx_SetNameInClass(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_EmptySet, __pyx_t_12) < (0)) __PYX_ERR(0, 663, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":667
 *         return empty_set_singleton
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def UniversalSet(self):
 *         return universal_set_singleton
*/
  __pyx_t_14 = NULL;
  __pyx_t_15 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_9Singleton_35UniversalSet, 0, __pyx_mstate_global->__pyx_n_u_Singleton_UniversalSet, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[31])); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 667, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_15);
  #endif
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_14, __pyx_t_15};
    __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 667, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
  }
  if (__Pyx_SetNameInClass(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_UniversalSet, __pyx_t_12) < (0)) __PYX_ERR(0, 667, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":671
 *         return universal_set_singleton
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def Integers(self):
 *         return integers_singleton
*/
  __pyx_t_15 = NULL;
  __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_9Singleton_37Integers, 0, __pyx_mstate_global->__pyx_n_u_Singleton_Integers, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[32])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 671, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14);
  #endif
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_15, __pyx_t_14};
    __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 671, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
  }
  if (__Pyx_SetNameInClass(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_Integers, __pyx_t_12) < (0)) __PYX_ERR(0, 671, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":675
 *         return integers_singleton
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def Rationals(self):
 *         return rationals_singleton
*/
  __pyx_t_14 = NULL;
  __pyx_t_15 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_9Singleton_39Rationals, 0, __pyx_mstate_global->__pyx_n_u_Singleton_Rationals, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[33])); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 675, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_15);
  #endif
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_14, __pyx_t_15};
    __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 675, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
  }
  if (__Pyx_SetNameInClass(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_Rationals, __pyx_t_12) < (0)) __PYX_ERR(0, 675, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":679
 *         return rationals_singleton
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def Reals(self):
 *         return reals_singleton
*/
  __pyx_t_15 = NULL;
  __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_9Singleton_41Reals, 0, __pyx_mstate_global->__pyx_n_u_Singleton_Reals, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[34])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 679, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14);
  #endif
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_15, __pyx_t_14};
    __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 679, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
  }
  if (__Pyx_SetNameInClass(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_Reals, __pyx_t_12) < (0)) __PYX_ERR(0, 679, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":595
 *     return funcs[function]
 * 
 * class Singleton(object):             # <<<<<<<<<<<<<<
 * 
 *     __call__ = staticmethod(sympify)
*/
  __pyx_t_12 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Singleton, __pyx_t_5, __pyx_t_13, NULL, 0, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 595, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Singleton, __pyx_t_12) < (0)) __PYX_ERR(0, 595, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":683
 *         return reals_singleton
 * 
 * S = Singleton()             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_Singleton); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 683, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_13, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 683, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
  }
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_S, __pyx_t_5) < (0)) __PYX_ERR(0, 683, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.begin,self.end cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_13DictBasicIter_5__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DictBasicIter___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[35])); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_5) < (0)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.begin,self.end cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.begin,self.end cannot be converted to a Python object for pickling"
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_13DictBasicIter_7__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DictBasicIter___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[36])); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_5) < (0)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":710
 *             self.add_dict(tocopy)
 * 
 *     def as_dict(self):             # <<<<<<<<<<<<<<
 *         ret = {}
 *         it = self.c.begin()
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_10_DictBasic_3as_dict, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DictBasic_as_dict, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[37])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 710, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper__DictBasic, __pyx_mstate_global->__pyx_n_u_as_dict, __pyx_t_5) < (0)) __PYX_ERR(0, 710, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":718
 *         return ret
 * 
 *     def add_dict(self, d):             # <<<<<<<<<<<<<<
 *         cdef _DictBasic D
 *         if isinstance(d, DictBasic):
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_10_DictBasic_5add_dict, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DictBasic_add_dict, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[38])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 718, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper__DictBasic, __pyx_mstate_global->__pyx_n_u_add_dict, __pyx_t_5) < (0)) __PYX_ERR(0, 718, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":727
 *                 self.add(key, value)
 * 
 *     def add(self, key, value):             # <<<<<<<<<<<<<<
 *         cdef Basic K = sympify(key)
 *         cdef Basic V = sympify(value)
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_10_DictBasic_7add, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DictBasic_add, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[39])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 727, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper__DictBasic, __pyx_mstate_global->__pyx_n_u_add, __pyx_t_5) < (0)) __PYX_ERR(0, 727, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":735
 *         return self.c.insert(pair).second
 * 
 *     def copy(self):             # <<<<<<<<<<<<<<
 *         return DictBasic(self)
 * 
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_10_DictBasic_9copy, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DictBasic_copy, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[40])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 735, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper__DictBasic, __pyx_mstate_global->__pyx_n_u_copy, __pyx_t_5) < (0)) __PYX_ERR(0, 735, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":738
 *         return DictBasic(self)
 * 
 *     __copy__ = copy             # <<<<<<<<<<<<<<
 * 
 *     def __len__(self):
*/
  __Pyx_GetNameInClass(__pyx_t_5, (PyObject*)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper__DictBasic, __pyx_mstate_global->__pyx_n_u_copy); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 738, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper__DictBasic, __pyx_mstate_global->__pyx_n_u_copy_2, __pyx_t_5) < (0)) __PYX_ERR(0, 738, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":756
 *         self.c[K.thisptr] = V.thisptr
 * 
 *     def clear(self):             # <<<<<<<<<<<<<<
 *         self.clear()
 * 
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_10_DictBasic_17clear, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DictBasic_clear, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[41])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 756, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper__DictBasic, __pyx_mstate_global->__pyx_n_u_clear, __pyx_t_5) < (0)) __PYX_ERR(0, 756, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.c cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_10_DictBasic_25__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DictBasic___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[42])); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_5) < (0)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.c cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.c cannot be converted to a Python object for pickling"
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_10_DictBasic_27__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DictBasic___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[43])); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_5) < (0)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":774
 * 
 * 
 * class DictBasic(_DictBasic, MutableMapping):             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
*/
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_MutableMapping); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 774, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_13 = PyTuple_Pack(2, ((PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper__DictBasic), __pyx_t_5); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 774, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PEP560_update_bases(__pyx_t_13); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 774, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 774, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_12 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_5, __pyx_mstate_global->__pyx_n_u_DictBasic, __pyx_mstate_global->__pyx_n_u_DictBasic, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 774, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  if (__pyx_t_5 != __pyx_t_13) {
    if (unlikely((PyDict_SetItemString(__pyx_t_12, "__orig_bases__", __pyx_t_13) < 0))) __PYX_ERR(0, 774, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":776
 * class DictBasic(_DictBasic, MutableMapping):
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "{" + ", ".join(["%s: %s" % (str(key), str(value)) for key, value in self.items()]) + "}"
 * 
*/
  __pyx_t_13 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_9DictBasic_1__str__, 0, __pyx_mstate_global->__pyx_n_u_DictBasic___str, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[44])); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 776, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_13);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_str, __pyx_t_13) < (0)) __PYX_ERR(0, 776, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":779
 *         return "{" + ", ".join(["%s: %s" % (str(key), str(value)) for key, value in self.items()]) + "}"
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.__str__()
 * 
*/
  __pyx_t_13 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_9DictBasic_3__repr__, 0, __pyx_mstate_global->__pyx_n_u_DictBasic___repr, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[45])); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 779, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_13);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_repr, __pyx_t_13) < (0)) __PYX_ERR(0, 779, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":774
 * 
 * 
 * class DictBasic(_DictBasic, MutableMapping):             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
*/
  __pyx_t_13 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_DictBasic, __pyx_t_5, __pyx_t_12, NULL, 0, 0); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 774, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_13);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_DictBasic, __pyx_t_13) < (0)) __PYX_ERR(0, 774, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":782
 *         return self.__str__()
 * 
 * def get_dict(*args):             # <<<<<<<<<<<<<<
 *     """
 *     Returns a DictBasic instance from args. Inputs can be,
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_13get_dict, 0, __pyx_mstate_global->__pyx_n_u_get_dict, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[46])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 782, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_dict, __pyx_t_5) < (0)) __PYX_ERR(0, 782, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":830
 * 
 * 
 * def load_basic(bytes s):             # <<<<<<<<<<<<<<
 *     return c2py(symengine.wrapper_loads(s))
 * 
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_15load_basic, 0, __pyx_mstate_global->__pyx_n_u_load_basic, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[47])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 830, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_load_basic, __pyx_t_5) < (0)) __PYX_ERR(0, 830, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":834
 * 
 * 
 * repr_latex=[False]             # <<<<<<<<<<<<<<
 * 
 * cdef class Basic(object):
*/
  __pyx_t_5 = __Pyx_PyList_Pack(1, Py_False); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 834, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_repr_latex, __pyx_t_5) < (0)) __PYX_ERR(0, 834, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":844
 *         return self.__str__()
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         cdef bytes s = symengine.wrapper_dumps(deref(self.thisptr))
 *         return (load_basic, (s,))
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_5Basic_5__reduce__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Basic___reduce, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[48])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 844, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic, __pyx_mstate_global->__pyx_n_u_reduce, __pyx_t_5) < (0)) __PYX_ERR(0, 844, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":848
 *         return (load_basic, (s,))
 * 
 *     def _repr_latex_(self):             # <<<<<<<<<<<<<<
 *         if repr_latex[0]:
 *             return "${}$".format(latex(self))
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_5Basic_7_repr_latex_, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Basic__repr_latex, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[49])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 848, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic, __pyx_mstate_global->__pyx_n_u_repr_latex_2, __pyx_t_5) < (0)) __PYX_ERR(0, 848, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":860
 *         self.thisptr.reset()
 * 
 *     def _unsafe_reset(self):             # <<<<<<<<<<<<<<
 *         self.thisptr.reset()
 * 
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_5Basic_13_unsafe_reset, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Basic__unsafe_reset, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[50])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 860, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic, __pyx_mstate_global->__pyx_n_u_unsafe_reset, __pyx_t_5) < (0)) __PYX_ERR(0, 860, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":969
 *         return Basic._richcmp_(A, B, op)
 * 
 *     def _richcmp_(Basic A, Basic B, int op):             # <<<<<<<<<<<<<<
 *         if (op == 2):
 *             return symengine.eq(deref(A.thisptr), deref(B.thisptr))
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_5Basic_55_richcmp_, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Basic__richcmp, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[51])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 969, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic, __pyx_mstate_global->__pyx_n_u_richcmp, __pyx_t_5) < (0)) __PYX_ERR(0, 969, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":983
 *             return c2py(<rcp_const_basic>(symengine.Ge(A.thisptr, B.thisptr)))
 * 
 *     def expand(Basic self not None, cppbool deep=True):             # <<<<<<<<<<<<<<
 *         return c2py(symengine.expand(self.thisptr, deep))
 * 
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_5Basic_57expand, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Basic_expand, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[52])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 983, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_mstate_global->__pyx_tuple[4]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic, __pyx_mstate_global->__pyx_n_u_expand, __pyx_t_5) < (0)) __PYX_ERR(0, 983, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":986
 *         return c2py(symengine.expand(self.thisptr, deep))
 * 
 *     def _diff(Basic self not None, Basic x):             # <<<<<<<<<<<<<<
 *         return c2py(symengine.diff(self.thisptr, x.thisptr))
 * 
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_5Basic_59_diff, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Basic__diff, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[53])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 986, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic, __pyx_mstate_global->__pyx_n_u_diff, __pyx_t_5) < (0)) __PYX_ERR(0, 986, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":989
 *         return c2py(symengine.diff(self.thisptr, x.thisptr))
 * 
 *     def diff(self, *args):             # <<<<<<<<<<<<<<
 *         if len(args) == 0:
 *             f = self.free_symbols
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_5Basic_61diff, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Basic_diff, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[54])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 989, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic, __pyx_mstate_global->__pyx_n_u_diff_2, __pyx_t_5) < (0)) __PYX_ERR(0, 989, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":997
 *         return _diff(self, *args)
 * 
 *     def subs_dict(Basic self not None, *args):             # <<<<<<<<<<<<<<
 *         warnings.warn("subs_dict() is deprecated. Use subs() instead", DeprecationWarning)
 *         return self.subs(*args)
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_5Basic_63subs_dict, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Basic_subs_dict, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[55])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 997, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic, __pyx_mstate_global->__pyx_n_u_subs_dict, __pyx_t_5) < (0)) __PYX_ERR(0, 997, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1001
 *         return self.subs(*args)
 * 
 *     def subs_oldnew(Basic self not None, old, new):             # <<<<<<<<<<<<<<
 *         warnings.warn("subs_oldnew() is deprecated. Use subs() instead", DeprecationWarning)
 *         return self.subs({old: new})
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_5Basic_65subs_oldnew, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Basic_subs_oldnew, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[56])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1001, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic, __pyx_mstate_global->__pyx_n_u_subs_oldnew, __pyx_t_5) < (0)) __PYX_ERR(0, 1001, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1005
 *         return self.subs({old: new})
 * 
 *     def subs(Basic self not None, *args):             # <<<<<<<<<<<<<<
 *         cdef _DictBasic D = get_dict(*args)
 *         return c2py(symengine.ssubs(self.thisptr, D.c))
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_5Basic_67subs, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Basic_subs, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[57])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1005, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic, __pyx_mstate_global->__pyx_n_u_subs, __pyx_t_5) < (0)) __PYX_ERR(0, 1005, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1009
 *         return c2py(symengine.ssubs(self.thisptr, D.c))
 * 
 *     def xreplace(Basic self not None, *args):             # <<<<<<<<<<<<<<
 *         cdef _DictBasic D = get_dict(*args)
 *         return c2py(symengine.xreplace(self.thisptr, D.c))
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_5Basic_69xreplace, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Basic_xreplace, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[58])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1009, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic, __pyx_mstate_global->__pyx_n_u_xreplace, __pyx_t_5) < (0)) __PYX_ERR(0, 1009, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1013
 *         return c2py(symengine.xreplace(self.thisptr, D.c))
 * 
 *     replace = xreplace             # <<<<<<<<<<<<<<
 * 
 *     def msubs(Basic self not None, *args):
*/
  __Pyx_GetNameInClass(__pyx_t_5, (PyObject*)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic, __pyx_mstate_global->__pyx_n_u_xreplace); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1013, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic, __pyx_mstate_global->__pyx_n_u_replace, __pyx_t_5) < (0)) __PYX_ERR(0, 1013, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1015
 *     replace = xreplace
 * 
 *     def msubs(Basic self not None, *args):             # <<<<<<<<<<<<<<
 *         cdef _DictBasic D = get_dict(*args)
 *         return c2py(symengine.msubs(self.thisptr, D.c))
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_5Basic_71msubs, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Basic_msubs, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[59])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1015, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic, __pyx_mstate_global->__pyx_n_u_msubs, __pyx_t_5) < (0)) __PYX_ERR(0, 1015, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1019
 *         return c2py(symengine.msubs(self.thisptr, D.c))
 * 
 *     def as_numer_denom(Basic self not None):             # <<<<<<<<<<<<<<
 *         cdef rcp_const_basic _num, _den
 *         symengine.as_numer_denom(self.thisptr, symengine.outArg(_num), symengine.outArg(_den))
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_5Basic_73as_numer_denom, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Basic_as_numer_denom, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[60])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1019, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic, __pyx_mstate_global->__pyx_n_u_as_numer_denom, __pyx_t_5) < (0)) __PYX_ERR(0, 1019, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1024
 *         return c2py(<rcp_const_basic>_num), c2py(<rcp_const_basic>_den)
 * 
 *     def as_real_imag(Basic self not None):             # <<<<<<<<<<<<<<
 *         cdef rcp_const_basic _real, _imag
 *         symengine.as_real_imag(self.thisptr, symengine.outArg(_real), symengine.outArg(_imag))
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_5Basic_75as_real_imag, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Basic_as_real_imag, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[61])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1024, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic, __pyx_mstate_global->__pyx_n_u_as_real_imag, __pyx_t_5) < (0)) __PYX_ERR(0, 1024, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1029
 *         return c2py(<rcp_const_basic>_real), c2py(<rcp_const_basic>_imag)
 * 
 *     def n(self, unsigned long prec = 53, real=None):             # <<<<<<<<<<<<<<
 *         return evalf(self, prec, real)
 * 
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_5Basic_77n, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Basic_n, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[62])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1029, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_mstate_global->__pyx_tuple[7]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic, __pyx_mstate_global->__pyx_n_u_n, __pyx_t_5) < (0)) __PYX_ERR(0, 1029, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1032
 *         return evalf(self, prec, real)
 * 
 *     evalf = n             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_GetNameInClass(__pyx_t_5, (PyObject*)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic, __pyx_mstate_global->__pyx_n_u_n); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1032, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic, __pyx_mstate_global->__pyx_n_u_evalf, __pyx_t_5) < (0)) __PYX_ERR(0, 1032, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1156
 *         return is_real(self)
 * 
 *     def copy(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_5Basic_79copy, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Basic_copy, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[63])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1156, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic, __pyx_mstate_global->__pyx_n_u_copy, __pyx_t_5) < (0)) __PYX_ERR(0, 1156, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1159
 *         return self
 * 
 *     def _symbolic_(self, ring):             # <<<<<<<<<<<<<<
 *         return ring(self._sage_())
 * 
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_5Basic_81_symbolic_, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Basic__symbolic, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[64])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic, __pyx_mstate_global->__pyx_n_u_symbolic, __pyx_t_5) < (0)) __PYX_ERR(0, 1159, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1162
 *         return ring(self._sage_())
 * 
 *     def atoms(self, *types):             # <<<<<<<<<<<<<<
 *         if types:
 *             s = set()
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_5Basic_83atoms, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Basic_atoms, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[65])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic, __pyx_mstate_global->__pyx_n_u_atoms, __pyx_t_5) < (0)) __PYX_ERR(0, 1162, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1173
 *             return self.free_symbols
 * 
 *     def simplify(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return sympify(self._sympy_().simplify(*args, **kwargs))
 * 
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_5Basic_85simplify, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Basic_simplify, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[66])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1173, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic, __pyx_mstate_global->__pyx_n_u_simplify, __pyx_t_5) < (0)) __PYX_ERR(0, 1173, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1176
 *         return sympify(self._sympy_().simplify(*args, **kwargs))
 * 
 *     def as_coefficients_dict(self):             # <<<<<<<<<<<<<<
 *         d = collections.defaultdict(int)
 *         d[self] = 1
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_5Basic_87as_coefficients_dict, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Basic_as_coefficients_dict, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[67])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1176, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic, __pyx_mstate_global->__pyx_n_u_as_coefficients_dict, __pyx_t_5) < (0)) __PYX_ERR(0, 1176, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1181
 *         return d
 * 
 *     def coeff(self, x, n=1):             # <<<<<<<<<<<<<<
 *         cdef Basic _x = sympify(x)
 *         require(_x, Symbol)
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_5Basic_89coeff, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Basic_coeff, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[68])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1181, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_mstate_global->__pyx_tuple[8]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic, __pyx_mstate_global->__pyx_n_u_coeff, __pyx_t_5) < (0)) __PYX_ERR(0, 1181, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1187
 *         return c2py(symengine.coeff(deref(self.thisptr), deref(_x.thisptr), deref(_n.thisptr)))
 * 
 *     def has(self, *symbols):             # <<<<<<<<<<<<<<
 *         return any([has_symbol(self, symbol) for symbol in symbols])
 * 
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_5Basic_91has, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Basic_has, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[69])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1187, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic, __pyx_mstate_global->__pyx_n_u_has, __pyx_t_5) < (0)) __PYX_ERR(0, 1187, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1190
 *         return any([has_symbol(self, symbol) for symbol in symbols])
 * 
 *     def args_as_sage(Basic self):             # <<<<<<<<<<<<<<
 *         cdef symengine.vec_basic Y = deref(self.thisptr).get_args()
 *         s = []
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_5Basic_93args_as_sage, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Basic_args_as_sage, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[70])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1190, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic, __pyx_mstate_global->__pyx_n_u_args_as_sage, __pyx_t_5) < (0)) __PYX_ERR(0, 1190, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1197
 *         return s
 * 
 *     def args_as_sympy(Basic self):             # <<<<<<<<<<<<<<
 *         cdef symengine.vec_basic Y = deref(self.thisptr).get_args()
 *         s = []
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_5Basic_95args_as_sympy, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Basic_args_as_sympy, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[71])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1197, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic, __pyx_mstate_global->__pyx_n_u_args_as_sympy, __pyx_t_5) < (0)) __PYX_ERR(0, 1197, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1213
 *         return int(float(self))
 * 
 *     def __complex__(self):             # <<<<<<<<<<<<<<
 *         f = self.n(real=False)
 *         if not isinstance(f, (ComplexDouble, RealDouble)):
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_5Basic_101__complex__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Basic___complex, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[72])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1213, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic, __pyx_mstate_global->__pyx_n_u_complex, __pyx_t_5) < (0)) __PYX_ERR(0, 1213, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1219
 *         return complex(f)
 * 
 *     def as_powers_dict(self):             # <<<<<<<<<<<<<<
 *         d = collections.defaultdict(int)
 *         d[self] = 1
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_5Basic_103as_powers_dict, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Basic_as_powers_dict, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[73])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1219, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Basic, __pyx_mstate_global->__pyx_n_u_as_powers_dict, __pyx_t_5) < (0)) __PYX_ERR(0, 1219, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1225
 * 
 * 
 * def series(ex, x=None, x0=0, n=6, as_deg_coef_pair=False):             # <<<<<<<<<<<<<<
 *     # TODO: check for x0 an infinity, see sympy/core/expr.py
 *     # TODO: nonzero x0
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_17series, 0, __pyx_mstate_global->__pyx_n_u_series, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[74])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1225, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_mstate_global->__pyx_tuple[9]);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_series, __pyx_t_5) < (0)) __PYX_ERR(0, 1225, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1296
 *                 store_pickle)
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.Symbol(str(self))
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_6Symbol_3_sympy_, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Symbol__sympy, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[75])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1296, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Symbol, __pyx_mstate_global->__pyx_n_u_sympy_2, __pyx_t_5) < (0)) __PYX_ERR(0, 1296, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1300
 *         return sympy.Symbol(str(self))
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         if type(self) == Symbol:
 *             return Basic.__reduce__(self)
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_6Symbol_5__reduce__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Symbol___reduce, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[76])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1300, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Symbol, __pyx_mstate_global->__pyx_n_u_reduce, __pyx_t_5) < (0)) __PYX_ERR(0, 1300, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1306
 *             raise NotImplementedError("pickling for Symbol subclass not implemented")
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         import sage.all as sage
 *         return sage.SR.symbol(str(self))
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_6Symbol_7_sage_, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Symbol__sage, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[77])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1306, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Symbol, __pyx_mstate_global->__pyx_n_u_sage, __pyx_t_5) < (0)) __PYX_ERR(0, 1306, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1343
 *             self.thisptr = symengine.make_rcp_Dummy(name.encode("utf-8"))
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.Dummy(str(self)[1:])
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_5Dummy_3_sympy_, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Dummy__sympy, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[78])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1343, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Dummy, __pyx_mstate_global->__pyx_n_u_sympy_2, __pyx_t_5) < (0)) __PYX_ERR(0, 1343, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1356
 * 
 * 
 * def symarray(prefix, shape, **kwargs):             # <<<<<<<<<<<<<<
 *     """ Creates an nd-array of symbols
 * 
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_19symarray, 0, __pyx_mstate_global->__pyx_n_u_symarray, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[79])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1356, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_symarray, __pyx_t_5) < (0)) __PYX_ERR(0, 1356, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1388
 *         return True
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         raise Exception("Unknown Constant")
 * 
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_8Constant_3_sympy_, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Constant__sympy, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[80])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1388, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Constant, __pyx_mstate_global->__pyx_n_u_sympy_2, __pyx_t_5) < (0)) __PYX_ERR(0, 1388, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1391
 *         raise Exception("Unknown Constant")
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         raise Exception("Unknown Constant")
 * 
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_8Constant_5_sage_, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Constant__sage, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[81])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1391, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Constant, __pyx_mstate_global->__pyx_n_u_sage, __pyx_t_5) < (0)) __PYX_ERR(0, 1391, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1400
 *         self.thisptr = symengine.I
 * 
 *     def as_powers_dict(self):             # <<<<<<<<<<<<<<
 *         d = collections.defaultdict(int)
 *         d[minus_one] = half
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_13ImaginaryUnit_3as_powers_dict, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ImaginaryUnit_as_powers_dict, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[82])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1400, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ImaginaryUnit, __pyx_mstate_global->__pyx_n_u_as_powers_dict, __pyx_t_5) < (0)) __PYX_ERR(0, 1400, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1405
 *         return d
 * 
 * I = ImaginaryUnit()             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_t_4 = NULL;
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ImaginaryUnit, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1405, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_5);
  }
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_I, ((PyObject *)__pyx_t_5)) < (0)) __PYX_ERR(0, 1405, __pyx_L1_error)
  __Pyx_DECREF((PyObject *)__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1413
 *         self.thisptr = symengine.pi
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.pi
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_2Pi_3_sympy_, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pi__sympy, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[83])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1413, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Pi, __pyx_mstate_global->__pyx_n_u_sympy_2, __pyx_t_5) < (0)) __PYX_ERR(0, 1413, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1417
 *         return sympy.pi
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         import sage.all as sage
 *         return sage.pi
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_2Pi_5_sage_, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pi__sage, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[84])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1417, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Pi, __pyx_mstate_global->__pyx_n_u_sage, __pyx_t_5) < (0)) __PYX_ERR(0, 1417, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1421
 *         return sage.pi
 * 
 * pi = Pi()             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_t_4 = NULL;
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Pi, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1421, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_5);
  }
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pi, ((PyObject *)__pyx_t_5)) < (0)) __PYX_ERR(0, 1421, __pyx_L1_error)
  __Pyx_DECREF((PyObject *)__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1429
 *         self.thisptr = symengine.E
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.E
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_4Exp1_3_sympy_, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Exp1__sympy, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[85])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1429, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Exp1, __pyx_mstate_global->__pyx_n_u_sympy_2, __pyx_t_5) < (0)) __PYX_ERR(0, 1429, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1433
 *         return sympy.E
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         import sage.all as sage
 *         return sage.e
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_4Exp1_5_sage_, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Exp1__sage, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[86])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1433, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Exp1, __pyx_mstate_global->__pyx_n_u_sage, __pyx_t_5) < (0)) __PYX_ERR(0, 1433, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1437
 *         return sage.e
 * 
 * E = Exp1()             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_t_4 = NULL;
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Exp1, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1437, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_5);
  }
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_E, ((PyObject *)__pyx_t_5)) < (0)) __PYX_ERR(0, 1437, __pyx_L1_error)
  __Pyx_DECREF((PyObject *)__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1445
 *         self.thisptr = symengine.GoldenRatio
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.GoldenRatio
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_11GoldenRatio_3_sympy_, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_GoldenRatio__sympy, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[87])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1445, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_GoldenRatio, __pyx_mstate_global->__pyx_n_u_sympy_2, __pyx_t_5) < (0)) __PYX_ERR(0, 1445, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1449
 *         return sympy.GoldenRatio
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         import sage.all as sage
 *         return sage.golden_ratio
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_11GoldenRatio_5_sage_, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_GoldenRatio__sage, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[88])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1449, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_GoldenRatio, __pyx_mstate_global->__pyx_n_u_sage, __pyx_t_5) < (0)) __PYX_ERR(0, 1449, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1453
 *         return sage.golden_ratio
 * 
 * golden_ratio = GoldenRatio()             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_t_4 = NULL;
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_GoldenRatio, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1453, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_5);
  }
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_golden_ratio, ((PyObject *)__pyx_t_5)) < (0)) __PYX_ERR(0, 1453, __pyx_L1_error)
  __Pyx_DECREF((PyObject *)__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1461
 *         self.thisptr = symengine.Catalan
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.Catalan
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_7Catalan_3_sympy_, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Catalan__sympy, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[89])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1461, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Catalan, __pyx_mstate_global->__pyx_n_u_sympy_2, __pyx_t_5) < (0)) __PYX_ERR(0, 1461, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1465
 *         return sympy.Catalan
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         import sage.all as sage
 *         return sage.catalan
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_7Catalan_5_sage_, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Catalan__sage, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[90])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1465, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Catalan, __pyx_mstate_global->__pyx_n_u_sage, __pyx_t_5) < (0)) __PYX_ERR(0, 1465, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1469
 *         return sage.catalan
 * 
 * catalan = Catalan()             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_t_4 = NULL;
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Catalan, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1469, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_5);
  }
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_catalan, ((PyObject *)__pyx_t_5)) < (0)) __PYX_ERR(0, 1469, __pyx_L1_error)
  __Pyx_DECREF((PyObject *)__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1477
 *         self.thisptr = symengine.EulerGamma
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.EulerGamma
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_10EulerGamma_3_sympy_, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_EulerGamma__sympy, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[91])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1477, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_EulerGamma, __pyx_mstate_global->__pyx_n_u_sympy_2, __pyx_t_5) < (0)) __PYX_ERR(0, 1477, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1481
 *         return sympy.EulerGamma
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         import sage.all as sage
 *         return sage.euler_gamma
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_10EulerGamma_5_sage_, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_EulerGamma__sage, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[92])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1481, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_EulerGamma, __pyx_mstate_global->__pyx_n_u_sage, __pyx_t_5) < (0)) __PYX_ERR(0, 1481, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1485
 *         return sage.euler_gamma
 * 
 * eulergamma = EulerGamma()             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_t_4 = NULL;
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_EulerGamma, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1485, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_5);
  }
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_eulergamma, ((PyObject *)__pyx_t_5)) < (0)) __PYX_ERR(0, 1485, __pyx_L1_error)
  __Pyx_DECREF((PyObject *)__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1490
 * cdef class Boolean(Expr):
 * 
 *     def logical_not(self):             # <<<<<<<<<<<<<<
 *         return c2py(<rcp_const_basic>(deref(symengine.rcp_static_cast_Boolean(self.thisptr)).logical_not()))
 * 
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_7Boolean_1logical_not, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Boolean_logical_not, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[93])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1490, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Boolean, __pyx_mstate_global->__pyx_n_u_logical_not, __pyx_t_5) < (0)) __PYX_ERR(0, 1490, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1513
 *         self.thisptr = symengine.boolTrue
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.S.true
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_11BooleanTrue_3_sympy_, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_BooleanTrue__sympy, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[94])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1513, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_BooleanTrue, __pyx_mstate_global->__pyx_n_u_sympy_2, __pyx_t_5) < (0)) __PYX_ERR(0, 1513, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1517
 *         return sympy.S.true
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         return True
 * 
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_11BooleanTrue_5_sage_, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_BooleanTrue__sage, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[95])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1517, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_BooleanTrue, __pyx_mstate_global->__pyx_n_u_sage, __pyx_t_5) < (0)) __PYX_ERR(0, 1517, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1524
 * 
 * 
 * true = BooleanTrue()             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_t_4 = NULL;
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_BooleanTrue, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1524, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_5);
  }
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_true, ((PyObject *)__pyx_t_5)) < (0)) __PYX_ERR(0, 1524, __pyx_L1_error)
  __Pyx_DECREF((PyObject *)__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1532
 *         self.thisptr = symengine.boolFalse
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.S.false
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_12BooleanFalse_3_sympy_, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_BooleanFalse__sympy, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[96])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1532, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_BooleanFalse, __pyx_mstate_global->__pyx_n_u_sympy_2, __pyx_t_5) < (0)) __PYX_ERR(0, 1532, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1536
 *         return sympy.S.false
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         return False
 * 
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_12BooleanFalse_5_sage_, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_BooleanFalse__sage, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[97])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1536, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_BooleanFalse, __pyx_mstate_global->__pyx_n_u_sage, __pyx_t_5) < (0)) __PYX_ERR(0, 1536, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1545
 *         return False
 * 
 * false = BooleanFalse()             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_t_4 = NULL;
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_BooleanFalse, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1545, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_5);
  }
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_false, ((PyObject *)__pyx_t_5)) < (0)) __PYX_ERR(0, 1545, __pyx_L1_error)
  __Pyx_DECREF((PyObject *)__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1548
 * 
 * 
 * class And(Boolean):             # <<<<<<<<<<<<<<
 * 
 *     def __new__(cls, *args):
*/
  __pyx_t_5 = PyTuple_Pack(1, ((PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Boolean)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1548, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1548, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_12 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1548, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_13 = __Pyx_Py3MetaclassPrepare(__pyx_t_12, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_And, __pyx_mstate_global->__pyx_n_u_And, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1548, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  if (__pyx_t_4 != __pyx_t_5) {
    if (unlikely((PyDict_SetItemString(__pyx_t_13, "__orig_bases__", __pyx_t_5) < 0))) __PYX_ERR(0, 1548, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1550
 * class And(Boolean):
 * 
 *     def __new__(cls, *args):             # <<<<<<<<<<<<<<
 *         return logical_and(*args)
 * 
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_3And_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_And___new, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[98])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1550, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetNewInClass(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_new, __pyx_t_5) < (0)) __PYX_ERR(0, 1550, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1553
 *         return logical_and(*args)
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         s = self.args_as_sympy()
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_3And_3_sympy_, 0, __pyx_mstate_global->__pyx_n_u_And__sympy, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[99])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1553, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_sympy_2, __pyx_t_5) < (0)) __PYX_ERR(0, 1553, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1548
 * 
 * 
 * class And(Boolean):             # <<<<<<<<<<<<<<
 * 
 *     def __new__(cls, *args):
*/
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_And, __pyx_t_4, __pyx_t_13, NULL, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1548, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_And, __pyx_t_5) < (0)) __PYX_ERR(0, 1548, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1559
 * 
 * 
 * class Or(Boolean):             # <<<<<<<<<<<<<<
 * 
 *     def __new__(cls, *args):
*/
  __pyx_t_4 = PyTuple_Pack(1, ((PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Boolean)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1559, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_12 = __Pyx_PEP560_update_bases(__pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1559, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_13 = __Pyx_CalculateMetaclass(NULL, __pyx_t_12); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1559, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_13, __pyx_t_12, __pyx_mstate_global->__pyx_n_u_Or, __pyx_mstate_global->__pyx_n_u_Or, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1559, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__pyx_t_12 != __pyx_t_4) {
    if (unlikely((PyDict_SetItemString(__pyx_t_5, "__orig_bases__", __pyx_t_4) < 0))) __PYX_ERR(0, 1559, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1561
 * class Or(Boolean):
 * 
 *     def __new__(cls, *args):             # <<<<<<<<<<<<<<
 *         return logical_or(*args)
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_2Or_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_Or___new, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[100])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1561, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetNewInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_new, __pyx_t_4) < (0)) __PYX_ERR(0, 1561, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1564
 *         return logical_or(*args)
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         s = self.args_as_sympy()
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_2Or_3_sympy_, 0, __pyx_mstate_global->__pyx_n_u_Or__sympy, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[101])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1564, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_sympy_2, __pyx_t_4) < (0)) __PYX_ERR(0, 1564, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1559
 * 
 * 
 * class Or(Boolean):             # <<<<<<<<<<<<<<
 * 
 *     def __new__(cls, *args):
*/
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_Or, __pyx_t_12, __pyx_t_5, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1559, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Or, __pyx_t_4) < (0)) __PYX_ERR(0, 1559, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1570
 * 
 * 
 * class Not(Boolean):             # <<<<<<<<<<<<<<
 * 
 *     def __new__(cls, x):
*/
  __pyx_t_12 = PyTuple_Pack(1, ((PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Boolean)); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1570, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_13 = __Pyx_PEP560_update_bases(__pyx_t_12); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1570, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_13); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1570, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_t_13, __pyx_mstate_global->__pyx_n_u_Not, __pyx_mstate_global->__pyx_n_u_Not, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1570, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__pyx_t_13 != __pyx_t_12) {
    if (unlikely((PyDict_SetItemString(__pyx_t_4, "__orig_bases__", __pyx_t_12) < 0))) __PYX_ERR(0, 1570, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1572
 * class Not(Boolean):
 * 
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         return logical_not(x)
 * 
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_3Not_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_Not___new, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[102])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1572, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetNewInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_new, __pyx_t_12) < (0)) __PYX_ERR(0, 1572, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1575
 *         return logical_not(x)
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         s = self.args_as_sympy()[0]
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_3Not_3_sympy_, 0, __pyx_mstate_global->__pyx_n_u_Not__sympy, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[103])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1575, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_sympy_2, __pyx_t_12) < (0)) __PYX_ERR(0, 1575, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1570
 * 
 * 
 * class Not(Boolean):             # <<<<<<<<<<<<<<
 * 
 *     def __new__(cls, x):
*/
  __pyx_t_12 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_Not, __pyx_t_13, __pyx_t_4, NULL, 0, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1570, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Not, __pyx_t_12) < (0)) __PYX_ERR(0, 1570, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1581
 * 
 * 
 * class Xor(Boolean):             # <<<<<<<<<<<<<<
 * 
 *     def __new__(cls, *args):
*/
  __pyx_t_13 = PyTuple_Pack(1, ((PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Boolean)); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1581, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __pyx_t_5 = __Pyx_PEP560_update_bases(__pyx_t_13); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1581, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1581, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_12 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_5, __pyx_mstate_global->__pyx_n_u_Xor, __pyx_mstate_global->__pyx_n_u_Xor, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1581, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  if (__pyx_t_5 != __pyx_t_13) {
    if (unlikely((PyDict_SetItemString(__pyx_t_12, "__orig_bases__", __pyx_t_13) < 0))) __PYX_ERR(0, 1581, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1583
 * class Xor(Boolean):
 * 
 *     def __new__(cls, *args):             # <<<<<<<<<<<<<<
 *         return logical_xor(*args)
 * 
*/
  __pyx_t_13 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_3Xor_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_Xor___new, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[104])); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1583, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_13);
  #endif
  if (__Pyx_SetNewInClass(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_new, __pyx_t_13) < (0)) __PYX_ERR(0, 1583, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1586
 *         return logical_xor(*args)
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         s = self.args_as_sympy()
*/
  __pyx_t_13 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_3Xor_3_sympy_, 0, __pyx_mstate_global->__pyx_n_u_Xor__sympy, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[105])); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1586, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_13);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_sympy_2, __pyx_t_13) < (0)) __PYX_ERR(0, 1586, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1581
 * 
 * 
 * class Xor(Boolean):             # <<<<<<<<<<<<<<
 * 
 *     def __new__(cls, *args):
*/
  __pyx_t_13 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Xor, __pyx_t_5, __pyx_t_12, NULL, 0, 0); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1581, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_13);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Xor, __pyx_t_13) < (0)) __PYX_ERR(0, 1581, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1592
 * 
 * 
 * class Relational(Boolean):             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __pyx_t_5 = PyTuple_Pack(1, ((PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Boolean)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1592, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1592, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_12 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1592, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_13 = __Pyx_Py3MetaclassPrepare(__pyx_t_12, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_Relational, __pyx_mstate_global->__pyx_n_u_Relational, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1592, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  if (__pyx_t_4 != __pyx_t_5) {
    if (unlikely((PyDict_SetItemString(__pyx_t_13, "__orig_bases__", __pyx_t_5) < 0))) __PYX_ERR(0, 1592, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1594
 * class Relational(Boolean):
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_Relational(self):
 *         return True
*/
  __pyx_t_14 = NULL;
  __pyx_t_15 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_10Relational_1is_Relational, 0, __pyx_mstate_global->__pyx_n_u_Relational_is_Relational, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[106])); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1594, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_15);
  #endif
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_14, __pyx_t_15};
    __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1594, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
  }
  if (__Pyx_SetNameInClass(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_is_Relational, __pyx_t_5) < (0)) __PYX_ERR(0, 1594, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1598
 *         return True
 * 
 *     def __bool__(self):             # <<<<<<<<<<<<<<
 *         raise TypeError("cannot determine truth value of Relational")
 * 
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_10Relational_3__bool__, 0, __pyx_mstate_global->__pyx_n_u_Relational___bool, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[107])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1598, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_bool, __pyx_t_5) < (0)) __PYX_ERR(0, 1598, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1592
 * 
 * 
 * class Relational(Boolean):             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_Relational, __pyx_t_4, __pyx_t_13, NULL, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1592, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Relational, __pyx_t_5) < (0)) __PYX_ERR(0, 1592, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1602
 * 
 * 
 * Rel = Relational             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Relational); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1602, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Rel, __pyx_t_4) < (0)) __PYX_ERR(0, 1602, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1605
 * 
 * 
 * class Equality(Relational):             # <<<<<<<<<<<<<<
 * 
 *     def __new__(cls, *args):
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Relational); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1605, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_12 = PyTuple_Pack(1, __pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1605, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1605, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_13 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1605, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_13, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_Equality, __pyx_mstate_global->__pyx_n_u_Equality, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1605, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__pyx_t_4 != __pyx_t_12) {
    if (unlikely((PyDict_SetItemString(__pyx_t_5, "__orig_bases__", __pyx_t_12) < 0))) __PYX_ERR(0, 1605, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1607
 * class Equality(Relational):
 * 
 *     def __new__(cls, *args):             # <<<<<<<<<<<<<<
 *         return eq(*args)
 * 
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_8Equality_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_Equality___new, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[108])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1607, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetNewInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_new, __pyx_t_12) < (0)) __PYX_ERR(0, 1607, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1610
 *         return eq(*args)
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         s = self.args_as_sympy()
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_8Equality_3_sympy_, 0, __pyx_mstate_global->__pyx_n_u_Equality__sympy, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[109])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1610, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_sympy_2, __pyx_t_12) < (0)) __PYX_ERR(0, 1610, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1615
 *         return sympy.Equality(*s)
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         import sage.all as sage
 *         s = self.args_as_sage()
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_8Equality_5_sage_, 0, __pyx_mstate_global->__pyx_n_u_Equality__sage, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[110])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1615, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_sage, __pyx_t_12) < (0)) __PYX_ERR(0, 1615, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1620
 *         return sage.eq(*s)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_Equality(self):
 *         return True
*/
  __pyx_t_15 = NULL;
  __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_8Equality_7is_Equality, 0, __pyx_mstate_global->__pyx_n_u_Equality_is_Equality, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[111])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1620, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14);
  #endif
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_15, __pyx_t_14};
    __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1620, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
  }
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_is_Equality, __pyx_t_12) < (0)) __PYX_ERR(0, 1620, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1624
 *         return True
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def func(self):
 *         return self.__class__
*/
  __pyx_t_14 = NULL;
  __pyx_t_15 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_8Equality_9func, 0, __pyx_mstate_global->__pyx_n_u_Equality_func, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[112])); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1624, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_15);
  #endif
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_14, __pyx_t_15};
    __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1624, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
  }
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_func, __pyx_t_12) < (0)) __PYX_ERR(0, 1624, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1605
 * 
 * 
 * class Equality(Relational):             # <<<<<<<<<<<<<<
 * 
 *     def __new__(cls, *args):
*/
  __pyx_t_12 = __Pyx_Py3ClassCreate(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_Equality, __pyx_t_4, __pyx_t_5, NULL, 0, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1605, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Equality, __pyx_t_12) < (0)) __PYX_ERR(0, 1605, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1629
 * 
 * 
 * Eq = Equality             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Equality); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1629, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Eq, __pyx_t_4) < (0)) __PYX_ERR(0, 1629, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1632
 * 
 * 
 * class Unequality(Relational):             # <<<<<<<<<<<<<<
 * 
 *     def __new__(cls, *args):
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Relational); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1632, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_13 = PyTuple_Pack(1, __pyx_t_4); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1632, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1632, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1632, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_12 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_Unequality, __pyx_mstate_global->__pyx_n_u_Unequality, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1632, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  if (__pyx_t_4 != __pyx_t_13) {
    if (unlikely((PyDict_SetItemString(__pyx_t_12, "__orig_bases__", __pyx_t_13) < 0))) __PYX_ERR(0, 1632, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1634
 * class Unequality(Relational):
 * 
 *     def __new__(cls, *args):             # <<<<<<<<<<<<<<
 *         return ne(*args)
 * 
*/
  __pyx_t_13 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_10Unequality_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_Unequality___new, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[113])); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1634, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_13);
  #endif
  if (__Pyx_SetNewInClass(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_new, __pyx_t_13) < (0)) __PYX_ERR(0, 1634, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1637
 *         return ne(*args)
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         s = self.args_as_sympy()
*/
  __pyx_t_13 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_10Unequality_3_sympy_, 0, __pyx_mstate_global->__pyx_n_u_Unequality__sympy, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[114])); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1637, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_13);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_sympy_2, __pyx_t_13) < (0)) __PYX_ERR(0, 1637, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1642
 *         return sympy.Unequality(*s)
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         import sage.all as sage
 *         s = self.args_as_sage()
*/
  __pyx_t_13 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_10Unequality_5_sage_, 0, __pyx_mstate_global->__pyx_n_u_Unequality__sage, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[115])); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1642, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_13);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_sage, __pyx_t_13) < (0)) __PYX_ERR(0, 1642, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1647
 *         return sage.ne(*s)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def func(self):
 *         return self.__class__
*/
  __pyx_t_15 = NULL;
  __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_10Unequality_7func, 0, __pyx_mstate_global->__pyx_n_u_Unequality_func, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[116])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1647, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14);
  #endif
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_15, __pyx_t_14};
    __pyx_t_13 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1647, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
  }
  if (__Pyx_SetNameInClass(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_func, __pyx_t_13) < (0)) __PYX_ERR(0, 1647, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1632
 * 
 * 
 * class Unequality(Relational):             # <<<<<<<<<<<<<<
 * 
 *     def __new__(cls, *args):
*/
  __pyx_t_13 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_Unequality, __pyx_t_4, __pyx_t_12, NULL, 0, 0); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1632, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_13);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Unequality, __pyx_t_13) < (0)) __PYX_ERR(0, 1632, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1652
 * 
 * 
 * Ne = Unequality             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Unequality); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1652, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Ne, __pyx_t_4) < (0)) __PYX_ERR(0, 1652, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1655
 * 
 * 
 * class LessThan(Relational):             # <<<<<<<<<<<<<<
 * 
 *     def __new__(cls, *args):
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Relational); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1655, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyTuple_Pack(1, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1655, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1655, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_12 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1655, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_13 = __Pyx_Py3MetaclassPrepare(__pyx_t_12, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_LessThan, __pyx_mstate_global->__pyx_n_u_LessThan, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1655, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  if (__pyx_t_4 != __pyx_t_5) {
    if (unlikely((PyDict_SetItemString(__pyx_t_13, "__orig_bases__", __pyx_t_5) < 0))) __PYX_ERR(0, 1655, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1657
 * class LessThan(Relational):
 * 
 *     def __new__(cls, *args):             # <<<<<<<<<<<<<<
 *         return le(*args)
 * 
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_8LessThan_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_LessThan___new, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[117])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1657, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetNewInClass(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_new, __pyx_t_5) < (0)) __PYX_ERR(0, 1657, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1660
 *         return le(*args)
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         s = self.args_as_sympy()
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_8LessThan_3_sympy_, 0, __pyx_mstate_global->__pyx_n_u_LessThan__sympy, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[118])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1660, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_sympy_2, __pyx_t_5) < (0)) __PYX_ERR(0, 1660, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1665
 *         return sympy.LessThan(*s)
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         import sage.all as sage
 *         s = self.args_as_sage()
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_8LessThan_5_sage_, 0, __pyx_mstate_global->__pyx_n_u_LessThan__sage, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[119])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1665, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_sage, __pyx_t_5) < (0)) __PYX_ERR(0, 1665, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1655
 * 
 * 
 * class LessThan(Relational):             # <<<<<<<<<<<<<<
 * 
 *     def __new__(cls, *args):
*/
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_LessThan, __pyx_t_4, __pyx_t_13, NULL, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1655, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_LessThan, __pyx_t_5) < (0)) __PYX_ERR(0, 1655, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1671
 * 
 * 
 * Le = LessThan             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_LessThan); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1671, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Le, __pyx_t_4) < (0)) __PYX_ERR(0, 1671, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1674
 * 
 * 
 * class StrictLessThan(Relational):             # <<<<<<<<<<<<<<
 * 
 *     def __new__(cls, *args):
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Relational); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1674, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_12 = PyTuple_Pack(1, __pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1674, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1674, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_13 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1674, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_13, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_StrictLessThan, __pyx_mstate_global->__pyx_n_u_StrictLessThan, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1674, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__pyx_t_4 != __pyx_t_12) {
    if (unlikely((PyDict_SetItemString(__pyx_t_5, "__orig_bases__", __pyx_t_12) < 0))) __PYX_ERR(0, 1674, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1676
 * class StrictLessThan(Relational):
 * 
 *     def __new__(cls, *args):             # <<<<<<<<<<<<<<
 *         return lt(*args)
 * 
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_14StrictLessThan_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_StrictLessThan___new, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[120])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1676, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetNewInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_new, __pyx_t_12) < (0)) __PYX_ERR(0, 1676, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1679
 *         return lt(*args)
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         s = self.args_as_sympy()
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_14StrictLessThan_3_sympy_, 0, __pyx_mstate_global->__pyx_n_u_StrictLessThan__sympy, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[121])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1679, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_sympy_2, __pyx_t_12) < (0)) __PYX_ERR(0, 1679, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1684
 *         return sympy.StrictLessThan(*s)
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         import sage.all as sage
 *         s = self.args_as_sage()
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_14StrictLessThan_5_sage_, 0, __pyx_mstate_global->__pyx_n_u_StrictLessThan__sage, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[122])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1684, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_sage, __pyx_t_12) < (0)) __PYX_ERR(0, 1684, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1674
 * 
 * 
 * class StrictLessThan(Relational):             # <<<<<<<<<<<<<<
 * 
 *     def __new__(cls, *args):
*/
  __pyx_t_12 = __Pyx_Py3ClassCreate(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_StrictLessThan, __pyx_t_4, __pyx_t_5, NULL, 0, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1674, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_StrictLessThan, __pyx_t_12) < (0)) __PYX_ERR(0, 1674, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1690
 * 
 * 
 * Lt = StrictLessThan             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_StrictLessThan); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1690, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Lt, __pyx_t_4) < (0)) __PYX_ERR(0, 1690, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1743
 * 
 * 
 * class Rational(Number):             # <<<<<<<<<<<<<<
 * 
 *     def __new__(cls, p, q):
*/
  __pyx_t_4 = PyTuple_Pack(1, ((PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Number)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1743, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_13 = __Pyx_PEP560_update_bases(__pyx_t_4); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1743, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_13); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1743, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_12 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_t_13, __pyx_mstate_global->__pyx_n_u_Rational, __pyx_mstate_global->__pyx_n_u_Rational, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1743, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  if (__pyx_t_13 != __pyx_t_4) {
    if (unlikely((PyDict_SetItemString(__pyx_t_12, "__orig_bases__", __pyx_t_4) < 0))) __PYX_ERR(0, 1743, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1745
 * class Rational(Number):
 * 
 *     def __new__(cls, p, q):             # <<<<<<<<<<<<<<
 *         p = int(p)
 *         q = int(q)
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_8Rational_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_Rational___new, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[123])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1745, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetNewInClass(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_new, __pyx_t_4) < (0)) __PYX_ERR(0, 1745, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1766
 *             return c2py(<rcp_const_basic>symengine.Integer(p__).divint(symengine.Integer(q__)))
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_Rational(self):
 *         return True
*/
  __pyx_t_14 = NULL;
  __pyx_t_15 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_8Rational_3is_Rational, 0, __pyx_mstate_global->__pyx_n_u_Rational_is_Rational, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[124])); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1766, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_15);
  #endif
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_14, __pyx_t_15};
    __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1766, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  if (__Pyx_SetNameInClass(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_is_Rational, __pyx_t_4) < (0)) __PYX_ERR(0, 1766, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1770
 *         return True
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_rational(self):
 *         return True
*/
  __pyx_t_15 = NULL;
  __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_8Rational_5is_rational, 0, __pyx_mstate_global->__pyx_n_u_Rational_is_rational, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[125])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1770, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14);
  #endif
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_15, __pyx_t_14};
    __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1770, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  if (__Pyx_SetNameInClass(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_is_rational, __pyx_t_4) < (0)) __PYX_ERR(0, 1770, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1774
 *         return True
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_real(self):
 *         return True
*/
  __pyx_t_14 = NULL;
  __pyx_t_15 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_8Rational_7is_real, 0, __pyx_mstate_global->__pyx_n_u_Rational_is_real, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[126])); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1774, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_15);
  #endif
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_14, __pyx_t_15};
    __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1774, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  if (__Pyx_SetNameInClass(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_is_real, __pyx_t_4) < (0)) __PYX_ERR(0, 1774, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1778
 *         return True
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_finite(self):
 *         return True
*/
  __pyx_t_15 = NULL;
  __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_8Rational_9is_finite, 0, __pyx_mstate_global->__pyx_n_u_Rational_is_finite, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[127])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1778, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14);
  #endif
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_15, __pyx_t_14};
    __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1778, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  if (__Pyx_SetNameInClass(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_is_finite, __pyx_t_4) < (0)) __PYX_ERR(0, 1778, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1782
 *         return True
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_integer(self):
 *         return False
*/
  __pyx_t_14 = NULL;
  __pyx_t_15 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_8Rational_11is_integer, 0, __pyx_mstate_global->__pyx_n_u_Rational_is_integer, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[128])); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1782, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_15);
  #endif
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_14, __pyx_t_15};
    __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1782, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  if (__Pyx_SetNameInClass(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_is_integer, __pyx_t_4) < (0)) __PYX_ERR(0, 1782, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1786
 *         return False
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def p(self):
 *         return self.get_num_den()[0]
*/
  __pyx_t_15 = NULL;
  __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_8Rational_13p, 0, __pyx_mstate_global->__pyx_n_u_Rational_p, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[129])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1786, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14);
  #endif
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_15, __pyx_t_14};
    __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1786, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  if (__Pyx_SetNameInClass(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_p, __pyx_t_4) < (0)) __PYX_ERR(0, 1786, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1790
 *         return self.get_num_den()[0]
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def q(self):
 *         return self.get_num_den()[1]
*/
  __pyx_t_14 = NULL;
  __pyx_t_15 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_8Rational_15q, 0, __pyx_mstate_global->__pyx_n_u_Rational_q, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[130])); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1790, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_15);
  #endif
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_14, __pyx_t_15};
    __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1790, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  if (__Pyx_SetNameInClass(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_q, __pyx_t_4) < (0)) __PYX_ERR(0, 1790, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1794
 *         return self.get_num_den()[1]
 * 
 *     def get_num_den(Basic self):             # <<<<<<<<<<<<<<
 *         cdef RCP[const symengine.Integer] _num, _den
 *         symengine.get_num_den(deref(symengine.rcp_static_cast_Rational(self.thisptr)),
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_8Rational_17get_num_den, 0, __pyx_mstate_global->__pyx_n_u_Rational_get_num_den, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[131])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1794, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_get_num_den, __pyx_t_4) < (0)) __PYX_ERR(0, 1794, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1800
 *         return [c2py(<rcp_const_basic>_num), c2py(<rcp_const_basic>_den)]
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         rat = self.get_num_den()
 *         return rat[0]._sympy_() / rat[1]._sympy_()
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_8Rational_19_sympy_, 0, __pyx_mstate_global->__pyx_n_u_Rational__sympy, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[132])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1800, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_sympy_2, __pyx_t_4) < (0)) __PYX_ERR(0, 1800, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1804
 *         return rat[0]._sympy_() / rat[1]._sympy_()
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         try:
 *             from sage.symbolic.symengine_conversions import convert_to_rational
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_8Rational_21_sage_, 0, __pyx_mstate_global->__pyx_n_u_Rational__sage, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[133])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1804, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_sage, __pyx_t_4) < (0)) __PYX_ERR(0, 1804, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1812
 *             return rat[0]._sage_() / rat[1]._sage_()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def func(self):
 *         return self.__class__
*/
  __pyx_t_15 = NULL;
  __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_8Rational_23func, 0, __pyx_mstate_global->__pyx_n_u_Rational_func, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[134])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1812, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14);
  #endif
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_15, __pyx_t_14};
    __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1812, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  if (__Pyx_SetNameInClass(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_func, __pyx_t_4) < (0)) __PYX_ERR(0, 1812, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1743
 * 
 * 
 * class Rational(Number):             # <<<<<<<<<<<<<<
 * 
 *     def __new__(cls, p, q):
*/
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_Rational, __pyx_t_13, __pyx_t_12, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1743, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Rational, __pyx_t_4) < (0)) __PYX_ERR(0, 1743, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1817
 * 
 * 
 * class Integer(Rational):             # <<<<<<<<<<<<<<
 * 
 *     def __new__(cls, i):
*/
  __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_Rational); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1817, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __pyx_t_5 = PyTuple_Pack(1, __pyx_t_13); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1817, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  __pyx_t_13 = __Pyx_PEP560_update_bases(__pyx_t_5); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1817, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __pyx_t_12 = __Pyx_CalculateMetaclass(NULL, __pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1817, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_12, __pyx_t_13, __pyx_mstate_global->__pyx_n_u_Integer, __pyx_mstate_global->__pyx_n_u_Integer, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1817, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__pyx_t_13 != __pyx_t_5) {
    if (unlikely((PyDict_SetItemString(__pyx_t_4, "__orig_bases__", __pyx_t_5) < 0))) __PYX_ERR(0, 1817, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1819
 * class Integer(Rational):
 * 
 *     def __new__(cls, i):             # <<<<<<<<<<<<<<
 *         i = int(i)
 *         cdef int i_
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_7Integer_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_Integer___new, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[135])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1819, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetNewInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_new, __pyx_t_5) < (0)) __PYX_ERR(0, 1819, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1839
 *             return c2py(<rcp_const_basic>symengine.integer(i__))
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_Integer(self):
 *         return True
*/
  __pyx_t_14 = NULL;
  __pyx_t_15 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_7Integer_3is_Integer, 0, __pyx_mstate_global->__pyx_n_u_Integer_is_Integer, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[136])); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1839, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_15);
  #endif
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_14, __pyx_t_15};
    __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1839, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
  }
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_is_Integer, __pyx_t_5) < (0)) __PYX_ERR(0, 1839, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1843
 *         return True
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_integer(self):
 *         return True
*/
  __pyx_t_15 = NULL;
  __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_7Integer_5is_integer, 0, __pyx_mstate_global->__pyx_n_u_Integer_is_integer, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[137])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1843, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14);
  #endif
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_15, __pyx_t_14};
    __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1843, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
  }
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_is_integer, __pyx_t_5) < (0)) __PYX_ERR(0, 1843, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1847
 *         return True
 * 
 *     def doit(self, **hints):             # <<<<<<<<<<<<<<
 *         return self
 * 
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_7Integer_7doit, 0, __pyx_mstate_global->__pyx_n_u_Integer_doit, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[138])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1847, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_doit, __pyx_t_5) < (0)) __PYX_ERR(0, 1847, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1850
 *         return self
 * 
 *     def __hash__(Basic self):             # <<<<<<<<<<<<<<
 *         return deref(self.thisptr).hash()
 * 
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_7Integer_9__hash__, 0, __pyx_mstate_global->__pyx_n_u_Integer___hash, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[139])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1850, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_hash, __pyx_t_5) < (0)) __PYX_ERR(0, 1850, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1853
 *         return deref(self.thisptr).hash()
 * 
 *     def __richcmp__(a, b, int op):             # <<<<<<<<<<<<<<
 *         A = _sympify(a, False)
 *         B = _sympify(b, False)
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_7Integer_11__richcmp__, 0, __pyx_mstate_global->__pyx_n_u_Integer___richcmp, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[140])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1853, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_richcmp_2, __pyx_t_5) < (0)) __PYX_ERR(0, 1853, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1864
 *         return Integer._richcmp_(A, B, op)
 * 
 *     def _richcmp_(Basic A, Basic B, int op):             # <<<<<<<<<<<<<<
 *         cdef int i = deref(symengine.rcp_static_cast_Integer(A.thisptr)).compare(deref(symengine.rcp_static_cast_Integer(B.thisptr)))
 *         if (op == 0):
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_7Integer_13_richcmp_, 0, __pyx_mstate_global->__pyx_n_u_Integer__richcmp, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[141])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1864, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_richcmp, __pyx_t_5) < (0)) __PYX_ERR(0, 1864, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1881
 *             return NotImplemented
 * 
 *     def _sympy_(Basic self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.Integer(int(self))
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_7Integer_15_sympy_, 0, __pyx_mstate_global->__pyx_n_u_Integer__sympy, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[142])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1881, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_sympy_2, __pyx_t_5) < (0)) __PYX_ERR(0, 1881, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1885
 *         return sympy.Integer(int(self))
 * 
 *     def _sage_(Basic self):             # <<<<<<<<<<<<<<
 *         try:
 *             from sage.symbolic.symengine_conversions import convert_to_integer
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_7Integer_17_sage_, 0, __pyx_mstate_global->__pyx_n_u_Integer__sage, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[143])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1885, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_sage, __pyx_t_5) < (0)) __PYX_ERR(0, 1885, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1893
 *             return sage.Integer(str(self))
 * 
 *     def __int__(Basic self):             # <<<<<<<<<<<<<<
 *         cdef string s = symengine.mp_get_hex_str(
 *             deref(symengine.rcp_static_cast_Integer(self.thisptr)).as_integer_class())
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_7Integer_19__int__, 0, __pyx_mstate_global->__pyx_n_u_Integer___int, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[144])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1893, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_int, __pyx_t_5) < (0)) __PYX_ERR(0, 1893, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1898
 *         return int(s.decode("utf-8"), base=16)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def p(self):
 *         return int(self)
*/
  __pyx_t_14 = NULL;
  __pyx_t_15 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_7Integer_21p, 0, __pyx_mstate_global->__pyx_n_u_Integer_p, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[145])); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1898, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_15);
  #endif
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_14, __pyx_t_15};
    __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1898, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
  }
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_p, __pyx_t_5) < (0)) __PYX_ERR(0, 1898, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1902
 *         return int(self)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def q(self):
 *         return 1
*/
  __pyx_t_15 = NULL;
  __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_7Integer_23q, 0, __pyx_mstate_global->__pyx_n_u_Integer_q, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[146])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1902, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14);
  #endif
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_15, __pyx_t_14};
    __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1902, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
  }
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_q, __pyx_t_5) < (0)) __PYX_ERR(0, 1902, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1906
 *         return 1
 * 
 *     def get_num_den(Basic self):             # <<<<<<<<<<<<<<
 *         return self, 1
 * 
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_7Integer_25get_num_den, 0, __pyx_mstate_global->__pyx_n_u_Integer_get_num_den, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[147])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1906, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_get_num_den, __pyx_t_5) < (0)) __PYX_ERR(0, 1906, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1909
 *         return self, 1
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def func(self):
 *         return self.__class__
*/
  __pyx_t_14 = NULL;
  __pyx_t_15 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_7Integer_27func, 0, __pyx_mstate_global->__pyx_n_u_Integer_func, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[148])); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1909, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_15);
  #endif
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_14, __pyx_t_15};
    __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1909, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
  }
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_func, __pyx_t_5) < (0)) __PYX_ERR(0, 1909, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1817
 * 
 * 
 * class Integer(Rational):             # <<<<<<<<<<<<<<
 * 
 *     def __new__(cls, i):
*/
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_Integer, __pyx_t_13, __pyx_t_4, NULL, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1817, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Integer, __pyx_t_5) < (0)) __PYX_ERR(0, 1817, __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_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1914
 * 
 * 
 * def dps_to_prec(n):             # <<<<<<<<<<<<<<
 *     """Return the number of bits required to represent n decimals accurately."""
 *     return max(1, int(round((int(n)+1)*3.3219280948873626)))
*/
  __pyx_t_13 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_21dps_to_prec, 0, __pyx_mstate_global->__pyx_n_u_dps_to_prec, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[149])); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1914, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_13);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_dps_to_prec, __pyx_t_13) < (0)) __PYX_ERR(0, 1914, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1919
 * 
 * 
 * class BasicMeta(type):             # <<<<<<<<<<<<<<
 *     def __instancecheck__(self, instance):
 *         return isinstance(instance, self._classes)
*/
  __pyx_t_13 = PyTuple_Pack(1, ((PyObject *)(&PyType_Type))); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1919, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __pyx_t_12 = __Pyx_PEP560_update_bases(__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1919, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1919, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_12, __pyx_mstate_global->__pyx_n_u_BasicMeta, __pyx_mstate_global->__pyx_n_u_BasicMeta, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1919, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__pyx_t_12 != __pyx_t_13) {
    if (unlikely((PyDict_SetItemString(__pyx_t_5, "__orig_bases__", __pyx_t_13) < 0))) __PYX_ERR(0, 1919, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1920
 * 
 * class BasicMeta(type):
 *     def __instancecheck__(self, instance):             # <<<<<<<<<<<<<<
 *         return isinstance(instance, self._classes)
 * 
*/
  __pyx_t_13 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_9BasicMeta_1__instancecheck__, 0, __pyx_mstate_global->__pyx_n_u_BasicMeta___instancecheck, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[150])); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1920, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_13);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_instancecheck, __pyx_t_13) < (0)) __PYX_ERR(0, 1920, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1919
 * 
 * 
 * class BasicMeta(type):             # <<<<<<<<<<<<<<
 *     def __instancecheck__(self, instance):
 *         return isinstance(instance, self._classes)
*/
  __pyx_t_13 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_BasicMeta, __pyx_t_12, __pyx_t_5, NULL, 0, 0); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1919, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_13);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_BasicMeta, __pyx_t_13) < (0)) __PYX_ERR(0, 1919, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1923
 *         return isinstance(instance, self._classes)
 * 
 * class Float(Number):             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __pyx_t_12 = PyTuple_Pack(1, ((PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Number)); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1923, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1923, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1923, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_13 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_Float, __pyx_mstate_global->__pyx_n_u_Float, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1923, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  if (__pyx_t_4 != __pyx_t_12) {
    if (unlikely((PyDict_SetItemString(__pyx_t_13, "__orig_bases__", __pyx_t_12) < 0))) __PYX_ERR(0, 1923, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1925
 * class Float(Number):
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_rational(self):
 *         return None
*/
  __pyx_t_15 = NULL;
  __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_5Float_1is_rational, 0, __pyx_mstate_global->__pyx_n_u_Float_is_rational, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[151])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1925, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14);
  #endif
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_15, __pyx_t_14};
    __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1925, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
  }
  if (__Pyx_SetNameInClass(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_is_rational, __pyx_t_12) < (0)) __PYX_ERR(0, 1925, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1929
 *         return None
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_irrational(self):
 *         return None
*/
  __pyx_t_14 = NULL;
  __pyx_t_15 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_5Float_3is_irrational, 0, __pyx_mstate_global->__pyx_n_u_Float_is_irrational, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[152])); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1929, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_15);
  #endif
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_14, __pyx_t_15};
    __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1929, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
  }
  if (__Pyx_SetNameInClass(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_is_irrational, __pyx_t_12) < (0)) __PYX_ERR(0, 1929, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1933
 *         return None
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_real(self):
 *         return True
*/
  __pyx_t_15 = NULL;
  __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_5Float_5is_real, 0, __pyx_mstate_global->__pyx_n_u_Float_is_real, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[153])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1933, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14);
  #endif
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_15, __pyx_t_14};
    __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1933, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
  }
  if (__Pyx_SetNameInClass(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_is_real, __pyx_t_12) < (0)) __PYX_ERR(0, 1933, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1937
 *         return True
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_Float(self):
 *         return True
*/
  __pyx_t_14 = NULL;
  __pyx_t_15 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_5Float_7is_Float, 0, __pyx_mstate_global->__pyx_n_u_Float_is_Float, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[154])); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1937, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_15);
  #endif
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_14, __pyx_t_15};
    __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1937, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
  }
  if (__Pyx_SetNameInClass(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_is_Float, __pyx_t_12) < (0)) __PYX_ERR(0, 1937, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1941
 *         return True
 * 
 *     def __new__(cls, num, dps=None, precision=None):             # <<<<<<<<<<<<<<
 *         if cls is not Float:
 *             return super(Float, cls).__new__(cls)
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_5Float_9__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_Float___new, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[155])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1941, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_12, __pyx_mstate_global->__pyx_tuple[10]);
  if (__Pyx_SetNewInClass(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_new, __pyx_t_12) < (0)) __PYX_ERR(0, 1941, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1923
 *         return isinstance(instance, self._classes)
 * 
 * class Float(Number):             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __pyx_t_12 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_Float, __pyx_t_4, __pyx_t_13, NULL, 0, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1923, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Float, __pyx_t_12) < (0)) __PYX_ERR(0, 1923, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1965
 * 
 * 
 * RealNumber = Float             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Float); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1965, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_RealNumber, __pyx_t_4) < (0)) __PYX_ERR(0, 1965, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1968
 * 
 * 
 * class RealDouble(Float):             # <<<<<<<<<<<<<<
 * 
 *     def __new__(cls, i):
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Float); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1968, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyTuple_Pack(1, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1968, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1968, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_13 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1968, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __pyx_t_12 = __Pyx_Py3MetaclassPrepare(__pyx_t_13, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_RealDouble, __pyx_mstate_global->__pyx_n_u_RealDouble, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1968, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  if (__pyx_t_4 != __pyx_t_5) {
    if (unlikely((PyDict_SetItemString(__pyx_t_12, "__orig_bases__", __pyx_t_5) < 0))) __PYX_ERR(0, 1968, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1970
 * class RealDouble(Float):
 * 
 *     def __new__(cls, i):             # <<<<<<<<<<<<<<
 *         cdef double i_ = i
 *         return c2py(symengine.make_rcp_RealDouble(i_))
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_10RealDouble_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_RealDouble___new, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[156])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1970, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetNewInClass(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_new, __pyx_t_5) < (0)) __PYX_ERR(0, 1970, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1974
 *         return c2py(symengine.make_rcp_RealDouble(i_))
 * 
 *     def _sympy_(Basic self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.Float(float(self))
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_10RealDouble_3_sympy_, 0, __pyx_mstate_global->__pyx_n_u_RealDouble__sympy, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[157])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1974, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_sympy_2, __pyx_t_5) < (0)) __PYX_ERR(0, 1974, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1978
 *         return sympy.Float(float(self))
 * 
 *     def _sage_(Basic self):             # <<<<<<<<<<<<<<
 *         import sage.all as sage
 *         return sage.RealDoubleField()(float(self))
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_10RealDouble_5_sage_, 0, __pyx_mstate_global->__pyx_n_u_RealDouble__sage, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[158])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1978, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_sage, __pyx_t_5) < (0)) __PYX_ERR(0, 1978, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1982
 *         return sage.RealDoubleField()(float(self))
 * 
 *     def __float__(Basic self):             # <<<<<<<<<<<<<<
 *         return deref(symengine.rcp_static_cast_RealDouble(self.thisptr)).as_double()
 * 
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_10RealDouble_7__float__, 0, __pyx_mstate_global->__pyx_n_u_RealDouble___float, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[159])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1982, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_float, __pyx_t_5) < (0)) __PYX_ERR(0, 1982, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1985
 *         return deref(symengine.rcp_static_cast_RealDouble(self.thisptr)).as_double()
 * 
 *     def __complex__(self):             # <<<<<<<<<<<<<<
 *         return complex(float(self))
 * 
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_10RealDouble_9__complex__, 0, __pyx_mstate_global->__pyx_n_u_RealDouble___complex, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[160])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1985, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_complex, __pyx_t_5) < (0)) __PYX_ERR(0, 1985, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1968
 * 
 * 
 * class RealDouble(Float):             # <<<<<<<<<<<<<<
 * 
 *     def __new__(cls, i):
*/
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_RealDouble, __pyx_t_4, __pyx_t_12, NULL, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1968, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_RealDouble, __pyx_t_5) < (0)) __PYX_ERR(0, 1968, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1991
 * cdef class ComplexBase(Number):
 * 
 *     def real_part(Basic self):             # <<<<<<<<<<<<<<
 *         return c2py(<rcp_const_basic>deref(symengine.rcp_static_cast_ComplexBase(self.thisptr)).real_part())
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_11ComplexBase_1real_part, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ComplexBase_real_part, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[161])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1991, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ComplexBase, __pyx_mstate_global->__pyx_n_u_real_part, __pyx_t_4) < (0)) __PYX_ERR(0, 1991, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1994
 *         return c2py(<rcp_const_basic>deref(symengine.rcp_static_cast_ComplexBase(self.thisptr)).real_part())
 * 
 *     def imaginary_part(Basic self):             # <<<<<<<<<<<<<<
 *         return c2py(<rcp_const_basic>deref(symengine.rcp_static_cast_ComplexBase(self.thisptr)).imaginary_part())
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_11ComplexBase_3imaginary_part, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ComplexBase_imaginary_part, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[162])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1994, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ComplexBase, __pyx_mstate_global->__pyx_n_u_imaginary_part, __pyx_t_4) < (0)) __PYX_ERR(0, 1994, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2014
 *         self.thisptr = symengine.make_rcp_ComplexDouble(i_)
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return self.real_part()._sympy_() + sympy.I * self.imaginary_part()._sympy_()
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_13ComplexDouble_3_sympy_, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ComplexDouble__sympy, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[163])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2014, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ComplexDouble, __pyx_mstate_global->__pyx_n_u_sympy_2, __pyx_t_4) < (0)) __PYX_ERR(0, 2014, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2018
 *         return self.real_part()._sympy_() + sympy.I * self.imaginary_part()._sympy_()
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         import sage.all as sage
 *         return self.real_part()._sage_() + sage.I * self.imaginary_part()._sage_()
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_13ComplexDouble_5_sage_, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ComplexDouble__sage, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[164])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2018, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ComplexDouble, __pyx_mstate_global->__pyx_n_u_sage, __pyx_t_4) < (0)) __PYX_ERR(0, 2018, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2022
 *         return self.real_part()._sage_() + sage.I * self.imaginary_part()._sage_()
 * 
 *     def __complex__(Basic self):             # <<<<<<<<<<<<<<
 *         return deref(symengine.rcp_static_cast_ComplexDouble(self.thisptr)).as_complex_double()
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_13ComplexDouble_7__complex__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ComplexDouble___complex, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[165])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2022, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ComplexDouble, __pyx_mstate_global->__pyx_n_u_complex, __pyx_t_4) < (0)) __PYX_ERR(0, 2022, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2026
 * 
 * 
 * class RealMPFR(Float):             # <<<<<<<<<<<<<<
 * 
 *     def __new__(cls, i = None, long prec = 53, unsigned base = 10):
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Float); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2026, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_13 = PyTuple_Pack(1, __pyx_t_4); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2026, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2026, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_12 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2026, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_12, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_RealMPFR, __pyx_mstate_global->__pyx_n_u_RealMPFR, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2026, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__pyx_t_4 != __pyx_t_13) {
    if (unlikely((PyDict_SetItemString(__pyx_t_5, "__orig_bases__", __pyx_t_13) < 0))) __PYX_ERR(0, 2026, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2028
 * class RealMPFR(Float):
 * 
 *     def __new__(cls, i = None, long prec = 53, unsigned base = 10):             # <<<<<<<<<<<<<<
 *         if i is None:
 *             return
*/
  __pyx_t_13 = __Pyx_PyLong_From_long(((long)53)); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2028, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __pyx_t_15 = __Pyx_PyLong_From_unsigned_int(((unsigned int)10)); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2028, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  __pyx_t_14 = PyTuple_Pack(3, Py_None, __pyx_t_13, __pyx_t_15); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2028, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  __pyx_t_15 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_8RealMPFR_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_RealMPFR___new, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[166])); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2028, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_15);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_15, __pyx_t_14);
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  if (__Pyx_SetNewInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_new, __pyx_t_15) < (0)) __PYX_ERR(0, 2028, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2036
 *         return c2py(<rcp_const_basic>symengine.real_mpfr(move[symengine.mpfr_class](m)))
 * 
 *     def get_prec(Basic self):             # <<<<<<<<<<<<<<
 *         return Integer(deref(symengine.rcp_static_cast_RealMPFR(self.thisptr)).get_prec())
 * 
*/
  __pyx_t_15 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_8RealMPFR_3get_prec, 0, __pyx_mstate_global->__pyx_n_u_RealMPFR_get_prec, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[167])); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2036, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_15);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_get_prec, __pyx_t_15) < (0)) __PYX_ERR(0, 2036, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2039
 *         return Integer(deref(symengine.rcp_static_cast_RealMPFR(self.thisptr)).get_prec())
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         cdef long prec_ = self.get_prec()
*/
  __pyx_t_15 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_8RealMPFR_5_sympy_, 0, __pyx_mstate_global->__pyx_n_u_RealMPFR__sympy, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[168])); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2039, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_15);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_sympy_2, __pyx_t_15) < (0)) __PYX_ERR(0, 2039, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2045
 *         return sympy.Float(str(self), prec)
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         try:
 *             from sage.symbolic.symengine_conversions import convert_to_real_number
*/
  __pyx_t_15 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_8RealMPFR_7_sage_, 0, __pyx_mstate_global->__pyx_n_u_RealMPFR__sage, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[169])); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2045, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_15);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_sage, __pyx_t_15) < (0)) __PYX_ERR(0, 2045, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2026
 * 
 * 
 * class RealMPFR(Float):             # <<<<<<<<<<<<<<
 * 
 *     def __new__(cls, i = None, long prec = 53, unsigned base = 10):
*/
  __pyx_t_15 = __Pyx_Py3ClassCreate(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_RealMPFR, __pyx_t_4, __pyx_t_5, NULL, 0, 0); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2026, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_15);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_RealMPFR, __pyx_t_15) < (0)) __PYX_ERR(0, 2026, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2062
 *         self.thisptr = <rcp_const_basic>symengine.complex_mpc(move[symengine.mpc_class](m))
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return self.real_part()._sympy_() + sympy.I * self.imaginary_part()._sympy_()
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_10ComplexMPC_3_sympy_, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ComplexMPC__sympy, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[170])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2062, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ComplexMPC, __pyx_mstate_global->__pyx_n_u_sympy_2, __pyx_t_4) < (0)) __PYX_ERR(0, 2062, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2066
 *         return self.real_part()._sympy_() + sympy.I * self.imaginary_part()._sympy_()
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         try:
 *             from sage.symbolic.symengine_conversions import convert_to_mpcomplex_number
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_10ComplexMPC_5_sage_, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ComplexMPC__sage, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[171])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2066, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ComplexMPC, __pyx_mstate_global->__pyx_n_u_sage, __pyx_t_4) < (0)) __PYX_ERR(0, 2066, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2077
 * cdef class Complex(ComplexBase):
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return self.real_part()._sympy_() + sympy.I * self.imaginary_part()._sympy_()
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_7Complex_1_sympy_, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Complex__sympy, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[172])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2077, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Complex, __pyx_mstate_global->__pyx_n_u_sympy_2, __pyx_t_4) < (0)) __PYX_ERR(0, 2077, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2081
 *         return self.real_part()._sympy_() + sympy.I * self.imaginary_part()._sympy_()
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         import sage.all as sage
 *         return self.real_part()._sage_() + sage.I * self.imaginary_part()._sage_()
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_7Complex_3_sage_, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Complex__sage, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[173])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2081, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Complex, __pyx_mstate_global->__pyx_n_u_sage, __pyx_t_4) < (0)) __PYX_ERR(0, 2081, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2095
 *         self.thisptr = symengine.Inf
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.oo
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_8Infinity_3_sympy_, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Infinity__sympy, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[174])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2095, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Infinity, __pyx_mstate_global->__pyx_n_u_sympy_2, __pyx_t_4) < (0)) __PYX_ERR(0, 2095, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2099
 *         return sympy.oo
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         import sage.all as sage
 *         return sage.oo
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_8Infinity_5_sage_, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Infinity__sage, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[175])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2099, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Infinity, __pyx_mstate_global->__pyx_n_u_sage, __pyx_t_4) < (0)) __PYX_ERR(0, 2099, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2103
 *         return sage.oo
 * 
 * oo = Infinity()             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_t_12 = NULL;
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_12, NULL};
    __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Infinity, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2103, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_4);
  }
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_oo, ((PyObject *)__pyx_t_4)) < (0)) __PYX_ERR(0, 2103, __pyx_L1_error)
  __Pyx_DECREF((PyObject *)__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2115
 *         self.thisptr = symengine.neg(symengine.Inf)
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return -sympy.oo
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_16NegativeInfinity_3_sympy_, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_NegativeInfinity__sympy, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[176])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2115, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_NegativeInfinity, __pyx_mstate_global->__pyx_n_u_sympy_2, __pyx_t_4) < (0)) __PYX_ERR(0, 2115, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2119
 *         return -sympy.oo
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         import sage.all as sage
 *         return -sage.oo
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_16NegativeInfinity_5_sage_, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_NegativeInfinity__sage, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[177])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2119, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_NegativeInfinity, __pyx_mstate_global->__pyx_n_u_sage, __pyx_t_4) < (0)) __PYX_ERR(0, 2119, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2123
 *         return -sage.oo
 * 
 *     def as_powers_dict(self):             # <<<<<<<<<<<<<<
 *         d = collections.defaultdict(int)
 *         d[minus_one] = 1
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_16NegativeInfinity_7as_powers_dict, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_NegativeInfinity_as_powers_dict, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[178])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2123, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_NegativeInfinity, __pyx_mstate_global->__pyx_n_u_as_powers_dict, __pyx_t_4) < (0)) __PYX_ERR(0, 2123, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2130
 * 
 * 
 * minus_oo = NegativeInfinity()             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_t_12 = NULL;
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_12, NULL};
    __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_NegativeInfinity, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2130, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_4);
  }
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_minus_oo, ((PyObject *)__pyx_t_4)) < (0)) __PYX_ERR(0, 2130, __pyx_L1_error)
  __Pyx_DECREF((PyObject *)__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2142
 *         self.thisptr = symengine.ComplexInf
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.zoo
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_15ComplexInfinity_3_sympy_, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ComplexInfinity__sympy, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[179])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2142, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ComplexInfinity, __pyx_mstate_global->__pyx_n_u_sympy_2, __pyx_t_4) < (0)) __PYX_ERR(0, 2142, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2146
 *         return sympy.zoo
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         import sage.all as sage
 *         return sage.unsigned_infinity
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_15ComplexInfinity_5_sage_, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ComplexInfinity__sage, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[180])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2146, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ComplexInfinity, __pyx_mstate_global->__pyx_n_u_sage, __pyx_t_4) < (0)) __PYX_ERR(0, 2146, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2150
 *         return sage.unsigned_infinity
 * 
 * zoo = ComplexInfinity()             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_t_12 = NULL;
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_12, NULL};
    __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ComplexInfinity, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2150, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_4);
  }
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_zoo, ((PyObject *)__pyx_t_4)) < (0)) __PYX_ERR(0, 2150, __pyx_L1_error)
  __Pyx_DECREF((PyObject *)__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2174
 *         self.thisptr = symengine.Nan
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.nan
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_3NaN_3_sympy_, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_NaN__sympy, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[181])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2174, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_NaN, __pyx_mstate_global->__pyx_n_u_sympy_2, __pyx_t_4) < (0)) __PYX_ERR(0, 2174, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2178
 *         return sympy.nan
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         import sage.all as sage
 *         return sage.NaN
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_3NaN_5_sage_, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_NaN__sage, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[182])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2178, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_NaN, __pyx_mstate_global->__pyx_n_u_sage, __pyx_t_4) < (0)) __PYX_ERR(0, 2178, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2182
 *         return sage.NaN
 * 
 * nan = NaN()             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_t_12 = NULL;
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_12, NULL};
    __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_NaN, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2182, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_4);
  }
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_nan, ((PyObject *)__pyx_t_4)) < (0)) __PYX_ERR(0, 2182, __pyx_L1_error)
  __Pyx_DECREF((PyObject *)__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2185
 * 
 * 
 * class Zero(Integer):             # <<<<<<<<<<<<<<
 *     def __new__(cls):
 *         cdef Basic r = Number.__new__(Zero)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Integer); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2185, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_12 = PyTuple_Pack(1, __pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2185, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2185, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2185, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_15 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_Zero, __pyx_mstate_global->__pyx_n_u_Zero, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2185, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  if (__pyx_t_4 != __pyx_t_12) {
    if (unlikely((PyDict_SetItemString(__pyx_t_15, "__orig_bases__", __pyx_t_12) < 0))) __PYX_ERR(0, 2185, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2186
 * 
 * class Zero(Integer):
 *     def __new__(cls):             # <<<<<<<<<<<<<<
 *         cdef Basic r = Number.__new__(Zero)
 *         r.thisptr = <rcp_const_basic>symengine.integer(0)
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_4Zero_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_Zero___new, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[183])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2186, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetNewInClass(__pyx_t_15, __pyx_mstate_global->__pyx_n_u_new, __pyx_t_12) < (0)) __PYX_ERR(0, 2186, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2185
 * 
 * 
 * class Zero(Integer):             # <<<<<<<<<<<<<<
 *     def __new__(cls):
 *         cdef Basic r = Number.__new__(Zero)
*/
  __pyx_t_12 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_Zero, __pyx_t_4, __pyx_t_15, NULL, 0, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2185, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Zero, __pyx_t_12) < (0)) __PYX_ERR(0, 2185, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2191
 *         return r
 * 
 * zero = Zero()             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_t_5 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_15, __pyx_mstate_global->__pyx_n_u_Zero); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2191, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
    __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_15, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2191, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_zero, __pyx_t_4) < (0)) __PYX_ERR(0, 2191, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2194
 * 
 * 
 * class One(Integer):             # <<<<<<<<<<<<<<
 *     def __new__(cls):
 *         cdef Basic r = Number.__new__(One)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Integer); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2194, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_15 = PyTuple_Pack(1, __pyx_t_4); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2194, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_15); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2194, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2194, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_12 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_One, __pyx_mstate_global->__pyx_n_u_One, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2194, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  if (__pyx_t_4 != __pyx_t_15) {
    if (unlikely((PyDict_SetItemString(__pyx_t_12, "__orig_bases__", __pyx_t_15) < 0))) __PYX_ERR(0, 2194, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2195
 * 
 * class One(Integer):
 *     def __new__(cls):             # <<<<<<<<<<<<<<
 *         cdef Basic r = Number.__new__(One)
 *         r.thisptr = <rcp_const_basic>symengine.integer(1)
*/
  __pyx_t_15 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_3One_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_One___new, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[184])); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2195, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_15);
  #endif
  if (__Pyx_SetNewInClass(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_new, __pyx_t_15) < (0)) __PYX_ERR(0, 2195, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2194
 * 
 * 
 * class One(Integer):             # <<<<<<<<<<<<<<
 *     def __new__(cls):
 *         cdef Basic r = Number.__new__(One)
*/
  __pyx_t_15 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_One, __pyx_t_4, __pyx_t_12, NULL, 0, 0); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2194, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_15);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_One, __pyx_t_15) < (0)) __PYX_ERR(0, 2194, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2200
 *         return r
 * 
 * one = One()             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_t_5 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_One); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
    __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_12, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2200, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_one, __pyx_t_4) < (0)) __PYX_ERR(0, 2200, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2203
 * 
 * 
 * class NegativeOne(Integer):             # <<<<<<<<<<<<<<
 *     def __new__(cls):
 *         cdef Basic r = Number.__new__(NegativeOne)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Integer); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2203, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_12 = PyTuple_Pack(1, __pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2203, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2203, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2203, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_15 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_NegativeOne, __pyx_mstate_global->__pyx_n_u_NegativeOne, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2203, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  if (__pyx_t_4 != __pyx_t_12) {
    if (unlikely((PyDict_SetItemString(__pyx_t_15, "__orig_bases__", __pyx_t_12) < 0))) __PYX_ERR(0, 2203, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2204
 * 
 * class NegativeOne(Integer):
 *     def __new__(cls):             # <<<<<<<<<<<<<<
 *         cdef Basic r = Number.__new__(NegativeOne)
 *         r.thisptr = <rcp_const_basic>symengine.integer(-1)
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_11NegativeOne_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_NegativeOne___new, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[185])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetNewInClass(__pyx_t_15, __pyx_mstate_global->__pyx_n_u_new, __pyx_t_12) < (0)) __PYX_ERR(0, 2204, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2203
 * 
 * 
 * class NegativeOne(Integer):             # <<<<<<<<<<<<<<
 *     def __new__(cls):
 *         cdef Basic r = Number.__new__(NegativeOne)
*/
  __pyx_t_12 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_NegativeOne, __pyx_t_4, __pyx_t_15, NULL, 0, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2203, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_NegativeOne, __pyx_t_12) < (0)) __PYX_ERR(0, 2203, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2209
 *         return r
 * 
 * minus_one = NegativeOne()             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_t_5 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_15, __pyx_mstate_global->__pyx_n_u_NegativeOne); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2209, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
    __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_15, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2209, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_minus_one, __pyx_t_4) < (0)) __PYX_ERR(0, 2209, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2212
 * 
 * 
 * class Half(Rational):             # <<<<<<<<<<<<<<
 *     def __new__(cls):
 *         cdef Basic q = Number.__new__(Half)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Rational); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2212, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_15 = PyTuple_Pack(1, __pyx_t_4); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2212, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_15); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2212, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2212, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_12 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_Half, __pyx_mstate_global->__pyx_n_u_Half, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2212, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  if (__pyx_t_4 != __pyx_t_15) {
    if (unlikely((PyDict_SetItemString(__pyx_t_12, "__orig_bases__", __pyx_t_15) < 0))) __PYX_ERR(0, 2212, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2213
 * 
 * class Half(Rational):
 *     def __new__(cls):             # <<<<<<<<<<<<<<
 *         cdef Basic q = Number.__new__(Half)
 *         q.thisptr = <rcp_const_basic>symengine.rational(1, 2)
*/
  __pyx_t_15 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_4Half_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_Half___new, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[186])); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2213, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_15);
  #endif
  if (__Pyx_SetNewInClass(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_new, __pyx_t_15) < (0)) __PYX_ERR(0, 2213, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2212
 * 
 * 
 * class Half(Rational):             # <<<<<<<<<<<<<<
 *     def __new__(cls):
 *         cdef Basic q = Number.__new__(Half)
*/
  __pyx_t_15 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_Half, __pyx_t_4, __pyx_t_12, NULL, 0, 0); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2212, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_15);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Half, __pyx_t_15) < (0)) __PYX_ERR(0, 2212, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2218
 *         return q
 * 
 * half = Half()             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_t_5 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_Half); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2218, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
    __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_12, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2218, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_half, __pyx_t_4) < (0)) __PYX_ERR(0, 2218, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2221
 * 
 * 
 * class AssocOp(Expr):             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
*/
  __pyx_t_4 = PyTuple_Pack(1, ((PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Expr)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2221, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_12 = __Pyx_PEP560_update_bases(__pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2221, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_12); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2221, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_15 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_t_12, __pyx_mstate_global->__pyx_n_u_AssocOp, __pyx_mstate_global->__pyx_n_u_AssocOp, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2221, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  if (__pyx_t_12 != __pyx_t_4) {
    if (unlikely((PyDict_SetItemString(__pyx_t_15, "__orig_bases__", __pyx_t_4) < 0))) __PYX_ERR(0, 2221, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2223
 * class AssocOp(Expr):
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def make_args(cls, expr):
 *         if isinstance(expr, cls):
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_7AssocOp_1make_args, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_mstate_global->__pyx_n_u_AssocOp_make_args, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[187])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2223, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  __pyx_t_14 = __Pyx_Method_ClassMethod(__pyx_t_4); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2223, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_15, __pyx_mstate_global->__pyx_n_u_make_args, __pyx_t_14) < (0)) __PYX_ERR(0, 2223, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2221
 * 
 * 
 * class AssocOp(Expr):             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
*/
  __pyx_t_14 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_AssocOp, __pyx_t_12, __pyx_t_15, NULL, 0, 0); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2221, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_AssocOp, __pyx_t_14) < (0)) __PYX_ERR(0, 2221, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2231
 * 
 * 
 * class Add(AssocOp):             # <<<<<<<<<<<<<<
 * 
 *     identity = 0
*/
  __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_AssocOp); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2231, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_5 = PyTuple_Pack(1, __pyx_t_12); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2231, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __pyx_t_12 = __Pyx_PEP560_update_bases(__pyx_t_5); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2231, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_15 = __Pyx_CalculateMetaclass(NULL, __pyx_t_12); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2231, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  __pyx_t_14 = __Pyx_Py3MetaclassPrepare(__pyx_t_15, __pyx_t_12, __pyx_mstate_global->__pyx_n_u_Add, __pyx_mstate_global->__pyx_n_u_Add, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2231, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  if (__pyx_t_12 != __pyx_t_5) {
    if (unlikely((PyDict_SetItemString(__pyx_t_14, "__orig_bases__", __pyx_t_5) < 0))) __PYX_ERR(0, 2231, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2233
 * class Add(AssocOp):
 * 
 *     identity = 0             # <<<<<<<<<<<<<<
 * 
 *     def __new__(cls, *args, **kwargs):
*/
  if (__Pyx_SetNameInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_identity, __pyx_mstate_global->__pyx_int_0) < (0)) __PYX_ERR(0, 2233, __pyx_L1_error)

  /* "symengine/lib/symengine_wrapper.pyx":2235
 *     identity = 0
 * 
 *     def __new__(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         cdef symengine.vec_basic v_ = iter_to_vec_basic(args)
 *         return c2py(symengine.add(v_))
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_3Add_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_Add___new, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[188])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2235, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetNewInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_new, __pyx_t_5) < (0)) __PYX_ERR(0, 2235, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2239
 *         return c2py(symengine.add(v_))
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def _from_args(self, args):
 *         if len(args) == 0:
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_3Add_3_from_args, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_mstate_global->__pyx_n_u_Add__from_args, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[189])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  __pyx_t_4 = __Pyx_Method_ClassMethod(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_from_args, __pyx_t_4) < (0)) __PYX_ERR(0, 2239, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2248
 *         return Add(*args)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_Add(self):
 *         return True
*/
  __pyx_t_5 = NULL;
  __pyx_t_13 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_3Add_5is_Add, 0, __pyx_mstate_global->__pyx_n_u_Add_is_Add, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[190])); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2248, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_13);
  #endif
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_13};
    __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2248, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  if (__Pyx_SetNameInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_is_Add, __pyx_t_4) < (0)) __PYX_ERR(0, 2248, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2252
 *         return True
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         from sympy import Add
 *         return Add(*self.args)
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_3Add_7_sympy_, 0, __pyx_mstate_global->__pyx_n_u_Add__sympy, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[191])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2252, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_sympy_2, __pyx_t_4) < (0)) __PYX_ERR(0, 2252, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2256
 *         return Add(*self.args)
 * 
 *     def _sage_(Basic self):             # <<<<<<<<<<<<<<
 *         cdef RCP[const symengine.Add] X = symengine.rcp_static_cast_Add(self.thisptr)
 *         cdef rcp_const_basic a, b
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_3Add_9_sage_, 0, __pyx_mstate_global->__pyx_n_u_Add__sage, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[192])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2256, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_sage, __pyx_t_4) < (0)) __PYX_ERR(0, 2256, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2262
 *         return c2py(a)._sage_() + c2py(b)._sage_()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def func(self):
 *         return self.__class__
*/
  __pyx_t_13 = NULL;
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_3Add_11func, 0, __pyx_mstate_global->__pyx_n_u_Add_func, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[193])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2262, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_13, __pyx_t_5};
    __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2262, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  if (__Pyx_SetNameInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_func, __pyx_t_4) < (0)) __PYX_ERR(0, 2262, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2266
 *         return self.__class__
 * 
 *     def as_coefficients_dict(Basic self):             # <<<<<<<<<<<<<<
 *         cdef RCP[const symengine.Add] X = symengine.rcp_static_cast_Add(self.thisptr)
 *         cdef umap_basic_num umap
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_3Add_13as_coefficients_dict, 0, __pyx_mstate_global->__pyx_n_u_Add_as_coefficients_dict, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[194])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2266, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_as_coefficients_dict, __pyx_t_4) < (0)) __PYX_ERR(0, 2266, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2231
 * 
 * 
 * class Add(AssocOp):             # <<<<<<<<<<<<<<
 * 
 *     identity = 0
*/
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_15, __pyx_mstate_global->__pyx_n_u_Add, __pyx_t_12, __pyx_t_14, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2231, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Add, __pyx_t_4) < (0)) __PYX_ERR(0, 2231, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2282
 * 
 * 
 * class Mul(AssocOp):             # <<<<<<<<<<<<<<
 * 
 *     identity = 1
*/
  __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_AssocOp); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2282, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_15 = PyTuple_Pack(1, __pyx_t_12); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2282, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __pyx_t_12 = __Pyx_PEP560_update_bases(__pyx_t_15); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2282, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_14 = __Pyx_CalculateMetaclass(NULL, __pyx_t_12); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2282, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_14, __pyx_t_12, __pyx_mstate_global->__pyx_n_u_Mul, __pyx_mstate_global->__pyx_n_u_Mul, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2282, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__pyx_t_12 != __pyx_t_15) {
    if (unlikely((PyDict_SetItemString(__pyx_t_4, "__orig_bases__", __pyx_t_15) < 0))) __PYX_ERR(0, 2282, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2284
 * class Mul(AssocOp):
 * 
 *     identity = 1             # <<<<<<<<<<<<<<
 * 
 *     def __new__(cls, *args, **kwargs):
*/
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_identity, __pyx_mstate_global->__pyx_int_1) < (0)) __PYX_ERR(0, 2284, __pyx_L1_error)

  /* "symengine/lib/symengine_wrapper.pyx":2286
 *     identity = 1
 * 
 *     def __new__(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         cdef symengine.vec_basic v_ = iter_to_vec_basic(args)
 *         return c2py(symengine.mul(v_))
*/
  __pyx_t_15 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_3Mul_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_Mul___new, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[195])); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2286, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_15);
  #endif
  if (__Pyx_SetNewInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_new, __pyx_t_15) < (0)) __PYX_ERR(0, 2286, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2290
 *         return c2py(symengine.mul(v_))
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def _from_args(self, args):
 *         if len(args) == 0:
*/
  __pyx_t_15 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_3Mul_3_from_args, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_mstate_global->__pyx_n_u_Mul__from_args, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[196])); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2290, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_15);
  #endif
  __pyx_t_5 = __Pyx_Method_ClassMethod(__pyx_t_15); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2290, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_from_args, __pyx_t_5) < (0)) __PYX_ERR(0, 2290, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2299
 *         return Mul(*args)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_Mul(self):
 *         return True
*/
  __pyx_t_15 = NULL;
  __pyx_t_13 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_3Mul_5is_Mul, 0, __pyx_mstate_global->__pyx_n_u_Mul_is_Mul, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[197])); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2299, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_13);
  #endif
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_15, __pyx_t_13};
    __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2299, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
  }
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_is_Mul, __pyx_t_5) < (0)) __PYX_ERR(0, 2299, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2303
 *         return True
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         from sympy import Mul
 *         return Mul(*self.args)
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_3Mul_7_sympy_, 0, __pyx_mstate_global->__pyx_n_u_Mul__sympy, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[198])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2303, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_sympy_2, __pyx_t_5) < (0)) __PYX_ERR(0, 2303, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2307
 *         return Mul(*self.args)
 * 
 *     def _sage_(Basic self):             # <<<<<<<<<<<<<<
 *         cdef RCP[const symengine.Mul] X = symengine.rcp_static_cast_Mul(self.thisptr)
 *         cdef rcp_const_basic a, b
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_3Mul_9_sage_, 0, __pyx_mstate_global->__pyx_n_u_Mul__sage, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[199])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2307, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_sage, __pyx_t_5) < (0)) __PYX_ERR(0, 2307, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2313
 *         return c2py(a)._sage_() * c2py(b)._sage_()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def func(self):
 *         return self.__class__
*/
  __pyx_t_13 = NULL;
  __pyx_t_15 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_3Mul_11func, 0, __pyx_mstate_global->__pyx_n_u_Mul_func, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[200])); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2313, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_15);
  #endif
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_13, __pyx_t_15};
    __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2313, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
  }
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_func, __pyx_t_5) < (0)) __PYX_ERR(0, 2313, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2317
 *         return self.__class__
 * 
 *     def as_coefficients_dict(Basic self):             # <<<<<<<<<<<<<<
 *         cdef RCP[const symengine.Mul] X = symengine.rcp_static_cast_Mul(self.thisptr)
 *         cdef RCP[const symengine.Integer] one = symengine.integer(1)
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_3Mul_13as_coefficients_dict, 0, __pyx_mstate_global->__pyx_n_u_Mul_as_coefficients_dict, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[201])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2317, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_as_coefficients_dict, __pyx_t_5) < (0)) __PYX_ERR(0, 2317, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2328
 *         return d
 * 
 *     def as_powers_dict(Basic self):             # <<<<<<<<<<<<<<
 *         cdef RCP[const symengine.Mul] X = symengine.rcp_static_cast_Mul(self.thisptr)
 *         cdef map_basic_basic m = deref(X).get_dict()
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_3Mul_15as_powers_dict, 0, __pyx_mstate_global->__pyx_n_u_Mul_as_powers_dict, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[202])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2328, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_as_powers_dict, __pyx_t_5) < (0)) __PYX_ERR(0, 2328, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2282
 * 
 * 
 * class Mul(AssocOp):             # <<<<<<<<<<<<<<
 * 
 *     identity = 1
*/
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_Mul, __pyx_t_12, __pyx_t_4, NULL, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2282, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Mul, __pyx_t_5) < (0)) __PYX_ERR(0, 2282, __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_14); __pyx_t_14 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2351
 * 
 * 
 * class Pow(Expr):             # <<<<<<<<<<<<<<
 * 
 *     def __new__(cls, a, b):
*/
  __pyx_t_12 = PyTuple_Pack(1, ((PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Expr)); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2351, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_14 = __Pyx_PEP560_update_bases(__pyx_t_12); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2351, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_14); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2351, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_14, __pyx_mstate_global->__pyx_n_u_Pow, __pyx_mstate_global->__pyx_n_u_Pow, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2351, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__pyx_t_14 != __pyx_t_12) {
    if (unlikely((PyDict_SetItemString(__pyx_t_5, "__orig_bases__", __pyx_t_12) < 0))) __PYX_ERR(0, 2351, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2353
 * class Pow(Expr):
 * 
 *     def __new__(cls, a, b):             # <<<<<<<<<<<<<<
 *         return _sympify(a) ** b
 * 
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_3Pow_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_Pow___new, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[203])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2353, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetNewInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_new, __pyx_t_12) < (0)) __PYX_ERR(0, 2353, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2356
 *         return _sympify(a) ** b
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def base(Basic self):
 *         cdef RCP[const symengine.Pow] X = symengine.rcp_static_cast_Pow(self.thisptr)
*/
  __pyx_t_15 = NULL;
  __pyx_t_13 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_3Pow_3base, 0, __pyx_mstate_global->__pyx_n_u_Pow_base, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[204])); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2356, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_13);
  #endif
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_15, __pyx_t_13};
    __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2356, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
  }
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_base, __pyx_t_12) < (0)) __PYX_ERR(0, 2356, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2361
 *         return c2py(deref(X).get_base())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def exp(Basic self):
 *         cdef RCP[const symengine.Pow] X = symengine.rcp_static_cast_Pow(self.thisptr)
*/
  __pyx_t_13 = NULL;
  __pyx_t_15 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_3Pow_5exp, 0, __pyx_mstate_global->__pyx_n_u_Pow_exp, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[205])); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2361, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_15);
  #endif
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_13, __pyx_t_15};
    __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2361, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
  }
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_exp, __pyx_t_12) < (0)) __PYX_ERR(0, 2361, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2366
 *         return c2py(deref(X).get_exp())
 * 
 *     def as_base_exp(self):             # <<<<<<<<<<<<<<
 *         return self.base, self.exp
 * 
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_3Pow_7as_base_exp, 0, __pyx_mstate_global->__pyx_n_u_Pow_as_base_exp, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[206])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2366, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_as_base_exp, __pyx_t_12) < (0)) __PYX_ERR(0, 2366, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2369
 *         return self.base, self.exp
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_Pow(self):
 *         return True
*/
  __pyx_t_15 = NULL;
  __pyx_t_13 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_3Pow_9is_Pow, 0, __pyx_mstate_global->__pyx_n_u_Pow_is_Pow, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[207])); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2369, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_13);
  #endif
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_15, __pyx_t_13};
    __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2369, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
  }
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_is_Pow, __pyx_t_12) < (0)) __PYX_ERR(0, 2369, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2373
 *         return True
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_commutative(self):
 *         return (self.base.is_commutative and self.exp.is_commutative)
*/
  __pyx_t_13 = NULL;
  __pyx_t_15 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_3Pow_11is_commutative, 0, __pyx_mstate_global->__pyx_n_u_Pow_is_commutative, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[208])); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2373, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_15);
  #endif
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_13, __pyx_t_15};
    __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2373, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
  }
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_is_commutative, __pyx_t_12) < (0)) __PYX_ERR(0, 2373, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2377
 *         return (self.base.is_commutative and self.exp.is_commutative)
 * 
 *     def _sympy_(Basic self):             # <<<<<<<<<<<<<<
 *         cdef RCP[const symengine.Pow] X = symengine.rcp_static_cast_Pow(self.thisptr)
 *         base = c2py(deref(X).get_base())
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_3Pow_13_sympy_, 0, __pyx_mstate_global->__pyx_n_u_Pow__sympy, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[209])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2377, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_sympy_2, __pyx_t_12) < (0)) __PYX_ERR(0, 2377, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2383
 *         return base._sympy_() ** exp._sympy_()
 * 
 *     def _sage_(Basic self):             # <<<<<<<<<<<<<<
 *         cdef RCP[const symengine.Pow] X = symengine.rcp_static_cast_Pow(self.thisptr)
 *         base = c2py(deref(X).get_base())
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_3Pow_15_sage_, 0, __pyx_mstate_global->__pyx_n_u_Pow__sage, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[210])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2383, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_sage, __pyx_t_12) < (0)) __PYX_ERR(0, 2383, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2389
 *         return base._sage_() ** exp._sage_()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def func(self):
 *         return self.__class__
*/
  __pyx_t_15 = NULL;
  __pyx_t_13 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_3Pow_17func, 0, __pyx_mstate_global->__pyx_n_u_Pow_func, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[211])); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2389, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_13);
  #endif
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_15, __pyx_t_13};
    __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2389, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
  }
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_func, __pyx_t_12) < (0)) __PYX_ERR(0, 2389, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2393
 *         return self.__class__
 * 
 *     def as_powers_dict(Basic self):             # <<<<<<<<<<<<<<
 *         d = collections.defaultdict(int)
 *         base, exp = self.as_base_exp()
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_3Pow_19as_powers_dict, 0, __pyx_mstate_global->__pyx_n_u_Pow_as_powers_dict, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[212])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2393, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_as_powers_dict, __pyx_t_12) < (0)) __PYX_ERR(0, 2393, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2351
 * 
 * 
 * class Pow(Expr):             # <<<<<<<<<<<<<<
 * 
 *     def __new__(cls, a, b):
*/
  __pyx_t_12 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Pow, __pyx_t_14, __pyx_t_5, NULL, 0, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2351, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Pow, __pyx_t_12) < (0)) __PYX_ERR(0, 2351, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2403
 * 
 * 
 * class Function(Expr):             # <<<<<<<<<<<<<<
 * 
 *     def __new__(cls, *args, **kwargs):
*/
  __pyx_t_14 = PyTuple_Pack(1, ((PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Expr)); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2403, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_14); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2403, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2403, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_12 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_Function, __pyx_mstate_global->__pyx_n_u_Function, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2403, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  if (__pyx_t_4 != __pyx_t_14) {
    if (unlikely((PyDict_SetItemString(__pyx_t_12, "__orig_bases__", __pyx_t_14) < 0))) __PYX_ERR(0, 2403, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2405
 * class Function(Expr):
 * 
 *     def __new__(cls, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         if cls == Function:
 *             nargs = len(args)
*/
  __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_8Function_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_Function___new, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[213])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2405, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14);
  #endif
  if (__Pyx_SetNewInClass(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_new, __pyx_t_14) < (0)) __PYX_ERR(0, 2405, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2417
 *         return super(Function, cls).__new__(cls)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_Function(self):
 *         return True
*/
  __pyx_t_13 = NULL;
  __pyx_t_15 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_8Function_3is_Function, 0, __pyx_mstate_global->__pyx_n_u_Function_is_Function, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[214])); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2417, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_15);
  #endif
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_13, __pyx_t_15};
    __pyx_t_14 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2417, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
  }
  if (__Pyx_SetNameInClass(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_is_Function, __pyx_t_14) < (0)) __PYX_ERR(0, 2417, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2421
 *         return True
 * 
 *     def func(self, *values):             # <<<<<<<<<<<<<<
 *         import sys
 *         return getattr(sys.modules[__name__], self.__class__.__name__.lower())(*values)
*/
  __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_8Function_5func, 0, __pyx_mstate_global->__pyx_n_u_Function_func, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[215])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2421, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_func, __pyx_t_14) < (0)) __PYX_ERR(0, 2421, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2403
 * 
 * 
 * class Function(Expr):             # <<<<<<<<<<<<<<
 * 
 *     def __new__(cls, *args, **kwargs):
*/
  __pyx_t_14 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_Function, __pyx_t_4, __pyx_t_12, NULL, 0, 0); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2403, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Function, __pyx_t_14) < (0)) __PYX_ERR(0, 2403, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2426
 * 
 * 
 * class OneArgFunction(Function):             # <<<<<<<<<<<<<<
 * 
 *     def get_arg(Basic self):
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Function); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2426, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyTuple_Pack(1, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2426, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2426, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_12 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2426, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_14 = __Pyx_Py3MetaclassPrepare(__pyx_t_12, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_OneArgFunction, __pyx_mstate_global->__pyx_n_u_OneArgFunction, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2426, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  if (__pyx_t_4 != __pyx_t_5) {
    if (unlikely((PyDict_SetItemString(__pyx_t_14, "__orig_bases__", __pyx_t_5) < 0))) __PYX_ERR(0, 2426, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2428
 * class OneArgFunction(Function):
 * 
 *     def get_arg(Basic self):             # <<<<<<<<<<<<<<
 *         cdef RCP[const symengine.OneArgFunction] X = symengine.rcp_static_cast_OneArgFunction(self.thisptr)
 *         return c2py(deref(X).get_arg())
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_14OneArgFunction_1get_arg, 0, __pyx_mstate_global->__pyx_n_u_OneArgFunction_get_arg, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[216])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2428, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_get_arg, __pyx_t_5) < (0)) __PYX_ERR(0, 2428, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2432
 *         return c2py(deref(X).get_arg())
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return getattr(sympy, self.__class__.__name__)(self.get_arg()._sympy_())
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_14OneArgFunction_3_sympy_, 0, __pyx_mstate_global->__pyx_n_u_OneArgFunction__sympy, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[217])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2432, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_sympy_2, __pyx_t_5) < (0)) __PYX_ERR(0, 2432, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2436
 *         return getattr(sympy, self.__class__.__name__)(self.get_arg()._sympy_())
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         import sage.all as sage
 *         return getattr(sage, self.__class__.__name__.lower())(self.get_arg()._sage_())
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_14OneArgFunction_5_sage_, 0, __pyx_mstate_global->__pyx_n_u_OneArgFunction__sage, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[218])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2436, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_sage, __pyx_t_5) < (0)) __PYX_ERR(0, 2436, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2426
 * 
 * 
 * class OneArgFunction(Function):             # <<<<<<<<<<<<<<
 * 
 *     def get_arg(Basic self):
*/
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_OneArgFunction, __pyx_t_4, __pyx_t_14, NULL, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2426, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_OneArgFunction, __pyx_t_5) < (0)) __PYX_ERR(0, 2426, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2441
 * 
 * 
 * class HyperbolicFunction(OneArgFunction):             # <<<<<<<<<<<<<<
 *     pass
 * 
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_OneArgFunction); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2441, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_12 = PyTuple_Pack(1, __pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2441, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2441, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_14 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2441, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_14, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_HyperbolicFunction, __pyx_mstate_global->__pyx_n_u_HyperbolicFunction, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2441, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__pyx_t_4 != __pyx_t_12) {
    if (unlikely((PyDict_SetItemString(__pyx_t_5, "__orig_bases__", __pyx_t_12) < 0))) __PYX_ERR(0, 2441, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __pyx_t_12 = __Pyx_Py3ClassCreate(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_HyperbolicFunction, __pyx_t_4, __pyx_t_5, NULL, 0, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2441, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_HyperbolicFunction, __pyx_t_12) < (0)) __PYX_ERR(0, 2441, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2444
 *     pass
 * 
 * class TrigFunction(OneArgFunction):             # <<<<<<<<<<<<<<
 *     pass
 * 
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_OneArgFunction); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2444, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_14 = PyTuple_Pack(1, __pyx_t_4); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2444, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_14); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2444, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2444, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_12 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_TrigFunction, __pyx_mstate_global->__pyx_n_u_TrigFunction, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2444, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  if (__pyx_t_4 != __pyx_t_14) {
    if (unlikely((PyDict_SetItemString(__pyx_t_12, "__orig_bases__", __pyx_t_14) < 0))) __PYX_ERR(0, 2444, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __pyx_t_14 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_TrigFunction, __pyx_t_4, __pyx_t_12, NULL, 0, 0); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2444, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_TrigFunction, __pyx_t_14) < (0)) __PYX_ERR(0, 2444, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2447
 *     pass
 * 
 * class gamma(OneArgFunction):             # <<<<<<<<<<<<<<
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_OneArgFunction); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2447, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyTuple_Pack(1, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2447, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2447, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_12 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2447, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_14 = __Pyx_Py3MetaclassPrepare(__pyx_t_12, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_gamma, __pyx_mstate_global->__pyx_n_u_gamma, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2447, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  if (__pyx_t_4 != __pyx_t_5) {
    if (unlikely((PyDict_SetItemString(__pyx_t_14, "__orig_bases__", __pyx_t_5) < 0))) __PYX_ERR(0, 2447, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2448
 * 
 * class gamma(OneArgFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.gamma(X.thisptr))
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_5gamma_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_gamma___new, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[219])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2448, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetNewInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_new, __pyx_t_5) < (0)) __PYX_ERR(0, 2448, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2447
 *     pass
 * 
 * class gamma(OneArgFunction):             # <<<<<<<<<<<<<<
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
*/
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_gamma, __pyx_t_4, __pyx_t_14, NULL, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2447, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_gamma, __pyx_t_5) < (0)) __PYX_ERR(0, 2447, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2452
 *         return c2py(symengine.gamma(X.thisptr))
 * 
 * class LambertW(OneArgFunction):             # <<<<<<<<<<<<<<
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_OneArgFunction); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2452, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_12 = PyTuple_Pack(1, __pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2452, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2452, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_14 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2452, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_14, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_LambertW, __pyx_mstate_global->__pyx_n_u_LambertW, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2452, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__pyx_t_4 != __pyx_t_12) {
    if (unlikely((PyDict_SetItemString(__pyx_t_5, "__orig_bases__", __pyx_t_12) < 0))) __PYX_ERR(0, 2452, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2453
 * 
 * class LambertW(OneArgFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.lambertw(X.thisptr))
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_8LambertW_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_LambertW___new, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[220])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2453, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetNewInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_new, __pyx_t_12) < (0)) __PYX_ERR(0, 2453, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2457
 *         return c2py(symengine.lambertw(X.thisptr))
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         import sage.all as sage
 *         return sage.lambert_w(self.get_arg()._sage_())
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_8LambertW_3_sage_, 0, __pyx_mstate_global->__pyx_n_u_LambertW__sage, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[221])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2457, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_sage, __pyx_t_12) < (0)) __PYX_ERR(0, 2457, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2452
 *         return c2py(symengine.gamma(X.thisptr))
 * 
 * class LambertW(OneArgFunction):             # <<<<<<<<<<<<<<
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
*/
  __pyx_t_12 = __Pyx_Py3ClassCreate(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_LambertW, __pyx_t_4, __pyx_t_5, NULL, 0, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2452, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_LambertW, __pyx_t_12) < (0)) __PYX_ERR(0, 2452, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2461
 *         return sage.lambert_w(self.get_arg()._sage_())
 * 
 * class zeta(Function):             # <<<<<<<<<<<<<<
 *     def __new__(cls, s, a = None):
 *         cdef Basic S = sympify(s)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Function); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2461, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_14 = PyTuple_Pack(1, __pyx_t_4); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2461, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_14); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2461, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2461, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_12 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_zeta, __pyx_mstate_global->__pyx_n_u_zeta, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2461, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  if (__pyx_t_4 != __pyx_t_14) {
    if (unlikely((PyDict_SetItemString(__pyx_t_12, "__orig_bases__", __pyx_t_14) < 0))) __PYX_ERR(0, 2461, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2462
 * 
 * class zeta(Function):
 *     def __new__(cls, s, a = None):             # <<<<<<<<<<<<<<
 *         cdef Basic S = sympify(s)
 *         if a == None:
*/
  __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_4zeta_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_zeta___new, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[222])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2462, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_14, __pyx_mstate_global->__pyx_tuple[11]);
  if (__Pyx_SetNewInClass(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_new, __pyx_t_14) < (0)) __PYX_ERR(0, 2462, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2469
 *         return c2py(symengine.zeta(S.thisptr, A.thisptr))
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.zeta(*self.args_as_sympy())
*/
  __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_4zeta_3_sympy_, 0, __pyx_mstate_global->__pyx_n_u_zeta__sympy, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[223])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2469, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_sympy_2, __pyx_t_14) < (0)) __PYX_ERR(0, 2469, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2461
 *         return sage.lambert_w(self.get_arg()._sage_())
 * 
 * class zeta(Function):             # <<<<<<<<<<<<<<
 *     def __new__(cls, s, a = None):
 *         cdef Basic S = sympify(s)
*/
  __pyx_t_14 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_zeta, __pyx_t_4, __pyx_t_12, NULL, 0, 0); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2461, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_zeta, __pyx_t_14) < (0)) __PYX_ERR(0, 2461, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2473
 *         return sympy.zeta(*self.args_as_sympy())
 * 
 * class dirichlet_eta(OneArgFunction):             # <<<<<<<<<<<<<<
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_OneArgFunction); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2473, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyTuple_Pack(1, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2473, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2473, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_12 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2473, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_14 = __Pyx_Py3MetaclassPrepare(__pyx_t_12, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_dirichlet_eta, __pyx_mstate_global->__pyx_n_u_dirichlet_eta, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2473, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  if (__pyx_t_4 != __pyx_t_5) {
    if (unlikely((PyDict_SetItemString(__pyx_t_14, "__orig_bases__", __pyx_t_5) < 0))) __PYX_ERR(0, 2473, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2474
 * 
 * class dirichlet_eta(OneArgFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.dirichlet_eta(X.thisptr))
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_13dirichlet_eta_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_dirichlet_eta___new, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[224])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2474, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetNewInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_new, __pyx_t_5) < (0)) __PYX_ERR(0, 2474, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2473
 *         return sympy.zeta(*self.args_as_sympy())
 * 
 * class dirichlet_eta(OneArgFunction):             # <<<<<<<<<<<<<<
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
*/
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_dirichlet_eta, __pyx_t_4, __pyx_t_14, NULL, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2473, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_dirichlet_eta, __pyx_t_5) < (0)) __PYX_ERR(0, 2473, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2478
 *         return c2py(symengine.dirichlet_eta(X.thisptr))
 * 
 * class KroneckerDelta(Function):             # <<<<<<<<<<<<<<
 *     def __new__(cls, x, y):
 *         cdef Basic X = sympify(x)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Function); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2478, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_12 = PyTuple_Pack(1, __pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2478, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2478, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_14 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2478, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_14, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_KroneckerDelta, __pyx_mstate_global->__pyx_n_u_KroneckerDelta, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2478, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__pyx_t_4 != __pyx_t_12) {
    if (unlikely((PyDict_SetItemString(__pyx_t_5, "__orig_bases__", __pyx_t_12) < 0))) __PYX_ERR(0, 2478, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2479
 * 
 * class KroneckerDelta(Function):
 *     def __new__(cls, x, y):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         cdef Basic Y = sympify(y)
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_14KroneckerDelta_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_KroneckerDelta___new, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[225])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2479, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetNewInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_new, __pyx_t_12) < (0)) __PYX_ERR(0, 2479, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2484
 *         return c2py(symengine.kronecker_delta(X.thisptr, Y.thisptr))
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.KroneckerDelta(*self.args_as_sympy())
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_14KroneckerDelta_3_sympy_, 0, __pyx_mstate_global->__pyx_n_u_KroneckerDelta__sympy, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[226])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2484, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_sympy_2, __pyx_t_12) < (0)) __PYX_ERR(0, 2484, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2488
 *         return sympy.KroneckerDelta(*self.args_as_sympy())
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         import sage.all as sage
 *         return sage.kronecker_delta(*self.args_as_sage())
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_14KroneckerDelta_5_sage_, 0, __pyx_mstate_global->__pyx_n_u_KroneckerDelta__sage, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[227])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2488, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_sage, __pyx_t_12) < (0)) __PYX_ERR(0, 2488, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2478
 *         return c2py(symengine.dirichlet_eta(X.thisptr))
 * 
 * class KroneckerDelta(Function):             # <<<<<<<<<<<<<<
 *     def __new__(cls, x, y):
 *         cdef Basic X = sympify(x)
*/
  __pyx_t_12 = __Pyx_Py3ClassCreate(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_KroneckerDelta, __pyx_t_4, __pyx_t_5, NULL, 0, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2478, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_KroneckerDelta, __pyx_t_12) < (0)) __PYX_ERR(0, 2478, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2492
 *         return sage.kronecker_delta(*self.args_as_sage())
 * 
 * class LeviCivita(Function):             # <<<<<<<<<<<<<<
 *     def __new__(cls, *args):
 *         cdef symengine.vec_basic v = iter_to_vec_basic(args)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Function); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2492, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_14 = PyTuple_Pack(1, __pyx_t_4); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2492, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_14); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2492, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2492, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_12 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_LeviCivita, __pyx_mstate_global->__pyx_n_u_LeviCivita, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2492, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  if (__pyx_t_4 != __pyx_t_14) {
    if (unlikely((PyDict_SetItemString(__pyx_t_12, "__orig_bases__", __pyx_t_14) < 0))) __PYX_ERR(0, 2492, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2493
 * 
 * class LeviCivita(Function):
 *     def __new__(cls, *args):             # <<<<<<<<<<<<<<
 *         cdef symengine.vec_basic v = iter_to_vec_basic(args)
 *         return c2py(symengine.levi_civita(v))
*/
  __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_10LeviCivita_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_LeviCivita___new, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[228])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2493, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14);
  #endif
  if (__Pyx_SetNewInClass(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_new, __pyx_t_14) < (0)) __PYX_ERR(0, 2493, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2497
 *         return c2py(symengine.levi_civita(v))
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.LeviCivita(*self.args_as_sympy())
*/
  __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_10LeviCivita_3_sympy_, 0, __pyx_mstate_global->__pyx_n_u_LeviCivita__sympy, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[229])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2497, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_sympy_2, __pyx_t_14) < (0)) __PYX_ERR(0, 2497, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2492
 *         return sage.kronecker_delta(*self.args_as_sage())
 * 
 * class LeviCivita(Function):             # <<<<<<<<<<<<<<
 *     def __new__(cls, *args):
 *         cdef symengine.vec_basic v = iter_to_vec_basic(args)
*/
  __pyx_t_14 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_LeviCivita, __pyx_t_4, __pyx_t_12, NULL, 0, 0); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2492, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_LeviCivita, __pyx_t_14) < (0)) __PYX_ERR(0, 2492, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2501
 *         return sympy.LeviCivita(*self.args_as_sympy())
 * 
 * class erf(OneArgFunction):             # <<<<<<<<<<<<<<
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_OneArgFunction); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2501, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyTuple_Pack(1, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2501, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2501, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_12 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2501, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_14 = __Pyx_Py3MetaclassPrepare(__pyx_t_12, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_erf, __pyx_mstate_global->__pyx_n_u_erf, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2501, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  if (__pyx_t_4 != __pyx_t_5) {
    if (unlikely((PyDict_SetItemString(__pyx_t_14, "__orig_bases__", __pyx_t_5) < 0))) __PYX_ERR(0, 2501, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2502
 * 
 * class erf(OneArgFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.erf(X.thisptr))
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_3erf_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_erf___new, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[230])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2502, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetNewInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_new, __pyx_t_5) < (0)) __PYX_ERR(0, 2502, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2501
 *         return sympy.LeviCivita(*self.args_as_sympy())
 * 
 * class erf(OneArgFunction):             # <<<<<<<<<<<<<<
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
*/
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_erf, __pyx_t_4, __pyx_t_14, NULL, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2501, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_erf, __pyx_t_5) < (0)) __PYX_ERR(0, 2501, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2506
 *         return c2py(symengine.erf(X.thisptr))
 * 
 * class erfc(OneArgFunction):             # <<<<<<<<<<<<<<
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_OneArgFunction); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2506, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_12 = PyTuple_Pack(1, __pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2506, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2506, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_14 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2506, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_14, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_erfc, __pyx_mstate_global->__pyx_n_u_erfc, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2506, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__pyx_t_4 != __pyx_t_12) {
    if (unlikely((PyDict_SetItemString(__pyx_t_5, "__orig_bases__", __pyx_t_12) < 0))) __PYX_ERR(0, 2506, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2507
 * 
 * class erfc(OneArgFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.erfc(X.thisptr))
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_4erfc_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_erfc___new, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[231])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2507, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetNewInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_new, __pyx_t_12) < (0)) __PYX_ERR(0, 2507, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2506
 *         return c2py(symengine.erf(X.thisptr))
 * 
 * class erfc(OneArgFunction):             # <<<<<<<<<<<<<<
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
*/
  __pyx_t_12 = __Pyx_Py3ClassCreate(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_erfc, __pyx_t_4, __pyx_t_5, NULL, 0, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2506, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_erfc, __pyx_t_12) < (0)) __PYX_ERR(0, 2506, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2511
 *         return c2py(symengine.erfc(X.thisptr))
 * 
 * class lowergamma(Function):             # <<<<<<<<<<<<<<
 *     def __new__(cls, x, y):
 *         cdef Basic X = sympify(x)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Function); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2511, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_14 = PyTuple_Pack(1, __pyx_t_4); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2511, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_14); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2511, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2511, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_12 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_lowergamma, __pyx_mstate_global->__pyx_n_u_lowergamma, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2511, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  if (__pyx_t_4 != __pyx_t_14) {
    if (unlikely((PyDict_SetItemString(__pyx_t_12, "__orig_bases__", __pyx_t_14) < 0))) __PYX_ERR(0, 2511, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2512
 * 
 * class lowergamma(Function):
 *     def __new__(cls, x, y):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         cdef Basic Y = sympify(y)
*/
  __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_10lowergamma_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_lowergamma___new, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[232])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2512, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14);
  #endif
  if (__Pyx_SetNewInClass(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_new, __pyx_t_14) < (0)) __PYX_ERR(0, 2512, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2517
 *         return c2py(symengine.lowergamma(X.thisptr, Y.thisptr))
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.lowergamma(*self.args_as_sympy())
*/
  __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_10lowergamma_3_sympy_, 0, __pyx_mstate_global->__pyx_n_u_lowergamma__sympy, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[233])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2517, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_sympy_2, __pyx_t_14) < (0)) __PYX_ERR(0, 2517, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2521
 *         return sympy.lowergamma(*self.args_as_sympy())
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         import sage.all as sage
 *         return sage.gamma_inc_lower(*self.args_as_sage())
*/
  __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_10lowergamma_5_sage_, 0, __pyx_mstate_global->__pyx_n_u_lowergamma__sage, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[234])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2521, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_sage, __pyx_t_14) < (0)) __PYX_ERR(0, 2521, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2511
 *         return c2py(symengine.erfc(X.thisptr))
 * 
 * class lowergamma(Function):             # <<<<<<<<<<<<<<
 *     def __new__(cls, x, y):
 *         cdef Basic X = sympify(x)
*/
  __pyx_t_14 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_lowergamma, __pyx_t_4, __pyx_t_12, NULL, 0, 0); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2511, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_lowergamma, __pyx_t_14) < (0)) __PYX_ERR(0, 2511, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2525
 *         return sage.gamma_inc_lower(*self.args_as_sage())
 * 
 * class uppergamma(Function):             # <<<<<<<<<<<<<<
 *     def __new__(cls, x, y):
 *         cdef Basic X = sympify(x)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Function); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2525, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyTuple_Pack(1, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2525, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2525, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_12 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2525, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_14 = __Pyx_Py3MetaclassPrepare(__pyx_t_12, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_uppergamma, __pyx_mstate_global->__pyx_n_u_uppergamma, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2525, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  if (__pyx_t_4 != __pyx_t_5) {
    if (unlikely((PyDict_SetItemString(__pyx_t_14, "__orig_bases__", __pyx_t_5) < 0))) __PYX_ERR(0, 2525, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2526
 * 
 * class uppergamma(Function):
 *     def __new__(cls, x, y):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         cdef Basic Y = sympify(y)
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_10uppergamma_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_uppergamma___new, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[235])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2526, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetNewInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_new, __pyx_t_5) < (0)) __PYX_ERR(0, 2526, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2531
 *         return c2py(symengine.uppergamma(X.thisptr, Y.thisptr))
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.uppergamma(*self.args_as_sympy())
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_10uppergamma_3_sympy_, 0, __pyx_mstate_global->__pyx_n_u_uppergamma__sympy, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[236])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2531, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_sympy_2, __pyx_t_5) < (0)) __PYX_ERR(0, 2531, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2535
 *         return sympy.uppergamma(*self.args_as_sympy())
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         import sage.all as sage
 *         return sage.gamma_inc(*self.args_as_sage())
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_10uppergamma_5_sage_, 0, __pyx_mstate_global->__pyx_n_u_uppergamma__sage, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[237])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2535, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_sage, __pyx_t_5) < (0)) __PYX_ERR(0, 2535, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2525
 *         return sage.gamma_inc_lower(*self.args_as_sage())
 * 
 * class uppergamma(Function):             # <<<<<<<<<<<<<<
 *     def __new__(cls, x, y):
 *         cdef Basic X = sympify(x)
*/
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_uppergamma, __pyx_t_4, __pyx_t_14, NULL, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2525, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_uppergamma, __pyx_t_5) < (0)) __PYX_ERR(0, 2525, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2539
 *         return sage.gamma_inc(*self.args_as_sage())
 * 
 * class loggamma(OneArgFunction):             # <<<<<<<<<<<<<<
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_OneArgFunction); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2539, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_12 = PyTuple_Pack(1, __pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2539, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2539, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_14 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2539, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_14, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_loggamma, __pyx_mstate_global->__pyx_n_u_loggamma, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2539, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__pyx_t_4 != __pyx_t_12) {
    if (unlikely((PyDict_SetItemString(__pyx_t_5, "__orig_bases__", __pyx_t_12) < 0))) __PYX_ERR(0, 2539, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2540
 * 
 * class loggamma(OneArgFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.loggamma(X.thisptr))
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_8loggamma_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_loggamma___new, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[238])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2540, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetNewInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_new, __pyx_t_12) < (0)) __PYX_ERR(0, 2540, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2544
 *         return c2py(symengine.loggamma(X.thisptr))
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         import sage.all as sage
 *         return sage.log_gamma(self.get_arg()._sage_())
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_8loggamma_3_sage_, 0, __pyx_mstate_global->__pyx_n_u_loggamma__sage, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[239])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2544, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_sage, __pyx_t_12) < (0)) __PYX_ERR(0, 2544, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2539
 *         return sage.gamma_inc(*self.args_as_sage())
 * 
 * class loggamma(OneArgFunction):             # <<<<<<<<<<<<<<
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
*/
  __pyx_t_12 = __Pyx_Py3ClassCreate(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_loggamma, __pyx_t_4, __pyx_t_5, NULL, 0, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2539, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_loggamma, __pyx_t_12) < (0)) __PYX_ERR(0, 2539, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2548
 *         return sage.log_gamma(self.get_arg()._sage_())
 * 
 * class beta(Function):             # <<<<<<<<<<<<<<
 *     def __new__(cls, x, y):
 *         cdef Basic X = sympify(x)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Function); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2548, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_14 = PyTuple_Pack(1, __pyx_t_4); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2548, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_14); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2548, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2548, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_12 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_beta, __pyx_mstate_global->__pyx_n_u_beta, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2548, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  if (__pyx_t_4 != __pyx_t_14) {
    if (unlikely((PyDict_SetItemString(__pyx_t_12, "__orig_bases__", __pyx_t_14) < 0))) __PYX_ERR(0, 2548, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2549
 * 
 * class beta(Function):
 *     def __new__(cls, x, y):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         cdef Basic Y = sympify(y)
*/
  __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_4beta_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_beta___new, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[240])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2549, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14);
  #endif
  if (__Pyx_SetNewInClass(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_new, __pyx_t_14) < (0)) __PYX_ERR(0, 2549, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2554
 *         return c2py(symengine.beta(X.thisptr, Y.thisptr))
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.beta(*self.args_as_sympy())
*/
  __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_4beta_3_sympy_, 0, __pyx_mstate_global->__pyx_n_u_beta__sympy, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[241])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2554, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_sympy_2, __pyx_t_14) < (0)) __PYX_ERR(0, 2554, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2558
 *         return sympy.beta(*self.args_as_sympy())
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         import sage.all as sage
 *         return sage.beta(*self.args_as_sage())
*/
  __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_4beta_5_sage_, 0, __pyx_mstate_global->__pyx_n_u_beta__sage, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[242])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2558, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_sage, __pyx_t_14) < (0)) __PYX_ERR(0, 2558, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2548
 *         return sage.log_gamma(self.get_arg()._sage_())
 * 
 * class beta(Function):             # <<<<<<<<<<<<<<
 *     def __new__(cls, x, y):
 *         cdef Basic X = sympify(x)
*/
  __pyx_t_14 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_beta, __pyx_t_4, __pyx_t_12, NULL, 0, 0); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2548, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_beta, __pyx_t_14) < (0)) __PYX_ERR(0, 2548, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2562
 *         return sage.beta(*self.args_as_sage())
 * 
 * class polygamma(Function):             # <<<<<<<<<<<<<<
 *     def __new__(cls, x, y):
 *         cdef Basic X = sympify(x)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Function); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2562, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyTuple_Pack(1, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2562, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2562, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_12 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2562, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_14 = __Pyx_Py3MetaclassPrepare(__pyx_t_12, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_polygamma, __pyx_mstate_global->__pyx_n_u_polygamma, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2562, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  if (__pyx_t_4 != __pyx_t_5) {
    if (unlikely((PyDict_SetItemString(__pyx_t_14, "__orig_bases__", __pyx_t_5) < 0))) __PYX_ERR(0, 2562, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2563
 * 
 * class polygamma(Function):
 *     def __new__(cls, x, y):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         cdef Basic Y = sympify(y)
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_9polygamma_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_polygamma___new, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[243])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2563, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetNewInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_new, __pyx_t_5) < (0)) __PYX_ERR(0, 2563, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2568
 *         return c2py(symengine.polygamma(X.thisptr, Y.thisptr))
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.polygamma(*self.args_as_sympy())
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_9polygamma_3_sympy_, 0, __pyx_mstate_global->__pyx_n_u_polygamma__sympy, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[244])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2568, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_sympy_2, __pyx_t_5) < (0)) __PYX_ERR(0, 2568, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2562
 *         return sage.beta(*self.args_as_sage())
 * 
 * class polygamma(Function):             # <<<<<<<<<<<<<<
 *     def __new__(cls, x, y):
 *         cdef Basic X = sympify(x)
*/
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_polygamma, __pyx_t_4, __pyx_t_14, NULL, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2562, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_polygamma, __pyx_t_5) < (0)) __PYX_ERR(0, 2562, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2572
 *         return sympy.polygamma(*self.args_as_sympy())
 * 
 * class sign(OneArgFunction):             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_OneArgFunction); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2572, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_12 = PyTuple_Pack(1, __pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2572, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2572, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_14 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2572, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_14, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_sign, __pyx_mstate_global->__pyx_n_u_sign, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2572, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__pyx_t_4 != __pyx_t_12) {
    if (unlikely((PyDict_SetItemString(__pyx_t_5, "__orig_bases__", __pyx_t_12) < 0))) __PYX_ERR(0, 2572, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2574
 * class sign(OneArgFunction):
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_complex(self):
 *         return True
*/
  __pyx_t_15 = NULL;
  __pyx_t_13 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_4sign_1is_complex, 0, __pyx_mstate_global->__pyx_n_u_sign_is_complex, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[245])); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2574, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_13);
  #endif
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_15, __pyx_t_13};
    __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2574, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
  }
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_is_complex, __pyx_t_12) < (0)) __PYX_ERR(0, 2574, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2578
 *         return True
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_finite(self):
 *         return True
*/
  __pyx_t_13 = NULL;
  __pyx_t_15 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_4sign_3is_finite, 0, __pyx_mstate_global->__pyx_n_u_sign_is_finite, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[246])); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2578, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_15);
  #endif
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_13, __pyx_t_15};
    __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2578, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
  }
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_is_finite, __pyx_t_12) < (0)) __PYX_ERR(0, 2578, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2582
 *         return True
 * 
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.sign(X.thisptr))
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_4sign_5__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_sign___new, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[247])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2582, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetNewInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_new, __pyx_t_12) < (0)) __PYX_ERR(0, 2582, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2572
 *         return sympy.polygamma(*self.args_as_sympy())
 * 
 * class sign(OneArgFunction):             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __pyx_t_12 = __Pyx_Py3ClassCreate(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_sign, __pyx_t_4, __pyx_t_5, NULL, 0, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2572, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_sign, __pyx_t_12) < (0)) __PYX_ERR(0, 2572, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2586
 *         return c2py(symengine.sign(X.thisptr))
 * 
 * class floor(OneArgFunction):             # <<<<<<<<<<<<<<
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_OneArgFunction); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2586, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_14 = PyTuple_Pack(1, __pyx_t_4); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2586, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_14); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2586, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2586, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_12 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_floor, __pyx_mstate_global->__pyx_n_u_floor, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2586, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  if (__pyx_t_4 != __pyx_t_14) {
    if (unlikely((PyDict_SetItemString(__pyx_t_12, "__orig_bases__", __pyx_t_14) < 0))) __PYX_ERR(0, 2586, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2587
 * 
 * class floor(OneArgFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.floor(X.thisptr))
*/
  __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_5floor_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_floor___new, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[248])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2587, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14);
  #endif
  if (__Pyx_SetNewInClass(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_new, __pyx_t_14) < (0)) __PYX_ERR(0, 2587, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2586
 *         return c2py(symengine.sign(X.thisptr))
 * 
 * class floor(OneArgFunction):             # <<<<<<<<<<<<<<
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
*/
  __pyx_t_14 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_floor, __pyx_t_4, __pyx_t_12, NULL, 0, 0); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2586, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_floor, __pyx_t_14) < (0)) __PYX_ERR(0, 2586, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2591
 *         return c2py(symengine.floor(X.thisptr))
 * 
 * class ceiling(OneArgFunction):             # <<<<<<<<<<<<<<
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_OneArgFunction); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2591, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyTuple_Pack(1, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2591, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2591, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_12 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2591, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_14 = __Pyx_Py3MetaclassPrepare(__pyx_t_12, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_ceiling, __pyx_mstate_global->__pyx_n_u_ceiling, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2591, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  if (__pyx_t_4 != __pyx_t_5) {
    if (unlikely((PyDict_SetItemString(__pyx_t_14, "__orig_bases__", __pyx_t_5) < 0))) __PYX_ERR(0, 2591, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2592
 * 
 * class ceiling(OneArgFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.ceiling(X.thisptr))
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_7ceiling_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_ceiling___new, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[249])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2592, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetNewInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_new, __pyx_t_5) < (0)) __PYX_ERR(0, 2592, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2596
 *         return c2py(symengine.ceiling(X.thisptr))
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         import sage.all as sage
 *         return sage.ceil(self.get_arg()._sage_())
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_7ceiling_3_sage_, 0, __pyx_mstate_global->__pyx_n_u_ceiling__sage, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[250])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2596, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_sage, __pyx_t_5) < (0)) __PYX_ERR(0, 2596, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2591
 *         return c2py(symengine.floor(X.thisptr))
 * 
 * class ceiling(OneArgFunction):             # <<<<<<<<<<<<<<
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
*/
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_ceiling, __pyx_t_4, __pyx_t_14, NULL, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2591, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ceiling, __pyx_t_5) < (0)) __PYX_ERR(0, 2591, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2600
 *         return sage.ceil(self.get_arg()._sage_())
 * 
 * class conjugate(OneArgFunction):             # <<<<<<<<<<<<<<
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_OneArgFunction); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2600, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_12 = PyTuple_Pack(1, __pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2600, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2600, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_14 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2600, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_14, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_conjugate, __pyx_mstate_global->__pyx_n_u_conjugate, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2600, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__pyx_t_4 != __pyx_t_12) {
    if (unlikely((PyDict_SetItemString(__pyx_t_5, "__orig_bases__", __pyx_t_12) < 0))) __PYX_ERR(0, 2600, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2601
 * 
 * class conjugate(OneArgFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.conjugate(X.thisptr))
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_9conjugate_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_conjugate___new, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[251])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2601, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetNewInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_new, __pyx_t_12) < (0)) __PYX_ERR(0, 2601, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2600
 *         return sage.ceil(self.get_arg()._sage_())
 * 
 * class conjugate(OneArgFunction):             # <<<<<<<<<<<<<<
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
*/
  __pyx_t_12 = __Pyx_Py3ClassCreate(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_conjugate, __pyx_t_4, __pyx_t_5, NULL, 0, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2600, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_conjugate, __pyx_t_12) < (0)) __PYX_ERR(0, 2600, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2605
 *         return c2py(symengine.conjugate(X.thisptr))
 * 
 * class log(OneArgFunction):             # <<<<<<<<<<<<<<
 *     def __new__(cls, x, y=None):
 *         cdef Basic X = sympify(x)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_OneArgFunction); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2605, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_14 = PyTuple_Pack(1, __pyx_t_4); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2605, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_14); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2605, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2605, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_12 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_log, __pyx_mstate_global->__pyx_n_u_log, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2605, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  if (__pyx_t_4 != __pyx_t_14) {
    if (unlikely((PyDict_SetItemString(__pyx_t_12, "__orig_bases__", __pyx_t_14) < 0))) __PYX_ERR(0, 2605, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2606
 * 
 * class log(OneArgFunction):
 *     def __new__(cls, x, y=None):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         if y == None:
*/
  __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_3log_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_log___new, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[252])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2606, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_14, __pyx_mstate_global->__pyx_tuple[11]);
  if (__Pyx_SetNewInClass(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_new, __pyx_t_14) < (0)) __PYX_ERR(0, 2606, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2605
 *         return c2py(symengine.conjugate(X.thisptr))
 * 
 * class log(OneArgFunction):             # <<<<<<<<<<<<<<
 *     def __new__(cls, x, y=None):
 *         cdef Basic X = sympify(x)
*/
  __pyx_t_14 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_log, __pyx_t_4, __pyx_t_12, NULL, 0, 0); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2605, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_log, __pyx_t_14) < (0)) __PYX_ERR(0, 2605, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2613
 *         return c2py(symengine.log(X.thisptr, Y.thisptr))
 * 
 * class sin(TrigFunction):             # <<<<<<<<<<<<<<
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_TrigFunction); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2613, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyTuple_Pack(1, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2613, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2613, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_12 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2613, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_14 = __Pyx_Py3MetaclassPrepare(__pyx_t_12, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_sin, __pyx_mstate_global->__pyx_n_u_sin, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2613, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  if (__pyx_t_4 != __pyx_t_5) {
    if (unlikely((PyDict_SetItemString(__pyx_t_14, "__orig_bases__", __pyx_t_5) < 0))) __PYX_ERR(0, 2613, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2614
 * 
 * class sin(TrigFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.sin(X.thisptr))
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_3sin_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_sin___new, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[253])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2614, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetNewInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_new, __pyx_t_5) < (0)) __PYX_ERR(0, 2614, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2613
 *         return c2py(symengine.log(X.thisptr, Y.thisptr))
 * 
 * class sin(TrigFunction):             # <<<<<<<<<<<<<<
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
*/
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_sin, __pyx_t_4, __pyx_t_14, NULL, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2613, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_sin, __pyx_t_5) < (0)) __PYX_ERR(0, 2613, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2618
 *         return c2py(symengine.sin(X.thisptr))
 * 
 * class cos(TrigFunction):             # <<<<<<<<<<<<<<
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_TrigFunction); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2618, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_12 = PyTuple_Pack(1, __pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2618, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2618, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_14 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2618, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_14, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_cos, __pyx_mstate_global->__pyx_n_u_cos, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2618, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__pyx_t_4 != __pyx_t_12) {
    if (unlikely((PyDict_SetItemString(__pyx_t_5, "__orig_bases__", __pyx_t_12) < 0))) __PYX_ERR(0, 2618, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2619
 * 
 * class cos(TrigFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.cos(X.thisptr))
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_3cos_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_cos___new, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[254])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2619, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetNewInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_new, __pyx_t_12) < (0)) __PYX_ERR(0, 2619, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2618
 *         return c2py(symengine.sin(X.thisptr))
 * 
 * class cos(TrigFunction):             # <<<<<<<<<<<<<<
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
*/
  __pyx_t_12 = __Pyx_Py3ClassCreate(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_cos, __pyx_t_4, __pyx_t_5, NULL, 0, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2618, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_cos, __pyx_t_12) < (0)) __PYX_ERR(0, 2618, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2623
 *         return c2py(symengine.cos(X.thisptr))
 * 
 * class tan(TrigFunction):             # <<<<<<<<<<<<<<
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_TrigFunction); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2623, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_14 = PyTuple_Pack(1, __pyx_t_4); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2623, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_14); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2623, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2623, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_12 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_tan, __pyx_mstate_global->__pyx_n_u_tan, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2623, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  if (__pyx_t_4 != __pyx_t_14) {
    if (unlikely((PyDict_SetItemString(__pyx_t_12, "__orig_bases__", __pyx_t_14) < 0))) __PYX_ERR(0, 2623, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2624
 * 
 * class tan(TrigFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.tan(X.thisptr))
*/
  __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_3tan_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_tan___new, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[255])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2624, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14);
  #endif
  if (__Pyx_SetNewInClass(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_new, __pyx_t_14) < (0)) __PYX_ERR(0, 2624, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2623
 *         return c2py(symengine.cos(X.thisptr))
 * 
 * class tan(TrigFunction):             # <<<<<<<<<<<<<<
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
*/
  __pyx_t_14 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_tan, __pyx_t_4, __pyx_t_12, NULL, 0, 0); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2623, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_tan, __pyx_t_14) < (0)) __PYX_ERR(0, 2623, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2628
 *         return c2py(symengine.tan(X.thisptr))
 * 
 * class cot(TrigFunction):             # <<<<<<<<<<<<<<
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_TrigFunction); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2628, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyTuple_Pack(1, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2628, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2628, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_12 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2628, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_14 = __Pyx_Py3MetaclassPrepare(__pyx_t_12, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_cot, __pyx_mstate_global->__pyx_n_u_cot, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2628, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  if (__pyx_t_4 != __pyx_t_5) {
    if (unlikely((PyDict_SetItemString(__pyx_t_14, "__orig_bases__", __pyx_t_5) < 0))) __PYX_ERR(0, 2628, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2629
 * 
 * class cot(TrigFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.cot(X.thisptr))
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_3cot_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_cot___new, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[256])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2629, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetNewInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_new, __pyx_t_5) < (0)) __PYX_ERR(0, 2629, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2628
 *         return c2py(symengine.tan(X.thisptr))
 * 
 * class cot(TrigFunction):             # <<<<<<<<<<<<<<
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
*/
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_cot, __pyx_t_4, __pyx_t_14, NULL, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2628, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_cot, __pyx_t_5) < (0)) __PYX_ERR(0, 2628, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2633
 *         return c2py(symengine.cot(X.thisptr))
 * 
 * class sec(TrigFunction):             # <<<<<<<<<<<<<<
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_TrigFunction); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2633, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_12 = PyTuple_Pack(1, __pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2633, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2633, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_14 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2633, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_14, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_sec, __pyx_mstate_global->__pyx_n_u_sec, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2633, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__pyx_t_4 != __pyx_t_12) {
    if (unlikely((PyDict_SetItemString(__pyx_t_5, "__orig_bases__", __pyx_t_12) < 0))) __PYX_ERR(0, 2633, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2634
 * 
 * class sec(TrigFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.sec(X.thisptr))
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_3sec_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_sec___new, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[257])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2634, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetNewInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_new, __pyx_t_12) < (0)) __PYX_ERR(0, 2634, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2633
 *         return c2py(symengine.cot(X.thisptr))
 * 
 * class sec(TrigFunction):             # <<<<<<<<<<<<<<
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
*/
  __pyx_t_12 = __Pyx_Py3ClassCreate(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_sec, __pyx_t_4, __pyx_t_5, NULL, 0, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2633, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_sec, __pyx_t_12) < (0)) __PYX_ERR(0, 2633, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2638
 *         return c2py(symengine.sec(X.thisptr))
 * 
 * class csc(TrigFunction):             # <<<<<<<<<<<<<<
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_TrigFunction); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2638, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_14 = PyTuple_Pack(1, __pyx_t_4); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2638, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_14); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2638, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2638, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_12 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_csc, __pyx_mstate_global->__pyx_n_u_csc, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2638, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  if (__pyx_t_4 != __pyx_t_14) {
    if (unlikely((PyDict_SetItemString(__pyx_t_12, "__orig_bases__", __pyx_t_14) < 0))) __PYX_ERR(0, 2638, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2639
 * 
 * class csc(TrigFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.csc(X.thisptr))
*/
  __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_3csc_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_csc___new, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[258])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2639, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14);
  #endif
  if (__Pyx_SetNewInClass(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_new, __pyx_t_14) < (0)) __PYX_ERR(0, 2639, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2638
 *         return c2py(symengine.sec(X.thisptr))
 * 
 * class csc(TrigFunction):             # <<<<<<<<<<<<<<
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
*/
  __pyx_t_14 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_csc, __pyx_t_4, __pyx_t_12, NULL, 0, 0); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2638, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_csc, __pyx_t_14) < (0)) __PYX_ERR(0, 2638, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2643
 *         return c2py(symengine.csc(X.thisptr))
 * 
 * class asin(TrigFunction):             # <<<<<<<<<<<<<<
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_TrigFunction); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2643, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyTuple_Pack(1, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2643, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2643, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_12 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2643, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_14 = __Pyx_Py3MetaclassPrepare(__pyx_t_12, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_asin, __pyx_mstate_global->__pyx_n_u_asin, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2643, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  if (__pyx_t_4 != __pyx_t_5) {
    if (unlikely((PyDict_SetItemString(__pyx_t_14, "__orig_bases__", __pyx_t_5) < 0))) __PYX_ERR(0, 2643, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2644
 * 
 * class asin(TrigFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.asin(X.thisptr))
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_4asin_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_asin___new, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[259])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2644, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetNewInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_new, __pyx_t_5) < (0)) __PYX_ERR(0, 2644, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2643
 *         return c2py(symengine.csc(X.thisptr))
 * 
 * class asin(TrigFunction):             # <<<<<<<<<<<<<<
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
*/
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_asin, __pyx_t_4, __pyx_t_14, NULL, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2643, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_asin, __pyx_t_5) < (0)) __PYX_ERR(0, 2643, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2648
 *         return c2py(symengine.asin(X.thisptr))
 * 
 * class acos(TrigFunction):             # <<<<<<<<<<<<<<
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_TrigFunction); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2648, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_12 = PyTuple_Pack(1, __pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2648, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2648, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_14 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2648, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_14, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_acos, __pyx_mstate_global->__pyx_n_u_acos, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2648, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__pyx_t_4 != __pyx_t_12) {
    if (unlikely((PyDict_SetItemString(__pyx_t_5, "__orig_bases__", __pyx_t_12) < 0))) __PYX_ERR(0, 2648, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2649
 * 
 * class acos(TrigFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.acos(X.thisptr))
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_4acos_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_acos___new, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[260])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2649, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetNewInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_new, __pyx_t_12) < (0)) __PYX_ERR(0, 2649, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2648
 *         return c2py(symengine.asin(X.thisptr))
 * 
 * class acos(TrigFunction):             # <<<<<<<<<<<<<<
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
*/
  __pyx_t_12 = __Pyx_Py3ClassCreate(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_acos, __pyx_t_4, __pyx_t_5, NULL, 0, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2648, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_acos, __pyx_t_12) < (0)) __PYX_ERR(0, 2648, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2653
 *         return c2py(symengine.acos(X.thisptr))
 * 
 * class atan(TrigFunction):             # <<<<<<<<<<<<<<
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_TrigFunction); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2653, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_14 = PyTuple_Pack(1, __pyx_t_4); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2653, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_14); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2653, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2653, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_12 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_atan, __pyx_mstate_global->__pyx_n_u_atan, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2653, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  if (__pyx_t_4 != __pyx_t_14) {
    if (unlikely((PyDict_SetItemString(__pyx_t_12, "__orig_bases__", __pyx_t_14) < 0))) __PYX_ERR(0, 2653, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2654
 * 
 * class atan(TrigFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.atan(X.thisptr))
*/
  __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_4atan_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_atan___new, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[261])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2654, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14);
  #endif
  if (__Pyx_SetNewInClass(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_new, __pyx_t_14) < (0)) __PYX_ERR(0, 2654, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2653
 *         return c2py(symengine.acos(X.thisptr))
 * 
 * class atan(TrigFunction):             # <<<<<<<<<<<<<<
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
*/
  __pyx_t_14 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_atan, __pyx_t_4, __pyx_t_12, NULL, 0, 0); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2653, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_atan, __pyx_t_14) < (0)) __PYX_ERR(0, 2653, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2658
 *         return c2py(symengine.atan(X.thisptr))
 * 
 * class acot(TrigFunction):             # <<<<<<<<<<<<<<
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_TrigFunction); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2658, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyTuple_Pack(1, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2658, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2658, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_12 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2658, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_14 = __Pyx_Py3MetaclassPrepare(__pyx_t_12, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_acot, __pyx_mstate_global->__pyx_n_u_acot, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2658, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  if (__pyx_t_4 != __pyx_t_5) {
    if (unlikely((PyDict_SetItemString(__pyx_t_14, "__orig_bases__", __pyx_t_5) < 0))) __PYX_ERR(0, 2658, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2659
 * 
 * class acot(TrigFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.acot(X.thisptr))
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_4acot_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_acot___new, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[262])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2659, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetNewInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_new, __pyx_t_5) < (0)) __PYX_ERR(0, 2659, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2658
 *         return c2py(symengine.atan(X.thisptr))
 * 
 * class acot(TrigFunction):             # <<<<<<<<<<<<<<
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
*/
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_acot, __pyx_t_4, __pyx_t_14, NULL, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2658, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_acot, __pyx_t_5) < (0)) __PYX_ERR(0, 2658, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2663
 *         return c2py(symengine.acot(X.thisptr))
 * 
 * class asec(TrigFunction):             # <<<<<<<<<<<<<<
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_TrigFunction); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2663, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_12 = PyTuple_Pack(1, __pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2663, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2663, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_14 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2663, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_14, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_asec, __pyx_mstate_global->__pyx_n_u_asec, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2663, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__pyx_t_4 != __pyx_t_12) {
    if (unlikely((PyDict_SetItemString(__pyx_t_5, "__orig_bases__", __pyx_t_12) < 0))) __PYX_ERR(0, 2663, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2664
 * 
 * class asec(TrigFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.asec(X.thisptr))
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_4asec_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_asec___new, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[263])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2664, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetNewInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_new, __pyx_t_12) < (0)) __PYX_ERR(0, 2664, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2663
 *         return c2py(symengine.acot(X.thisptr))
 * 
 * class asec(TrigFunction):             # <<<<<<<<<<<<<<
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
*/
  __pyx_t_12 = __Pyx_Py3ClassCreate(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_asec, __pyx_t_4, __pyx_t_5, NULL, 0, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2663, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_asec, __pyx_t_12) < (0)) __PYX_ERR(0, 2663, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2668
 *         return c2py(symengine.asec(X.thisptr))
 * 
 * class acsc(TrigFunction):             # <<<<<<<<<<<<<<
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_TrigFunction); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2668, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_14 = PyTuple_Pack(1, __pyx_t_4); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2668, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_14); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2668, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2668, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_12 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_acsc, __pyx_mstate_global->__pyx_n_u_acsc, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2668, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  if (__pyx_t_4 != __pyx_t_14) {
    if (unlikely((PyDict_SetItemString(__pyx_t_12, "__orig_bases__", __pyx_t_14) < 0))) __PYX_ERR(0, 2668, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2669
 * 
 * class acsc(TrigFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.acsc(X.thisptr))
*/
  __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_4acsc_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_acsc___new, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[264])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2669, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14);
  #endif
  if (__Pyx_SetNewInClass(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_new, __pyx_t_14) < (0)) __PYX_ERR(0, 2669, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2668
 *         return c2py(symengine.asec(X.thisptr))
 * 
 * class acsc(TrigFunction):             # <<<<<<<<<<<<<<
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
*/
  __pyx_t_14 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_acsc, __pyx_t_4, __pyx_t_12, NULL, 0, 0); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2668, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_acsc, __pyx_t_14) < (0)) __PYX_ERR(0, 2668, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2673
 *         return c2py(symengine.acsc(X.thisptr))
 * 
 * class sinh(HyperbolicFunction):             # <<<<<<<<<<<<<<
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_HyperbolicFunction); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2673, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyTuple_Pack(1, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2673, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2673, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_12 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2673, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_14 = __Pyx_Py3MetaclassPrepare(__pyx_t_12, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_sinh, __pyx_mstate_global->__pyx_n_u_sinh, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2673, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  if (__pyx_t_4 != __pyx_t_5) {
    if (unlikely((PyDict_SetItemString(__pyx_t_14, "__orig_bases__", __pyx_t_5) < 0))) __PYX_ERR(0, 2673, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2674
 * 
 * class sinh(HyperbolicFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.sinh(X.thisptr))
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_4sinh_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_sinh___new, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[265])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2674, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetNewInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_new, __pyx_t_5) < (0)) __PYX_ERR(0, 2674, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2673
 *         return c2py(symengine.acsc(X.thisptr))
 * 
 * class sinh(HyperbolicFunction):             # <<<<<<<<<<<<<<
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
*/
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_sinh, __pyx_t_4, __pyx_t_14, NULL, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2673, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_sinh, __pyx_t_5) < (0)) __PYX_ERR(0, 2673, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2678
 *         return c2py(symengine.sinh(X.thisptr))
 * 
 * class cosh(HyperbolicFunction):             # <<<<<<<<<<<<<<
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_HyperbolicFunction); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2678, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_12 = PyTuple_Pack(1, __pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2678, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2678, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_14 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2678, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_14, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_cosh, __pyx_mstate_global->__pyx_n_u_cosh, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2678, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__pyx_t_4 != __pyx_t_12) {
    if (unlikely((PyDict_SetItemString(__pyx_t_5, "__orig_bases__", __pyx_t_12) < 0))) __PYX_ERR(0, 2678, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2679
 * 
 * class cosh(HyperbolicFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.cosh(X.thisptr))
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_4cosh_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_cosh___new, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[266])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2679, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetNewInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_new, __pyx_t_12) < (0)) __PYX_ERR(0, 2679, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2678
 *         return c2py(symengine.sinh(X.thisptr))
 * 
 * class cosh(HyperbolicFunction):             # <<<<<<<<<<<<<<
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
*/
  __pyx_t_12 = __Pyx_Py3ClassCreate(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_cosh, __pyx_t_4, __pyx_t_5, NULL, 0, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2678, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_cosh, __pyx_t_12) < (0)) __PYX_ERR(0, 2678, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2683
 *         return c2py(symengine.cosh(X.thisptr))
 * 
 * class tanh(HyperbolicFunction):             # <<<<<<<<<<<<<<
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_HyperbolicFunction); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2683, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_14 = PyTuple_Pack(1, __pyx_t_4); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2683, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_14); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2683, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2683, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_12 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_tanh, __pyx_mstate_global->__pyx_n_u_tanh, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2683, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  if (__pyx_t_4 != __pyx_t_14) {
    if (unlikely((PyDict_SetItemString(__pyx_t_12, "__orig_bases__", __pyx_t_14) < 0))) __PYX_ERR(0, 2683, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2684
 * 
 * class tanh(HyperbolicFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.tanh(X.thisptr))
*/
  __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_4tanh_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_tanh___new, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[267])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2684, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14);
  #endif
  if (__Pyx_SetNewInClass(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_new, __pyx_t_14) < (0)) __PYX_ERR(0, 2684, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2683
 *         return c2py(symengine.cosh(X.thisptr))
 * 
 * class tanh(HyperbolicFunction):             # <<<<<<<<<<<<<<
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
*/
  __pyx_t_14 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_tanh, __pyx_t_4, __pyx_t_12, NULL, 0, 0); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2683, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_tanh, __pyx_t_14) < (0)) __PYX_ERR(0, 2683, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2688
 *         return c2py(symengine.tanh(X.thisptr))
 * 
 * class coth(HyperbolicFunction):             # <<<<<<<<<<<<<<
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_HyperbolicFunction); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2688, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyTuple_Pack(1, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2688, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2688, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_12 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2688, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_14 = __Pyx_Py3MetaclassPrepare(__pyx_t_12, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_coth, __pyx_mstate_global->__pyx_n_u_coth, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2688, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  if (__pyx_t_4 != __pyx_t_5) {
    if (unlikely((PyDict_SetItemString(__pyx_t_14, "__orig_bases__", __pyx_t_5) < 0))) __PYX_ERR(0, 2688, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2689
 * 
 * class coth(HyperbolicFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.coth(X.thisptr))
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_4coth_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_coth___new, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[268])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2689, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetNewInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_new, __pyx_t_5) < (0)) __PYX_ERR(0, 2689, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2688
 *         return c2py(symengine.tanh(X.thisptr))
 * 
 * class coth(HyperbolicFunction):             # <<<<<<<<<<<<<<
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
*/
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_coth, __pyx_t_4, __pyx_t_14, NULL, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2688, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_coth, __pyx_t_5) < (0)) __PYX_ERR(0, 2688, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2693
 *         return c2py(symengine.coth(X.thisptr))
 * 
 * class sech(HyperbolicFunction):             # <<<<<<<<<<<<<<
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_HyperbolicFunction); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2693, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_12 = PyTuple_Pack(1, __pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2693, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2693, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_14 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2693, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_14, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_sech, __pyx_mstate_global->__pyx_n_u_sech, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2693, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__pyx_t_4 != __pyx_t_12) {
    if (unlikely((PyDict_SetItemString(__pyx_t_5, "__orig_bases__", __pyx_t_12) < 0))) __PYX_ERR(0, 2693, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2694
 * 
 * class sech(HyperbolicFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.sech(X.thisptr))
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_4sech_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_sech___new, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[269])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2694, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetNewInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_new, __pyx_t_12) < (0)) __PYX_ERR(0, 2694, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2693
 *         return c2py(symengine.coth(X.thisptr))
 * 
 * class sech(HyperbolicFunction):             # <<<<<<<<<<<<<<
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
*/
  __pyx_t_12 = __Pyx_Py3ClassCreate(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_sech, __pyx_t_4, __pyx_t_5, NULL, 0, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2693, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_sech, __pyx_t_12) < (0)) __PYX_ERR(0, 2693, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2698
 *         return c2py(symengine.sech(X.thisptr))
 * 
 * class csch(HyperbolicFunction):             # <<<<<<<<<<<<<<
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_HyperbolicFunction); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2698, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_14 = PyTuple_Pack(1, __pyx_t_4); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2698, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_14); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2698, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2698, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_12 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_csch, __pyx_mstate_global->__pyx_n_u_csch, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2698, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  if (__pyx_t_4 != __pyx_t_14) {
    if (unlikely((PyDict_SetItemString(__pyx_t_12, "__orig_bases__", __pyx_t_14) < 0))) __PYX_ERR(0, 2698, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2699
 * 
 * class csch(HyperbolicFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.csch(X.thisptr))
*/
  __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_4csch_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_csch___new, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[270])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2699, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14);
  #endif
  if (__Pyx_SetNewInClass(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_new, __pyx_t_14) < (0)) __PYX_ERR(0, 2699, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2698
 *         return c2py(symengine.sech(X.thisptr))
 * 
 * class csch(HyperbolicFunction):             # <<<<<<<<<<<<<<
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
*/
  __pyx_t_14 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_csch, __pyx_t_4, __pyx_t_12, NULL, 0, 0); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2698, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_csch, __pyx_t_14) < (0)) __PYX_ERR(0, 2698, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2703
 *         return c2py(symengine.csch(X.thisptr))
 * 
 * class asinh(HyperbolicFunction):             # <<<<<<<<<<<<<<
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_HyperbolicFunction); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2703, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyTuple_Pack(1, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2703, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2703, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_12 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2703, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_14 = __Pyx_Py3MetaclassPrepare(__pyx_t_12, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_asinh, __pyx_mstate_global->__pyx_n_u_asinh, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2703, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  if (__pyx_t_4 != __pyx_t_5) {
    if (unlikely((PyDict_SetItemString(__pyx_t_14, "__orig_bases__", __pyx_t_5) < 0))) __PYX_ERR(0, 2703, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2704
 * 
 * class asinh(HyperbolicFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.asinh(X.thisptr))
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_5asinh_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_asinh___new, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[271])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2704, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetNewInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_new, __pyx_t_5) < (0)) __PYX_ERR(0, 2704, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2703
 *         return c2py(symengine.csch(X.thisptr))
 * 
 * class asinh(HyperbolicFunction):             # <<<<<<<<<<<<<<
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
*/
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_asinh, __pyx_t_4, __pyx_t_14, NULL, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2703, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_asinh, __pyx_t_5) < (0)) __PYX_ERR(0, 2703, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2708
 *         return c2py(symengine.asinh(X.thisptr))
 * 
 * class acosh(HyperbolicFunction):             # <<<<<<<<<<<<<<
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_HyperbolicFunction); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2708, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_12 = PyTuple_Pack(1, __pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2708, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2708, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_14 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2708, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_14, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_acosh, __pyx_mstate_global->__pyx_n_u_acosh, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2708, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__pyx_t_4 != __pyx_t_12) {
    if (unlikely((PyDict_SetItemString(__pyx_t_5, "__orig_bases__", __pyx_t_12) < 0))) __PYX_ERR(0, 2708, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2709
 * 
 * class acosh(HyperbolicFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.acosh(X.thisptr))
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_5acosh_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_acosh___new, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[272])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2709, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetNewInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_new, __pyx_t_12) < (0)) __PYX_ERR(0, 2709, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2708
 *         return c2py(symengine.asinh(X.thisptr))
 * 
 * class acosh(HyperbolicFunction):             # <<<<<<<<<<<<<<
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
*/
  __pyx_t_12 = __Pyx_Py3ClassCreate(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_acosh, __pyx_t_4, __pyx_t_5, NULL, 0, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2708, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_acosh, __pyx_t_12) < (0)) __PYX_ERR(0, 2708, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2713
 *         return c2py(symengine.acosh(X.thisptr))
 * 
 * class atanh(HyperbolicFunction):             # <<<<<<<<<<<<<<
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_HyperbolicFunction); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2713, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_14 = PyTuple_Pack(1, __pyx_t_4); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2713, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_14); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2713, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2713, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_12 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_atanh, __pyx_mstate_global->__pyx_n_u_atanh, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2713, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  if (__pyx_t_4 != __pyx_t_14) {
    if (unlikely((PyDict_SetItemString(__pyx_t_12, "__orig_bases__", __pyx_t_14) < 0))) __PYX_ERR(0, 2713, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2714
 * 
 * class atanh(HyperbolicFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.atanh(X.thisptr))
*/
  __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_5atanh_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_atanh___new, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[273])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2714, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14);
  #endif
  if (__Pyx_SetNewInClass(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_new, __pyx_t_14) < (0)) __PYX_ERR(0, 2714, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2713
 *         return c2py(symengine.acosh(X.thisptr))
 * 
 * class atanh(HyperbolicFunction):             # <<<<<<<<<<<<<<
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
*/
  __pyx_t_14 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_atanh, __pyx_t_4, __pyx_t_12, NULL, 0, 0); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2713, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_atanh, __pyx_t_14) < (0)) __PYX_ERR(0, 2713, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2718
 *         return c2py(symengine.atanh(X.thisptr))
 * 
 * class acoth(HyperbolicFunction):             # <<<<<<<<<<<<<<
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_HyperbolicFunction); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2718, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyTuple_Pack(1, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2718, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2718, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_12 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2718, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_14 = __Pyx_Py3MetaclassPrepare(__pyx_t_12, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_acoth, __pyx_mstate_global->__pyx_n_u_acoth, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2718, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  if (__pyx_t_4 != __pyx_t_5) {
    if (unlikely((PyDict_SetItemString(__pyx_t_14, "__orig_bases__", __pyx_t_5) < 0))) __PYX_ERR(0, 2718, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2719
 * 
 * class acoth(HyperbolicFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.acoth(X.thisptr))
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_5acoth_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_acoth___new, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[274])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2719, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetNewInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_new, __pyx_t_5) < (0)) __PYX_ERR(0, 2719, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2718
 *         return c2py(symengine.atanh(X.thisptr))
 * 
 * class acoth(HyperbolicFunction):             # <<<<<<<<<<<<<<
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
*/
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_acoth, __pyx_t_4, __pyx_t_14, NULL, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2718, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_acoth, __pyx_t_5) < (0)) __PYX_ERR(0, 2718, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2723
 *         return c2py(symengine.acoth(X.thisptr))
 * 
 * class asech(HyperbolicFunction):             # <<<<<<<<<<<<<<
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_HyperbolicFunction); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2723, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_12 = PyTuple_Pack(1, __pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2723, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2723, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_14 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2723, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_14, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_asech, __pyx_mstate_global->__pyx_n_u_asech, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2723, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__pyx_t_4 != __pyx_t_12) {
    if (unlikely((PyDict_SetItemString(__pyx_t_5, "__orig_bases__", __pyx_t_12) < 0))) __PYX_ERR(0, 2723, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2724
 * 
 * class asech(HyperbolicFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.asech(X.thisptr))
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_5asech_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_asech___new, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[275])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2724, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetNewInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_new, __pyx_t_12) < (0)) __PYX_ERR(0, 2724, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2723
 *         return c2py(symengine.acoth(X.thisptr))
 * 
 * class asech(HyperbolicFunction):             # <<<<<<<<<<<<<<
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
*/
  __pyx_t_12 = __Pyx_Py3ClassCreate(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_asech, __pyx_t_4, __pyx_t_5, NULL, 0, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2723, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_asech, __pyx_t_12) < (0)) __PYX_ERR(0, 2723, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2728
 *         return c2py(symengine.asech(X.thisptr))
 * 
 * class acsch(HyperbolicFunction):             # <<<<<<<<<<<<<<
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_HyperbolicFunction); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2728, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_14 = PyTuple_Pack(1, __pyx_t_4); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2728, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_14); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2728, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2728, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_12 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_acsch, __pyx_mstate_global->__pyx_n_u_acsch, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2728, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  if (__pyx_t_4 != __pyx_t_14) {
    if (unlikely((PyDict_SetItemString(__pyx_t_12, "__orig_bases__", __pyx_t_14) < 0))) __PYX_ERR(0, 2728, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2729
 * 
 * class acsch(HyperbolicFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.acsch(X.thisptr))
*/
  __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_5acsch_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_acsch___new, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[276])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2729, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14);
  #endif
  if (__Pyx_SetNewInClass(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_new, __pyx_t_14) < (0)) __PYX_ERR(0, 2729, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2728
 *         return c2py(symengine.asech(X.thisptr))
 * 
 * class acsch(HyperbolicFunction):             # <<<<<<<<<<<<<<
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
*/
  __pyx_t_14 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_acsch, __pyx_t_4, __pyx_t_12, NULL, 0, 0); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2728, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_acsch, __pyx_t_14) < (0)) __PYX_ERR(0, 2728, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2733
 *         return c2py(symengine.acsch(X.thisptr))
 * 
 * class atan2(Function):             # <<<<<<<<<<<<<<
 *     def __new__(cls, x, y):
 *         cdef Basic X = sympify(x)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Function); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2733, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyTuple_Pack(1, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2733, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2733, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_12 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2733, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_14 = __Pyx_Py3MetaclassPrepare(__pyx_t_12, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_atan2, __pyx_mstate_global->__pyx_n_u_atan2, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2733, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  if (__pyx_t_4 != __pyx_t_5) {
    if (unlikely((PyDict_SetItemString(__pyx_t_14, "__orig_bases__", __pyx_t_5) < 0))) __PYX_ERR(0, 2733, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2734
 * 
 * class atan2(Function):
 *     def __new__(cls, x, y):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         cdef Basic Y = sympify(y)
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_5atan2_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_atan2___new, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[277])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2734, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetNewInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_new, __pyx_t_5) < (0)) __PYX_ERR(0, 2734, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2739
 *         return c2py(symengine.atan2(X.thisptr, Y.thisptr))
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.atan2(*self.args_as_sympy())
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_5atan2_3_sympy_, 0, __pyx_mstate_global->__pyx_n_u_atan2__sympy, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[278])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2739, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_sympy_2, __pyx_t_5) < (0)) __PYX_ERR(0, 2739, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2743
 *         return sympy.atan2(*self.args_as_sympy())
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         import sage.all as sage
 *         return sage.atan2(*self.args_as_sage())
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_5atan2_5_sage_, 0, __pyx_mstate_global->__pyx_n_u_atan2__sage, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[279])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2743, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_sage, __pyx_t_5) < (0)) __PYX_ERR(0, 2743, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2733
 *         return c2py(symengine.acsch(X.thisptr))
 * 
 * class atan2(Function):             # <<<<<<<<<<<<<<
 *     def __new__(cls, x, y):
 *         cdef Basic X = sympify(x)
*/
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_atan2, __pyx_t_4, __pyx_t_14, NULL, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2733, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_atan2, __pyx_t_5) < (0)) __PYX_ERR(0, 2733, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2749
 * # For backwards compatibility
 * 
 * Sin = sin             # <<<<<<<<<<<<<<
 * Cos = cos
 * Tan = tan
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_sin); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2749, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Sin, __pyx_t_4) < (0)) __PYX_ERR(0, 2749, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2750
 * 
 * Sin = sin
 * Cos = cos             # <<<<<<<<<<<<<<
 * Tan = tan
 * Cot = cot
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_cos); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2750, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Cos, __pyx_t_4) < (0)) __PYX_ERR(0, 2750, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2751
 * Sin = sin
 * Cos = cos
 * Tan = tan             # <<<<<<<<<<<<<<
 * Cot = cot
 * Sec = sec
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_tan); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2751, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Tan, __pyx_t_4) < (0)) __PYX_ERR(0, 2751, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2752
 * Cos = cos
 * Tan = tan
 * Cot = cot             # <<<<<<<<<<<<<<
 * Sec = sec
 * Csc = csc
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_cot); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2752, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Cot, __pyx_t_4) < (0)) __PYX_ERR(0, 2752, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2753
 * Tan = tan
 * Cot = cot
 * Sec = sec             # <<<<<<<<<<<<<<
 * Csc = csc
 * ASin = asin
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_sec); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2753, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Sec, __pyx_t_4) < (0)) __PYX_ERR(0, 2753, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2754
 * Cot = cot
 * Sec = sec
 * Csc = csc             # <<<<<<<<<<<<<<
 * ASin = asin
 * ACos = acos
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_csc); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2754, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Csc, __pyx_t_4) < (0)) __PYX_ERR(0, 2754, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2755
 * Sec = sec
 * Csc = csc
 * ASin = asin             # <<<<<<<<<<<<<<
 * ACos = acos
 * ATan = atan
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_asin); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2755, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ASin, __pyx_t_4) < (0)) __PYX_ERR(0, 2755, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2756
 * Csc = csc
 * ASin = asin
 * ACos = acos             # <<<<<<<<<<<<<<
 * ATan = atan
 * ACot = acot
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_acos); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2756, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ACos, __pyx_t_4) < (0)) __PYX_ERR(0, 2756, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2757
 * ASin = asin
 * ACos = acos
 * ATan = atan             # <<<<<<<<<<<<<<
 * ACot = acot
 * ASec = asec
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_atan); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2757, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ATan, __pyx_t_4) < (0)) __PYX_ERR(0, 2757, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2758
 * ACos = acos
 * ATan = atan
 * ACot = acot             # <<<<<<<<<<<<<<
 * ASec = asec
 * ACsc = acsc
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_acot); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2758, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ACot, __pyx_t_4) < (0)) __PYX_ERR(0, 2758, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2759
 * ATan = atan
 * ACot = acot
 * ASec = asec             # <<<<<<<<<<<<<<
 * ACsc = acsc
 * Sinh = sinh
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_asec); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2759, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ASec, __pyx_t_4) < (0)) __PYX_ERR(0, 2759, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2760
 * ACot = acot
 * ASec = asec
 * ACsc = acsc             # <<<<<<<<<<<<<<
 * Sinh = sinh
 * Cosh = cosh
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_acsc); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2760, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ACsc, __pyx_t_4) < (0)) __PYX_ERR(0, 2760, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2761
 * ASec = asec
 * ACsc = acsc
 * Sinh = sinh             # <<<<<<<<<<<<<<
 * Cosh = cosh
 * Tanh = tanh
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_sinh); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2761, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Sinh, __pyx_t_4) < (0)) __PYX_ERR(0, 2761, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2762
 * ACsc = acsc
 * Sinh = sinh
 * Cosh = cosh             # <<<<<<<<<<<<<<
 * Tanh = tanh
 * Coth = coth
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_cosh); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2762, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Cosh, __pyx_t_4) < (0)) __PYX_ERR(0, 2762, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2763
 * Sinh = sinh
 * Cosh = cosh
 * Tanh = tanh             # <<<<<<<<<<<<<<
 * Coth = coth
 * Sech = sech
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_tanh); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2763, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Tanh, __pyx_t_4) < (0)) __PYX_ERR(0, 2763, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2764
 * Cosh = cosh
 * Tanh = tanh
 * Coth = coth             # <<<<<<<<<<<<<<
 * Sech = sech
 * Csch = csch
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_coth); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2764, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Coth, __pyx_t_4) < (0)) __PYX_ERR(0, 2764, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2765
 * Tanh = tanh
 * Coth = coth
 * Sech = sech             # <<<<<<<<<<<<<<
 * Csch = csch
 * ASinh = asinh
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_sech); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2765, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Sech, __pyx_t_4) < (0)) __PYX_ERR(0, 2765, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2766
 * Coth = coth
 * Sech = sech
 * Csch = csch             # <<<<<<<<<<<<<<
 * ASinh = asinh
 * ACosh = acosh
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_csch); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2766, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Csch, __pyx_t_4) < (0)) __PYX_ERR(0, 2766, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2767
 * Sech = sech
 * Csch = csch
 * ASinh = asinh             # <<<<<<<<<<<<<<
 * ACosh = acosh
 * ATanh = atanh
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_asinh); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2767, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ASinh, __pyx_t_4) < (0)) __PYX_ERR(0, 2767, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2768
 * Csch = csch
 * ASinh = asinh
 * ACosh = acosh             # <<<<<<<<<<<<<<
 * ATanh = atanh
 * ACoth = acoth
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_acosh); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2768, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ACosh, __pyx_t_4) < (0)) __PYX_ERR(0, 2768, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2769
 * ASinh = asinh
 * ACosh = acosh
 * ATanh = atanh             # <<<<<<<<<<<<<<
 * ACoth = acoth
 * ASech = asech
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_atanh); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2769, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ATanh, __pyx_t_4) < (0)) __PYX_ERR(0, 2769, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2770
 * ACosh = acosh
 * ATanh = atanh
 * ACoth = acoth             # <<<<<<<<<<<<<<
 * ASech = asech
 * ACsch = acsch
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_acoth); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2770, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ACoth, __pyx_t_4) < (0)) __PYX_ERR(0, 2770, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2771
 * ATanh = atanh
 * ACoth = acoth
 * ASech = asech             # <<<<<<<<<<<<<<
 * ACsch = acsch
 * ATan2 = atan2
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_asech); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2771, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ASech, __pyx_t_4) < (0)) __PYX_ERR(0, 2771, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2772
 * ACoth = acoth
 * ASech = asech
 * ACsch = acsch             # <<<<<<<<<<<<<<
 * ATan2 = atan2
 * Log = log
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_acsch); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2772, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ACsch, __pyx_t_4) < (0)) __PYX_ERR(0, 2772, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2773
 * ASech = asech
 * ACsch = acsch
 * ATan2 = atan2             # <<<<<<<<<<<<<<
 * Log = log
 * Gamma = gamma
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_atan2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2773, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ATan2, __pyx_t_4) < (0)) __PYX_ERR(0, 2773, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2774
 * ACsch = acsch
 * ATan2 = atan2
 * Log = log             # <<<<<<<<<<<<<<
 * Gamma = gamma
 * 
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2774, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Log, __pyx_t_4) < (0)) __PYX_ERR(0, 2774, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2775
 * ATan2 = atan2
 * Log = log
 * Gamma = gamma             # <<<<<<<<<<<<<<
 * 
 * add = Add
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_gamma); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2775, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Gamma, __pyx_t_4) < (0)) __PYX_ERR(0, 2775, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2777
 * Gamma = gamma
 * 
 * add = Add             # <<<<<<<<<<<<<<
 * mul = Mul
 * 
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Add); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2777, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_add, __pyx_t_4) < (0)) __PYX_ERR(0, 2777, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2778
 * 
 * add = Add
 * mul = Mul             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Mul); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2778, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_mul, __pyx_t_4) < (0)) __PYX_ERR(0, 2778, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2781
 * 
 * 
 * class UnevaluatedExpr(OneArgFunction):             # <<<<<<<<<<<<<<
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_OneArgFunction); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2781, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_12 = PyTuple_Pack(1, __pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2781, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2781, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_14 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2781, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_14, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_UnevaluatedExpr, __pyx_mstate_global->__pyx_n_u_UnevaluatedExpr, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2781, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__pyx_t_4 != __pyx_t_12) {
    if (unlikely((PyDict_SetItemString(__pyx_t_5, "__orig_bases__", __pyx_t_12) < 0))) __PYX_ERR(0, 2781, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2782
 * 
 * class UnevaluatedExpr(OneArgFunction):
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.unevaluated_expr(X.thisptr))
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_15UnevaluatedExpr_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_UnevaluatedExpr___new, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[280])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2782, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetNewInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_new, __pyx_t_12) < (0)) __PYX_ERR(0, 2782, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2786
 *         return c2py(symengine.unevaluated_expr(X.thisptr))
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_number(self):
 *         return self.args[0].is_number
*/
  __pyx_t_15 = NULL;
  __pyx_t_13 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_15UnevaluatedExpr_3is_number, 0, __pyx_mstate_global->__pyx_n_u_UnevaluatedExpr_is_number, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[281])); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2786, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_13);
  #endif
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_15, __pyx_t_13};
    __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2786, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
  }
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_is_number, __pyx_t_12) < (0)) __PYX_ERR(0, 2786, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2790
 *         return self.args[0].is_number
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_integer(self):
 *         return self.args[0].is_integer
*/
  __pyx_t_13 = NULL;
  __pyx_t_15 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_15UnevaluatedExpr_5is_integer, 0, __pyx_mstate_global->__pyx_n_u_UnevaluatedExpr_is_integer, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[282])); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2790, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_15);
  #endif
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_13, __pyx_t_15};
    __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2790, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
  }
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_is_integer, __pyx_t_12) < (0)) __PYX_ERR(0, 2790, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2794
 *         return self.args[0].is_integer
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_finite(self):
 *         return self.args[0].is_finite
*/
  __pyx_t_15 = NULL;
  __pyx_t_13 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_15UnevaluatedExpr_7is_finite, 0, __pyx_mstate_global->__pyx_n_u_UnevaluatedExpr_is_finite, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[283])); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2794, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_13);
  #endif
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_15, __pyx_t_13};
    __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2794, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
  }
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_is_finite, __pyx_t_12) < (0)) __PYX_ERR(0, 2794, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2781
 * 
 * 
 * class UnevaluatedExpr(OneArgFunction):             # <<<<<<<<<<<<<<
 *     def __new__(cls, x):
 *         cdef Basic X = sympify(x)
*/
  __pyx_t_12 = __Pyx_Py3ClassCreate(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_UnevaluatedExpr, __pyx_t_4, __pyx_t_5, NULL, 0, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2781, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_UnevaluatedExpr, __pyx_t_12) < (0)) __PYX_ERR(0, 2781, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2799
 * 
 * 
 * class Abs(OneArgFunction):             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_OneArgFunction); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2799, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_14 = PyTuple_Pack(1, __pyx_t_4); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2799, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_14); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2799, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2799, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_12 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_Abs, __pyx_mstate_global->__pyx_n_u_Abs, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2799, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  if (__pyx_t_4 != __pyx_t_14) {
    if (unlikely((PyDict_SetItemString(__pyx_t_12, "__orig_bases__", __pyx_t_14) < 0))) __PYX_ERR(0, 2799, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2801
 * class Abs(OneArgFunction):
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_real(self):
 *         return True
*/
  __pyx_t_13 = NULL;
  __pyx_t_15 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_3Abs_1is_real, 0, __pyx_mstate_global->__pyx_n_u_Abs_is_real, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[284])); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2801, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_15);
  #endif
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_13, __pyx_t_15};
    __pyx_t_14 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2801, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
  }
  if (__Pyx_SetNameInClass(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_is_real, __pyx_t_14) < (0)) __PYX_ERR(0, 2801, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2805
 *         return True
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_negative(self):
 *         return False
*/
  __pyx_t_15 = NULL;
  __pyx_t_13 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_3Abs_3is_negative, 0, __pyx_mstate_global->__pyx_n_u_Abs_is_negative, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[285])); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2805, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_13);
  #endif
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_15, __pyx_t_13};
    __pyx_t_14 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2805, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
  }
  if (__Pyx_SetNameInClass(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_is_negative, __pyx_t_14) < (0)) __PYX_ERR(0, 2805, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2809
 *         return False
 * 
 *     def __new__(cls, x):             # <<<<<<<<<<<<<<
 *         cdef Basic X = sympify(x)
 *         return c2py(symengine.abs(X.thisptr))
*/
  __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_3Abs_5__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_Abs___new, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[286])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2809, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14);
  #endif
  if (__Pyx_SetNewInClass(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_new, __pyx_t_14) < (0)) __PYX_ERR(0, 2809, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2813
 *         return c2py(symengine.abs(X.thisptr))
 * 
 *     def _sympy_(Basic self):             # <<<<<<<<<<<<<<
 *         cdef RCP[const symengine.Abs] X = symengine.rcp_static_cast_Abs(self.thisptr)
 *         arg = c2py(deref(X).get_arg())._sympy_()
*/
  __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_3Abs_7_sympy_, 0, __pyx_mstate_global->__pyx_n_u_Abs__sympy, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[287])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2813, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_sympy_2, __pyx_t_14) < (0)) __PYX_ERR(0, 2813, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2818
 *         return abs(arg)
 * 
 *     def _sage_(Basic self):             # <<<<<<<<<<<<<<
 *         cdef RCP[const symengine.Abs] X = symengine.rcp_static_cast_Abs(self.thisptr)
 *         arg = c2py(deref(X).get_arg())._sage_()
*/
  __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_3Abs_9_sage_, 0, __pyx_mstate_global->__pyx_n_u_Abs__sage, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[288])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2818, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_sage, __pyx_t_14) < (0)) __PYX_ERR(0, 2818, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2823
 *         return abs(arg)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def func(self):
 *         return self.__class__
*/
  __pyx_t_13 = NULL;
  __pyx_t_15 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_3Abs_11func, 0, __pyx_mstate_global->__pyx_n_u_Abs_func, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[289])); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2823, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_15);
  #endif
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_13, __pyx_t_15};
    __pyx_t_14 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2823, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
  }
  if (__Pyx_SetNameInClass(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_func, __pyx_t_14) < (0)) __PYX_ERR(0, 2823, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2799
 * 
 * 
 * class Abs(OneArgFunction):             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __pyx_t_14 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_Abs, __pyx_t_4, __pyx_t_12, NULL, 0, 0); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2799, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Abs, __pyx_t_14) < (0)) __PYX_ERR(0, 2799, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2827
 *         return self.__class__
 * 
 * class FunctionSymbol(Function):             # <<<<<<<<<<<<<<
 * 
 *     def get_name(Basic self):
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Function); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2827, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyTuple_Pack(1, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2827, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2827, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_12 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2827, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_14 = __Pyx_Py3MetaclassPrepare(__pyx_t_12, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_FunctionSymbol, __pyx_mstate_global->__pyx_n_u_FunctionSymbol, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2827, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  if (__pyx_t_4 != __pyx_t_5) {
    if (unlikely((PyDict_SetItemString(__pyx_t_14, "__orig_bases__", __pyx_t_5) < 0))) __PYX_ERR(0, 2827, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2829
 * class FunctionSymbol(Function):
 * 
 *     def get_name(Basic self):             # <<<<<<<<<<<<<<
 *         cdef RCP[const symengine.FunctionSymbol] X = \
 *             symengine.rcp_static_cast_FunctionSymbol(self.thisptr)
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_14FunctionSymbol_1get_name, 0, __pyx_mstate_global->__pyx_n_u_FunctionSymbol_get_name, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[290])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2829, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_get_name, __pyx_t_5) < (0)) __PYX_ERR(0, 2829, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2835
 *         return str(name)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def name(Basic self):
 *         return self.get_name()
*/
  __pyx_t_15 = NULL;
  __pyx_t_13 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_14FunctionSymbol_3name, 0, __pyx_mstate_global->__pyx_n_u_FunctionSymbol_name, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[291])); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2835, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_13);
  #endif
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_15, __pyx_t_13};
    __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2835, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
  }
  if (__Pyx_SetNameInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_name, __pyx_t_5) < (0)) __PYX_ERR(0, 2835, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2839
 *         return self.get_name()
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         name = self.get_name()
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_14FunctionSymbol_5_sympy_, 0, __pyx_mstate_global->__pyx_n_u_FunctionSymbol__sympy, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[292])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2839, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_sympy_2, __pyx_t_5) < (0)) __PYX_ERR(0, 2839, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2844
 *         return sympy.Function(name)(*self.args_as_sympy())
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         import sage.all as sage
 *         name = self.get_name()
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_14FunctionSymbol_7_sage_, 0, __pyx_mstate_global->__pyx_n_u_FunctionSymbol__sage, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[293])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2844, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_sage, __pyx_t_5) < (0)) __PYX_ERR(0, 2844, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2849
 *         return sage.function(name)(*self.args_as_sage())
 * 
 *     def func(self, *values):             # <<<<<<<<<<<<<<
 *         name = self.get_name()
 *         return function_symbol(name, *values)
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_14FunctionSymbol_9func, 0, __pyx_mstate_global->__pyx_n_u_FunctionSymbol_func, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[294])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2849, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_func, __pyx_t_5) < (0)) __PYX_ERR(0, 2849, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2827
 *         return self.__class__
 * 
 * class FunctionSymbol(Function):             # <<<<<<<<<<<<<<
 * 
 *     def get_name(Basic self):
*/
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_FunctionSymbol, __pyx_t_4, __pyx_t_14, NULL, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2827, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_FunctionSymbol, __pyx_t_5) < (0)) __PYX_ERR(0, 2827, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2854
 * 
 * 
 * class UndefFunction(object):             # <<<<<<<<<<<<<<
 *     def __init__(self, name):
 *         self.name = name
*/
  __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_mstate_global->__pyx_tuple[13]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2854, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_12 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2854, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_14 = __Pyx_Py3MetaclassPrepare(__pyx_t_12, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_UndefFunction, __pyx_mstate_global->__pyx_n_u_UndefFunction, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2854, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  if (__pyx_t_4 != __pyx_mstate_global->__pyx_tuple[13]) {
    if (unlikely((PyDict_SetItemString(__pyx_t_14, "__orig_bases__", __pyx_mstate_global->__pyx_tuple[13]) < 0))) __PYX_ERR(0, 2854, __pyx_L1_error)
  }

  /* "symengine/lib/symengine_wrapper.pyx":2855
 * 
 * class UndefFunction(object):
 *     def __init__(self, name):             # <<<<<<<<<<<<<<
 *         self.name = name
 * 
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_13UndefFunction_1__init__, 0, __pyx_mstate_global->__pyx_n_u_UndefFunction___init, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[295])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2855, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_5) < (0)) __PYX_ERR(0, 2855, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2858
 *         self.name = name
 * 
 *     def __call__(self, *values):             # <<<<<<<<<<<<<<
 *         return function_symbol(self.name, *values)
 * 
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_13UndefFunction_3__call__, 0, __pyx_mstate_global->__pyx_n_u_UndefFunction___call, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[296])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2858, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_call, __pyx_t_5) < (0)) __PYX_ERR(0, 2858, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2854
 * 
 * 
 * class UndefFunction(object):             # <<<<<<<<<<<<<<
 *     def __init__(self, name):
 *         self.name = name
*/
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_UndefFunction, __pyx_t_4, __pyx_t_14, NULL, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2854, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_UndefFunction, __pyx_t_5) < (0)) __PYX_ERR(0, 2854, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2894
 *     return X.thisptr
 * 
 * def create_sympy_module():             # <<<<<<<<<<<<<<
 *     cdef PyModule s = PyModule.__new__(PyModule)
 *     s.thisptr = symengine.make_rcp_PyModule(&symengine_to_sympy, &pynumber_to_symengine, &sympy_eval,
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_23create_sympy_module, 0, __pyx_mstate_global->__pyx_n_u_create_sympy_module, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[297])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2894, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_create_sympy_module, __pyx_t_4) < (0)) __PYX_ERR(0, 2894, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2900
 *     return s
 * 
 * def create_sage_module():             # <<<<<<<<<<<<<<
 *     cdef PyModule s = PyModule.__new__(PyModule)
 *     s.thisptr = symengine.make_rcp_PyModule(&symengine_to_sage, &pynumber_to_symengine, &sage_eval,
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_25create_sage_module, 0, __pyx_mstate_global->__pyx_n_u_create_sage_module, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[298])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2900, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_create_sage_module, __pyx_t_4) < (0)) __PYX_ERR(0, 2900, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2906
 *     return s
 * 
 * sympy_module = create_sympy_module()             # <<<<<<<<<<<<<<
 * sage_module = create_sage_module()
 * 
*/
  __pyx_t_12 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_create_sympy_module); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2906, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_12, NULL};
    __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_14, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2906, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_sympy_module, __pyx_t_4) < (0)) __PYX_ERR(0, 2906, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2907
 * 
 * sympy_module = create_sympy_module()
 * sage_module = create_sage_module()             # <<<<<<<<<<<<<<
 * 
 * cdef class PyNumber(Number):
*/
  __pyx_t_14 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_create_sage_module); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2907, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_14, NULL};
    __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_12, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2907, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_sage_module, __pyx_t_4) < (0)) __PYX_ERR(0, 2907, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2916
 *         self.thisptr = symengine.make_rcp_PyNumber(<PyObject*>(obj), module.thisptr)
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.sympify(self.pyobject())
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_8PyNumber_3_sympy_, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PyNumber__sympy, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[299])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2916, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_PyNumber, __pyx_mstate_global->__pyx_n_u_sympy_2, __pyx_t_4) < (0)) __PYX_ERR(0, 2916, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2920
 *         return sympy.sympify(self.pyobject())
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         import sage.all as sage
 *         res = self.pyobject()
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_8PyNumber_5_sage_, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PyNumber__sage, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[300])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2920, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_PyNumber, __pyx_mstate_global->__pyx_n_u_sage, __pyx_t_4) < (0)) __PYX_ERR(0, 2920, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2927
 *         return res
 * 
 *     def pyobject(self):             # <<<<<<<<<<<<<<
 *         return <object>deref(symengine.rcp_static_cast_PyNumber(self.thisptr)).get_py_object()
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_8PyNumber_7pyobject, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PyNumber_pyobject, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[301])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2927, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_PyNumber, __pyx_mstate_global->__pyx_n_u_pyobject, __pyx_t_4) < (0)) __PYX_ERR(0, 2927, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2931
 * 
 * 
 * class PyFunction(FunctionSymbol):             # <<<<<<<<<<<<<<
 * 
 *     def __init__(Basic self, pyfunction = None, args = None, pyfunction_class=None, module=None):
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_FunctionSymbol); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2931, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_12 = PyTuple_Pack(1, __pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2931, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2931, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_14 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2931, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_14, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_PyFunction, __pyx_mstate_global->__pyx_n_u_PyFunction, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2931, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__pyx_t_4 != __pyx_t_12) {
    if (unlikely((PyDict_SetItemString(__pyx_t_5, "__orig_bases__", __pyx_t_12) < 0))) __PYX_ERR(0, 2931, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2933
 * class PyFunction(FunctionSymbol):
 * 
 *     def __init__(Basic self, pyfunction = None, args = None, pyfunction_class=None, module=None):             # <<<<<<<<<<<<<<
 *         if pyfunction is None:
 *             return
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_10PyFunction_1__init__, 0, __pyx_mstate_global->__pyx_n_u_PyFunction___init, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[302])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2933, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_12, __pyx_mstate_global->__pyx_tuple[14]);
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_12) < (0)) __PYX_ERR(0, 2933, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2942
 *         self.thisptr = symengine.make_rcp_PyFunction(v, _pyfunction_class.thisptr, _pyfunction)
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.sympify(self.pyobject())
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_10PyFunction_3_sympy_, 0, __pyx_mstate_global->__pyx_n_u_PyFunction__sympy, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[303])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2942, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_sympy_2, __pyx_t_12) < (0)) __PYX_ERR(0, 2942, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2946
 *         return sympy.sympify(self.pyobject())
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         import sage.all as sage
 *         return sage.SR(self.pyobject())
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_10PyFunction_5_sage_, 0, __pyx_mstate_global->__pyx_n_u_PyFunction__sage, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[304])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2946, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_sage, __pyx_t_12) < (0)) __PYX_ERR(0, 2946, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2950
 *         return sage.SR(self.pyobject())
 * 
 *     def pyobject(Basic self):             # <<<<<<<<<<<<<<
 *         return <object>deref(symengine.rcp_static_cast_PyFunction(self.thisptr)).get_py_object()
 * 
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_10PyFunction_7pyobject, 0, __pyx_mstate_global->__pyx_n_u_PyFunction_pyobject, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[305])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2950, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pyobject, __pyx_t_12) < (0)) __PYX_ERR(0, 2950, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2931
 * 
 * 
 * class PyFunction(FunctionSymbol):             # <<<<<<<<<<<<<<
 * 
 *     def __init__(Basic self, pyfunction = None, args = None, pyfunction_class=None, module=None):
*/
  __pyx_t_12 = __Pyx_Py3ClassCreate(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_PyFunction, __pyx_t_4, __pyx_t_5, NULL, 0, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2931, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_PyFunction, __pyx_t_12) < (0)) __PYX_ERR(0, 2931, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_15PyFunctionClass_3__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PyFunctionClass___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[306])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_15PyFunctionClass_5__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PyFunctionClass___setstate_cytho, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[307])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2960
 * 
 * # TODO: remove this once SymEngine conversions are available in Sage.
 * def wrap_sage_function(func):             # <<<<<<<<<<<<<<
 *     return PyFunction(func, func.operands(), func.operator(), sage_module)
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_27wrap_sage_function, 0, __pyx_mstate_global->__pyx_n_u_wrap_sage_function, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[308])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2960, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_wrap_sage_function, __pyx_t_4) < (0)) __PYX_ERR(0, 2960, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2964
 * 
 * 
 * class Max(Function):             # <<<<<<<<<<<<<<
 * 
 *     def __new__(cls, *args):
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Function); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2964, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_14 = PyTuple_Pack(1, __pyx_t_4); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2964, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_14); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2964, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2964, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_12 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_Max, __pyx_mstate_global->__pyx_n_u_Max, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2964, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  if (__pyx_t_4 != __pyx_t_14) {
    if (unlikely((PyDict_SetItemString(__pyx_t_12, "__orig_bases__", __pyx_t_14) < 0))) __PYX_ERR(0, 2964, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2966
 * class Max(Function):
 * 
 *     def __new__(cls, *args):             # <<<<<<<<<<<<<<
 *         return _max(*args)
 * 
*/
  __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_3Max_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_Max___new, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[309])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2966, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14);
  #endif
  if (__Pyx_SetNewInClass(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_new, __pyx_t_14) < (0)) __PYX_ERR(0, 2966, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2969
 *         return _max(*args)
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         s = self.args_as_sympy()
*/
  __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_3Max_3_sympy_, 0, __pyx_mstate_global->__pyx_n_u_Max__sympy, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[310])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2969, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_sympy_2, __pyx_t_14) < (0)) __PYX_ERR(0, 2969, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2974
 *         return sympy.Max(*s)
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         import sage.all as sage
 *         s = self.args_as_sage()
*/
  __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_3Max_5_sage_, 0, __pyx_mstate_global->__pyx_n_u_Max__sage, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[311])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2974, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_sage, __pyx_t_14) < (0)) __PYX_ERR(0, 2974, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2979
 *         return sage.max(*s)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def func(self):
 *         return self.__class__
*/
  __pyx_t_13 = NULL;
  __pyx_t_15 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_3Max_7func, 0, __pyx_mstate_global->__pyx_n_u_Max_func, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[312])); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2979, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_15);
  #endif
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_13, __pyx_t_15};
    __pyx_t_14 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2979, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
  }
  if (__Pyx_SetNameInClass(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_func, __pyx_t_14) < (0)) __PYX_ERR(0, 2979, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2964
 * 
 * 
 * class Max(Function):             # <<<<<<<<<<<<<<
 * 
 *     def __new__(cls, *args):
*/
  __pyx_t_14 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_Max, __pyx_t_4, __pyx_t_12, NULL, 0, 0); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2964, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Max, __pyx_t_14) < (0)) __PYX_ERR(0, 2964, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2983
 *         return self.__class__
 * 
 * class Min(Function):             # <<<<<<<<<<<<<<
 * 
 *     def __new__(cls, *args):
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Function); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2983, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyTuple_Pack(1, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2983, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2983, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_12 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2983, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_14 = __Pyx_Py3MetaclassPrepare(__pyx_t_12, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_Min, __pyx_mstate_global->__pyx_n_u_Min, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2983, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  if (__pyx_t_4 != __pyx_t_5) {
    if (unlikely((PyDict_SetItemString(__pyx_t_14, "__orig_bases__", __pyx_t_5) < 0))) __PYX_ERR(0, 2983, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2985
 * class Min(Function):
 * 
 *     def __new__(cls, *args):             # <<<<<<<<<<<<<<
 *         return _min(*args)
 * 
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_3Min_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_Min___new, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[313])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2985, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetNewInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_new, __pyx_t_5) < (0)) __PYX_ERR(0, 2985, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2988
 *         return _min(*args)
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         s = self.args_as_sympy()
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_3Min_3_sympy_, 0, __pyx_mstate_global->__pyx_n_u_Min__sympy, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[314])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2988, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_sympy_2, __pyx_t_5) < (0)) __PYX_ERR(0, 2988, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2993
 *         return sympy.Min(*s)
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         import sage.all as sage
 *         s = self.args_as_sage()
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_3Min_5_sage_, 0, __pyx_mstate_global->__pyx_n_u_Min__sage, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[315])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2993, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_sage, __pyx_t_5) < (0)) __PYX_ERR(0, 2993, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2998
 *         return sage.min(*s)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def func(self):
 *         return self.__class__
*/
  __pyx_t_15 = NULL;
  __pyx_t_13 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_3Min_7func, 0, __pyx_mstate_global->__pyx_n_u_Min_func, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[316])); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2998, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_13);
  #endif
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_15, __pyx_t_13};
    __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2998, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
  }
  if (__Pyx_SetNameInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_func, __pyx_t_5) < (0)) __PYX_ERR(0, 2998, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":2983
 *         return self.__class__
 * 
 * class Min(Function):             # <<<<<<<<<<<<<<
 * 
 *     def __new__(cls, *args):
*/
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_Min, __pyx_t_4, __pyx_t_14, NULL, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2983, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Min, __pyx_t_5) < (0)) __PYX_ERR(0, 2983, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3003
 * 
 * 
 * class Derivative(Expr):             # <<<<<<<<<<<<<<
 * 
 *     def __new__(self, expr, *variables):
*/
  __pyx_t_4 = PyTuple_Pack(1, ((PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Expr)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3003, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_12 = __Pyx_PEP560_update_bases(__pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3003, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_14 = __Pyx_CalculateMetaclass(NULL, __pyx_t_12); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3003, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_14, __pyx_t_12, __pyx_mstate_global->__pyx_n_u_Derivative, __pyx_mstate_global->__pyx_n_u_Derivative, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3003, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__pyx_t_12 != __pyx_t_4) {
    if (unlikely((PyDict_SetItemString(__pyx_t_5, "__orig_bases__", __pyx_t_4) < 0))) __PYX_ERR(0, 3003, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3005
 * class Derivative(Expr):
 * 
 *     def __new__(self, expr, *variables):             # <<<<<<<<<<<<<<
 *         if len(variables) == 1 and is_sequence(variables[0]):
 *             return diff(expr, *variables[0])
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_10Derivative_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_Derivative___new, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[317])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3005, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetNewInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_new, __pyx_t_4) < (0)) __PYX_ERR(0, 3005, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3010
 *         return diff(expr, *variables)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_Derivative(self):
 *         return True
*/
  __pyx_t_13 = NULL;
  __pyx_t_15 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_10Derivative_3is_Derivative, 0, __pyx_mstate_global->__pyx_n_u_Derivative_is_Derivative, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[318])); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3010, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_15);
  #endif
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_13, __pyx_t_15};
    __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3010, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_is_Derivative, __pyx_t_4) < (0)) __PYX_ERR(0, 3010, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3014
 *         return True
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def expr(Basic self):
 *         cdef RCP[const symengine.Derivative] X = symengine.rcp_static_cast_Derivative(self.thisptr)
*/
  __pyx_t_15 = NULL;
  __pyx_t_13 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_10Derivative_5expr, 0, __pyx_mstate_global->__pyx_n_u_Derivative_expr, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[319])); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3014, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_13);
  #endif
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_15, __pyx_t_13};
    __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3014, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_expr, __pyx_t_4) < (0)) __PYX_ERR(0, 3014, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3019
 *         return c2py(deref(X).get_arg())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def variables(self):
 *         return self.args[1:]
*/
  __pyx_t_13 = NULL;
  __pyx_t_15 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_10Derivative_7variables, 0, __pyx_mstate_global->__pyx_n_u_Derivative_variables, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[320])); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3019, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_15);
  #endif
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_13, __pyx_t_15};
    __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3019, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_variables, __pyx_t_4) < (0)) __PYX_ERR(0, 3019, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3023
 *         return self.args[1:]
 * 
 *     def _sympy_(Basic self):             # <<<<<<<<<<<<<<
 *         cdef RCP[const symengine.Derivative] X = \
 *             symengine.rcp_static_cast_Derivative(self.thisptr)
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_10Derivative_9_sympy_, 0, __pyx_mstate_global->__pyx_n_u_Derivative__sympy, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[321])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3023, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_sympy_2, __pyx_t_4) < (0)) __PYX_ERR(0, 3023, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3034
 *         return sympy.Derivative(arg, *s)
 * 
 *     def _sage_(Basic self):             # <<<<<<<<<<<<<<
 *         cdef RCP[const symengine.Derivative] X = \
 *             symengine.rcp_static_cast_Derivative(self.thisptr)
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_10Derivative_11_sage_, 0, __pyx_mstate_global->__pyx_n_u_Derivative__sage, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[322])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3034, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_sage, __pyx_t_4) < (0)) __PYX_ERR(0, 3034, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3044
 *         return arg.diff(*s)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def func(self):
 *         return self.__class__
*/
  __pyx_t_15 = NULL;
  __pyx_t_13 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_10Derivative_13func, 0, __pyx_mstate_global->__pyx_n_u_Derivative_func, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[323])); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3044, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_13);
  #endif
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_15, __pyx_t_13};
    __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3044, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_func, __pyx_t_4) < (0)) __PYX_ERR(0, 3044, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3003
 * 
 * 
 * class Derivative(Expr):             # <<<<<<<<<<<<<<
 * 
 *     def __new__(self, expr, *variables):
*/
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_Derivative, __pyx_t_12, __pyx_t_5, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3003, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Derivative, __pyx_t_4) < (0)) __PYX_ERR(0, 3003, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3049
 * 
 * 
 * class Subs(Expr):             # <<<<<<<<<<<<<<
 * 
 *     def __new__(self, expr, variables, point):
*/
  __pyx_t_12 = PyTuple_Pack(1, ((PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Expr)); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3049, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_14 = __Pyx_PEP560_update_bases(__pyx_t_12); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3049, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_14); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3049, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_t_14, __pyx_mstate_global->__pyx_n_u_Subs, __pyx_mstate_global->__pyx_n_u_Subs, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3049, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__pyx_t_14 != __pyx_t_12) {
    if (unlikely((PyDict_SetItemString(__pyx_t_4, "__orig_bases__", __pyx_t_12) < 0))) __PYX_ERR(0, 3049, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3051
 * class Subs(Expr):
 * 
 *     def __new__(self, expr, variables, point):             # <<<<<<<<<<<<<<
 *         return sympify(expr).subs(variables, point)
 * 
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_4Subs_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_Subs___new, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[324])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3051, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetNewInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_new, __pyx_t_12) < (0)) __PYX_ERR(0, 3051, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3054
 *         return sympify(expr).subs(variables, point)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def expr(Basic self):
 *         cdef RCP[const symengine.Subs] me = symengine.rcp_static_cast_Subs(self.thisptr)
*/
  __pyx_t_13 = NULL;
  __pyx_t_15 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_4Subs_3expr, 0, __pyx_mstate_global->__pyx_n_u_Subs_expr, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[325])); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3054, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_15);
  #endif
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_13, __pyx_t_15};
    __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3054, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
  }
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_expr, __pyx_t_12) < (0)) __PYX_ERR(0, 3054, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3059
 *         return c2py(deref(me).get_arg())
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def variables(Basic self):
 *         cdef RCP[const symengine.Subs] me = symengine.rcp_static_cast_Subs(self.thisptr)
*/
  __pyx_t_15 = NULL;
  __pyx_t_13 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_4Subs_5variables, 0, __pyx_mstate_global->__pyx_n_u_Subs_variables, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[326])); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3059, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_13);
  #endif
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_15, __pyx_t_13};
    __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3059, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
  }
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_variables, __pyx_t_12) < (0)) __PYX_ERR(0, 3059, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3065
 *         return vec_basic_to_tuple(variables)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def point(Basic self):
 *         cdef RCP[const symengine.Subs] me = symengine.rcp_static_cast_Subs(self.thisptr)
*/
  __pyx_t_13 = NULL;
  __pyx_t_15 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_4Subs_7point, 0, __pyx_mstate_global->__pyx_n_u_Subs_point, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[327])); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3065, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_15);
  #endif
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_13, __pyx_t_15};
    __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3065, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
  }
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_point, __pyx_t_12) < (0)) __PYX_ERR(0, 3065, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3071
 *         return vec_basic_to_tuple(point)
 * 
 *     def _sympy_(Basic self):             # <<<<<<<<<<<<<<
 *         cdef RCP[const symengine.Subs] X = symengine.rcp_static_cast_Subs(self.thisptr)
 *         arg = c2py(deref(X).get_arg())._sympy_()
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_4Subs_9_sympy_, 0, __pyx_mstate_global->__pyx_n_u_Subs__sympy, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[328])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3071, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_sympy_2, __pyx_t_12) < (0)) __PYX_ERR(0, 3071, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3084
 *         return sympy.Subs(arg, v, p)
 * 
 *     def _sage_(Basic self):             # <<<<<<<<<<<<<<
 *         cdef RCP[const symengine.Subs] X = symengine.rcp_static_cast_Subs(self.thisptr)
 *         arg = c2py(deref(X).get_arg())._sage_()
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_4Subs_11_sage_, 0, __pyx_mstate_global->__pyx_n_u_Subs__sage, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[329])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3084, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_sage, __pyx_t_12) < (0)) __PYX_ERR(0, 3084, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3095
 *         return arg.subs(v)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def func(self):
 *         return self.__class__
*/
  __pyx_t_15 = NULL;
  __pyx_t_13 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_4Subs_13func, 0, __pyx_mstate_global->__pyx_n_u_Subs_func, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[330])); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3095, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_13);
  #endif
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_15, __pyx_t_13};
    __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3095, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
  }
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_func, __pyx_t_12) < (0)) __PYX_ERR(0, 3095, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3049
 * 
 * 
 * class Subs(Expr):             # <<<<<<<<<<<<<<
 * 
 *     def __new__(self, expr, variables, point):
*/
  __pyx_t_12 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_Subs, __pyx_t_14, __pyx_t_4, NULL, 0, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3049, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Subs, __pyx_t_12) < (0)) __PYX_ERR(0, 3049, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3100
 * 
 * 
 * class Piecewise(Function):             # <<<<<<<<<<<<<<
 * 
 *     def __new__(self, *args):
*/
  __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_Function); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3100, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __pyx_t_5 = PyTuple_Pack(1, __pyx_t_14); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3100, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __pyx_t_14 = __Pyx_PEP560_update_bases(__pyx_t_5); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3100, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_14); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3100, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_12 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_14, __pyx_mstate_global->__pyx_n_u_Piecewise, __pyx_mstate_global->__pyx_n_u_Piecewise, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3100, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  if (__pyx_t_14 != __pyx_t_5) {
    if (unlikely((PyDict_SetItemString(__pyx_t_12, "__orig_bases__", __pyx_t_5) < 0))) __PYX_ERR(0, 3100, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3102
 * class Piecewise(Function):
 * 
 *     def __new__(self, *args):             # <<<<<<<<<<<<<<
 *         return piecewise(*args)
 * 
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_9Piecewise_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_Piecewise___new, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[331])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3102, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetNewInClass(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_new, __pyx_t_5) < (0)) __PYX_ERR(0, 3102, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3105
 *         return piecewise(*args)
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         a = self.args
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_9Piecewise_3_sympy_, 0, __pyx_mstate_global->__pyx_n_u_Piecewise__sympy, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[332])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3105, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_sympy_2, __pyx_t_5) < (0)) __PYX_ERR(0, 3105, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3100
 * 
 * 
 * class Piecewise(Function):             # <<<<<<<<<<<<<<
 * 
 *     def __new__(self, *args):
*/
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Piecewise, __pyx_t_14, __pyx_t_12, NULL, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3100, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Piecewise, __pyx_t_5) < (0)) __PYX_ERR(0, 3100, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3116
 * cdef class Set(Expr):
 * 
 *     def intersection(self, a):             # <<<<<<<<<<<<<<
 *         cdef Set other = sympify(a)
 *         cdef RCP[const symengine.Set] other_ = symengine.rcp_static_cast_Set(other.thisptr)
*/
  __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_3Set_1intersection, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Set_intersection, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[333])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3116, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Set, __pyx_mstate_global->__pyx_n_u_intersection, __pyx_t_14) < (0)) __PYX_ERR(0, 3116, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3122
 *                     .set_intersection(other_)))
 * 
 *     def union(self, a):             # <<<<<<<<<<<<<<
 *         cdef Set other = sympify(a)
 *         cdef RCP[const symengine.Set] other_ = symengine.rcp_static_cast_Set(other.thisptr)
*/
  __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_3Set_3union, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Set_union, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[334])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3122, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Set, __pyx_mstate_global->__pyx_n_u_union, __pyx_t_14) < (0)) __PYX_ERR(0, 3122, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3128
 *                     .set_union(other_)))
 * 
 *     def complement(self, a):             # <<<<<<<<<<<<<<
 *         cdef Set other = sympify(a)
 *         cdef RCP[const symengine.Set] other_ = symengine.rcp_static_cast_Set(other.thisptr)
*/
  __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_3Set_5complement, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Set_complement, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[335])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3128, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Set, __pyx_mstate_global->__pyx_n_u_complement, __pyx_t_14) < (0)) __PYX_ERR(0, 3128, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3134
 *                     .set_complement(other_)))
 * 
 *     def contains(self, a):             # <<<<<<<<<<<<<<
 *         cdef Basic a_ = sympify(a)
 *         return c2py(<rcp_const_basic>(deref(symengine.rcp_static_cast_Set(self.thisptr))
*/
  __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_3Set_7contains, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Set_contains, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[336])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Set, __pyx_mstate_global->__pyx_n_u_contains, __pyx_t_14) < (0)) __PYX_ERR(0, 3134, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3140
 * 
 * 
 * class Interval(Set):             # <<<<<<<<<<<<<<
 * 
 *     def __new__(self, *args, left_open=None, right_open=None):
*/
  __pyx_t_14 = PyTuple_Pack(1, ((PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Set)); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3140, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_14); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3140, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_12 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3140, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_12, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_Interval, __pyx_mstate_global->__pyx_n_u_Interval, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3140, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__pyx_t_4 != __pyx_t_14) {
    if (unlikely((PyDict_SetItemString(__pyx_t_5, "__orig_bases__", __pyx_t_14) < 0))) __PYX_ERR(0, 3140, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3142
 * class Interval(Set):
 * 
 *     def __new__(self, *args, left_open=None, right_open=None):             # <<<<<<<<<<<<<<
 *         list_args = list(args)
 *         if ((left_open is not None) and (right_open is None)) or ((left_open is None) and (right_open is not None)):
*/
  __pyx_t_14 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3142, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  if (PyDict_SetItem(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_left_open, Py_None) < (0)) __PYX_ERR(0, 3142, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_right_open, Py_None) < (0)) __PYX_ERR(0, 3142, __pyx_L1_error)
  __pyx_t_13 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_8Interval_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_Interval___new, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[337])); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3142, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_13);
  #endif
  __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_13, __pyx_t_14);
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  if (__Pyx_SetNewInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_new, __pyx_t_13) < (0)) __PYX_ERR(0, 3142, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3152
 *         return interval(*list_args)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def start(self):
 *         return self.args[0]
*/
  __pyx_t_14 = NULL;
  __pyx_t_15 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_8Interval_3start, 0, __pyx_mstate_global->__pyx_n_u_Interval_start, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[338])); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3152, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_15);
  #endif
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_14, __pyx_t_15};
    __pyx_t_13 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3152, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
  }
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_start, __pyx_t_13) < (0)) __PYX_ERR(0, 3152, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3156
 *         return self.args[0]
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def end(self):
 *         return self.args[1]
*/
  __pyx_t_15 = NULL;
  __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_8Interval_5end, 0, __pyx_mstate_global->__pyx_n_u_Interval_end, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[339])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3156, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14);
  #endif
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_15, __pyx_t_14};
    __pyx_t_13 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3156, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
  }
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_end, __pyx_t_13) < (0)) __PYX_ERR(0, 3156, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3160
 *         return self.args[1]
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.Interval(*[arg._sympy_() for arg in self.args])
*/
  __pyx_t_13 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_8Interval_7_sympy_, 0, __pyx_mstate_global->__pyx_n_u_Interval__sympy, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[340])); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3160, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_13);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_sympy_2, __pyx_t_13) < (0)) __PYX_ERR(0, 3160, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3140
 * 
 * 
 * class Interval(Set):             # <<<<<<<<<<<<<<
 * 
 *     def __new__(self, *args, left_open=None, right_open=None):
*/
  __pyx_t_13 = __Pyx_Py3ClassCreate(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_Interval, __pyx_t_4, __pyx_t_5, NULL, 0, 0); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3140, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_13);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Interval, __pyx_t_13) < (0)) __PYX_ERR(0, 3140, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3165
 * 
 * 
 * class EmptySet(Set):             # <<<<<<<<<<<<<<
 * 
 *     def __new__(self):
*/
  __pyx_t_4 = PyTuple_Pack(1, ((PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Set)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3165, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_12 = __Pyx_PEP560_update_bases(__pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3165, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_12); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3165, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_13 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_t_12, __pyx_mstate_global->__pyx_n_u_EmptySet, __pyx_mstate_global->__pyx_n_u_EmptySet, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3165, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  if (__pyx_t_12 != __pyx_t_4) {
    if (unlikely((PyDict_SetItemString(__pyx_t_13, "__orig_bases__", __pyx_t_4) < 0))) __PYX_ERR(0, 3165, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3167
 * class EmptySet(Set):
 * 
 *     def __new__(self):             # <<<<<<<<<<<<<<
 *         return emptyset()
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_8EmptySet_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_EmptySet___new, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[341])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3167, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetNewInClass(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_new, __pyx_t_4) < (0)) __PYX_ERR(0, 3167, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3170
 *         return emptyset()
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.S.EmptySet
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_8EmptySet_3_sympy_, 0, __pyx_mstate_global->__pyx_n_u_EmptySet__sympy, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[342])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3170, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_sympy_2, __pyx_t_4) < (0)) __PYX_ERR(0, 3170, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3174
 *         return sympy.S.EmptySet
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def func(self):
 *         return self.__class__
*/
  __pyx_t_14 = NULL;
  __pyx_t_15 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_8EmptySet_5func, 0, __pyx_mstate_global->__pyx_n_u_EmptySet_func, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[343])); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3174, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_15);
  #endif
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_14, __pyx_t_15};
    __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3174, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  if (__Pyx_SetNameInClass(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_func, __pyx_t_4) < (0)) __PYX_ERR(0, 3174, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3165
 * 
 * 
 * class EmptySet(Set):             # <<<<<<<<<<<<<<
 * 
 *     def __new__(self):
*/
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_EmptySet, __pyx_t_12, __pyx_t_13, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3165, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_EmptySet, __pyx_t_4) < (0)) __PYX_ERR(0, 3165, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3179
 * 
 * 
 * class Reals(Set):             # <<<<<<<<<<<<<<
 * 
 *     def __new__(self):
*/
  __pyx_t_12 = PyTuple_Pack(1, ((PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Set)); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3179, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_5 = __Pyx_PEP560_update_bases(__pyx_t_12); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3179, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_13 = __Pyx_CalculateMetaclass(NULL, __pyx_t_5); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3179, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_13, __pyx_t_5, __pyx_mstate_global->__pyx_n_u_Reals, __pyx_mstate_global->__pyx_n_u_Reals, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3179, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__pyx_t_5 != __pyx_t_12) {
    if (unlikely((PyDict_SetItemString(__pyx_t_4, "__orig_bases__", __pyx_t_12) < 0))) __PYX_ERR(0, 3179, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3181
 * class Reals(Set):
 * 
 *     def __new__(self):             # <<<<<<<<<<<<<<
 *         return reals()
 * 
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_5Reals_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_Reals___new, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[344])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3181, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetNewInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_new, __pyx_t_12) < (0)) __PYX_ERR(0, 3181, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3184
 *         return reals()
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.S.Reals
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_5Reals_3_sympy_, 0, __pyx_mstate_global->__pyx_n_u_Reals__sympy, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[345])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3184, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_sympy_2, __pyx_t_12) < (0)) __PYX_ERR(0, 3184, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3188
 *         return sympy.S.Reals
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def func(self):
 *         return self.__class__
*/
  __pyx_t_15 = NULL;
  __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_5Reals_5func, 0, __pyx_mstate_global->__pyx_n_u_Reals_func, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[346])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3188, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14);
  #endif
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_15, __pyx_t_14};
    __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3188, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
  }
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_func, __pyx_t_12) < (0)) __PYX_ERR(0, 3188, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3179
 * 
 * 
 * class Reals(Set):             # <<<<<<<<<<<<<<
 * 
 *     def __new__(self):
*/
  __pyx_t_12 = __Pyx_Py3ClassCreate(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_Reals, __pyx_t_5, __pyx_t_4, NULL, 0, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3179, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Reals, __pyx_t_12) < (0)) __PYX_ERR(0, 3179, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3193
 * 
 * 
 * class Rationals(Set):             # <<<<<<<<<<<<<<
 * 
 *     def __new__(self):
*/
  __pyx_t_5 = PyTuple_Pack(1, ((PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Set)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3193, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_13 = __Pyx_PEP560_update_bases(__pyx_t_5); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3193, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3193, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_12 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_13, __pyx_mstate_global->__pyx_n_u_Rationals, __pyx_mstate_global->__pyx_n_u_Rationals, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3193, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  if (__pyx_t_13 != __pyx_t_5) {
    if (unlikely((PyDict_SetItemString(__pyx_t_12, "__orig_bases__", __pyx_t_5) < 0))) __PYX_ERR(0, 3193, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3195
 * class Rationals(Set):
 * 
 *     def __new__(self):             # <<<<<<<<<<<<<<
 *         return rationals()
 * 
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_9Rationals_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_Rationals___new, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[347])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3195, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetNewInClass(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_new, __pyx_t_5) < (0)) __PYX_ERR(0, 3195, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3198
 *         return rationals()
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.S.Rationals
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_9Rationals_3_sympy_, 0, __pyx_mstate_global->__pyx_n_u_Rationals__sympy, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[348])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3198, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_sympy_2, __pyx_t_5) < (0)) __PYX_ERR(0, 3198, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3202
 *         return sympy.S.Rationals
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def func(self):
 *         return self.__class__
*/
  __pyx_t_14 = NULL;
  __pyx_t_15 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_9Rationals_5func, 0, __pyx_mstate_global->__pyx_n_u_Rationals_func, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[349])); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_15);
  #endif
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_14, __pyx_t_15};
    __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3202, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
  }
  if (__Pyx_SetNameInClass(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_func, __pyx_t_5) < (0)) __PYX_ERR(0, 3202, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3193
 * 
 * 
 * class Rationals(Set):             # <<<<<<<<<<<<<<
 * 
 *     def __new__(self):
*/
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Rationals, __pyx_t_13, __pyx_t_12, NULL, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3193, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Rationals, __pyx_t_5) < (0)) __PYX_ERR(0, 3193, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3207
 * 
 * 
 * class Integers(Set):             # <<<<<<<<<<<<<<
 * 
 *     def __new__(self):
*/
  __pyx_t_13 = PyTuple_Pack(1, ((PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Set)); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3207, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3207, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_12 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3207, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_12, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_Integers, __pyx_mstate_global->__pyx_n_u_Integers, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3207, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__pyx_t_4 != __pyx_t_13) {
    if (unlikely((PyDict_SetItemString(__pyx_t_5, "__orig_bases__", __pyx_t_13) < 0))) __PYX_ERR(0, 3207, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3209
 * class Integers(Set):
 * 
 *     def __new__(self):             # <<<<<<<<<<<<<<
 *         return integers()
 * 
*/
  __pyx_t_13 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_8Integers_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_Integers___new, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[350])); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3209, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_13);
  #endif
  if (__Pyx_SetNewInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_new, __pyx_t_13) < (0)) __PYX_ERR(0, 3209, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3212
 *         return integers()
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.S.Integers
*/
  __pyx_t_13 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_8Integers_3_sympy_, 0, __pyx_mstate_global->__pyx_n_u_Integers__sympy, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[351])); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3212, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_13);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_sympy_2, __pyx_t_13) < (0)) __PYX_ERR(0, 3212, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3216
 *         return sympy.S.Integers
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def func(self):
 *         return self.__class__
*/
  __pyx_t_15 = NULL;
  __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_8Integers_5func, 0, __pyx_mstate_global->__pyx_n_u_Integers_func, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[352])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3216, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14);
  #endif
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_15, __pyx_t_14};
    __pyx_t_13 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3216, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
  }
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_func, __pyx_t_13) < (0)) __PYX_ERR(0, 3216, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3207
 * 
 * 
 * class Integers(Set):             # <<<<<<<<<<<<<<
 * 
 *     def __new__(self):
*/
  __pyx_t_13 = __Pyx_Py3ClassCreate(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_Integers, __pyx_t_4, __pyx_t_5, NULL, 0, 0); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3207, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_13);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Integers, __pyx_t_13) < (0)) __PYX_ERR(0, 3207, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3221
 * 
 * 
 * class UniversalSet(Set):             # <<<<<<<<<<<<<<
 * 
 *     def __new__(self):
*/
  __pyx_t_4 = PyTuple_Pack(1, ((PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Set)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3221, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_12 = __Pyx_PEP560_update_bases(__pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3221, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_12); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3221, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_13 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_t_12, __pyx_mstate_global->__pyx_n_u_UniversalSet, __pyx_mstate_global->__pyx_n_u_UniversalSet, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3221, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  if (__pyx_t_12 != __pyx_t_4) {
    if (unlikely((PyDict_SetItemString(__pyx_t_13, "__orig_bases__", __pyx_t_4) < 0))) __PYX_ERR(0, 3221, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3223
 * class UniversalSet(Set):
 * 
 *     def __new__(self):             # <<<<<<<<<<<<<<
 *         return universalset()
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_12UniversalSet_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_UniversalSet___new, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[353])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3223, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetNewInClass(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_new, __pyx_t_4) < (0)) __PYX_ERR(0, 3223, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3226
 *         return universalset()
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.S.UniversalSet
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_12UniversalSet_3_sympy_, 0, __pyx_mstate_global->__pyx_n_u_UniversalSet__sympy, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[354])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3226, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_sympy_2, __pyx_t_4) < (0)) __PYX_ERR(0, 3226, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3230
 *         return sympy.S.UniversalSet
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def func(self):
 *         return self.__class__
*/
  __pyx_t_14 = NULL;
  __pyx_t_15 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_12UniversalSet_5func, 0, __pyx_mstate_global->__pyx_n_u_UniversalSet_func, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[355])); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3230, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_15);
  #endif
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_14, __pyx_t_15};
    __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3230, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  if (__Pyx_SetNameInClass(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_func, __pyx_t_4) < (0)) __PYX_ERR(0, 3230, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3221
 * 
 * 
 * class UniversalSet(Set):             # <<<<<<<<<<<<<<
 * 
 *     def __new__(self):
*/
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_UniversalSet, __pyx_t_12, __pyx_t_13, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3221, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_UniversalSet, __pyx_t_4) < (0)) __PYX_ERR(0, 3221, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3235
 * 
 * 
 * class FiniteSet(Set):             # <<<<<<<<<<<<<<
 * 
 *     def __new__(self, *args):
*/
  __pyx_t_12 = PyTuple_Pack(1, ((PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Set)); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3235, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_5 = __Pyx_PEP560_update_bases(__pyx_t_12); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3235, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_13 = __Pyx_CalculateMetaclass(NULL, __pyx_t_5); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3235, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_13, __pyx_t_5, __pyx_mstate_global->__pyx_n_u_FiniteSet, __pyx_mstate_global->__pyx_n_u_FiniteSet, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3235, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__pyx_t_5 != __pyx_t_12) {
    if (unlikely((PyDict_SetItemString(__pyx_t_4, "__orig_bases__", __pyx_t_12) < 0))) __PYX_ERR(0, 3235, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3237
 * class FiniteSet(Set):
 * 
 *     def __new__(self, *args):             # <<<<<<<<<<<<<<
 *         return finiteset(*args)
 * 
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_9FiniteSet_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_FiniteSet___new, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[356])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3237, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetNewInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_new, __pyx_t_12) < (0)) __PYX_ERR(0, 3237, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3240
 *         return finiteset(*args)
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.FiniteSet(*[arg._sympy_() for arg in self.args])
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_9FiniteSet_3_sympy_, 0, __pyx_mstate_global->__pyx_n_u_FiniteSet__sympy, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[357])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3240, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_sympy_2, __pyx_t_12) < (0)) __PYX_ERR(0, 3240, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3235
 * 
 * 
 * class FiniteSet(Set):             # <<<<<<<<<<<<<<
 * 
 *     def __new__(self, *args):
*/
  __pyx_t_12 = __Pyx_Py3ClassCreate(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_FiniteSet, __pyx_t_5, __pyx_t_4, NULL, 0, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3235, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_FiniteSet, __pyx_t_12) < (0)) __PYX_ERR(0, 3235, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3245
 * 
 * 
 * class Contains(Boolean):             # <<<<<<<<<<<<<<
 * 
 *     def __new__(self, expr, sset):
*/
  __pyx_t_5 = PyTuple_Pack(1, ((PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Boolean)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3245, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_13 = __Pyx_PEP560_update_bases(__pyx_t_5); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3245, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3245, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_12 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_13, __pyx_mstate_global->__pyx_n_u_Contains, __pyx_mstate_global->__pyx_n_u_Contains, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3245, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  if (__pyx_t_13 != __pyx_t_5) {
    if (unlikely((PyDict_SetItemString(__pyx_t_12, "__orig_bases__", __pyx_t_5) < 0))) __PYX_ERR(0, 3245, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3247
 * class Contains(Boolean):
 * 
 *     def __new__(self, expr, sset):             # <<<<<<<<<<<<<<
 *         return contains(expr, sset)
 * 
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_8Contains_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_Contains___new, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[358])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3247, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetNewInClass(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_new, __pyx_t_5) < (0)) __PYX_ERR(0, 3247, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3250
 *         return contains(expr, sset)
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.Contains(*[arg._sympy_() for arg in self.args])
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_8Contains_3_sympy_, 0, __pyx_mstate_global->__pyx_n_u_Contains__sympy, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[359])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3250, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_sympy_2, __pyx_t_5) < (0)) __PYX_ERR(0, 3250, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3245
 * 
 * 
 * class Contains(Boolean):             # <<<<<<<<<<<<<<
 * 
 *     def __new__(self, expr, sset):
*/
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Contains, __pyx_t_13, __pyx_t_12, NULL, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3245, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Contains, __pyx_t_5) < (0)) __PYX_ERR(0, 3245, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3255
 * 
 * 
 * class Union(Set):             # <<<<<<<<<<<<<<
 * 
 *     def __new__(self, *args):
*/
  __pyx_t_13 = PyTuple_Pack(1, ((PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Set)); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3255, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3255, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_12 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3255, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_12, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_Union, __pyx_mstate_global->__pyx_n_u_Union, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3255, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__pyx_t_4 != __pyx_t_13) {
    if (unlikely((PyDict_SetItemString(__pyx_t_5, "__orig_bases__", __pyx_t_13) < 0))) __PYX_ERR(0, 3255, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3257
 * class Union(Set):
 * 
 *     def __new__(self, *args):             # <<<<<<<<<<<<<<
 *         return set_union(*args)
 * 
*/
  __pyx_t_13 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_5Union_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_Union___new, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[360])); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3257, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_13);
  #endif
  if (__Pyx_SetNewInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_new, __pyx_t_13) < (0)) __PYX_ERR(0, 3257, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3260
 *         return set_union(*args)
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.Union(*[arg._sympy_() for arg in self.args])
*/
  __pyx_t_13 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_5Union_3_sympy_, 0, __pyx_mstate_global->__pyx_n_u_Union__sympy, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[361])); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3260, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_13);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_sympy_2, __pyx_t_13) < (0)) __PYX_ERR(0, 3260, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3255
 * 
 * 
 * class Union(Set):             # <<<<<<<<<<<<<<
 * 
 *     def __new__(self, *args):
*/
  __pyx_t_13 = __Pyx_Py3ClassCreate(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_Union, __pyx_t_4, __pyx_t_5, NULL, 0, 0); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3255, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_13);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Union, __pyx_t_13) < (0)) __PYX_ERR(0, 3255, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3265
 * 
 * 
 * class Complement(Set):             # <<<<<<<<<<<<<<
 * 
 *     def __new__(self, universe, container):
*/
  __pyx_t_4 = PyTuple_Pack(1, ((PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Set)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3265, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_12 = __Pyx_PEP560_update_bases(__pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3265, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_12); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3265, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_13 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_t_12, __pyx_mstate_global->__pyx_n_u_Complement, __pyx_mstate_global->__pyx_n_u_Complement, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3265, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  if (__pyx_t_12 != __pyx_t_4) {
    if (unlikely((PyDict_SetItemString(__pyx_t_13, "__orig_bases__", __pyx_t_4) < 0))) __PYX_ERR(0, 3265, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3267
 * class Complement(Set):
 * 
 *     def __new__(self, universe, container):             # <<<<<<<<<<<<<<
 *         return set_complement(universe, container)
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_10Complement_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_Complement___new, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[362])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3267, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetNewInClass(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_new, __pyx_t_4) < (0)) __PYX_ERR(0, 3267, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3270
 *         return set_complement(universe, container)
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         import sympy
 *         return sympy.Complement(*[arg._sympy_() for arg in self.args])
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_10Complement_3_sympy_, 0, __pyx_mstate_global->__pyx_n_u_Complement__sympy, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[363])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3270, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_sympy_2, __pyx_t_4) < (0)) __PYX_ERR(0, 3270, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3265
 * 
 * 
 * class Complement(Set):             # <<<<<<<<<<<<<<
 * 
 *     def __new__(self, universe, container):
*/
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_Complement, __pyx_t_12, __pyx_t_13, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3265, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Complement, __pyx_t_4) < (0)) __PYX_ERR(0, 3265, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3275
 * 
 * 
 * class ConditionSet(Set):             # <<<<<<<<<<<<<<
 * 
 *     def __new__(self, sym, condition):
*/
  __pyx_t_12 = PyTuple_Pack(1, ((PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Set)); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3275, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_5 = __Pyx_PEP560_update_bases(__pyx_t_12); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3275, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_13 = __Pyx_CalculateMetaclass(NULL, __pyx_t_5); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3275, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_13, __pyx_t_5, __pyx_mstate_global->__pyx_n_u_ConditionSet, __pyx_mstate_global->__pyx_n_u_ConditionSet, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3275, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__pyx_t_5 != __pyx_t_12) {
    if (unlikely((PyDict_SetItemString(__pyx_t_4, "__orig_bases__", __pyx_t_12) < 0))) __PYX_ERR(0, 3275, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3277
 * class ConditionSet(Set):
 * 
 *     def __new__(self, sym, condition):             # <<<<<<<<<<<<<<
 *         return conditionset(sym, condition)
 * 
*/
  __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_12ConditionSet_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_ConditionSet___new, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[364])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3277, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (__Pyx_SetNewInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_new, __pyx_t_12) < (0)) __PYX_ERR(0, 3277, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3275
 * 
 * 
 * class ConditionSet(Set):             # <<<<<<<<<<<<<<
 * 
 *     def __new__(self, sym, condition):
*/
  __pyx_t_12 = __Pyx_Py3ClassCreate(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_ConditionSet, __pyx_t_5, __pyx_t_4, NULL, 0, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3275, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ConditionSet, __pyx_t_12) < (0)) __PYX_ERR(0, 3275, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3281
 * 
 * 
 * class ImageSet(Set):             # <<<<<<<<<<<<<<
 * 
 *     def __new__(self, sym, expr, base):
*/
  __pyx_t_5 = PyTuple_Pack(1, ((PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Set)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3281, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_13 = __Pyx_PEP560_update_bases(__pyx_t_5); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3281, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3281, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_12 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_13, __pyx_mstate_global->__pyx_n_u_ImageSet, __pyx_mstate_global->__pyx_n_u_ImageSet, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3281, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  if (__pyx_t_13 != __pyx_t_5) {
    if (unlikely((PyDict_SetItemString(__pyx_t_12, "__orig_bases__", __pyx_t_5) < 0))) __PYX_ERR(0, 3281, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3283
 * class ImageSet(Set):
 * 
 *     def __new__(self, sym, expr, base):             # <<<<<<<<<<<<<<
 *         return imageset(sym, expr, base)
 * 
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_8ImageSet_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_ImageSet___new, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[365])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3283, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetNewInClass(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_new, __pyx_t_5) < (0)) __PYX_ERR(0, 3283, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3281
 * 
 * 
 * class ImageSet(Set):             # <<<<<<<<<<<<<<
 * 
 *     def __new__(self, sym, expr, base):
*/
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ImageSet, __pyx_t_13, __pyx_t_12, NULL, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3281, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ImageSet, __pyx_t_5) < (0)) __PYX_ERR(0, 3281, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3305
 *         return A._richcmp_(B, op)
 * 
 *     def _richcmp_(MatrixBase A, MatrixBase B, int op):             # <<<<<<<<<<<<<<
 *         if (op == 2):
 *             return deref(A.thisptr).eq(deref(B.thisptr))
*/
  __pyx_t_13 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_10MatrixBase_3_richcmp_, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MatrixBase__richcmp, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[366])); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3305, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_13);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_MatrixBase, __pyx_mstate_global->__pyx_n_u_richcmp, __pyx_t_13) < (0)) __PYX_ERR(0, 3305, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3316
 *         del self.thisptr
 * 
 *     def _symbolic_(self, ring):             # <<<<<<<<<<<<<<
 *         return ring(self._sage_())
 * 
*/
  __pyx_t_13 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_10MatrixBase_7_symbolic_, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MatrixBase__symbolic, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[367])); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3316, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_13);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_MatrixBase, __pyx_mstate_global->__pyx_n_u_symbolic, __pyx_t_13) < (0)) __PYX_ERR(0, 3316, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.thisptr cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
*/
  __pyx_t_13 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_10MatrixBase_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MatrixBase___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[368])); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_13);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_13) < (0)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.thisptr cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.thisptr cannot be converted to a Python object for pickling"
*/
  __pyx_t_13 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_10MatrixBase_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MatrixBase___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[369])); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_13);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_13) < (0)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3324
 * 
 * 
 * class MatrixError(Exception):             # <<<<<<<<<<<<<<
 *     pass
 * 
*/
  __pyx_t_13 = PyTuple_Pack(1, ((PyObject *)(((PyTypeObject*)PyExc_Exception)))); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3324, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3324, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_12 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3324, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_12, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_MatrixError, __pyx_mstate_global->__pyx_n_u_MatrixError, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3324, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__pyx_t_4 != __pyx_t_13) {
    if (unlikely((PyDict_SetItemString(__pyx_t_5, "__orig_bases__", __pyx_t_13) < 0))) __PYX_ERR(0, 3324, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  __pyx_t_13 = __Pyx_Py3ClassCreate(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_MatrixError, __pyx_t_4, __pyx_t_5, NULL, 0, 0); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3324, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_13);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_MatrixError, __pyx_t_13) < (0)) __PYX_ERR(0, 3324, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3328
 * 
 * 
 * class ShapeError(ValueError, MatrixError):             # <<<<<<<<<<<<<<
 *     """Wrong matrix shape"""
 *     pass
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_MatrixError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3328, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_12 = PyTuple_Pack(2, ((PyObject *)(((PyTypeObject*)PyExc_ValueError))), __pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3328, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3328, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3328, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_13 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_ShapeError, __pyx_mstate_global->__pyx_n_u_ShapeError, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_kp_u_Wrong_matrix_shape); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3328, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  if (__pyx_t_4 != __pyx_t_12) {
    if (unlikely((PyDict_SetItemString(__pyx_t_13, "__orig_bases__", __pyx_t_12) < 0))) __PYX_ERR(0, 3328, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __pyx_t_12 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_ShapeError, __pyx_t_4, __pyx_t_13, NULL, 0, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3328, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_12);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ShapeError, __pyx_t_12) < (0)) __PYX_ERR(0, 3328, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3333
 * 
 * 
 * class NonSquareMatrixError(ShapeError):             # <<<<<<<<<<<<<<
 *     pass
 * 
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ShapeError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3333, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyTuple_Pack(1, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3333, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3333, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_13 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3333, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __pyx_t_12 = __Pyx_Py3MetaclassPrepare(__pyx_t_13, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_NonSquareMatrixError, __pyx_mstate_global->__pyx_n_u_NonSquareMatrixError, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3333, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  if (__pyx_t_4 != __pyx_t_5) {
    if (unlikely((PyDict_SetItemString(__pyx_t_12, "__orig_bases__", __pyx_t_5) < 0))) __PYX_ERR(0, 3333, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_NonSquareMatrixError, __pyx_t_4, __pyx_t_12, NULL, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3333, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_NonSquareMatrixError, __pyx_t_5) < (0)) __PYX_ERR(0, 3333, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3416
 *         return deref(self.thisptr).__str__().decode("utf-8")
 * 
 *     def _repr_latex_(self):             # <<<<<<<<<<<<<<
 *         if repr_latex[0]:
 *             return "${}$".format(latex(self))
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_7_repr_latex_, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DenseMatrixBase__repr_latex, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[370])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3416, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase, __pyx_mstate_global->__pyx_n_u_repr_latex_2, __pyx_t_4) < (0)) __PYX_ERR(0, 3416, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3639
 *             raise NotImplementedError
 * 
 *     def row_join(self, rhs):             # <<<<<<<<<<<<<<
 *         cdef DenseMatrixBase o = sympify(rhs)
 *         if self.rows != o.rows:
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_37row_join, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DenseMatrixBase_row_join, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[371])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3639, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase, __pyx_mstate_global->__pyx_n_u_row_join, __pyx_t_4) < (0)) __PYX_ERR(0, 3639, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3647
 *         return d
 * 
 *     def col_join(self, bott):             # <<<<<<<<<<<<<<
 *         cdef DenseMatrixBase o = sympify(bott)
 *         if self.cols != o.cols:
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_39col_join, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DenseMatrixBase_col_join, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[372])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3647, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase, __pyx_mstate_global->__pyx_n_u_col_join, __pyx_t_4) < (0)) __PYX_ERR(0, 3647, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3655
 *         return d
 * 
 *     def row_insert(self, pos, bott):             # <<<<<<<<<<<<<<
 *         cdef DenseMatrixBase o = sympify(bott)
 *         if pos < 0:
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_41row_insert, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DenseMatrixBase_row_insert, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[373])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3655, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase, __pyx_mstate_global->__pyx_n_u_row_insert, __pyx_t_4) < (0)) __PYX_ERR(0, 3655, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3669
 *         return d
 * 
 *     def col_insert(self, pos, bott):             # <<<<<<<<<<<<<<
 *         cdef DenseMatrixBase o = sympify(bott)
 *         if pos < 0:
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_43col_insert, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DenseMatrixBase_col_insert, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[374])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3669, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase, __pyx_mstate_global->__pyx_n_u_col_insert, __pyx_t_4) < (0)) __PYX_ERR(0, 3669, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3683
 *         return d
 * 
 *     def dot(self, b):             # <<<<<<<<<<<<<<
 *         cdef DenseMatrixBase o = sympify(b)
 *         cdef DenseMatrixBase result = self.__class__(self.rows, self.cols)
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_45dot, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DenseMatrixBase_dot, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[375])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3683, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase, __pyx_mstate_global->__pyx_n_u_dot, __pyx_t_4) < (0)) __PYX_ERR(0, 3683, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3692
 *             return result
 * 
 *     def cross(self, b):             # <<<<<<<<<<<<<<
 *         cdef DenseMatrixBase o = sympify(b)
 *         if self.cols * self.rows != 3 or o.cols * o.rows != 3:
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_47cross, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DenseMatrixBase_cross, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[376])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3692, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase, __pyx_mstate_global->__pyx_n_u_cross, __pyx_t_4) < (0)) __PYX_ERR(0, 3692, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3713
 *         return deref(self.thisptr).is_square()
 * 
 *     def nrows(self):             # <<<<<<<<<<<<<<
 *         return deref(self.thisptr).nrows()
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_49nrows, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DenseMatrixBase_nrows, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[377])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3713, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase, __pyx_mstate_global->__pyx_n_u_nrows, __pyx_t_4) < (0)) __PYX_ERR(0, 3713, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3716
 *         return deref(self.thisptr).nrows()
 * 
 *     def ncols(self):             # <<<<<<<<<<<<<<
 *         return deref(self.thisptr).ncols()
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_51ncols, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DenseMatrixBase_ncols, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[378])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3716, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase, __pyx_mstate_global->__pyx_n_u_ncols, __pyx_t_4) < (0)) __PYX_ERR(0, 3716, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3730
 *             return self.nrows()*self.ncols()
 * 
 *     def ravel(self, order='C'):             # <<<<<<<<<<<<<<
 *         if order == 'C':
 *             return [self._get(i, j) for i in range(self.nrows())
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_55ravel, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DenseMatrixBase_ravel, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[379])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3730, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[15]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase, __pyx_mstate_global->__pyx_n_u_ravel, __pyx_t_4) < (0)) __PYX_ERR(0, 3730, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3740
 *             raise NotImplementedError("Unknown order '%s'" % order)
 * 
 *     def reshape(self, rows, cols):             # <<<<<<<<<<<<<<
 *         if len(self) != rows*cols:
 *             raise ValueError("Invalid reshape parameters %d %d" % (rows, cols))
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_57reshape, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DenseMatrixBase_reshape, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[380])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3740, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase, __pyx_mstate_global->__pyx_n_u_reshape, __pyx_t_4) < (0)) __PYX_ERR(0, 3740, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3747
 *         return r
 * 
 *     def _get_index(self, i, j):             # <<<<<<<<<<<<<<
 *         nr = self.nrows()
 *         nc = self.ncols()
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_59_get_index, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DenseMatrixBase__get_index, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[381])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3747, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase, __pyx_mstate_global->__pyx_n_u_get_index, __pyx_t_4) < (0)) __PYX_ERR(0, 3747, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3760
 *         return i, j
 * 
 *     def get(self, i, j):             # <<<<<<<<<<<<<<
 *         i, j = self._get_index(i, j)
 *         return self._get(i, j)
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_61get, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DenseMatrixBase_get, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[382])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3760, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase, __pyx_mstate_global->__pyx_n_u_get, __pyx_t_4) < (0)) __PYX_ERR(0, 3760, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3764
 *         return self._get(i, j)
 * 
 *     def _get(self, i, j):             # <<<<<<<<<<<<<<
 *         # No error checking is done
 *         return c2py(deref(self.thisptr).get(i, j))
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_63_get, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DenseMatrixBase__get, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[383])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3764, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase, __pyx_mstate_global->__pyx_n_u_get_2, __pyx_t_4) < (0)) __PYX_ERR(0, 3764, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3768
 *         return c2py(deref(self.thisptr).get(i, j))
 * 
 *     def col(self, j):             # <<<<<<<<<<<<<<
 *         return self[:, j]
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_65col, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DenseMatrixBase_col, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[384])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3768, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase, __pyx_mstate_global->__pyx_n_u_col, __pyx_t_4) < (0)) __PYX_ERR(0, 3768, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3771
 *         return self[:, j]
 * 
 *     def row(self, i):             # <<<<<<<<<<<<<<
 *         return self[i, :]
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_67row, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DenseMatrixBase_row, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[385])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3771, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase, __pyx_mstate_global->__pyx_n_u_row, __pyx_t_4) < (0)) __PYX_ERR(0, 3771, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3774
 *         return self[i, :]
 * 
 *     def set(self, i, j, e):             # <<<<<<<<<<<<<<
 *         i, j = self._get_index(i, j)
 *         return self._set(i, j, e)
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_69set, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DenseMatrixBase_set, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[386])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3774, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase, __pyx_mstate_global->__pyx_n_u_set, __pyx_t_4) < (0)) __PYX_ERR(0, 3774, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3778
 *         return self._set(i, j, e)
 * 
 *     def _set(self, i, j, e):             # <<<<<<<<<<<<<<
 *         # No error checking is done
 *         cdef Basic e_ = sympify(e)
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_71_set, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DenseMatrixBase__set, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[387])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3778, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase, __pyx_mstate_global->__pyx_n_u_set_2, __pyx_t_4) < (0)) __PYX_ERR(0, 3778, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3784
 *             deref(self.thisptr).set(i, j, e_.thisptr)
 * 
 *     def det(self):             # <<<<<<<<<<<<<<
 *         if self.nrows() != self.ncols():
 *             raise NonSquareMatrixError()
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_73det, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DenseMatrixBase_det, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[388])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3784, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase, __pyx_mstate_global->__pyx_n_u_det, __pyx_t_4) < (0)) __PYX_ERR(0, 3784, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3789
 *         return c2py(deref(self.thisptr).det())
 * 
 *     def inv(self, method='LU'):             # <<<<<<<<<<<<<<
 *         cdef DenseMatrixBase result = self.__class__(self.nrows(), self.ncols())
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_75inv, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DenseMatrixBase_inv, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[389])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3789, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[16]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase, __pyx_mstate_global->__pyx_n_u_inv, __pyx_t_4) < (0)) __PYX_ERR(0, 3789, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3805
 *         return result
 * 
 *     def add_matrix(self, A):             # <<<<<<<<<<<<<<
 *         cdef MatrixBase A_ = sympify(A)
 *         if isinstance(A, ImmutableDenseMatrix):
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_77add_matrix, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DenseMatrixBase_add_matrix, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[390])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3805, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase, __pyx_mstate_global->__pyx_n_u_add_matrix, __pyx_t_4) < (0)) __PYX_ERR(0, 3805, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3815
 *         return result
 * 
 *     def mul_matrix(self, A):             # <<<<<<<<<<<<<<
 *         cdef MatrixBase A_ = sympify(A)
 *         if isinstance(A, ImmutableDenseMatrix):
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_79mul_matrix, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DenseMatrixBase_mul_matrix, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[391])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3815, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase, __pyx_mstate_global->__pyx_n_u_mul_matrix, __pyx_t_4) < (0)) __PYX_ERR(0, 3815, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3825
 *         return result
 * 
 *     def multiply_elementwise(self, A):             # <<<<<<<<<<<<<<
 *         cdef MatrixBase A_ = sympify(A)
 *         if isinstance(A, ImmutableDenseMatrix):
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_81multiply_elementwise, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DenseMatrixBase_multiply_element, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[392])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3825, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase, __pyx_mstate_global->__pyx_n_u_multiply_elementwise, __pyx_t_4) < (0)) __PYX_ERR(0, 3825, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3835
 *         return result
 * 
 *     def add_scalar(self, k):             # <<<<<<<<<<<<<<
 *         cdef Basic k_ = sympify(k)
 *         cdef DenseMatrixBase result = self.__class__(self.nrows(), self.ncols())
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_83add_scalar, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DenseMatrixBase_add_scalar, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[393])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3835, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase, __pyx_mstate_global->__pyx_n_u_add_scalar, __pyx_t_4) < (0)) __PYX_ERR(0, 3835, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3841
 *         return result
 * 
 *     def mul_scalar(self, k):             # <<<<<<<<<<<<<<
 *         cdef Basic k_ = sympify(k)
 *         cdef DenseMatrixBase result = self.__class__(self.nrows(), self.ncols())
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_85mul_scalar, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DenseMatrixBase_mul_scalar, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[394])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3841, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase, __pyx_mstate_global->__pyx_n_u_mul_scalar, __pyx_t_4) < (0)) __PYX_ERR(0, 3841, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3847
 *         return result
 * 
 *     def transpose(self):             # <<<<<<<<<<<<<<
 *         cdef DenseMatrixBase result = self.__class__(self.ncols(), self.nrows())
 *         deref(self.thisptr).transpose(deref(result.thisptr))
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_87transpose, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DenseMatrixBase_transpose, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[395])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3847, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase, __pyx_mstate_global->__pyx_n_u_transpose, __pyx_t_4) < (0)) __PYX_ERR(0, 3847, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3852
 *         return result
 * 
 *     def conjugate(self):             # <<<<<<<<<<<<<<
 *         cdef DenseMatrixBase result = self.__class__(self.nrows(), self.ncols())
 *         deref(self.thisptr).conjugate(deref(result.thisptr))
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_89conjugate, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DenseMatrixBase_conjugate, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[396])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3852, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase, __pyx_mstate_global->__pyx_n_u_conjugate, __pyx_t_4) < (0)) __PYX_ERR(0, 3852, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3857
 *         return result
 * 
 *     def conjugate_transpose(self):             # <<<<<<<<<<<<<<
 *         cdef DenseMatrixBase result = self.__class__(self.nrows(), self.ncols())
 *         deref(self.thisptr).conjugate_transpose(deref(result.thisptr))
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_91conjugate_transpose, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DenseMatrixBase_conjugate_transp, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[397])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3857, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase, __pyx_mstate_global->__pyx_n_u_conjugate_transpose, __pyx_t_4) < (0)) __PYX_ERR(0, 3857, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3866
 *         return self.conjugate_transpose()
 * 
 *     def trace(self):             # <<<<<<<<<<<<<<
 *         return c2py(deref(symengine.static_cast_DenseMatrix(self.thisptr)).trace())
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_93trace, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DenseMatrixBase_trace, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[398])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3866, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase, __pyx_mstate_global->__pyx_n_u_trace, __pyx_t_4) < (0)) __PYX_ERR(0, 3866, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3909
 *         return self.transpose()
 * 
 *     def applyfunc(self, f):             # <<<<<<<<<<<<<<
 *         cdef DenseMatrixBase out = self.__class__(self)
 *         cdef int nr = self.nrows()
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_95applyfunc, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DenseMatrixBase_applyfunc, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[399])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3909, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase, __pyx_mstate_global->__pyx_n_u_applyfunc, __pyx_t_4) < (0)) __PYX_ERR(0, 3909, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3921
 *         return out
 * 
 *     def _applyfunc(self, f):             # <<<<<<<<<<<<<<
 *         cdef int nr = self.nrows()
 *         cdef int nc = self.ncols()
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_97_applyfunc, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DenseMatrixBase__applyfunc, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[400])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3921, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase, __pyx_mstate_global->__pyx_n_u_applyfunc_2, __pyx_t_4) < (0)) __PYX_ERR(0, 3921, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3928
 *                 self._set(i, j, f(self._get(i, j)))
 * 
 *     def msubs(self, *args):             # <<<<<<<<<<<<<<
 *         cdef _DictBasic D = get_dict(*args)
 *         return self.applyfunc(lambda x: x.msubs(D))
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_99msubs, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DenseMatrixBase_msubs, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[401])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3928, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase, __pyx_mstate_global->__pyx_n_u_msubs, __pyx_t_4) < (0)) __PYX_ERR(0, 3928, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3932
 *         return self.applyfunc(lambda x: x.msubs(D))
 * 
 *     def _diff(self, Basic x):             # <<<<<<<<<<<<<<
 *         cdef DenseMatrixBase R = self.__class__(self.rows, self.cols)
 *         symengine.diff(<const symengine.DenseMatrix &>deref(self.thisptr),
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_101_diff, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DenseMatrixBase__diff, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[402])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3932, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase, __pyx_mstate_global->__pyx_n_u_diff, __pyx_t_4) < (0)) __PYX_ERR(0, 3932, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3938
 *         return R
 * 
 *     def diff(self, *args):             # <<<<<<<<<<<<<<
 *         return _diff(self, *args)
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_103diff, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DenseMatrixBase_diff, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[403])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3938, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase, __pyx_mstate_global->__pyx_n_u_diff_2, __pyx_t_4) < (0)) __PYX_ERR(0, 3938, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3942
 * 
 *     #TODO: implement this in C++
 *     def subs(self, *args):             # <<<<<<<<<<<<<<
 *         cdef _DictBasic D = get_dict(*args)
 *         return self.applyfunc(lambda x: x.subs(D))
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_105subs, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DenseMatrixBase_subs, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[404])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3942, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase, __pyx_mstate_global->__pyx_n_u_subs, __pyx_t_4) < (0)) __PYX_ERR(0, 3942, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3946
 *         return self.applyfunc(lambda x: x.subs(D))
 * 
 *     def xreplace(self, *args):             # <<<<<<<<<<<<<<
 *         cdef _DictBasic D = get_dict(*args)
 *         return self.applyfunc(lambda x: x.xreplace(D))
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_107xreplace, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DenseMatrixBase_xreplace, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[405])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3946, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase, __pyx_mstate_global->__pyx_n_u_xreplace, __pyx_t_4) < (0)) __PYX_ERR(0, 3946, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3950
 *         return self.applyfunc(lambda x: x.xreplace(D))
 * 
 *     replace = xreplace             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_GetNameInClass(__pyx_t_4, (PyObject*)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase, __pyx_mstate_global->__pyx_n_u_xreplace); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3950, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase, __pyx_mstate_global->__pyx_n_u_replace, __pyx_t_4) < (0)) __PYX_ERR(0, 3950, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3957
 *         return {c2py(<rcp_const_basic>(elem)) for elem in _set}
 * 
 *     def _submatrix(self, unsigned r_i, unsigned c_i, unsigned r_j, unsigned c_j, unsigned r_s=1, unsigned c_s=1):             # <<<<<<<<<<<<<<
 *         r_j, c_j = r_j - 1, c_j - 1
 *         cdef DenseMatrixBase result = self.__class__(((r_j - r_i) // r_s) + 1, ((c_j - c_i) // c_s) + 1)
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_109_submatrix, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DenseMatrixBase__submatrix, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[406])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3957, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[17]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase, __pyx_mstate_global->__pyx_n_u_submatrix, __pyx_t_4) < (0)) __PYX_ERR(0, 3957, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3963
 *         return result
 * 
 *     def LU(self):             # <<<<<<<<<<<<<<
 *         cdef DenseMatrixBase L = self.__class__(self.nrows(), self.ncols())
 *         cdef DenseMatrixBase U = self.__class__(self.nrows(), self.ncols())
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_111LU, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DenseMatrixBase_LU, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[407])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3963, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase, __pyx_mstate_global->__pyx_n_u_LU, __pyx_t_4) < (0)) __PYX_ERR(0, 3963, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3969
 *         return L, U
 * 
 *     def LUdecomposition(self):             # <<<<<<<<<<<<<<
 *         if self.rows != self.cols:
 *             raise NotImplementedError("LU decomposition not implemented for non-square matrices yet.")
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_113LUdecomposition, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DenseMatrixBase_LUdecomposition, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[408])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3969, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase, __pyx_mstate_global->__pyx_n_u_LUdecomposition, __pyx_t_4) < (0)) __PYX_ERR(0, 3969, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3982
 *         return L, U, perm
 * 
 *     def LDL(self):             # <<<<<<<<<<<<<<
 *         cdef DenseMatrixBase L = self.__class__(self.nrows(), self.ncols())
 *         cdef DenseMatrixBase D = self.__class__(self.nrows(), self.ncols())
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_115LDL, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DenseMatrixBase_LDL, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[409])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3982, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase, __pyx_mstate_global->__pyx_n_u_LDL, __pyx_t_4) < (0)) __PYX_ERR(0, 3982, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":3988
 *         return L, D
 * 
 *     def solve(self, b, method='LU'):             # <<<<<<<<<<<<<<
 *         cdef DenseMatrixBase b_ = sympify(b)
 *         cdef DenseMatrixBase x = self.__class__(b_.nrows(), b_.ncols())
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_117solve, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DenseMatrixBase_solve, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[410])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3988, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[16]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase, __pyx_mstate_global->__pyx_n_u_solve, __pyx_t_4) < (0)) __PYX_ERR(0, 3988, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4014
 *         return x
 * 
 *     def LUsolve(self, b):             # <<<<<<<<<<<<<<
 *         cdef DenseMatrixBase b_ = sympify(b)
 *         cdef DenseMatrixBase x = self.__class__(b.nrows(), b.ncols())
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_119LUsolve, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DenseMatrixBase_LUsolve, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[411])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4014, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase, __pyx_mstate_global->__pyx_n_u_LUsolve, __pyx_t_4) < (0)) __PYX_ERR(0, 4014, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4022
 *         return x
 * 
 *     def FFLU(self):             # <<<<<<<<<<<<<<
 *         cdef DenseMatrixBase L = self.__class__(self.nrows(), self.ncols())
 *         cdef DenseMatrixBase U = self.__class__(self.nrows(), self.ncols(), [0]*self.nrows()*self.ncols())
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_121FFLU, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DenseMatrixBase_FFLU, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[412])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4022, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase, __pyx_mstate_global->__pyx_n_u_FFLU, __pyx_t_4) < (0)) __PYX_ERR(0, 4022, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4035
 *         return L, U
 * 
 *     def FFLDU(self):             # <<<<<<<<<<<<<<
 *         cdef DenseMatrixBase L = self.__class__(self.nrows(), self.ncols())
 *         cdef DenseMatrixBase D = self.__class__(self.nrows(), self.ncols())
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_123FFLDU, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DenseMatrixBase_FFLDU, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[413])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4035, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase, __pyx_mstate_global->__pyx_n_u_FFLDU, __pyx_t_4) < (0)) __PYX_ERR(0, 4035, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4042
 *         return L, D, U
 * 
 *     def QR(self):             # <<<<<<<<<<<<<<
 *         cdef DenseMatrixBase Q = self.__class__(self.nrows(), self.ncols())
 *         cdef DenseMatrixBase R = self.__class__(self.nrows(), self.ncols())
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_125QR, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DenseMatrixBase_QR, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[414])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4042, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase, __pyx_mstate_global->__pyx_n_u_QR, __pyx_t_4) < (0)) __PYX_ERR(0, 4042, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4048
 *         return Q, R
 * 
 *     def cholesky(self):             # <<<<<<<<<<<<<<
 *         cdef DenseMatrixBase L = self.__class__(self.nrows(), self.ncols())
 *         deref(self.thisptr).cholesky(deref(L.thisptr))
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_127cholesky, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DenseMatrixBase_cholesky, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[415])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4048, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase, __pyx_mstate_global->__pyx_n_u_cholesky, __pyx_t_4) < (0)) __PYX_ERR(0, 4048, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4053
 *         return L
 * 
 *     def jacobian(self, x):             # <<<<<<<<<<<<<<
 *         cdef DenseMatrixBase x_ = sympify(x)
 *         cdef DenseMatrixBase R = self.__class__(self.nrows(), x.nrows())
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_129jacobian, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DenseMatrixBase_jacobian, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[416])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4053, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase, __pyx_mstate_global->__pyx_n_u_jacobian, __pyx_t_4) < (0)) __PYX_ERR(0, 4053, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4061
 *         return R
 * 
 *     def _sympy_(self):             # <<<<<<<<<<<<<<
 *         s = []
 *         cdef symengine.DenseMatrix A = deref(symengine.static_cast_DenseMatrix(self.thisptr))
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_131_sympy_, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DenseMatrixBase__sympy, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[417])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4061, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase, __pyx_mstate_global->__pyx_n_u_sympy_2, __pyx_t_4) < (0)) __PYX_ERR(0, 4061, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4072
 *         return sympy.ImmutableMatrix(s)
 * 
 *     def _sage_(self):             # <<<<<<<<<<<<<<
 *         s = []
 *         cdef symengine.DenseMatrix A = deref(symengine.static_cast_DenseMatrix(self.thisptr))
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_133_sage_, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DenseMatrixBase__sage, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[418])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4072, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase, __pyx_mstate_global->__pyx_n_u_sage, __pyx_t_4) < (0)) __PYX_ERR(0, 4072, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4083
 *         return sage.Matrix(s, immutable=True)
 * 
 *     def dump_real(self, double[::1] out):             # <<<<<<<<<<<<<<
 *         cdef size_t ri, ci, nr, nc
 *         if out.size < self.size:
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_135dump_real, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DenseMatrixBase_dump_real, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[419])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4083, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase, __pyx_mstate_global->__pyx_n_u_dump_real, __pyx_t_4) < (0)) __PYX_ERR(0, 4083, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4094
 *                     <symengine.rcp_const_basic>(deref(self.thisptr).get(ri, ci))))
 * 
 *     def dump_complex(self, double complex[::1] out):             # <<<<<<<<<<<<<<
 *         cdef size_t ri, ci, nr, nc
 *         if out.size < self.size:
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_137dump_complex, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DenseMatrixBase_dump_complex, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[420])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4094, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase, __pyx_mstate_global->__pyx_n_u_dump_complex, __pyx_t_4) < (0)) __PYX_ERR(0, 4094, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4108
 *         return DenseMatrixBaseIter(self)
 * 
 *     def as_mutable(self):             # <<<<<<<<<<<<<<
 *         return MutableDenseMatrix(self)
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_141as_mutable, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DenseMatrixBase_as_mutable, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[421])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4108, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase, __pyx_mstate_global->__pyx_n_u_as_mutable, __pyx_t_4) < (0)) __PYX_ERR(0, 4108, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4111
 *         return MutableDenseMatrix(self)
 * 
 *     def as_immutable(self):             # <<<<<<<<<<<<<<
 *         return ImmutableDenseMatrix(self)
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_143as_immutable, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DenseMatrixBase_as_immutable, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[422])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase, __pyx_mstate_global->__pyx_n_u_as_immutable, __pyx_t_4) < (0)) __PYX_ERR(0, 4111, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4114
 *         return ImmutableDenseMatrix(self)
 * 
 *     def tolist(self):             # <<<<<<<<<<<<<<
 *         return [[self[rowi, coli] for coli in range(self.ncols())]
 *                 for rowi in range(self.nrows())]
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_145tolist, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DenseMatrixBase_tolist, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[423])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4114, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase, __pyx_mstate_global->__pyx_n_u_tolist, __pyx_t_4) < (0)) __PYX_ERR(0, 4114, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4118
 *                 for rowi in range(self.nrows())]
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         return np.array(self.tolist())
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_147__array__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DenseMatrixBase___array, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[424])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4118, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase, __pyx_mstate_global->__pyx_n_u_array_2, __pyx_t_4) < (0)) __PYX_ERR(0, 4118, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4121
 *         return np.array(self.tolist())
 * 
 *     def _mat(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_149_mat, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DenseMatrixBase__mat, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[425])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4121, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase, __pyx_mstate_global->__pyx_n_u_mat, __pyx_t_4) < (0)) __PYX_ERR(0, 4121, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4124
 *         return self
 * 
 *     def atoms(self, *types):             # <<<<<<<<<<<<<<
 *         if types:
 *             s = set()
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_151atoms, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DenseMatrixBase_atoms, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[426])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4124, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase, __pyx_mstate_global->__pyx_n_u_atoms, __pyx_t_4) < (0)) __PYX_ERR(0, 4124, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4135
 *            return self.free_symbols
 * 
 *     def simplify(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self._applyfunc(lambda x : x.simplify(*args, **kwargs))
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_153simplify, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DenseMatrixBase_simplify, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[427])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4135, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase, __pyx_mstate_global->__pyx_n_u_simplify, __pyx_t_4) < (0)) __PYX_ERR(0, 4135, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4138
 *         return self._applyfunc(lambda x : x.simplify(*args, **kwargs))
 * 
 *     def expand(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.applyfunc(lambda x : x.expand(*args, **kwargs))
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_155expand, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DenseMatrixBase_expand, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[428])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4138, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_DenseMatrixBase, __pyx_mstate_global->__pyx_n_u_expand, __pyx_t_4) < (0)) __PYX_ERR(0, 4138, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_157__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DenseMatrixBase___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[429])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_15DenseMatrixBase_159__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DenseMatrixBase___setstate_cytho, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[430])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4142
 * 
 * 
 * class DenseMatrixBaseIter(object):             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, d):
*/
  __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_mstate_global->__pyx_tuple[19]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4142, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_13 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 4142, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __pyx_t_12 = __Pyx_Py3MetaclassPrepare(__pyx_t_13, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_DenseMatrixBaseIter, __pyx_mstate_global->__pyx_n_u_DenseMatrixBaseIter, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, (PyObject *) NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4142, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  if (__pyx_t_4 != __pyx_mstate_global->__pyx_tuple[19]) {
    if (unlikely((PyDict_SetItemString(__pyx_t_12, "__orig_bases__", __pyx_mstate_global->__pyx_tuple[19]) < 0))) __PYX_ERR(0, 4142, __pyx_L1_error)
  }

  /* "symengine/lib/symengine_wrapper.pyx":4144
 * class DenseMatrixBaseIter(object):
 * 
 *     def __init__(self, d):             # <<<<<<<<<<<<<<
 *         self.curr = -1
 *         self.d = d
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_19DenseMatrixBaseIter_1__init__, 0, __pyx_mstate_global->__pyx_n_u_DenseMatrixBaseIter___init, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[431])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4144, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_5) < (0)) __PYX_ERR(0, 4144, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4148
 *         self.d = d
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_19DenseMatrixBaseIter_3__iter__, 0, __pyx_mstate_global->__pyx_n_u_DenseMatrixBaseIter___iter, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[432])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4148, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_iter, __pyx_t_5) < (0)) __PYX_ERR(0, 4148, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4151
 *         return self
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         self.curr = self.curr + 1
 *         if (self.curr < self.d.rows * self.d.cols):
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_19DenseMatrixBaseIter_5__next__, 0, __pyx_mstate_global->__pyx_n_u_DenseMatrixBaseIter___next, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[433])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4151, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetNameInClass(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_next, __pyx_t_5) < (0)) __PYX_ERR(0, 4151, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4158
 *             raise StopIteration
 * 
 *     next = __next__             # <<<<<<<<<<<<<<
 * 
 * cdef class MutableDenseMatrix(DenseMatrixBase):
*/
  __pyx_t_5 = PyObject_GetItem(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_next);
  if (unlikely(!__pyx_t_5)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_next);
  }
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4158, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetNameInClass(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_next_2, __pyx_t_5) < (0)) __PYX_ERR(0, 4158, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4142
 * 
 * 
 * class DenseMatrixBaseIter(object):             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, d):
*/
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_DenseMatrixBaseIter, __pyx_t_4, __pyx_t_12, NULL, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4142, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_DenseMatrixBaseIter, __pyx_t_5) < (0)) __PYX_ERR(0, 4142, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4162
 * cdef class MutableDenseMatrix(DenseMatrixBase):
 * 
 *     def col_swap(self, i, j):             # <<<<<<<<<<<<<<
 *         symengine.column_exchange_dense(deref(symengine.static_cast_DenseMatrix(self.thisptr)), i, j)
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_18MutableDenseMatrix_1col_swap, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MutableDenseMatrix_col_swap, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[434])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_MutableDenseMatrix, __pyx_mstate_global->__pyx_n_u_col_swap, __pyx_t_4) < (0)) __PYX_ERR(0, 4162, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4165
 *         symengine.column_exchange_dense(deref(symengine.static_cast_DenseMatrix(self.thisptr)), i, j)
 * 
 *     def fill(self, value):             # <<<<<<<<<<<<<<
 *         for i in range(self.rows):
 *             for j in range(self.cols):
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_18MutableDenseMatrix_3fill, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MutableDenseMatrix_fill, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[435])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4165, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_MutableDenseMatrix, __pyx_mstate_global->__pyx_n_u_fill, __pyx_t_4) < (0)) __PYX_ERR(0, 4165, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4170
 *                 self[i, j] = value
 * 
 *     def row_swap(self, i, j):             # <<<<<<<<<<<<<<
 *         symengine.row_exchange_dense(deref(symengine.static_cast_DenseMatrix(self.thisptr)), i, j)
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_18MutableDenseMatrix_5row_swap, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MutableDenseMatrix_row_swap, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[436])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4170, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_MutableDenseMatrix, __pyx_mstate_global->__pyx_n_u_row_swap, __pyx_t_4) < (0)) __PYX_ERR(0, 4170, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4173
 *         symengine.row_exchange_dense(deref(symengine.static_cast_DenseMatrix(self.thisptr)), i, j)
 * 
 *     def rowmul(self, i, c, *args):             # <<<<<<<<<<<<<<
 *         cdef Basic _c = sympify(c)
 *         symengine.row_mul_scalar_dense(deref(symengine.static_cast_DenseMatrix(self.thisptr)), i, _c.thisptr)
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_18MutableDenseMatrix_7rowmul, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MutableDenseMatrix_rowmul, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[437])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4173, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_MutableDenseMatrix, __pyx_mstate_global->__pyx_n_u_rowmul, __pyx_t_4) < (0)) __PYX_ERR(0, 4173, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4178
 *         return self
 * 
 *     def rowadd(self, i, j, c, *args):             # <<<<<<<<<<<<<<
 *         cdef Basic _c = sympify(c)
 *         symengine.row_add_row_dense(deref(symengine.static_cast_DenseMatrix(self.thisptr)), i, j, _c.thisptr)
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_18MutableDenseMatrix_9rowadd, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MutableDenseMatrix_rowadd, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[438])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4178, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_MutableDenseMatrix, __pyx_mstate_global->__pyx_n_u_rowadd, __pyx_t_4) < (0)) __PYX_ERR(0, 4178, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4183
 *         return self
 * 
 *     def row_del(self, i):             # <<<<<<<<<<<<<<
 *         if i < -self.rows or i >= self.rows:
 *             raise IndexError("Index out of range: 'i = %s', valid -%s <= i"
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_18MutableDenseMatrix_11row_del, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MutableDenseMatrix_row_del, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[439])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4183, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_MutableDenseMatrix, __pyx_mstate_global->__pyx_n_u_row_del, __pyx_t_4) < (0)) __PYX_ERR(0, 4183, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4192
 *         return self
 * 
 *     def col_del(self, i):             # <<<<<<<<<<<<<<
 *         if i < -self.cols or i >= self.cols:
 *             raise IndexError("Index out of range: 'i=%s', valid -%s <= i < %s"
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_18MutableDenseMatrix_13col_del, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MutableDenseMatrix_col_del, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[440])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4192, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_MutableDenseMatrix, __pyx_mstate_global->__pyx_n_u_col_del, __pyx_t_4) < (0)) __PYX_ERR(0, 4192, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_18MutableDenseMatrix_15__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MutableDenseMatrix___reduce_cyth, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[441])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_18MutableDenseMatrix_17__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_MutableDenseMatrix___setstate_cy, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[442])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4201
 *         return self
 * 
 * Matrix = DenseMatrix = MutableDenseMatrix             # <<<<<<<<<<<<<<
 * 
 * cdef class ImmutableDenseMatrix(DenseMatrixBase):
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Matrix, ((PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_MutableDenseMatrix)) < (0)) __PYX_ERR(0, 4201, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_DenseMatrix, ((PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_MutableDenseMatrix)) < (0)) __PYX_ERR(0, 4201, __pyx_L1_error)

  /* "symengine/lib/symengine_wrapper.pyx":4208
 *         raise TypeError("Cannot set values of {}".format(self.__class__))
 * 
 *     def _applyfunc(self, f):             # <<<<<<<<<<<<<<
 *         res = DenseMatrix(self)
 *         res._applyfunc(f)
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_20ImmutableDenseMatrix_3_applyfunc, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ImmutableDenseMatrix__applyfunc, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[443])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ImmutableDenseMatrix, __pyx_mstate_global->__pyx_n_u_applyfunc_2, __pyx_t_4) < (0)) __PYX_ERR(0, 4208, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_20ImmutableDenseMatrix_5__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ImmutableDenseMatrix___reduce_cy, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[444])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_20ImmutableDenseMatrix_7__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ImmutableDenseMatrix___setstate, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[445])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4214
 * 
 * 
 * ImmutableMatrix = ImmutableDenseMatrix             # <<<<<<<<<<<<<<
 * 
 * 
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ImmutableMatrix, ((PyObject *)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_ImmutableDenseMatrix)) < (0)) __PYX_ERR(0, 4214, __pyx_L1_error)

  /* "symengine/lib/symengine_wrapper.pyx":4225
 * 
 * 
 * def eye(n):             # <<<<<<<<<<<<<<
 *     cdef DenseMatrixBase d = DenseMatrix(n, n)
 *     symengine.eye(deref(symengine.static_cast_DenseMatrix(d.thisptr)), 0)
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_29eye, 0, __pyx_mstate_global->__pyx_n_u_eye, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[446])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4225, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_eye, __pyx_t_4) < (0)) __PYX_ERR(0, 4225, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4240
 * 
 * 
 * def diag(*values):             # <<<<<<<<<<<<<<
 *     cdef DenseMatrixBase d = DenseMatrix(len(values), len(values))
 *     cdef symengine.vec_basic V = iter_to_vec_basic(values)
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_31diag, 0, __pyx_mstate_global->__pyx_n_u_diag, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[447])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4240, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_diag, __pyx_t_4) < (0)) __PYX_ERR(0, 4240, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4247
 * 
 * 
 * def ones(r, c = None):             # <<<<<<<<<<<<<<
 *     if c is None:
 *         c = r
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_33ones, 0, __pyx_mstate_global->__pyx_n_u_ones, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[448])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4247, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[11]);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ones, __pyx_t_4) < (0)) __PYX_ERR(0, 4247, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4255
 * 
 * 
 * def zeros(r, c = None):             # <<<<<<<<<<<<<<
 *     if c is None:
 *         c = r
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_35zeros, 0, __pyx_mstate_global->__pyx_n_u_zeros, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[449])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4255, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[11]);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_zeros, __pyx_t_4) < (0)) __PYX_ERR(0, 4255, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4264
 * 
 * cdef class Sieve:
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def generate_primes(n):
 *         cdef symengine.vector[unsigned] primes
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_5Sieve_1generate_primes, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Sieve_generate_primes, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[450])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4264, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Sieve, __pyx_mstate_global->__pyx_n_u_generate_primes, __pyx_t_4) < (0)) __PYX_ERR(0, 4264, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_13 = NULL;
  __Pyx_GetNameInClass(__pyx_t_12, (PyObject*)__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Sieve, __pyx_mstate_global->__pyx_n_u_generate_primes); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4264, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_13, __pyx_t_12};
    __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4264, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Sieve, __pyx_mstate_global->__pyx_n_u_generate_primes, __pyx_t_4) < (0)) __PYX_ERR(0, 4264, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_5Sieve_3__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Sieve___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[451])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Sieve, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_Sieve, (type(self), 0xe3b0c44, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_Sieve__set_state(self, __pyx_state)
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_5Sieve_5__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Sieve___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[452])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_Sieve, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_14Sieve_iterator_9__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Sieve_iterator___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[453])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_14Sieve_iterator_11__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Sieve_iterator___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[454])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4296
 * 
 * 
 * def module_cleanup():             # <<<<<<<<<<<<<<
 *     global I, E, pi, oo, minus_oo, zoo, nan, true, false, golden_ratio, \
 *            catalan, eulergamma, sympy_module, sage_module, half, one, \
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_37module_cleanup, 0, __pyx_mstate_global->__pyx_n_u_module_cleanup, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[455])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4296, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_module_cleanup, __pyx_t_4) < (0)) __PYX_ERR(0, 4296, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4305
 *            minus_one, zero
 * 
 * import atexit             # <<<<<<<<<<<<<<
 * atexit.register(module_cleanup)
 * 
*/
  __pyx_t_3 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_atexit, 0, 0, NULL, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4305, __pyx_L1_error)
  __pyx_t_4 = __pyx_t_3;
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_atexit, __pyx_t_4) < (0)) __PYX_ERR(0, 4305, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4306
 * 
 * import atexit
 * atexit.register(module_cleanup)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_t_12 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_atexit); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 4306, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_register); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4306, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_module_cleanup); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 4306, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_t_13};
    __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4306, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4309
 * 
 * 
 * def diff(expr, *args):             # <<<<<<<<<<<<<<
 *     if isinstance(expr, MatrixBase):
 *         # Don't sympify matrices so that mutable matrices
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_39diff, 0, __pyx_mstate_global->__pyx_n_u_diff_2, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[456])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4309, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_diff_2, __pyx_t_4) < (0)) __PYX_ERR(0, 4309, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4317
 * 
 * 
 * def _diff(expr, *args):             # <<<<<<<<<<<<<<
 *     cdef Basic prev
 *     cdef Basic b
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_41_diff, 0, __pyx_mstate_global->__pyx_n_u_diff, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[457])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4317, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_diff, __pyx_t_4) < (0)) __PYX_ERR(0, 4317, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4354
 * 
 * 
 * def expand(x, deep=True):             # <<<<<<<<<<<<<<
 *     return sympify(x).expand(deep)
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_43expand, 0, __pyx_mstate_global->__pyx_n_u_expand, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[458])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4354, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[4]);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_expand, __pyx_t_4) < (0)) __PYX_ERR(0, 4354, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4357
 *     return sympify(x).expand(deep)
 * 
 * expand_mul = expand             # <<<<<<<<<<<<<<
 * 
 * def function_symbol(name, *args):
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_expand); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4357, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_expand_mul, __pyx_t_4) < (0)) __PYX_ERR(0, 4357, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4359
 * expand_mul = expand
 * 
 * def function_symbol(name, *args):             # <<<<<<<<<<<<<<
 *     cdef symengine.vec_basic v
 *     cdef Basic e_
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_45function_symbol, 0, __pyx_mstate_global->__pyx_n_u_function_symbol, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[459])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4359, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_function_symbol, __pyx_t_4) < (0)) __PYX_ERR(0, 4359, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4368
 *     return c2py(symengine.function_symbol(name.encode("utf-8"), v))
 * 
 * def sqrt(x):             # <<<<<<<<<<<<<<
 *     cdef Basic X = sympify(x)
 *     return c2py(symengine.sqrt(X.thisptr))
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_47sqrt, 0, __pyx_mstate_global->__pyx_n_u_sqrt, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[460])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4368, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_sqrt, __pyx_t_4) < (0)) __PYX_ERR(0, 4368, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4372
 *     return c2py(symengine.sqrt(X.thisptr))
 * 
 * def exp(x):             # <<<<<<<<<<<<<<
 *     cdef Basic X = sympify(x)
 *     return c2py(symengine.exp(X.thisptr))
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_49exp, 0, __pyx_mstate_global->__pyx_n_u_exp, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[461])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4372, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_exp, __pyx_t_4) < (0)) __PYX_ERR(0, 4372, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4376
 *     return c2py(symengine.exp(X.thisptr))
 * 
 * def perfect_power(n):             # <<<<<<<<<<<<<<
 *     cdef Basic _n = sympify(n)
 *     require(_n, Integer)
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_51perfect_power, 0, __pyx_mstate_global->__pyx_n_u_perfect_power, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[462])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4376, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_perfect_power, __pyx_t_4) < (0)) __PYX_ERR(0, 4376, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4381
 *     return symengine.perfect_power(deref(symengine.rcp_static_cast_Integer(_n.thisptr)))
 * 
 * def is_square(n):             # <<<<<<<<<<<<<<
 *     cdef Basic _n = sympify(n)
 *     require(_n, Integer)
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_53is_square, 0, __pyx_mstate_global->__pyx_n_u_is_square, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[463])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4381, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_is_square, __pyx_t_4) < (0)) __PYX_ERR(0, 4381, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4386
 *     return symengine.perfect_square(deref(symengine.rcp_static_cast_Integer(_n.thisptr)))
 * 
 * def integer_nthroot(a, n):             # <<<<<<<<<<<<<<
 *     cdef Basic _a = sympify(a)
 *     require(_a, Integer)
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_55integer_nthroot, 0, __pyx_mstate_global->__pyx_n_u_integer_nthroot, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[464])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4386, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_integer_nthroot, __pyx_t_4) < (0)) __PYX_ERR(0, 4386, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4393
 *     return (c2py(<rcp_const_basic>_r), ret_val == 1)
 * 
 * def _max(*args):             # <<<<<<<<<<<<<<
 *     cdef symengine.vec_basic v
 *     cdef Basic e_
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_57_max, 0, __pyx_mstate_global->__pyx_n_u_max, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[465])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4393, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_max, __pyx_t_4) < (0)) __PYX_ERR(0, 4393, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4401
 *     return c2py(symengine.max(v))
 * 
 * def _min(*args):             # <<<<<<<<<<<<<<
 *     cdef symengine.vec_basic v
 *     cdef Basic e_
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_59_min, 0, __pyx_mstate_global->__pyx_n_u_min, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[466])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4401, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_min, __pyx_t_4) < (0)) __PYX_ERR(0, 4401, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4409
 *     return c2py(symengine.min(v))
 * 
 * def gamma(x):             # <<<<<<<<<<<<<<
 *     cdef Basic X = sympify(x)
 *     return c2py(symengine.gamma(X.thisptr))
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_61gamma, 0, __pyx_mstate_global->__pyx_n_u_gamma, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[467])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4409, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_gamma, __pyx_t_4) < (0)) __PYX_ERR(0, 4409, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4413
 *     return c2py(symengine.gamma(X.thisptr))
 * 
 * def eq(lhs, rhs = None):             # <<<<<<<<<<<<<<
 *     cdef Basic X = sympify(lhs)
 *     if rhs is None:
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_63eq, 0, __pyx_mstate_global->__pyx_n_u_eq, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[468])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4413, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[11]);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_eq, __pyx_t_4) < (0)) __PYX_ERR(0, 4413, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4420
 *     return c2py(<rcp_const_basic>(symengine.Eq(X.thisptr, Y.thisptr)))
 * 
 * def ne(lhs, rhs):             # <<<<<<<<<<<<<<
 *     cdef Basic X = sympify(lhs)
 *     cdef Basic Y = sympify(rhs)
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_65ne, 0, __pyx_mstate_global->__pyx_n_u_ne, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[469])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4420, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ne, __pyx_t_4) < (0)) __PYX_ERR(0, 4420, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4425
 *     return c2py(<rcp_const_basic>(symengine.Ne(X.thisptr, Y.thisptr)))
 * 
 * def ge(lhs, rhs):             # <<<<<<<<<<<<<<
 *     cdef Basic X = sympify(lhs)
 *     cdef Basic Y = sympify(rhs)
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_67ge, 0, __pyx_mstate_global->__pyx_n_u_ge, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[470])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4425, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ge, __pyx_t_4) < (0)) __PYX_ERR(0, 4425, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4430
 *     return c2py(<rcp_const_basic>(symengine.Ge(X.thisptr, Y.thisptr)))
 * 
 * Ge = GreaterThan = ge             # <<<<<<<<<<<<<<
 * 
 * def gt(lhs, rhs):
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ge); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4430, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Ge, __pyx_t_4) < (0)) __PYX_ERR(0, 4430, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_GreaterThan, __pyx_t_4) < (0)) __PYX_ERR(0, 4430, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4432
 * Ge = GreaterThan = ge
 * 
 * def gt(lhs, rhs):             # <<<<<<<<<<<<<<
 *     cdef Basic X = sympify(lhs)
 *     cdef Basic Y = sympify(rhs)
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_69gt, 0, __pyx_mstate_global->__pyx_n_u_gt, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[471])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4432, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_gt, __pyx_t_4) < (0)) __PYX_ERR(0, 4432, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4437
 *     return c2py(<rcp_const_basic>(symengine.Gt(X.thisptr, Y.thisptr)))
 * 
 * Gt = StrictGreaterThan = gt             # <<<<<<<<<<<<<<
 * 
 * def le(lhs, rhs):
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_gt); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4437, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Gt, __pyx_t_4) < (0)) __PYX_ERR(0, 4437, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_StrictGreaterThan, __pyx_t_4) < (0)) __PYX_ERR(0, 4437, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4439
 * Gt = StrictGreaterThan = gt
 * 
 * def le(lhs, rhs):             # <<<<<<<<<<<<<<
 *     cdef Basic X = sympify(lhs)
 *     cdef Basic Y = sympify(rhs)
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_71le, 0, __pyx_mstate_global->__pyx_n_u_le, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[472])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4439, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_le, __pyx_t_4) < (0)) __PYX_ERR(0, 4439, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4444
 *     return c2py(<rcp_const_basic>(symengine.Le(X.thisptr, Y.thisptr)))
 * 
 * def lt(lhs, rhs):             # <<<<<<<<<<<<<<
 *     cdef Basic X = sympify(lhs)
 *     cdef Basic Y = sympify(rhs)
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_73lt, 0, __pyx_mstate_global->__pyx_n_u_lt, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[473])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4444, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_lt, __pyx_t_4) < (0)) __PYX_ERR(0, 4444, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4449
 *     return c2py(<rcp_const_basic>(symengine.Lt(X.thisptr, Y.thisptr)))
 * 
 * def digamma(x):             # <<<<<<<<<<<<<<
 *     cdef Basic X = sympify(x)
 *     return c2py(symengine.digamma(X.thisptr))
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_75digamma, 0, __pyx_mstate_global->__pyx_n_u_digamma, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[474])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4449, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_digamma, __pyx_t_4) < (0)) __PYX_ERR(0, 4449, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4453
 *     return c2py(symengine.digamma(X.thisptr))
 * 
 * def trigamma(x):             # <<<<<<<<<<<<<<
 *     cdef Basic X = sympify(x)
 *     return c2py(symengine.trigamma(X.thisptr))
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_77trigamma, 0, __pyx_mstate_global->__pyx_n_u_trigamma, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[475])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4453, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_trigamma, __pyx_t_4) < (0)) __PYX_ERR(0, 4453, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4457
 *     return c2py(symengine.trigamma(X.thisptr))
 * 
 * def logical_and(*args):             # <<<<<<<<<<<<<<
 *     cdef symengine.set_boolean s
 *     cdef Boolean e_
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_79logical_and, 0, __pyx_mstate_global->__pyx_n_u_logical_and, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[476])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4457, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_logical_and, __pyx_t_4) < (0)) __PYX_ERR(0, 4457, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4465
 *     return c2py(<rcp_const_basic>(symengine.logical_and(s)))
 * 
 * def logical_or(*args):             # <<<<<<<<<<<<<<
 *     cdef symengine.set_boolean s
 *     cdef Boolean e_
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_81logical_or, 0, __pyx_mstate_global->__pyx_n_u_logical_or, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[477])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4465, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_logical_or, __pyx_t_4) < (0)) __PYX_ERR(0, 4465, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4473
 *     return c2py(<rcp_const_basic>(symengine.logical_or(s)))
 * 
 * def Nor(*args):             # <<<<<<<<<<<<<<
 *     cdef symengine.set_boolean s
 *     cdef Boolean e_
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_83Nor, 0, __pyx_mstate_global->__pyx_n_u_Nor, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[478])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4473, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Nor, __pyx_t_4) < (0)) __PYX_ERR(0, 4473, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4481
 *     return c2py(<rcp_const_basic>(symengine.logical_nor(s)))
 * 
 * def Nand(*args):             # <<<<<<<<<<<<<<
 *     cdef symengine.set_boolean s
 *     cdef Boolean e_
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_85Nand, 0, __pyx_mstate_global->__pyx_n_u_Nand, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[479])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4481, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Nand, __pyx_t_4) < (0)) __PYX_ERR(0, 4481, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4489
 *     return c2py(<rcp_const_basic>(symengine.logical_nand(s)))
 * 
 * def logical_not(x):             # <<<<<<<<<<<<<<
 *     cdef Basic x_ = sympify(x)
 *     require(x_, Boolean)
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_87logical_not, 0, __pyx_mstate_global->__pyx_n_u_logical_not, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[480])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4489, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_logical_not, __pyx_t_4) < (0)) __PYX_ERR(0, 4489, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4495
 *     return c2py(<rcp_const_basic>(symengine.logical_not(_x)))
 * 
 * def logical_xor(*args):             # <<<<<<<<<<<<<<
 *     cdef symengine.vec_boolean v
 *     cdef Boolean e_
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_89logical_xor, 0, __pyx_mstate_global->__pyx_n_u_logical_xor, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[481])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4495, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_logical_xor, __pyx_t_4) < (0)) __PYX_ERR(0, 4495, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4503
 *     return c2py(<rcp_const_basic>(symengine.logical_xor(v)))
 * 
 * def Xnor(*args):             # <<<<<<<<<<<<<<
 *     cdef symengine.vec_boolean v
 *     cdef Boolean e_
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_91Xnor, 0, __pyx_mstate_global->__pyx_n_u_Xnor, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[482])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4503, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Xnor, __pyx_t_4) < (0)) __PYX_ERR(0, 4503, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4511
 *     return c2py(<rcp_const_basic>(symengine.logical_xnor(v)))
 * 
 * def evalf(x, unsigned long bits=53, real=None):             # <<<<<<<<<<<<<<
 *     cdef Basic X = sympify(x)
 *     cdef symengine.EvalfDomain d
*/
  __pyx_t_4 = __Pyx_PyLong_From_unsigned_long(((unsigned long)53)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4511, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyTuple_Pack(2, __pyx_t_4, Py_None); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4511, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_93evalf, 0, __pyx_mstate_global->__pyx_n_u_evalf, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[483])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4511, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_t_5);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_evalf, __pyx_t_4) < (0)) __PYX_ERR(0, 4511, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4522
 *     return c2py(<rcp_const_basic>(symengine.evalf(deref(X.thisptr), bits, d)))
 * 
 * def eval_double(x):             # <<<<<<<<<<<<<<
 *     warnings.warn("eval_double is deprecated. Use evalf(..., real=True)", DeprecationWarning)
 *     return evalf(x, 53, real=True)
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_95eval_double, 0, __pyx_mstate_global->__pyx_n_u_eval_double, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[484])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4522, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_eval_double, __pyx_t_4) < (0)) __PYX_ERR(0, 4522, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4526
 *     return evalf(x, 53, real=True)
 * 
 * def eval_complex_double(x):             # <<<<<<<<<<<<<<
 *     warnings.warn("eval_complex_double is deprecated. Use evalf(..., real=False)", DeprecationWarning)
 *     return evalf(x, 53, real=False)
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_97eval_complex_double, 0, __pyx_mstate_global->__pyx_n_u_eval_complex_double, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[485])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4526, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_eval_complex_double, __pyx_t_4) < (0)) __PYX_ERR(0, 4526, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4530
 *     return evalf(x, 53, real=False)
 * 
 * have_mpfr = False             # <<<<<<<<<<<<<<
 * have_mpc = False
 * have_piranha = False
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_have_mpfr, Py_False) < (0)) __PYX_ERR(0, 4530, __pyx_L1_error)

  /* "symengine/lib/symengine_wrapper.pyx":4531
 * 
 * have_mpfr = False
 * have_mpc = False             # <<<<<<<<<<<<<<
 * have_piranha = False
 * have_flint = False
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_have_mpc, Py_False) < (0)) __PYX_ERR(0, 4531, __pyx_L1_error)

  /* "symengine/lib/symengine_wrapper.pyx":4532
 * have_mpfr = False
 * have_mpc = False
 * have_piranha = False             # <<<<<<<<<<<<<<
 * have_flint = False
 * have_llvm = False
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_have_piranha, Py_False) < (0)) __PYX_ERR(0, 4532, __pyx_L1_error)

  /* "symengine/lib/symengine_wrapper.pyx":4533
 * have_mpc = False
 * have_piranha = False
 * have_flint = False             # <<<<<<<<<<<<<<
 * have_llvm = False
 * have_llvm_long_double = False
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_have_flint, Py_False) < (0)) __PYX_ERR(0, 4533, __pyx_L1_error)

  /* "symengine/lib/symengine_wrapper.pyx":4534
 * have_piranha = False
 * have_flint = False
 * have_llvm = False             # <<<<<<<<<<<<<<
 * have_llvm_long_double = False
 * 
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_have_llvm, Py_False) < (0)) __PYX_ERR(0, 4534, __pyx_L1_error)

  /* "symengine/lib/symengine_wrapper.pyx":4535
 * have_flint = False
 * have_llvm = False
 * have_llvm_long_double = False             # <<<<<<<<<<<<<<
 * 
 * have_mpfr = True
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_have_llvm_long_double, Py_False) < (0)) __PYX_ERR(0, 4535, __pyx_L1_error)

  /* "symengine/lib/symengine_wrapper.pyx":4537
 * have_llvm_long_double = False
 * 
 * have_mpfr = True             # <<<<<<<<<<<<<<
 * def eval_mpfr(x, unsigned long prec):
 *     warnings.warn("eval_mpfr is deprecated. Use evalf(..., real=True)", DeprecationWarning)
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_have_mpfr, Py_True) < (0)) __PYX_ERR(0, 4537, __pyx_L1_error)

  /* "symengine/lib/symengine_wrapper.pyx":4538
 * 
 * have_mpfr = True
 * def eval_mpfr(x, unsigned long prec):             # <<<<<<<<<<<<<<
 *     warnings.warn("eval_mpfr is deprecated. Use evalf(..., real=True)", DeprecationWarning)
 *     return evalf(x, prec, real=True)
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_99eval_mpfr, 0, __pyx_mstate_global->__pyx_n_u_eval_mpfr, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[486])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4538, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_eval_mpfr, __pyx_t_4) < (0)) __PYX_ERR(0, 4538, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4542
 *     return evalf(x, prec, real=True)
 * 
 * have_mpc = True             # <<<<<<<<<<<<<<
 * def eval_mpc(x, unsigned long prec):
 *     warnings.warn("eval_mpc is deprecated. Use evalf(..., real=False)", DeprecationWarning)
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_have_mpc, Py_True) < (0)) __PYX_ERR(0, 4542, __pyx_L1_error)

  /* "symengine/lib/symengine_wrapper.pyx":4543
 * 
 * have_mpc = True
 * def eval_mpc(x, unsigned long prec):             # <<<<<<<<<<<<<<
 *     warnings.warn("eval_mpc is deprecated. Use evalf(..., real=False)", DeprecationWarning)
 *     return evalf(x, prec, real=False)
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_101eval_mpc, 0, __pyx_mstate_global->__pyx_n_u_eval_mpc, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[487])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4543, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_eval_mpc, __pyx_t_4) < (0)) __PYX_ERR(0, 4543, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4548
 * 
 * 
 * have_flint = True             # <<<<<<<<<<<<<<
 * 
 * have_llvm = True
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_have_flint, Py_True) < (0)) __PYX_ERR(0, 4548, __pyx_L1_error)

  /* "symengine/lib/symengine_wrapper.pyx":4550
 * have_flint = True
 * 
 * have_llvm = True             # <<<<<<<<<<<<<<
 * 
 * have_llvm_long_double = True
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_have_llvm, Py_True) < (0)) __PYX_ERR(0, 4550, __pyx_L1_error)

  /* "symengine/lib/symengine_wrapper.pyx":4552
 * have_llvm = True
 * 
 * have_llvm_long_double = True             # <<<<<<<<<<<<<<
 * 
 * def require(obj, t):
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_have_llvm_long_double, Py_True) < (0)) __PYX_ERR(0, 4552, __pyx_L1_error)

  /* "symengine/lib/symengine_wrapper.pyx":4554
 * have_llvm_long_double = True
 * 
 * def require(obj, t):             # <<<<<<<<<<<<<<
 *     if not isinstance(obj, t):
 *         raise TypeError("{} required. {} is of type {}".format(t, obj, type(obj)))
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_103require, 0, __pyx_mstate_global->__pyx_n_u_require, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[488])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4554, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_require, __pyx_t_4) < (0)) __PYX_ERR(0, 4554, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4558
 *         raise TypeError("{} required. {} is of type {}".format(t, obj, type(obj)))
 * 
 * def eval(x, long prec):             # <<<<<<<<<<<<<<
 *     warnings.warn("eval is deprecated. Use evalf(..., real=False)", DeprecationWarning)
 *     return evalf(x, prec, real=False)
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_105eval, 0, __pyx_mstate_global->__pyx_n_u_eval, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[489])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4558, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_eval, __pyx_t_4) < (0)) __PYX_ERR(0, 4558, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4562
 *     return evalf(x, prec, real=False)
 * 
 * def eval_real(x, long prec):             # <<<<<<<<<<<<<<
 *     warnings.warn("eval_real is deprecated. Use evalf(..., real=True)", DeprecationWarning)
 *     return evalf(x, prec, real=True)
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_107eval_real, 0, __pyx_mstate_global->__pyx_n_u_eval_real, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[490])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4562, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_eval_real, __pyx_t_4) < (0)) __PYX_ERR(0, 4562, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4566
 *     return evalf(x, prec, real=True)
 * 
 * def probab_prime_p(n, reps = 25):             # <<<<<<<<<<<<<<
 *     cdef Basic _n = sympify(n)
 *     require(_n, Integer)
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_109probab_prime_p, 0, __pyx_mstate_global->__pyx_n_u_probab_prime_p, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[491])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4566, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[20]);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_probab_prime_p, __pyx_t_4) < (0)) __PYX_ERR(0, 4566, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4571
 *     return symengine.probab_prime_p(deref(symengine.rcp_static_cast_Integer(_n.thisptr)), reps) >= 1
 * 
 * isprime = probab_prime_p             # <<<<<<<<<<<<<<
 * 
 * def nextprime(n):
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_probab_prime_p); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4571, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_isprime, __pyx_t_4) < (0)) __PYX_ERR(0, 4571, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4573
 * isprime = probab_prime_p
 * 
 * def nextprime(n):             # <<<<<<<<<<<<<<
 *     cdef Basic _n = sympify(n)
 *     require(_n, Integer)
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_111nextprime, 0, __pyx_mstate_global->__pyx_n_u_nextprime, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[492])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4573, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_nextprime, __pyx_t_4) < (0)) __PYX_ERR(0, 4573, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4578
 *     return c2py(<rcp_const_basic>(symengine.nextprime(deref(symengine.rcp_static_cast_Integer(_n.thisptr)))))
 * 
 * def gcd(a, b):             # <<<<<<<<<<<<<<
 *     cdef Basic _a = sympify(a)
 *     cdef Basic _b = sympify(b)
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_113gcd, 0, __pyx_mstate_global->__pyx_n_u_gcd, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[493])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4578, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_gcd, __pyx_t_4) < (0)) __PYX_ERR(0, 4578, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4586
 *         deref(symengine.rcp_static_cast_Integer(_b.thisptr)))))
 * 
 * def lcm(a, b):             # <<<<<<<<<<<<<<
 *     cdef Basic _a = sympify(a)
 *     cdef Basic _b = sympify(b)
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_115lcm, 0, __pyx_mstate_global->__pyx_n_u_lcm, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[494])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4586, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_lcm, __pyx_t_4) < (0)) __PYX_ERR(0, 4586, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4594
 *         deref(symengine.rcp_static_cast_Integer(_b.thisptr)))))
 * 
 * def gcd_ext(a, b):             # <<<<<<<<<<<<<<
 *     cdef Basic _a = sympify(a)
 *     cdef Basic _b = sympify(b)
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_117gcd_ext, 0, __pyx_mstate_global->__pyx_n_u_gcd_ext, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[495])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4594, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_gcd_ext, __pyx_t_4) < (0)) __PYX_ERR(0, 4594, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4604
 *     return (c2py(<rcp_const_basic>s), c2py(<rcp_const_basic>t), c2py(<rcp_const_basic>g))
 * 
 * igcdex = gcd_ext             # <<<<<<<<<<<<<<
 * 
 * def mod(a, b):
*/
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_gcd_ext); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4604, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_igcdex, __pyx_t_4) < (0)) __PYX_ERR(0, 4604, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4606
 * igcdex = gcd_ext
 * 
 * def mod(a, b):             # <<<<<<<<<<<<<<
 *     if b == 0:
 *         raise ZeroDivisionError
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_119mod, 0, __pyx_mstate_global->__pyx_n_u_mod, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[496])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4606, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_mod, __pyx_t_4) < (0)) __PYX_ERR(0, 4606, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4616
 *         deref(symengine.rcp_static_cast_Integer(_b.thisptr)))))
 * 
 * def quotient(a, b):             # <<<<<<<<<<<<<<
 *     if b == 0:
 *         raise ZeroDivisionError
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_121quotient, 0, __pyx_mstate_global->__pyx_n_u_quotient, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[497])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4616, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_quotient, __pyx_t_4) < (0)) __PYX_ERR(0, 4616, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4626
 *         deref(symengine.rcp_static_cast_Integer(_b.thisptr)))))
 * 
 * def quotient_mod(a, b):             # <<<<<<<<<<<<<<
 *     if b == 0:
 *         raise ZeroDivisionError
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_123quotient_mod, 0, __pyx_mstate_global->__pyx_n_u_quotient_mod, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[498])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4626, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_quotient_mod, __pyx_t_4) < (0)) __PYX_ERR(0, 4626, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4638
 *     return (c2py(<rcp_const_basic>q), c2py(<rcp_const_basic>r))
 * 
 * def mod_inverse(a, b):             # <<<<<<<<<<<<<<
 *     cdef RCP[const symengine.Integer] inv
 *     cdef Basic _a = sympify(a)
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_125mod_inverse, 0, __pyx_mstate_global->__pyx_n_u_mod_inverse, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[499])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4638, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_mod_inverse, __pyx_t_4) < (0)) __PYX_ERR(0, 4638, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4650
 *     return c2py(<rcp_const_basic>inv)
 * 
 * def crt(rem, mod):             # <<<<<<<<<<<<<<
 *     cdef symengine.vec_integer _rem, _mod
 *     cdef Basic _a
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_127crt, 0, __pyx_mstate_global->__pyx_n_u_crt, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[500])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4650, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_crt, __pyx_t_4) < (0)) __PYX_ERR(0, 4650, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4668
 *     return c2py(<rcp_const_basic>c)
 * 
 * def fibonacci(n):             # <<<<<<<<<<<<<<
 *     if n < 0 :
 *         raise NotImplementedError
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_129fibonacci, 0, __pyx_mstate_global->__pyx_n_u_fibonacci, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[501])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4668, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_fibonacci, __pyx_t_4) < (0)) __PYX_ERR(0, 4668, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4673
 *     return c2py(<rcp_const_basic>(symengine.fibonacci(n)))
 * 
 * def fibonacci2(n):             # <<<<<<<<<<<<<<
 *     if n < 0 :
 *         raise NotImplementedError
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_131fibonacci2, 0, __pyx_mstate_global->__pyx_n_u_fibonacci2, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[502])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4673, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_fibonacci2, __pyx_t_4) < (0)) __PYX_ERR(0, 4673, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4680
 *     return [c2py(<rcp_const_basic>f1), c2py(<rcp_const_basic>f2)]
 * 
 * def lucas(n):             # <<<<<<<<<<<<<<
 *     if n < 0 :
 *         raise NotImplementedError
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_133lucas, 0, __pyx_mstate_global->__pyx_n_u_lucas, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[503])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4680, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_lucas, __pyx_t_4) < (0)) __PYX_ERR(0, 4680, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4685
 *     return c2py(<rcp_const_basic>(symengine.lucas(n)))
 * 
 * def lucas2(n):             # <<<<<<<<<<<<<<
 *     if n < 0 :
 *         raise NotImplementedError
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_135lucas2, 0, __pyx_mstate_global->__pyx_n_u_lucas2, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[504])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4685, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_lucas2, __pyx_t_4) < (0)) __PYX_ERR(0, 4685, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4692
 *     return [c2py(<rcp_const_basic>f1), c2py(<rcp_const_basic>f2)]
 * 
 * def binomial(n, k):             # <<<<<<<<<<<<<<
 *     if k < 0:
 *         raise ArithmeticError
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_137binomial, 0, __pyx_mstate_global->__pyx_n_u_binomial, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[505])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4692, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_binomial, __pyx_t_4) < (0)) __PYX_ERR(0, 4692, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4699
 *     return c2py(<rcp_const_basic>symengine.binomial(deref(symengine.rcp_static_cast_Integer(_n.thisptr)), k))
 * 
 * def factorial(n):             # <<<<<<<<<<<<<<
 *     if n < 0:
 *         raise ArithmeticError
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_139factorial, 0, __pyx_mstate_global->__pyx_n_u_factorial, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[506])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4699, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_factorial, __pyx_t_4) < (0)) __PYX_ERR(0, 4699, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4704
 *     return c2py(<rcp_const_basic>(symengine.factorial(n)))
 * 
 * def divides(a, b):             # <<<<<<<<<<<<<<
 *     cdef Basic _a = sympify(a)
 *     cdef Basic _b = sympify(b)
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_141divides, 0, __pyx_mstate_global->__pyx_n_u_divides, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[507])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4704, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_divides, __pyx_t_4) < (0)) __PYX_ERR(0, 4704, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4712
 *         deref(symengine.rcp_static_cast_Integer(_b.thisptr)))
 * 
 * def factor(n, B1 = 1.0):             # <<<<<<<<<<<<<<
 *     cdef Basic _n = sympify(n)
 *     require(_n, Integer)
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_143factor, 0, __pyx_mstate_global->__pyx_n_u_factor, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[508])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4712, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[21]);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_factor, __pyx_t_4) < (0)) __PYX_ERR(0, 4712, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4723
 *         return None
 * 
 * def factor_lehman_method(n):             # <<<<<<<<<<<<<<
 *     cdef Basic _n = sympify(n)
 *     require(_n, Integer)
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_145factor_lehman_method, 0, __pyx_mstate_global->__pyx_n_u_factor_lehman_method, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[509])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4723, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_factor_lehman_method, __pyx_t_4) < (0)) __PYX_ERR(0, 4723, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4734
 *         return None
 * 
 * def factor_pollard_pm1_method(n, B = 10, retries = 5):             # <<<<<<<<<<<<<<
 *     cdef Basic _n = sympify(n)
 *     require(_n, Integer)
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_147factor_pollard_pm1_method, 0, __pyx_mstate_global->__pyx_n_u_factor_pollard_pm1_method, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[510])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4734, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[22]);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_factor_pollard_pm1_method, __pyx_t_4) < (0)) __PYX_ERR(0, 4734, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4745
 *         return None
 * 
 * def factor_pollard_rho_method(n, retries = 5):             # <<<<<<<<<<<<<<
 *     cdef Basic _n = sympify(n)
 *     require(_n, Integer)
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_149factor_pollard_rho_method, 0, __pyx_mstate_global->__pyx_n_u_factor_pollard_rho_method, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[511])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4745, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[23]);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_factor_pollard_rho_method, __pyx_t_4) < (0)) __PYX_ERR(0, 4745, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4756
 *         return None
 * 
 * def prime_factors(n):             # <<<<<<<<<<<<<<
 *     cdef symengine.vec_integer factors
 *     cdef Basic _n = sympify(n)
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_151prime_factors, 0, __pyx_mstate_global->__pyx_n_u_prime_factors, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[512])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4756, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_prime_factors, __pyx_t_4) < (0)) __PYX_ERR(0, 4756, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4766
 *     return s
 * 
 * def prime_factor_multiplicities(n):             # <<<<<<<<<<<<<<
 *     cdef symengine.vec_integer factors
 *     cdef Basic _n = sympify(n)
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_153prime_factor_multiplicities, 0, __pyx_mstate_global->__pyx_n_u_prime_factor_multiplicities, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[513])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4766, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_prime_factor_multiplicities, __pyx_t_4) < (0)) __PYX_ERR(0, 4766, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4781
 *     return dict
 * 
 * def bernoulli(n):             # <<<<<<<<<<<<<<
 *     if n < 0:
 *         raise ArithmeticError
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_155bernoulli, 0, __pyx_mstate_global->__pyx_n_u_bernoulli, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[514])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4781, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_bernoulli, __pyx_t_4) < (0)) __PYX_ERR(0, 4781, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4786
 *     return c2py(<rcp_const_basic>(symengine.bernoulli(n)))
 * 
 * def primitive_root(n):             # <<<<<<<<<<<<<<
 *     cdef RCP[const symengine.Integer] g
 *     cdef Basic _n = sympify(n)
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_157primitive_root, 0, __pyx_mstate_global->__pyx_n_u_primitive_root, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[515])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4786, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_primitive_root, __pyx_t_4) < (0)) __PYX_ERR(0, 4786, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4796
 *     return c2py(<rcp_const_basic>g)
 * 
 * def primitive_root_list(n):             # <<<<<<<<<<<<<<
 *     cdef symengine.vec_integer root_list
 *     cdef Basic _n = sympify(n)
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_159primitive_root_list, 0, __pyx_mstate_global->__pyx_n_u_primitive_root_list, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[516])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4796, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_primitive_root_list, __pyx_t_4) < (0)) __PYX_ERR(0, 4796, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4807
 *     return s
 * 
 * def totient(n):             # <<<<<<<<<<<<<<
 *     cdef Basic _n = sympify(n)
 *     require(_n, Integer)
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_161totient, 0, __pyx_mstate_global->__pyx_n_u_totient, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[517])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4807, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_totient, __pyx_t_4) < (0)) __PYX_ERR(0, 4807, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4813
 *     return c2py(<rcp_const_basic>symengine.totient(m))
 * 
 * def carmichael(n):             # <<<<<<<<<<<<<<
 *     cdef Basic _n = sympify(n)
 *     require(_n, Integer)
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_163carmichael, 0, __pyx_mstate_global->__pyx_n_u_carmichael, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[518])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4813, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_carmichael, __pyx_t_4) < (0)) __PYX_ERR(0, 4813, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4819
 *     return c2py(<rcp_const_basic>symengine.carmichael(m))
 * 
 * def multiplicative_order(a, n):             # <<<<<<<<<<<<<<
 *     cdef Basic _n = sympify(n)
 *     cdef Basic _a = sympify(a)
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_165multiplicative_order, 0, __pyx_mstate_global->__pyx_n_u_multiplicative_order, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[519])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4819, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_multiplicative_order, __pyx_t_4) < (0)) __PYX_ERR(0, 4819, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4833
 *     return c2py(<rcp_const_basic>o)
 * 
 * def legendre(a, n):             # <<<<<<<<<<<<<<
 *     cdef Basic _n = sympify(n)
 *     cdef Basic _a = sympify(a)
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_167legendre, 0, __pyx_mstate_global->__pyx_n_u_legendre, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[520])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4833, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_legendre, __pyx_t_4) < (0)) __PYX_ERR(0, 4833, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4841
 *         deref(symengine.rcp_static_cast_Integer(_n.thisptr)))
 * 
 * def jacobi(a, n):             # <<<<<<<<<<<<<<
 *     cdef Basic _n = sympify(n)
 *     cdef Basic _a = sympify(a)
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_169jacobi, 0, __pyx_mstate_global->__pyx_n_u_jacobi, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[521])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4841, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_jacobi, __pyx_t_4) < (0)) __PYX_ERR(0, 4841, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4849
 *         deref(symengine.rcp_static_cast_Integer(_n.thisptr)))
 * 
 * def kronecker(a, n):             # <<<<<<<<<<<<<<
 *     cdef Basic _n = sympify(n)
 *     cdef Basic _a = sympify(a)
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_171kronecker, 0, __pyx_mstate_global->__pyx_n_u_kronecker, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[522])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4849, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_kronecker, __pyx_t_4) < (0)) __PYX_ERR(0, 4849, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4857
 *         deref(symengine.rcp_static_cast_Integer(_n.thisptr)))
 * 
 * def nthroot_mod(a, n, m):             # <<<<<<<<<<<<<<
 *     cdef RCP[const symengine.Integer] root
 *     cdef Basic _n = sympify(n)
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_173nthroot_mod, 0, __pyx_mstate_global->__pyx_n_u_nthroot_mod, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[523])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4857, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_nthroot_mod, __pyx_t_4) < (0)) __PYX_ERR(0, 4857, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4873
 *     return c2py(<rcp_const_basic>root)
 * 
 * def nthroot_mod_list(a, n, m):             # <<<<<<<<<<<<<<
 *     cdef symengine.vec_integer root_list
 *     cdef Basic _n = sympify(n)
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_175nthroot_mod_list, 0, __pyx_mstate_global->__pyx_n_u_nthroot_mod_list, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[524])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4873, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_nthroot_mod_list, __pyx_t_4) < (0)) __PYX_ERR(0, 4873, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4890
 *     return s
 * 
 * def sqrt_mod(a, p, all_roots=False):             # <<<<<<<<<<<<<<
 *     if all_roots:
 *         return nthroot_mod_list(a, 2, p)
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_177sqrt_mod, 0, __pyx_mstate_global->__pyx_n_u_sqrt_mod, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[525])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4890, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[3]);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_sqrt_mod, __pyx_t_4) < (0)) __PYX_ERR(0, 4890, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4895
 *     return nthroot_mod(a, 2, p)
 * 
 * def powermod(a, b, m):             # <<<<<<<<<<<<<<
 *     cdef Basic _a = sympify(a)
 *     cdef Basic _m = sympify(m)
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_179powermod, 0, __pyx_mstate_global->__pyx_n_u_powermod, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[526])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4895, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_powermod, __pyx_t_4) < (0)) __PYX_ERR(0, 4895, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4910
 *     return c2py(<rcp_const_basic>root)
 * 
 * def powermod_list(a, b, m):             # <<<<<<<<<<<<<<
 *     cdef Basic _a = sympify(a)
 *     cdef Basic _m = sympify(m)
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_181powermod_list, 0, __pyx_mstate_global->__pyx_n_u_powermod_list, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[527])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4910, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_powermod_list, __pyx_t_4) < (0)) __PYX_ERR(0, 4910, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4927
 *     return s
 * 
 * def has_symbol(obj, symbol=None):             # <<<<<<<<<<<<<<
 *     cdef Basic b = _sympify(obj)
 *     cdef Basic s = _sympify(symbol)
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_183has_symbol, 0, __pyx_mstate_global->__pyx_n_u_has_symbol, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[528])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4927, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[11]);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_has_symbol, __pyx_t_4) < (0)) __PYX_ERR(0, 4927, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":4993
 *         raise ValueError("Not supported")
 * 
 *     cpdef eval_real(self, inp, out):             # <<<<<<<<<<<<<<
 *         if inp.size != self.args_size:
 *             raise ValueError("Size of inp incompatible with number of args.")
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_9_Lambdify_3eval_real, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Lambdify_eval_real, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[529])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4993, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper__Lambdify, __pyx_mstate_global->__pyx_n_u_eval_real, __pyx_t_4) < (0)) __PYX_ERR(0, 4993, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5000
 *         self.unsafe_real(inp, out)
 * 
 *     cpdef eval_complex(self, inp, out):             # <<<<<<<<<<<<<<
 *         if inp.size != self.args_size:
 *             raise ValueError("Size of inp incompatible with number of args.")
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_9_Lambdify_5eval_complex, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Lambdify_eval_complex, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[530])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5000, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper__Lambdify, __pyx_mstate_global->__pyx_n_u_eval_complex, __pyx_t_4) < (0)) __PYX_ERR(0, 5000, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5007
 *         self.unsafe_complex(inp, out)
 * 
 *     cpdef unsafe_eval(self, inp, out, unsigned nbroadcast=1):             # <<<<<<<<<<<<<<
 *         raise ValueError("Not supported")
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_9_Lambdify_7unsafe_eval, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Lambdify_unsafe_eval, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[531])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5007, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[8]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper__Lambdify, __pyx_mstate_global->__pyx_n_u_unsafe_eval, __pyx_t_4) < (0)) __PYX_ERR(0, 5007, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_9_Lambdify_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Lambdify___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[532])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper__Lambdify, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle__Lambdify, (type(self), 0x9ba3967, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle__Lambdify__set_state(self, __pyx_state)
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_9_Lambdify_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Lambdify___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[533])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper__Lambdify, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5136
 * 
 * 
 * def create_low_level_callable(lambdify, *args):             # <<<<<<<<<<<<<<
 *     from scipy import LowLevelCallable
 *     class LambdifyLowLevelCallable(LowLevelCallable):
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_185create_low_level_callable, 0, __pyx_mstate_global->__pyx_n_u_create_low_level_callable, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[534])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5136, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_create_low_level_callable, __pyx_t_4) < (0)) __PYX_ERR(0, 5136, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5155
 *         deref(self.lambda_visitor).init(args_, outs_, cse)
 * 
 *     cpdef unsafe_real(self, double[::1] inp, double[::1] out, int inp_offset=0, int out_offset=0):             # <<<<<<<<<<<<<<
 *         deref(self.lambda_visitor).call(&out[out_offset], &inp[inp_offset])
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_12LambdaDouble_3unsafe_real, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_LambdaDouble_unsafe_real, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[535])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[1]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LambdaDouble, __pyx_mstate_global->__pyx_n_u_unsafe_real, __pyx_t_4) < (0)) __PYX_ERR(0, 5155, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5158
 *         deref(self.lambda_visitor).call(&out[out_offset], &inp[inp_offset])
 * 
 *     cpdef unsafe_eval(self, inp, out, unsigned nbroadcast=1):             # <<<<<<<<<<<<<<
 *         cdef double[::1] c_inp, c_out
 *         cdef unsigned idx
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_12LambdaDouble_5unsafe_eval, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_LambdaDouble_unsafe_eval, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[536])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5158, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[8]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LambdaDouble, __pyx_mstate_global->__pyx_n_u_unsafe_eval, __pyx_t_4) < (0)) __PYX_ERR(0, 5158, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5166
 *             deref(self.lambda_visitor).call(&c_out[idx*self.tot_out_size], &c_inp[idx*self.args_size])
 * 
 *     cpdef as_scipy_low_level_callable(self):             # <<<<<<<<<<<<<<
 *         from ctypes import c_double, c_void_p, c_int, cast, POINTER, CFUNCTYPE
 *         if self.tot_out_size > 1:
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_12LambdaDouble_7as_scipy_low_level_callable, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_LambdaDouble_as_scipy_low_level, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[537])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LambdaDouble, __pyx_mstate_global->__pyx_n_u_as_scipy_low_level_callable, __pyx_t_4) < (0)) __PYX_ERR(0, 5166, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5175
 *         return create_low_level_callable(self, addr1, addr2)
 * 
 *     cpdef as_ctypes(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a tuple with first element being a ctypes function with signature
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_12LambdaDouble_9as_ctypes, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_LambdaDouble_as_ctypes, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[538])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5175, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LambdaDouble, __pyx_mstate_global->__pyx_n_u_as_ctypes, __pyx_t_4) < (0)) __PYX_ERR(0, 5175, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_12LambdaDouble_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_LambdaDouble___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[539])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_12LambdaDouble_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_LambdaDouble___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[540])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5200
 *         deref(self.lambda_visitor).init(args_, outs_, cse)
 * 
 *     cpdef unsafe_complex(self, double complex[::1] inp, double complex[::1] out, int inp_offset=0, int out_offset=0):             # <<<<<<<<<<<<<<
 *         deref(self.lambda_visitor).call(&out[out_offset], &inp[inp_offset])
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_19LambdaComplexDouble_3unsafe_complex, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_LambdaComplexDouble_unsafe_compl, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[541])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[1]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LambdaComplexDouble, __pyx_mstate_global->__pyx_n_u_unsafe_complex, __pyx_t_4) < (0)) __PYX_ERR(0, 5200, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5203
 *         deref(self.lambda_visitor).call(&out[out_offset], &inp[inp_offset])
 * 
 *     cpdef unsafe_eval(self, inp, out, unsigned nbroadcast=1):             # <<<<<<<<<<<<<<
 *         cdef double complex[::1] c_inp, c_out
 *         cdef unsigned idx
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_19LambdaComplexDouble_5unsafe_eval, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_LambdaComplexDouble_unsafe_eval, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[542])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5203, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[8]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LambdaComplexDouble, __pyx_mstate_global->__pyx_n_u_unsafe_eval, __pyx_t_4) < (0)) __PYX_ERR(0, 5203, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_19LambdaComplexDouble_7__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_LambdaComplexDouble___reduce_cyt, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[543])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_19LambdaComplexDouble_9__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_LambdaComplexDouble___setstate_c, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[544])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_4) < (0)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5224
 *         deref(self.lambda_visitor).loads(s)
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         """
 *         Interface for pickle. Note that the resulting object is platform dependent.
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_10LLVMDouble_3__reduce__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_LLVMDouble___reduce, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[545])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5224, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LLVMDouble, __pyx_mstate_global->__pyx_n_u_reduce, __pyx_t_4) < (0)) __PYX_ERR(0, 5224, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5232
 *             self.n_exprs, self.order, self.accum_out_sizes, self.numpy_dtype, s)
 * 
 *     cpdef unsafe_real(self, double[::1] inp, double[::1] out, int inp_offset=0, int out_offset=0):             # <<<<<<<<<<<<<<
 *         deref(self.lambda_visitor).call(&out[out_offset], &inp[inp_offset])
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_10LLVMDouble_5unsafe_real, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_LLVMDouble_unsafe_real, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[546])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5232, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[1]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LLVMDouble, __pyx_mstate_global->__pyx_n_u_unsafe_real, __pyx_t_4) < (0)) __PYX_ERR(0, 5232, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5235
 *         deref(self.lambda_visitor).call(&out[out_offset], &inp[inp_offset])
 * 
 *     cpdef unsafe_eval(self, inp, out, unsigned nbroadcast=1):             # <<<<<<<<<<<<<<
 *         cdef double[::1] c_inp, c_out
 *         cdef unsigned idx
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_10LLVMDouble_7unsafe_eval, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_LLVMDouble_unsafe_eval, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[547])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5235, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[8]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LLVMDouble, __pyx_mstate_global->__pyx_n_u_unsafe_eval, __pyx_t_4) < (0)) __PYX_ERR(0, 5235, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5243
 *             deref(self.lambda_visitor).call(&c_out[idx*self.tot_out_size], &c_inp[idx*self.args_size])
 * 
 *     cpdef as_scipy_low_level_callable(self):             # <<<<<<<<<<<<<<
 *         from ctypes import c_double, c_void_p, c_int, cast, POINTER, CFUNCTYPE
 *         if not self.real:
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_10LLVMDouble_9as_scipy_low_level_callable, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_LLVMDouble_as_scipy_low_level_ca, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[548])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5243, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LLVMDouble, __pyx_mstate_global->__pyx_n_u_as_scipy_low_level_callable, __pyx_t_4) < (0)) __PYX_ERR(0, 5243, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5254
 *         return create_low_level_callable(self, addr1, addr2)
 * 
 *     cpdef as_ctypes(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a tuple with first element being a ctypes function with signature
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_10LLVMDouble_11as_ctypes, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_LLVMDouble_as_ctypes, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[549])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5254, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LLVMDouble, __pyx_mstate_global->__pyx_n_u_as_ctypes, __pyx_t_4) < (0)) __PYX_ERR(0, 5254, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5283
 *         deref(self.lambda_visitor).loads(s)
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         """
 *         Interface for pickle. Note that the resulting object is platform dependent.
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_9LLVMFloat_3__reduce__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_LLVMFloat___reduce, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[550])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5283, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LLVMFloat, __pyx_mstate_global->__pyx_n_u_reduce, __pyx_t_4) < (0)) __PYX_ERR(0, 5283, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5291
 *             self.n_exprs, self.order, self.accum_out_sizes, self.numpy_dtype, s)
 * 
 *     cpdef unsafe_real(self, float[::1] inp, float[::1] out, int inp_offset=0, int out_offset=0):             # <<<<<<<<<<<<<<
 *         deref(self.lambda_visitor).call(&out[out_offset], &inp[inp_offset])
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_9LLVMFloat_5unsafe_real, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_LLVMFloat_unsafe_real, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[551])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5291, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[1]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LLVMFloat, __pyx_mstate_global->__pyx_n_u_unsafe_real, __pyx_t_4) < (0)) __PYX_ERR(0, 5291, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5294
 *         deref(self.lambda_visitor).call(&out[out_offset], &inp[inp_offset])
 * 
 *     cpdef unsafe_eval(self, inp, out, unsigned nbroadcast=1):             # <<<<<<<<<<<<<<
 *         cdef float[::1] c_inp, c_out
 *         cdef unsigned idx
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_9LLVMFloat_7unsafe_eval, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_LLVMFloat_unsafe_eval, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[552])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5294, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[8]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LLVMFloat, __pyx_mstate_global->__pyx_n_u_unsafe_eval, __pyx_t_4) < (0)) __PYX_ERR(0, 5294, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5314
 *         deref(self.lambda_visitor).loads(s)
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         """
 *         Interface for pickle. Note that the resulting object is platform dependent.
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_14LLVMLongDouble_3__reduce__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_LLVMLongDouble___reduce, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[553])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5314, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LLVMLongDouble, __pyx_mstate_global->__pyx_n_u_reduce, __pyx_t_4) < (0)) __PYX_ERR(0, 5314, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5322
 *             self.n_exprs, self.order, self.accum_out_sizes, self.numpy_dtype, s)
 * 
 *     cpdef unsafe_real(self, long double[::1] inp, long double[::1] out, int inp_offset=0, int out_offset=0):             # <<<<<<<<<<<<<<
 *         deref(self.lambda_visitor).call(&out[out_offset], &inp[inp_offset])
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_14LLVMLongDouble_5unsafe_real, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_LLVMLongDouble_unsafe_real, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[554])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5322, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[1]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LLVMLongDouble, __pyx_mstate_global->__pyx_n_u_unsafe_real, __pyx_t_4) < (0)) __PYX_ERR(0, 5322, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5325
 *         deref(self.lambda_visitor).call(&out[out_offset], &inp[inp_offset])
 * 
 *     cpdef unsafe_eval(self, inp, out, unsigned nbroadcast=1):             # <<<<<<<<<<<<<<
 *         cdef long double[::1] c_inp, c_out
 *         cdef unsigned idx
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_14LLVMLongDouble_7unsafe_eval, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_LLVMLongDouble_unsafe_eval, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[555])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5325, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[8]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_9symengine_3lib_17symengine_wrapper_LLVMLongDouble, __pyx_mstate_global->__pyx_n_u_unsafe_eval, __pyx_t_4) < (0)) __PYX_ERR(0, 5325, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5333
 *             deref(self.lambda_visitor).call(&c_out[idx*self.tot_out_size], &c_inp[idx*self.args_size])
 * 
 * def llvm_loading_func(*args):             # <<<<<<<<<<<<<<
 *     return LLVMDouble(args, _load=True)
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_187llvm_loading_func, 0, __pyx_mstate_global->__pyx_n_u_llvm_loading_func, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[556])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5333, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_llvm_loading_func, __pyx_t_4) < (0)) __PYX_ERR(0, 5333, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5336
 *     return LLVMDouble(args, _load=True)
 * 
 * def llvm_float_loading_func(*args):             # <<<<<<<<<<<<<<
 *     return LLVMFloat(args, _load=True)
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_189llvm_float_loading_func, 0, __pyx_mstate_global->__pyx_n_u_llvm_float_loading_func, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[557])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5336, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_llvm_float_loading_func, __pyx_t_4) < (0)) __PYX_ERR(0, 5336, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5339
 *     return LLVMFloat(args, _load=True)
 * 
 * def llvm_long_double_loading_func(*args):             # <<<<<<<<<<<<<<
 *     return LLVMLongDouble(args, _load=True)
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_191llvm_long_double_loading_func, 0, __pyx_mstate_global->__pyx_n_u_llvm_long_double_loading_func, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[558])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5339, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_llvm_long_double_loading_func, __pyx_t_4) < (0)) __PYX_ERR(0, 5339, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5342
 *     return LLVMLongDouble(args, _load=True)
 * 
 * def Lambdify(args, *exprs, cppbool real=True, backend=None, order='C',             # <<<<<<<<<<<<<<
 *              as_scipy=False, cse=False, dtype=None, **kwargs):
 *     """
*/
  __pyx_t_4 = __Pyx_PyDict_NewPresized(6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5342, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyBool_FromLong(((int)1)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5342, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_real, __pyx_t_5) < (0)) __PYX_ERR(0, 5342, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_backend, Py_None) < (0)) __PYX_ERR(0, 5342, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_order, ((PyObject*)__pyx_mstate_global->__pyx_n_u_C)) < (0)) __PYX_ERR(0, 5342, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_as_scipy, ((PyObject*)Py_False)) < (0)) __PYX_ERR(0, 5342, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_cse, ((PyObject*)Py_False)) < (0)) __PYX_ERR(0, 5342, __pyx_L1_error)

  /* "symengine/lib/symengine_wrapper.pyx":5343
 * 
 * def Lambdify(args, *exprs, cppbool real=True, backend=None, order='C',
 *              as_scipy=False, cse=False, dtype=None, **kwargs):             # <<<<<<<<<<<<<<
 *     """
 *     Lambdify instances are callbacks that numerically evaluate their symbolic
*/
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_dtype, Py_None) < (0)) __PYX_ERR(0, 5342, __pyx_L1_error)

  /* "symengine/lib/symengine_wrapper.pyx":5342
 *     return LLVMLongDouble(args, _load=True)
 * 
 * def Lambdify(args, *exprs, cppbool real=True, backend=None, order='C',             # <<<<<<<<<<<<<<
 *              as_scipy=False, cse=False, dtype=None, **kwargs):
 *     """
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_193Lambdify, 0, __pyx_mstate_global->__pyx_n_u_Lambdify, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[559])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5342, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_5, __pyx_t_4);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Lambdify, __pyx_t_5) < (0)) __PYX_ERR(0, 5342, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5421
 * 
 * 
 * def LambdifyCSE(args, *exprs, order='C', **kwargs):             # <<<<<<<<<<<<<<
 *     """ Analogous with Lambdify but performs common subexpression elimination.
 *     """
*/
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5421, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_order, ((PyObject*)__pyx_mstate_global->__pyx_n_u_C)) < (0)) __PYX_ERR(0, 5421, __pyx_L1_error)
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_195LambdifyCSE, 0, __pyx_mstate_global->__pyx_n_u_LambdifyCSE, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[560])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5421, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_4, __pyx_t_5);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_LambdifyCSE, __pyx_t_4) < (0)) __PYX_ERR(0, 5421, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5428
 * 
 * 
 * def ccode(expr):             # <<<<<<<<<<<<<<
 *     cdef Basic expr_ = sympify(expr)
 *     return symengine.ccode(deref(expr_.thisptr)).decode("utf-8")
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_197ccode, 0, __pyx_mstate_global->__pyx_n_u_ccode, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[561])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5428, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ccode, __pyx_t_4) < (0)) __PYX_ERR(0, 5428, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5433
 * 
 * 
 * def piecewise(*v):             # <<<<<<<<<<<<<<
 *     cdef symengine.PiecewiseVec vec
 *     cdef pair[rcp_const_basic, RCP[symengine.const_Boolean]] p
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_199piecewise, 0, __pyx_mstate_global->__pyx_n_u_piecewise, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[562])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5433, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_piecewise, __pyx_t_4) < (0)) __PYX_ERR(0, 5433, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5447
 * 
 * 
 * def interval(start, end, left_open=False, right_open=False):             # <<<<<<<<<<<<<<
 *     if isinstance(start, NegativeInfinity):
 *         left_open = True
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_201interval, 0, __pyx_mstate_global->__pyx_n_u_interval, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[563])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5447, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[24]);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_interval, __pyx_t_4) < (0)) __PYX_ERR(0, 5447, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5461
 * 
 * 
 * def emptyset():             # <<<<<<<<<<<<<<
 *     return c2py(<rcp_const_basic>(symengine.emptyset()))
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_203emptyset, 0, __pyx_mstate_global->__pyx_n_u_emptyset, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[564])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5461, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_emptyset, __pyx_t_4) < (0)) __PYX_ERR(0, 5461, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5465
 * 
 * 
 * def universalset():             # <<<<<<<<<<<<<<
 *     return c2py(<rcp_const_basic>(symengine.universalset()))
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_205universalset, 0, __pyx_mstate_global->__pyx_n_u_universalset, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[565])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5465, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_universalset, __pyx_t_4) < (0)) __PYX_ERR(0, 5465, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5469
 * 
 * 
 * def reals():             # <<<<<<<<<<<<<<
 *     return c2py(<rcp_const_basic>(symengine.reals()))
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_207reals, 0, __pyx_mstate_global->__pyx_n_u_reals, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[566])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5469, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reals, __pyx_t_4) < (0)) __PYX_ERR(0, 5469, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5473
 * 
 * 
 * def rationals():             # <<<<<<<<<<<<<<
 *     return c2py(<rcp_const_basic>(symengine.rationals()))
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_209rationals, 0, __pyx_mstate_global->__pyx_n_u_rationals, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[567])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5473, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_rationals, __pyx_t_4) < (0)) __PYX_ERR(0, 5473, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5477
 * 
 * 
 * def integers():             # <<<<<<<<<<<<<<
 *     return c2py(<rcp_const_basic>(symengine.integers()))
 * 
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_211integers, 0, __pyx_mstate_global->__pyx_n_u_integers, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[568])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5477, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_integers, __pyx_t_4) < (0)) __PYX_ERR(0, 5477, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5481
 * 
 * 
 * def finiteset(*args):             # <<<<<<<<<<<<<<
 *     cdef symengine.set_basic s
 *     cdef Basic e_
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_213finiteset, 0, __pyx_mstate_global->__pyx_n_u_finiteset, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[569])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5481, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_finiteset, __pyx_t_4) < (0)) __PYX_ERR(0, 5481, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5490
 * 
 * 
 * def contains(expr, sset):             # <<<<<<<<<<<<<<
 *     cdef Basic expr_ = sympify(expr)
 *     cdef Set sset_ = sympify(sset)
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_215contains, 0, __pyx_mstate_global->__pyx_n_u_contains, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[570])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5490, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_contains, __pyx_t_4) < (0)) __PYX_ERR(0, 5490, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5508
 * 
 * 
 * def is_zero(expr):             # <<<<<<<<<<<<<<
 *     cdef Basic expr_ = sympify(expr)
 *     cdef tribool tbool = symengine.is_zero(deref(expr_.thisptr))
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_217is_zero, 0, __pyx_mstate_global->__pyx_n_u_is_zero, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[571])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5508, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_is_zero, __pyx_t_4) < (0)) __PYX_ERR(0, 5508, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5514
 * 
 * 
 * def is_positive(expr):             # <<<<<<<<<<<<<<
 *     cdef Basic expr_ = sympify(expr)
 *     cdef tribool tbool = symengine.is_positive(deref(expr_.thisptr))
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_219is_positive, 0, __pyx_mstate_global->__pyx_n_u_is_positive, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[572])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5514, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_is_positive, __pyx_t_4) < (0)) __PYX_ERR(0, 5514, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5520
 * 
 * 
 * def is_negative(expr):             # <<<<<<<<<<<<<<
 *     cdef Basic expr_ = sympify(expr)
 *     cdef tribool tbool = symengine.is_negative(deref(expr_.thisptr))
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_221is_negative, 0, __pyx_mstate_global->__pyx_n_u_is_negative, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[573])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5520, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_is_negative, __pyx_t_4) < (0)) __PYX_ERR(0, 5520, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5526
 * 
 * 
 * def is_nonpositive(expr):             # <<<<<<<<<<<<<<
 *     cdef Basic expr_ = sympify(expr)
 *     cdef tribool tbool = symengine.is_nonpositive(deref(expr_.thisptr))
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_223is_nonpositive, 0, __pyx_mstate_global->__pyx_n_u_is_nonpositive, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[574])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5526, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_is_nonpositive, __pyx_t_4) < (0)) __PYX_ERR(0, 5526, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5532
 * 
 * 
 * def is_nonnegative(expr):             # <<<<<<<<<<<<<<
 *     cdef Basic expr_ = sympify(expr)
 *     cdef tribool tbool = symengine.is_nonnegative(deref(expr_.thisptr))
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_225is_nonnegative, 0, __pyx_mstate_global->__pyx_n_u_is_nonnegative, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[575])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5532, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_is_nonnegative, __pyx_t_4) < (0)) __PYX_ERR(0, 5532, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5538
 * 
 * 
 * def is_real(expr):             # <<<<<<<<<<<<<<
 *     cdef Basic expr_ = sympify(expr)
 *     cdef tribool tbool = symengine.is_real(deref(expr_.thisptr))
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_227is_real, 0, __pyx_mstate_global->__pyx_n_u_is_real, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[576])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5538, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_is_real, __pyx_t_4) < (0)) __PYX_ERR(0, 5538, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5544
 * 
 * 
 * def set_union(*args):             # <<<<<<<<<<<<<<
 *     cdef symengine.set_set s
 *     cdef Set e_
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_229set_union, 0, __pyx_mstate_global->__pyx_n_u_set_union, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[577])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5544, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_set_union, __pyx_t_4) < (0)) __PYX_ERR(0, 5544, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5553
 * 
 * 
 * def set_intersection(*args):             # <<<<<<<<<<<<<<
 *     cdef symengine.set_set s
 *     cdef Set e_
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_231set_intersection, 0, __pyx_mstate_global->__pyx_n_u_set_intersection, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[578])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5553, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_set_intersection, __pyx_t_4) < (0)) __PYX_ERR(0, 5553, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5562
 * 
 * 
 * def set_complement(universe, container):             # <<<<<<<<<<<<<<
 *     cdef Set universe_ = sympify(universe)
 *     cdef Set container_ = sympify(container)
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_233set_complement, 0, __pyx_mstate_global->__pyx_n_u_set_complement, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[579])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5562, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_set_complement, __pyx_t_4) < (0)) __PYX_ERR(0, 5562, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5570
 * 
 * 
 * def set_complement_helper(container, universe):             # <<<<<<<<<<<<<<
 *     cdef Set container_ = sympify(container)
 *     cdef Set universe_ = sympify(universe)
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_235set_complement_helper, 0, __pyx_mstate_global->__pyx_n_u_set_complement_helper, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[580])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5570, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_set_complement_helper, __pyx_t_4) < (0)) __PYX_ERR(0, 5570, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5578
 * 
 * 
 * def conditionset(sym, condition):             # <<<<<<<<<<<<<<
 *     cdef Basic sym_ = sympify(sym)
 *     cdef Boolean condition_ = sympify(condition)
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_237conditionset, 0, __pyx_mstate_global->__pyx_n_u_conditionset, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[581])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5578, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_conditionset, __pyx_t_4) < (0)) __PYX_ERR(0, 5578, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5585
 * 
 * 
 * def imageset(sym, expr, base):             # <<<<<<<<<<<<<<
 *     cdef Basic sym_ = sympify(sym)
 *     cdef Basic expr_ = sympify(expr)
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_239imageset, 0, __pyx_mstate_global->__pyx_n_u_imageset, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[582])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5585, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_imageset, __pyx_t_4) < (0)) __PYX_ERR(0, 5585, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5593
 * 
 * 
 * universal_set_singleton = UniversalSet()             # <<<<<<<<<<<<<<
 * integers_singleton = Integers()
 * rationals_singleton = Rationals()
*/
  __pyx_t_5 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_UniversalSet); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 5593, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
    __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_13, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5593, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_universal_set_singleton, __pyx_t_4) < (0)) __PYX_ERR(0, 5593, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5594
 * 
 * universal_set_singleton = UniversalSet()
 * integers_singleton = Integers()             # <<<<<<<<<<<<<<
 * rationals_singleton = Rationals()
 * reals_singleton = Reals()
*/
  __pyx_t_13 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_Integers); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5594, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_13, NULL};
    __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5594, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_integers_singleton, __pyx_t_4) < (0)) __PYX_ERR(0, 5594, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5595
 * universal_set_singleton = UniversalSet()
 * integers_singleton = Integers()
 * rationals_singleton = Rationals()             # <<<<<<<<<<<<<<
 * reals_singleton = Reals()
 * empty_set_singleton = EmptySet()
*/
  __pyx_t_5 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_Rationals); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 5595, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
    __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_13, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5595, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_rationals_singleton, __pyx_t_4) < (0)) __PYX_ERR(0, 5595, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5596
 * integers_singleton = Integers()
 * rationals_singleton = Rationals()
 * reals_singleton = Reals()             # <<<<<<<<<<<<<<
 * empty_set_singleton = EmptySet()
 * 
*/
  __pyx_t_13 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_Reals); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5596, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_13, NULL};
    __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5596, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reals_singleton, __pyx_t_4) < (0)) __PYX_ERR(0, 5596, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5597
 * rationals_singleton = Rationals()
 * reals_singleton = Reals()
 * empty_set_singleton = EmptySet()             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_t_5 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_EmptySet); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 5597, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
    __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_13, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5597, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_empty_set_singleton, __pyx_t_4) < (0)) __PYX_ERR(0, 5597, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5600
 * 
 * 
 * def solve(f, sym, domain=None):             # <<<<<<<<<<<<<<
 *     cdef Basic f_ = sympify(f)
 *     cdef Basic sym_ = sympify(sym)
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_241solve, 0, __pyx_mstate_global->__pyx_n_u_solve, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[583])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5600, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[11]);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_solve, __pyx_t_4) < (0)) __PYX_ERR(0, 5600, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5612
 * 
 * 
 * def linsolve(eqs, syms):             # <<<<<<<<<<<<<<
 *     """
 *     Solve a set of linear equations given as an iterable `eqs`
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_243linsolve, 0, __pyx_mstate_global->__pyx_n_u_linsolve, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[584])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5612, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_linsolve, __pyx_t_4) < (0)) __PYX_ERR(0, 5612, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5631
 * 
 * 
 * def cse(exprs):             # <<<<<<<<<<<<<<
 *     cdef symengine.vec_basic vec
 *     cdef symengine.vec_pair replacements
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_245cse, 0, __pyx_mstate_global->__pyx_n_u_cse, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[585])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5631, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_cse, __pyx_t_4) < (0)) __PYX_ERR(0, 5631, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5642
 *     return (vec_pair_to_list(replacements), vec_basic_to_list(reduced_exprs))
 * 
 * def latex(expr):             # <<<<<<<<<<<<<<
 *     cdef DenseMatrixBase mat_expr
 *     cdef Basic basic_expr
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_247latex, 0, __pyx_mstate_global->__pyx_n_u_latex, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[586])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5642, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_latex, __pyx_t_4) < (0)) __PYX_ERR(0, 5642, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5652
 *         return symengine.latex(deref(basic_expr.thisptr)).decode("utf-8")
 * 
 * def unicode(expr):             # <<<<<<<<<<<<<<
 *     cdef Basic basic_expr
 *     basic_expr = sympify(expr)
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_249unicode, 0, __pyx_mstate_global->__pyx_n_u_unicode, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[587])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5652, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_unicode, __pyx_t_4) < (0)) __PYX_ERR(0, 5652, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5667
 * 
 * 
 * def count_ops(*exprs):             # <<<<<<<<<<<<<<
 *     cdef symengine.vec_basic vec
 *     _flattened_vec(vec, exprs)
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_251count_ops, 0, __pyx_mstate_global->__pyx_n_u_count_ops, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[588])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5667, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_count_ops, __pyx_t_4) < (0)) __PYX_ERR(0, 5667, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":5674
 * 
 * # Turn on nice stacktraces:
 * symengine.print_stack_on_segfault()             # <<<<<<<<<<<<<<
*/
  SymEngine::print_stack_on_segfault();

  /* "(tree fragment)":4
 *     int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1
 *     int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1
 * def __pyx_unpickle_Sieve(__pyx_type, long __pyx_checksum, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_result
 *     __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0xe3b0c44, 0xda39a3e, 0xd41d8cd, b'')
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_253__pyx_unpickle_Sieve, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_Sieve, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[589])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_Sieve, __pyx_t_4) < (0)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "(tree fragment)":1
 * cdef extern from *:             # <<<<<<<<<<<<<<
 *     int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1
 *     int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1
*/
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9symengine_3lib_17symengine_wrapper_255__pyx_unpickle__Lambdify, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle__Lambdify, NULL, __pyx_mstate_global->__pyx_n_u_symengine_lib_symengine_wrapper, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[590])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle__Lambdify, __pyx_t_4) < (0)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "symengine/lib/symengine_wrapper.pyx":1
 * from cython.operator cimport dereference as deref, preincrement as inc             # <<<<<<<<<<<<<<
 * cimport symengine
 * from symengine cimport (RCP, pair, map_basic_basic, umap_int_basic,
*/
  __pyx_t_4 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_sympify_line_504, __pyx_mstate_global->__pyx_kp_u_Converts_an_expression_a_into_a) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_sympify_line_537, __pyx_mstate_global->__pyx_kp_u_Converts_an_expression_a_into_a_2) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Lambdify_line_5342, __pyx_mstate_global->__pyx_kp_u_Lambdify_instances_are_callback) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test, __pyx_t_4) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /*--- Wrapped vars code ---*/

  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  if (__pyx_m) {
    if (__pyx_mstate->__pyx_d && stringtab_initialized) {
      __Pyx_AddTraceback("init symengine.lib.symengine_wrapper", __pyx_clineno, __pyx_lineno, __pyx_filename);
    }
    #if !CYTHON_USE_MODULE_STATE
    Py_CLEAR(__pyx_m);
    #else
    Py_DECREF(__pyx_m);
    if (pystate_addmodule_run) {
      PyObject *tp, *value, *tb;
      PyErr_Fetch(&tp, &value, &tb);
      PyState_RemoveModule(&__pyx_moduledef);
      PyErr_Restore(tp, value, tb);
    }
    #endif
  } else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_ImportError, "init symengine.lib.symengine_wrapper");
  }
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  return (__pyx_m != NULL) ? 0 : -1;
  #else
  return __pyx_m;
  #endif
}
/* #### Code section: pystring_table ### */
/* #### Code section: cached_builtins ### */

static int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate) {
  CYTHON_UNUSED_VAR(__pyx_mstate);
  __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_object); if (!__pyx_builtin_object) __PYX_ERR(0, 595, __pyx_L1_error)
  __pyx_builtin_staticmethod = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_staticmethod); if (!__pyx_builtin_staticmethod) __PYX_ERR(0, 597, __pyx_L1_error)
  __pyx_builtin_property = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_property); if (!__pyx_builtin_property) __PYX_ERR(0, 599, __pyx_L1_error)
  __pyx_builtin_zip = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_zip); if (!__pyx_builtin_zip) __PYX_ERR(0, 792, __pyx_L1_error)
  __pyx_builtin_NotImplemented = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_NotImplemented); if (!__pyx_builtin_NotImplemented) __PYX_ERR(0, 866, __pyx_L1_error)
  __pyx_builtin_any = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_any); if (!__pyx_builtin_any) __PYX_ERR(0, 1188, __pyx_L1_error)
  __pyx_builtin_map = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_map); if (!__pyx_builtin_map) __PYX_ERR(0, 1373, __pyx_L1_error)
  __pyx_builtin_round = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_round); if (!__pyx_builtin_round) __PYX_ERR(0, 1916, __pyx_L1_error)
  __pyx_builtin_super = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_super); if (!__pyx_builtin_super) __PYX_ERR(0, 1943, __pyx_L1_error)
  __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(0, 3609, __pyx_L1_error)
  __pyx_builtin___import__ = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_import); if (!__pyx_builtin___import__) __PYX_ERR(1, 109, __pyx_L1_error)
  __pyx_builtin_Ellipsis = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_Ellipsis); if (!__pyx_builtin_Ellipsis) __PYX_ERR(1, 418, __pyx_L1_error)
  __pyx_builtin_id = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_id); if (!__pyx_builtin_id) __PYX_ERR(1, 628, __pyx_L1_error)

  /* Cached unbound methods */
  __pyx_mstate->__pyx_umethod_PyDict_Type_items.type = (PyObject*)&PyDict_Type;
  __pyx_mstate->__pyx_umethod_PyDict_Type_items.method_name = &__pyx_mstate->__pyx_n_u_items;
  __pyx_mstate->__pyx_umethod_PyDict_Type_pop.type = (PyObject*)&PyDict_Type;
  __pyx_mstate->__pyx_umethod_PyDict_Type_pop.method_name = &__pyx_mstate->__pyx_n_u_pop;
  __pyx_mstate->__pyx_umethod_PyDict_Type_values.type = (PyObject*)&PyDict_Type;
  __pyx_mstate->__pyx_umethod_PyDict_Type_values.method_name = &__pyx_mstate->__pyx_n_u_values;
  __pyx_mstate->__pyx_umethod_PyList_Type_pop.type = (PyObject*)&PyList_Type;
  __pyx_mstate->__pyx_umethod_PyList_Type_pop.method_name = &__pyx_mstate->__pyx_n_u_pop;
  __pyx_mstate->__pyx_umethod_PySet_Type__update.type = (PyObject*)(&PySet_Type);
  __pyx_mstate->__pyx_umethod_PySet_Type__update.method_name = &__pyx_mstate->__pyx_n_u_update;
  return 0;
  __pyx_L1_error:;
  return -1;
}
/* #### Code section: cached_constants ### */

static int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate) {
  __Pyx_RefNannyDeclarations
  CYTHON_UNUSED_VAR(__pyx_mstate);
  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);

  /* "View.MemoryView":592
 *     def suboffsets(self):
 *         if self.view.suboffsets == NULL:
 *             return (-1,) * self.view.ndim             # <<<<<<<<<<<<<<
 * 
 *         return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]])
*/
  __pyx_mstate_global->__pyx_tuple[0] = PyTuple_New(1); if (unlikely(!__pyx_mstate_global->__pyx_tuple[0])) __PYX_ERR(1, 592, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[0]);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_int_neg_1);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_neg_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_mstate_global->__pyx_tuple[0], 0, __pyx_mstate_global->__pyx_int_neg_1) != (0)) __PYX_ERR(1, 592, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[0]);

  /* "View.MemoryView":689
 *     tup = <tuple>index if isinstance(index, tuple) else (index,)
 * 
 *     result = [slice(None)] * ndim             # <<<<<<<<<<<<<<
 *     have_slices = False
 *     seen_ellipsis = False
*/
  __pyx_mstate_global->__pyx_slice[0] = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_slice[0])) __PYX_ERR(1, 689, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_slice[0]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_slice[0]);

  /* "symengine/lib/symengine_wrapper.pyx":3021
 *     @property
 *     def variables(self):
 *         return self.args[1:]             # <<<<<<<<<<<<<<
 * 
 *     def _sympy_(Basic self):
*/
  __pyx_mstate_global->__pyx_slice[1] = PySlice_New(__pyx_mstate_global->__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_slice[1])) __PYX_ERR(0, 3021, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_slice[1]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_slice[1]);

  /* "symengine/lib/symengine_wrapper.pyx":3429
 *         cdef MatrixBase a_ = a
 *         cdef MatrixBase b_ = b
 *         if (a_.shape == (0, 0)):             # <<<<<<<<<<<<<<
 *             return b_
 *         if (b_.shape == (0, 0)):
*/
  __pyx_mstate_global->__pyx_tuple[1] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_0, __pyx_mstate_global->__pyx_int_0); if (unlikely(!__pyx_mstate_global->__pyx_tuple[1])) __PYX_ERR(0, 3429, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[1]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[1]);

  /* "symengine/lib/symengine_wrapper.pyx":3570
 *             else:
 *                 s = [0, 0, 0, 0, 0, 0]
 *                 for i in (0, 1):             # <<<<<<<<<<<<<<
 *                     if isinstance(item[i], slice):
 *                         s[i], s[i+2], s[i+4] = item[i].indices(self.nrows() if i == 0 else self.ncols())
*/
  __pyx_mstate_global->__pyx_tuple[2] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_0, __pyx_mstate_global->__pyx_int_1); if (unlikely(!__pyx_mstate_global->__pyx_tuple[2])) __PYX_ERR(0, 3570, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[2]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[2]);

  /* "symengine/lib/symengine_wrapper.pyx":271
 *     return r
 * 
 * def sympy2symengine(a, raise_error=False):             # <<<<<<<<<<<<<<
 *     """
 *     Converts 'a' from SymPy to SymEngine.
*/
  __pyx_mstate_global->__pyx_tuple[3] = PyTuple_Pack(1, ((PyObject*)Py_False)); if (unlikely(!__pyx_mstate_global->__pyx_tuple[3])) __PYX_ERR(0, 271, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[3]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[3]);

  /* "symengine/lib/symengine_wrapper.pyx":537
 * 
 * 
 * def _sympify(a, raise_error=True):             # <<<<<<<<<<<<<<
 *     """
 *     Converts an expression 'a' into a SymEngine type.
*/
  __pyx_mstate_global->__pyx_tuple[4] = PyTuple_Pack(1, ((PyObject*)Py_True)); if (unlikely(!__pyx_mstate_global->__pyx_tuple[4])) __PYX_ERR(0, 537, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[4]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[4]);

  /* "symengine/lib/symengine_wrapper.pyx":595
 *     return funcs[function]
 * 
 * class Singleton(object):             # <<<<<<<<<<<<<<
 * 
 *     __call__ = staticmethod(sympify)
*/
  __pyx_mstate_global->__pyx_tuple[5] = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_mstate_global->__pyx_tuple[5])) __PYX_ERR(0, 595, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[5]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[5]);
  __pyx_mstate_global->__pyx_tuple[6] = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_mstate_global->__pyx_tuple[6])) __PYX_ERR(0, 595, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[6]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[6]);

  /* "symengine/lib/symengine_wrapper.pyx":1029
 *         return c2py(<rcp_const_basic>_real), c2py(<rcp_const_basic>_imag)
 * 
 *     def n(self, unsigned long prec = 53, real=None):             # <<<<<<<<<<<<<<
 *         return evalf(self, prec, real)
 * 
*/
  __pyx_mstate_global->__pyx_tuple[7] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_53, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_tuple[7])) __PYX_ERR(0, 1029, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[7]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[7]);

  /* "symengine/lib/symengine_wrapper.pyx":1181
 *         return d
 * 
 *     def coeff(self, x, n=1):             # <<<<<<<<<<<<<<
 *         cdef Basic _x = sympify(x)
 *         require(_x, Symbol)
*/
  __pyx_mstate_global->__pyx_tuple[8] = PyTuple_Pack(1, __pyx_mstate_global->__pyx_int_1); if (unlikely(!__pyx_mstate_global->__pyx_tuple[8])) __PYX_ERR(0, 1181, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[8]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[8]);

  /* "symengine/lib/symengine_wrapper.pyx":1225
 * 
 * 
 * def series(ex, x=None, x0=0, n=6, as_deg_coef_pair=False):             # <<<<<<<<<<<<<<
 *     # TODO: check for x0 an infinity, see sympy/core/expr.py
 *     # TODO: nonzero x0
*/
  __pyx_mstate_global->__pyx_tuple[9] = PyTuple_Pack(4, Py_None, ((PyObject*)__pyx_mstate_global->__pyx_int_0), ((PyObject*)__pyx_mstate_global->__pyx_int_6), ((PyObject*)Py_False)); if (unlikely(!__pyx_mstate_global->__pyx_tuple[9])) __PYX_ERR(0, 1225, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[9]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[9]);

  /* "symengine/lib/symengine_wrapper.pyx":1941
 *         return True
 * 
 *     def __new__(cls, num, dps=None, precision=None):             # <<<<<<<<<<<<<<
 *         if cls is not Float:
 *             return super(Float, cls).__new__(cls)
*/
  __pyx_mstate_global->__pyx_tuple[10] = PyTuple_Pack(2, Py_None, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_tuple[10])) __PYX_ERR(0, 1941, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[10]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[10]);

  /* "symengine/lib/symengine_wrapper.pyx":2462
 * 
 * class zeta(Function):
 *     def __new__(cls, s, a = None):             # <<<<<<<<<<<<<<
 *         cdef Basic S = sympify(s)
 *         if a == None:
*/
  __pyx_mstate_global->__pyx_tuple[11] = PyTuple_Pack(1, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_tuple[11])) __PYX_ERR(0, 2462, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[11]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[11]);

  /* "symengine/lib/symengine_wrapper.pyx":2854
 * 
 * 
 * class UndefFunction(object):             # <<<<<<<<<<<<<<
 *     def __init__(self, name):
 *         self.name = name
*/
  __pyx_mstate_global->__pyx_tuple[12] = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_mstate_global->__pyx_tuple[12])) __PYX_ERR(0, 2854, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[12]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[12]);
  __pyx_mstate_global->__pyx_tuple[13] = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_mstate_global->__pyx_tuple[13])) __PYX_ERR(0, 2854, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[13]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[13]);

  /* "symengine/lib/symengine_wrapper.pyx":2933
 * class PyFunction(FunctionSymbol):
 * 
 *     def __init__(Basic self, pyfunction = None, args = None, pyfunction_class=None, module=None):             # <<<<<<<<<<<<<<
 *         if pyfunction is None:
 *             return
*/
  __pyx_mstate_global->__pyx_tuple[14] = PyTuple_Pack(4, Py_None, Py_None, Py_None, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_tuple[14])) __PYX_ERR(0, 2933, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[14]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[14]);

  /* "symengine/lib/symengine_wrapper.pyx":3730
 *             return self.nrows()*self.ncols()
 * 
 *     def ravel(self, order='C'):             # <<<<<<<<<<<<<<
 *         if order == 'C':
 *             return [self._get(i, j) for i in range(self.nrows())
*/
  __pyx_mstate_global->__pyx_tuple[15] = PyTuple_Pack(1, __pyx_mstate_global->__pyx_n_u_C); if (unlikely(!__pyx_mstate_global->__pyx_tuple[15])) __PYX_ERR(0, 3730, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[15]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[15]);

  /* "symengine/lib/symengine_wrapper.pyx":3789
 *         return c2py(deref(self.thisptr).det())
 * 
 *     def inv(self, method='LU'):             # <<<<<<<<<<<<<<
 *         cdef DenseMatrixBase result = self.__class__(self.nrows(), self.ncols())
 * 
*/
  __pyx_mstate_global->__pyx_tuple[16] = PyTuple_Pack(1, __pyx_mstate_global->__pyx_n_u_LU); if (unlikely(!__pyx_mstate_global->__pyx_tuple[16])) __PYX_ERR(0, 3789, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[16]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[16]);

  /* "symengine/lib/symengine_wrapper.pyx":3957
 *         return {c2py(<rcp_const_basic>(elem)) for elem in _set}
 * 
 *     def _submatrix(self, unsigned r_i, unsigned c_i, unsigned r_j, unsigned c_j, unsigned r_s=1, unsigned c_s=1):             # <<<<<<<<<<<<<<
 *         r_j, c_j = r_j - 1, c_j - 1
 *         cdef DenseMatrixBase result = self.__class__(((r_j - r_i) // r_s) + 1, ((c_j - c_i) // c_s) + 1)
*/
  __pyx_mstate_global->__pyx_tuple[17] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_1, __pyx_mstate_global->__pyx_int_1); if (unlikely(!__pyx_mstate_global->__pyx_tuple[17])) __PYX_ERR(0, 3957, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[17]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[17]);

  /* "symengine/lib/symengine_wrapper.pyx":4142
 * 
 * 
 * class DenseMatrixBaseIter(object):             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, d):
*/
  __pyx_mstate_global->__pyx_tuple[18] = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_mstate_global->__pyx_tuple[18])) __PYX_ERR(0, 4142, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[18]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[18]);
  __pyx_mstate_global->__pyx_tuple[19] = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_mstate_global->__pyx_tuple[19])) __PYX_ERR(0, 4142, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[19]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[19]);

  /* "symengine/lib/symengine_wrapper.pyx":4566
 *     return evalf(x, prec, real=True)
 * 
 * def probab_prime_p(n, reps = 25):             # <<<<<<<<<<<<<<
 *     cdef Basic _n = sympify(n)
 *     require(_n, Integer)
*/
  __pyx_mstate_global->__pyx_tuple[20] = PyTuple_Pack(1, ((PyObject*)__pyx_mstate_global->__pyx_int_25)); if (unlikely(!__pyx_mstate_global->__pyx_tuple[20])) __PYX_ERR(0, 4566, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[20]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[20]);

  /* "symengine/lib/symengine_wrapper.pyx":4712
 *         deref(symengine.rcp_static_cast_Integer(_b.thisptr)))
 * 
 * def factor(n, B1 = 1.0):             # <<<<<<<<<<<<<<
 *     cdef Basic _n = sympify(n)
 *     require(_n, Integer)
*/
  __pyx_mstate_global->__pyx_tuple[21] = PyTuple_Pack(1, ((PyObject*)__pyx_mstate_global->__pyx_float_1_0)); if (unlikely(!__pyx_mstate_global->__pyx_tuple[21])) __PYX_ERR(0, 4712, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[21]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[21]);

  /* "symengine/lib/symengine_wrapper.pyx":4734
 *         return None
 * 
 * def factor_pollard_pm1_method(n, B = 10, retries = 5):             # <<<<<<<<<<<<<<
 *     cdef Basic _n = sympify(n)
 *     require(_n, Integer)
*/
  __pyx_mstate_global->__pyx_tuple[22] = PyTuple_Pack(2, ((PyObject*)__pyx_mstate_global->__pyx_int_10), ((PyObject*)__pyx_mstate_global->__pyx_int_5)); if (unlikely(!__pyx_mstate_global->__pyx_tuple[22])) __PYX_ERR(0, 4734, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[22]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[22]);

  /* "symengine/lib/symengine_wrapper.pyx":4745
 *         return None
 * 
 * def factor_pollard_rho_method(n, retries = 5):             # <<<<<<<<<<<<<<
 *     cdef Basic _n = sympify(n)
 *     require(_n, Integer)
*/
  __pyx_mstate_global->__pyx_tuple[23] = PyTuple_Pack(1, ((PyObject*)__pyx_mstate_global->__pyx_int_5)); if (unlikely(!__pyx_mstate_global->__pyx_tuple[23])) __PYX_ERR(0, 4745, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[23]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[23]);

  /* "symengine/lib/symengine_wrapper.pyx":5447
 * 
 * 
 * def interval(start, end, left_open=False, right_open=False):             # <<<<<<<<<<<<<<
 *     if isinstance(start, NegativeInfinity):
 *         left_open = True
*/
  __pyx_mstate_global->__pyx_tuple[24] = PyTuple_Pack(2, ((PyObject*)Py_False), ((PyObject*)Py_False)); if (unlikely(!__pyx_mstate_global->__pyx_tuple[24])) __PYX_ERR(0, 5447, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[24]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[24]);
  #if CYTHON_IMMORTAL_CONSTANTS
  {
    PyObject **table = __pyx_mstate->__pyx_tuple;
    for (Py_ssize_t i=0; i<25; ++i) {
      #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
      #if PY_VERSION_HEX < 0x030E0000
      if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1)
      #else
      if (PyUnstable_Object_IsUniquelyReferenced(table[i]))
      #endif
      {
        Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL);
      }
      #else
      Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT);
      #endif
    }
  }
  #endif
  #if CYTHON_IMMORTAL_CONSTANTS
  {
    PyObject **table = __pyx_mstate->__pyx_slice;
    for (Py_ssize_t i=0; i<2; ++i) {
      #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
      #if PY_VERSION_HEX < 0x030E0000
      if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1)
      #else
      if (PyUnstable_Object_IsUniquelyReferenced(table[i]))
      #endif
      {
        Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL);
      }
      #else
      Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT);
      #endif
    }
  }
  #endif
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}
/* #### Code section: init_constants ### */

static int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate) {
  CYTHON_UNUSED_VAR(__pyx_mstate);
  {
    const struct { const unsigned int length: 12; } index[] = {{2},{3},{61},{68},{45},{35},{26},{54},{33},{37},{60},{24},{23},{52},{30},{259},{432},{26},{40},{34},{27},{36},{25},{23},{33},{59},{45},{27},{22},{40},{46},{43},{61},{30},{54},{1701},{20},{15},{13},{179},{45},{44},{35},{37},{40},{40},{37},{34},{57},{42},{27},{60},{45},{46},{44},{32},{27},{27},{16},{52},{20},{18},{28},{19},{30},{18},{1},{1},{1},{1},{1},{1},{1},{1},{2},{1},{4},{8},{5},{6},{39},{42},{15},{23},{25},{7},{6},{61},{52},{46},{50},{50},{50},{2},{6},{35},{8},{9},{30},{16},{50},{8},{11},{23},{45},{44},{29},{56},{53},{51},{54},{71},{58},{64},{31},{18},{20},{32},{22},{45},{48},{47},{21},{25},{18},{19},{33},{22},{15},{30},{37},{5},{10},{3},{1},{4},{5},{4},{5},{4},{5},{5},{4},{5},{4},{5},{4},{5},{5},{2},{3},{11},{10},{11},{8},{15},{11},{3},{11},{14},{10},{11},{24},{8},{10},{3},{11},{11},{12},{7},{17},{1},{2},{5},{9},{27},{17},{16},{11},{18},{15},{16},{19},{18},{19},{26},{20},{20},{18},{11},{11},{10},{10},{12},{9},{11},{7},{14},{10},{15},{17},{14},{7},{11},{12},{19},{20},{11},{18},{19},{19},{1},{9},{12},{7},{14},{15},{10},{18},{18},{7},{11},{26},{21},{13},{25},{20},{21},{15},{22},{23},{10},{17},{18},{14},{15},{12},{20},{8},{15},{16},{8},{16},{16},{3},{4},{3},{4},{3},{4},{1},{11},{15},{19},{28},{28},{28},{21},{20},{19},{18},{31},{23},{18},{25},{33},{35},{26},{21},{20},{26},{20},{28},{22},{20},{26},{23},{26},{26},{25},{28},{26},{21},{24},{19},{26},{24},{25},{35},{21},{19},{20},{19},{28},{25},{22},{19},{19},{24},{21},{26},{26},{36},{21},{21},{21},{23},{19},{26},{24},{19},{24},{21},{20},{22},{21},{25},{24},{10},{18},{17},{18},{15},{15},{24},{20},{9},{13},{31},{33},{10},{28},{18},{30},{17},{14},{19},{18},{16},{15},{5},{13},{1},{8},{8},{16},{16},{13},{2},{8},{16},{15},{16},{13},{20},{10},{17},{18},{4},{11},{12},{4},{1},{4},{5},{4},{12},{9},{17},{17},{5},{13},{14},{19},{17},{13},{8},{14},{21},{22},{19},{23},{19},{16},{13},{20},{2},{5},{2},{11},{18},{19},{11},{2},{4},{12},{18},{1},{8},{16},{13},{28},{20},{38},{40},{31},{15},{8},{15},{16},{7},{16},{15},{15},{19},{17},{14},{15},{12},{12},{19},{18},{18},{9},{9},{8},{16},{16},{13},{8},{12},{8},{16},{16},{12},{14},{28},{1},{14},{22},{21},{22},{1},{3},{10},{21},{20},{38},{22},{22},{9},{20},{21},{21},{13},{14},{25},{26},{26},{2},{15},{7},{19},{37},{39},{34},{31},{12},{30},{32},{22},{40},{24},{24},{8},{11},{24},{9},{27},{29},{22},{19},{21},{8},{16},{15},{2},{8},{16},{15},{16},{10},{18},{18},{3},{16},{2},{14},{6},{10},{28},{30},{20},{21},{11},{3},{11},{10},{11},{8},{3},{11},{10},{11},{8},{14},{3},{11},{14},{10},{11},{24},{18},{8},{10},{18},{36},{38},{26},{27},{23},{26},{27},{25},{25},{14},{3},{10},{11},{4},{2},{16},{23},{24},{31},{11},{19},{20},{3},{3},{14},{11},{11},{6},{3},{14},{21},{22},{22},{11},{2},{10},{10},{1},{7},{2},{9},{10},{9},{17},{17},{3},{11},{10},{11},{15},{18},{8},{7},{8},{10},{18},{10},{15},{33},{35},{19},{17},{18},{19},{8},{8},{15},{16},{17},{20},{2},{1},{1},{8},{16},{15},{16},{13},{20},{20},{18},{19},{20},{16},{10},{10},{9},{17},{17},{14},{10},{15},{22},{20},{18},{17},{18},{9},{8},{16},{15},{16},{17},{10},{5},{13},{13},{10},{3},{10},{19},{24},{1},{2},{26},{3},{4},{8},{3},{14},{12},{16},{9},{10},{5},{23},{25},{21},{14},{32},{34},{3},{9},{17},{25},{18},{20},{14},{21},{14},{23},{18},{18},{13},{26},{21},{13},{12},{19},{15},{22},{14},{15},{14},{4},{17},{14},{22},{21},{22},{4},{12},{11},{12},{9},{9},{10},{14},{6},{17},{13},{14},{12},{3},{4},{12},{21},{1},{13},{22},{22},{10},{18},{17},{18},{15},{15},{23},{25},{26},{25},{5},{13},{13},{12},{20},{20},{17},{1},{15},{9},{1},{4},{3},{11},{11},{1},{4},{12},{1},{1},{2},{2},{2},{3},{3},{4},{12},{5},{13},{4},{12},{5},{13},{4},{12},{5},{13},{3},{8},{10},{10},{3},{9},{15},{3},{9},{10},{3},{4},{12},{13},{3},{5},{9},{11},{20},{9},{16},{7},{12},{10},{14},{14},{12},{8},{27},{10},{17},{4},{12},{5},{13},{4},{12},{5},{13},{17},{18},{4},{5},{13},{12},{13},{12},{5},{13},{6},{5},{1},{2},{2},{2},{7},{15},{4},{5},{10},{9},{4},{12},{11},{12},{8},{4},{8},{4},{1},{2},{8},{3},{5},{3},{3},{8},{8},{7},{16},{10},{4},{7},{5},{4},{7},{15},{14},{8},{2},{9},{17},{8},{5},{18},{5},{3},{4},{5},{3},{7},{10},{8},{8},{4},{11},{15},{4},{10},{11},{10},{9},{10},{12},{9},{17},{19},{9},{10},{8},{18},{27},{19},{22},{4},{8},{3},{11},{4},{12},{3},{11},{4},{12},{5},{9},{25},{59},{68},{67},{18},{19},{5},{3},{3},{11},{4},{12},{3},{6},{7},{4},{1},{4},{11},{4},{3},{4},{8},{4},{5},{5},{4},{7},{13},{21},{7},{7},{4},{6},{7},{7},{3},{3},{11},{5},{15},{12},{9},{1},{2},{10},{5},{19},{8},{6},{3},{4},{9},{2},{3},{4},{3},{11},{4},{12},{5},{11},{10},{4},{12},{19},{11},{8},{9},{9},{5},{2},{3},{3},{6},{24},{10},{4},{5},{5},{3},{1},{2},{2},{2},{6},{20},{25},{25},{9},{7},{5},{9},{10},{4},{9},{5},{9},{7},{7},{7},{5},{13},{6},{7},{12},{10},{8},{4},{8},{5},{8},{15},{9},{9},{1},{5},{13},{9},{15},{3},{7},{2},{15},{7},{3},{4},{7},{8},{18},{10},{8},{11},{8},{6},{12},{12},{2},{4},{3},{10},{8},{10},{9},{21},{8},{9},{10},{12},{5},{10},{1},{2},{3},{2},{8},{6},{5},{8},{14},{9},{10},{5},{7},{8},{25},{3},{10},{8},{17},{7},{6},{15},{8},{18},{12},{8},{3},{6},{13},{11},{8},{11},{10},{6},{6},{11},{13},{14},{10},{13},{9},{10},{13},{11},{14},{14},{9},{11},{11},{7},{11},{9},{7},{7},{2},{6},{4},{5},{8},{8},{4},{7},{9},{9},{1},{6},{8},{1},{2},{3},{9},{15},{6},{1},{6},{8},{8},{9},{5},{3},{2},{9},{10},{8},{6},{3},{8},{9},{4},{23},{17},{29},{5},{10},{3},{11},{9},{8},{16},{15},{11},{11},{10},{11},{10},{5},{10},{18},{17},{18},{2},{5},{6},{1},{2},{2},{8},{9},{3},{4},{8},{4},{3},{2},{7},{13},{6},{4},{3},{9},{8},{3},{4},{11},{4},{14},{6},{10},{14},{7},{15},{5},{23},{3},{10},{10},{20},{20},{1},{2},{2},{2},{4},{8},{3},{5},{10},{2},{5},{4},{7},{2},{7},{3},{8},{4},{8},{9},{2},{2},{5},{11},{16},{3},{4},{7},{5},{1},{3},{6},{3},{3},{4},{2},{2},{8},{8},{9},{5},{2},{5},{6},{3},{10},{1},{2},{3},{4},{4},{13},{4},{2},{9},{5},{4},{9},{17},{17},{5},{3},{3},{8},{13},{5},{4},{5},{9},{6},{11},{4},{27},{13},{6},{14},{19},{14},{8},{10},{11},{16},{17},{8},{12},{14},{12},{11},{10},{19},{20},{24},{14},{1},{2},{3},{12},{8},{12},{1},{2},{3},{3},{3},{11},{3},{9},{19},{5},{4},{5},{9},{5},{15},{10},{6},{17},{13},{13},{8},{3},{3},{4},{7},{12},{8},{10},{12},{4},{7},{3},{7},{6},{3},{7},{7},{3},{2},{9},{11},{10},{11},{4},{4},{9},{5},{3},{7},{10},{8},{8},{6},{4},{6},{4},{1},{6},{4},{8},{11},{35},{5},{3},{11},{4},{12},{4},{4},{6},{3},{4},{14},{21},{16},{12},{9},{10},{12},{19},{5},{4},{12},{15},{14},{8},{26},{3},{11},{4},{12},{4},{5},{4},{8},{4},{5},{5},{6},{5},{12},{4},{4},{12},{7},{6},{10},{4},{9},{22},{11},{5},{3},{4},{8},{6},{10},{7},{11},{31},{19},{7},{8},{5},{15},{7},{18},{19},{12},{4},{5},{3},{1},{3},{11},{4},{12},{5},{8},{5},{3},{6},{6},{7},{5},{9},{8},{13},{4},{5},{1},{4},{7},{5},{23},{12},{8},{9},{6},{14},{11},{11},{13},{17},{6},{5},{10},{18},{17},{18},{12},{1},{2},{5},{6},{9},{3},{11},{4},{8},{18},{1},{2},{2},{2},{8},{26},{1},{4},{5},{4},{12},{12},{3},{3},{55},{85},{2},{11},{37},{22},{16},{16},{16},{16},{15},{100},{22},{20},{124},{26},{26},{26},{26},{26},{42},{27},{15},{12},{35},{208},{97},{56},{87},{92},{11},{12},{13},{66},{68},{9},{9},{84},{84},{46},{97},{135},{60},{42},{42},{194},{29},{29},{61},{61},{53},{51},{69},{70},{102},{103},{57},{57},{12},{126},{146},{40},{36},{132},{100},{30},{32},{162},{44},{79},{120},{196},{107},{35},{35},{29},{25},{71},{67},{25},{73},{52},{52},{52},{49},{21},{36},{11},{22},{25},{56},{106},{109},{44},{75},{60},{133},{95},{63},{174},{48},{78},{25},{25},{25},{25},{25},{25},{25},{29},{20},{39},{9},{89},{9},{93},{22},{30},{30},{78},{11},{16},{82},{27},{27},{36},{25},{27},{31},{67},{29},{13},{57},{117},{32},{64},{64},{85},{83},{83},{69},{184},{103},{74},{74},{45},{52},{77},{102},{120},{100},{82},{139},{70},{15},{48},{22},{32},{39},{126},{45},{46},{36},{67},{11},{57},{30},{7},{45},{7},{39},{26},{14},{51},{14},{46},{42},{58},{41},{11},{50},{17},{11},{25},{20},{12},{11},{15},{23},{25},{9},{32},{32},{30},{11},{52},{20},{22},{11},{13},{15},{24},{20},{20},{13},{11},{11},{22},{33},{33},{21},{23},{21},{13},{24},{20},{37},{37},{21},{13},{15},{12},{13},{9},{14},{20},{24},{20},{30},{20},{20},{20},{20},{30},{30},{20},{20},{30},{20},{9},{15},{62},{63},{64},{15},{32},{32},{34},{25},{26},{26},{26},{26},{26},{26},{26},{27},{53},{39},{40},{39},{39},{39},{35},{23},{15},{19},{37},{32},{24},{23},{9},{15},{15},{13},{11},{11},{9},{11},{15},{62},{63},{29},{29},{29},{30},{68},{106},{83},{48},{48},{48},{48},{72},{38},{38},{79},{83},{71},{76},{84},{105},{78},{68},{68},{68},{68},{103},{121},{138},{150},{130},{143},{59},{116},{30},{37},{34},{37},{9},{109},{44},{50},{52},{52},{52},{62},{52},{52},{53},{52},{50},{25},{15},{162},{138},{37},{20},{75},{32},{15},{19},{40},{50},{75},{256},{148},{92},{53},{66},{50},{50},{10},{14},{10},{10},{12},{339},{106},{55},{55},{55},{2559},{11},{63},{32},{32},{65},{59},{60},{92},{92},{118},{37},{179},{29},{39},{66},{66},{33},{30},{33},{52},{33},{319},{81},{112},{127},{245},{41},{1}};
    #if (CYTHON_COMPRESS_STRINGS) == 3 && __PYX_LIMITED_VERSION_HEX >= 0x030e0000 /* compression: zstd (15701 bytes) */
const char* const cstring = "(\265/\375`\362\254]\352\001\032h\251KH\340\316l\0030\314#\214\342\343\032O\3604\314\216\3311;f\307\354\230\2150|\260r\221\310\224\020J\321X\202Dr\262\264\026\233e\032\374\024\354\376]\314\010[\007$\337sg\236\352\214\021\364\223Dzl\257L\321\255\333\032]\004P\004\354\004\243\310Eqg\304>\317\214\272c\030\024\014\314y\302\325\214\273\367\025\212\352Q\227e\356X$\311\025\266u\235m\270\213\242(\236zm%\246PL[\335P=\346\331\n\006c\315V\267\261\373[\337\254\325*\344\205\021Z\"\224>=\235vj\262a^\2069s_2\245z\246\t*\242I%\201\024\272\360z\270\323.\243\244\271M%\245\335\231B\342l*\371Q\223b\017I\013'\356q\243M\210\222k\247~\3437\022$H\360\360D\tsg\3248Txa{\276\313]\nI\027F\023k]J\206\242\230\307\224\024\303\215\226P\223\004\322B\250\303\027\013a\210jM\226\302\321\306\313\021w\276\224\242\210\346\256IT_\2600\326\360)\233&6\263\014\335\033&\345'\311\223\200\212$\211IN\224 9\021\242\2240\221.\2340\204%\033\272y\216?\361\023\316\351\324KH\247\360\245\337l\364\035\236\321\233\332>\321\233\334\333<\363\234::C\365\276\333\262lr-;\335l\372\206\246\241\354e3#\313\257\232R8\342\232\323.4\tY5\273\217'}\267yh\346~\2464'\222HB;\306\2219\243a7uZ\353\035\233\243N\346\252\026U\004\033\227M\210\372\261g\346\2326Y483\026L)\225\312\212Y\252`\342\245J8T\304I\225\242\020\202P\205()\020%\021<'\275\023^\210\302\003\241\007\201\007\"D\021\301\023\242\360@\274\204&\022O\330\013y\244\022\212\351\005\005\313N=\234\013\211yF\263-\314y{\214\352S\233\256Z\272\317\023Me\235\334\247\307\334\226=)\275\215\332\304\254,\263\3332a\317F\217=\234\036\273\310s*\315\334\303^\302B\024\225\216\363\016\205\304\341\316dR\tQ\314\020e\247\244\3236\025\023\032\242\234\245\020\207'\333)\207.5?\342\354O=lFxE`\221^,Sc\035\3568\304\276\224\222Z4.\016\254\025\214\350\341\005k\301\314\254dD\027\r,\206\3065\343a\2469\272\271\326\241\031=\221\314Sg\232$\356{)$A\"\335$\t\022\371\226\023\272\220\271\357hS<\t1\323\021lL#d6\315\254\303|\344\324\303;\022\315\232\227\021\362m\364}\237\035{L\316\204\247n\252m\\\311\304\313f)$\265\216\347""\236\366]\343:\347\260\2479\332wF\\3M<\242\330\367\227\334\307\020\245\024\346~\023\342L\272f,3\327:\276\215hJ\326N,s\362\2717f\216\323\\\217\200\2229\367\235\311\360Ff\254\245\035\217\372\364;&\324^\223$\016y\370\324<\334\363\2119\306e\216B\"\205\244\221\204\222\311}\206\244Fa\247\233\347\251-4\367\256\205(=\034\252\321\r{\t_BM\n]\262\rVn\3551\356\204q]\276z\230s|B\367\315\367R\217{\036w\272B\027?\246\344\356}\363\221\357\261e\312\335\304\257\020ed\254\211\"\3178\034\346;\361\244\315\023\231sm,7M\330Q\236\372\314C\257w;D1\345\224\323Bo\246\270\314d)\314<\305\246\251sB\2769\317b\356\032\363Z\010\3014R\203\200GP&T\251Wj\234\347;\237\275~\341\302\205\214y.t\025\236^V\033\247\214j\033\352:{\263\020\2230\251\263\302\r\262$t\351$\232\356\232O7z\246\346fu4\353\216b\356O\224\010\313\235\206>wR\230q=\257w!/\223\250>7/\263Y\303^\363]\004\322\206=\336f\031n\3373\347Y\347I\247\036\337g>CT\207=\335\251M{t\217a\327\241\3077_\013q\230=\316|D1\253\024\236\232\014\315\260\237:d\365Lj\356\373\306\361r\3507\032\366\274\311p\227\265.\344\271,S\030\323m\364\370\354\372\0143\217\356a\212Oq\250.\205d65.C\033\252}\307#\2117\207)q=\314f\272o]\307\263Gae\330=\232\317\324\306qH\362\275\353\345\235\320\304\363\315\353\214\206|\227\302SFw\330\233\205'2k\023\207K{\210n\3359.\354q\214\352ZH\24284\361\251\307L\2067\277a$\234P\241K\031=+\025\245\306\370r>\001>\r\014\213\214\025\330\215\271+$\277\004\303bcE\233c\033\254<1\327e\345R\010\271,\237\367\245\205`\340\347|*7AKcWl\316\352\242z_\310E\201~l}\260v\025\203z0\253\302\002`s\253\203\002\277\200\n\001\240\017\213?j_,\212}\000\352\371\250@\261\264\331O\000\204\265\374\231\273rU\341\0179>GF\017J\035\251\036\031=\037\027\004\233\203\363qZ\037\365c\241>*\243'\347b\227\245\344\227d\364tp\364\204\326Q\255\340\033\220\321sC\373\264\227\337\341J`\360\031\200~\017\227\032-L\027\302\321\202\rK\346\342R:\251\351\331\354\315\203\323<\330g\236\336\023y<Q\002\217\207f]\317\242N\227{\232f\217I\\\232s\232\246\336o\177\363(\366\276\237rJ4kg/\355~L\267\367}\324""\236\347z\346\271\241\272\233\371&\346\334\307\334\273i\342S\327\334\206\336l\232\367\233\0263\357\342i#y\271\367.r\035\221k\221s\221\373\235\023s9\235K\314h\3323?\323\216\353\341\304\032\256\355\236E]\026y\272\024{\017W\342p8\261o\217\363\235\304m\334\336\273\357.r\024\207z^FG\024\025ETL\241(\024\325\334\243Y\334\034\227\242Z\237[\354)\252O\021k]\346y\034>EQ<S\035\217\251\351M\033\312\343\333\266M\262\367\233\211r\033\232\313lf\363\034\315\235i\356v\260\337\351\345\035qgG\207\363\356\273\356\231\243[\207vqg\373\262\334\"\016\325=\217Z\034m\332kR\213Z\337\372\215k\234\r\275y\233\016\315\331\346\311<\332v\027{\366\370\344\273\344[\305\222RaAu\0336\313\224\036\307\232.\373\276q\324in\234\210\342\363\306\267\037q)\226\251\022\325\313\335\274\200\343\225b\346\233\217%\317b\317\345\\\316h\356b\316Y\354Z\3548\322o\262\213\347&\275\036w\327\244\317\242\317\246&me)\2126\234I\\\316$\311y:f\337\367y\272\320\267i\3414v\334\026=\232v\021w\212<{qlI\241\2726\273\271\315Q\314c\317\242\250GS\3471\223{\034G3\353\023'\222z\353\304Q\007\325\3428\216\342\350}\367\272fb\255k\330\233\351Fkb\rU\253y\315\313\267\024\212=\356\031\325>\335|\353\021\355\245\035\267\275xC\365m\314(\306\\c\234h\313\230s,\366P,v\2777'\311\333\330o\376\266G\334kx\254a\024\306\242\207\016|\243\035:\270d`V.\032L\226s\302!\263(\336\334PL\363\250\336\270>\273\245\334\227<\1770q\3266\247\355\263iC\275\026{>u\316\272\254gh\252\307\021\315i.\317d\263\231i\366\336s\270\314y\226\311b\262X\231e\236\307\353\331\364p\254\236\215\026s\307\265\335\316c\326\332F\333\310\\4\032X\215\215\r\257\34156\276\202y\032\232\214\326\320d\032\022\245\3014\270\223$\261\251K\034\336u3\223\330L\311\215\352\031\036\236q\221f\326//c\333\330k\235fi]\356=\313d\231\034\317\263\210o\260h\232\342\014\216\214\214\014\366\346\316\230\321\3159p\340>\237\033\3356\315i:nb\336{\317\341t\327g\352\265\027o0\330\r\014\006\343\031\327\323P\232X\203\217A\361\215\306cd\346\216\3111\033b\362\211Q\316u\327\257\374zm\210y\275^\034\205\343\341\363\3041<\233\251+""\347\352\272\343\264i\272\\\347\231\2668\316\346\330I\337\352]\233\333\243\250\336\211=3\305\272\266G\254\243C\365&I\321\226\352\240\250\336:\236gs\367vz6\367mL\317\2169\356'>E\237m\330\373\334e\261\2543w\277\221i\311\334\264d^\257\023\317\0366\223;\232[\255\216\275\3173\224e3\323+QX\313\213\247\314\333,\024\233\330c\326\354\246\346&\006F\243\251a\211,\227\215\007\032\213\346\346\305b\331\266yZ\345\021\233\274\262\243\370\326\317\355m\370\324\"\317\273\215;7\232I\261c\321\347\236K\334\321\024w\006\261\025\205h-[!\274z\010bU*\264\222Bp\311\201\0373\2110RKX\275\0053\360\233j\3158\350\004G\031Sa\353\013\350\001\244\375R?\234W\364\222Z,\234,A\001Z\030o\240X\034\014\263\340C\007\304cc\245j\370\345\274\020FA\321\352\322a\026\245c4Si&\004\337U\213\325\260|\345\220\203\215Z\254\225\200J%\266v|\330Zzka.J\353\005\314gm\367\305\206\n\213;\240m\205J\260\013F:D\300\264\242>x\3706_\347\267{Uo\n\004D\300ZS/\274\025\202\033\032\026\034+X\036m*\304\304\334\371;!~\010\332O\201\037~\242\337\3477\003\251z\212\023\357\323\352\370\220K\212\211~\314-\265\235e\261\242\321g\r\340\201\030H\303\362S\260$\000*\327\324\222\017xD\037\246\217\037\372\230\304'\021\3734\325\027C#D|\021\034~\202\037\315\302H\356ga\364S\324\320\006P'\364Rh\360S\374`P\377\343\266\332\034\017\035~\207\234\237c\363m2\374\226\222/\nC\rD+\177\317d\377\006\270\002\312\264\374\026\366\203\340\255\360\312\010\346f| _F\206\332\362\251\"\213O\233`\362M\200\257\237\002\0237\270\241\001\302\n\262$\035\277#EE\210\016\357\311\017\305i#\000U\300\021p\303\312_\361p\307\221\207\004*+ A\223\003!\227'\273\204t\364\260Z\360\317\303\373\340\355\"\236\234\310\310e\365<\031\304\206\354\330\223\230\372\240#\366Y\020\n~\310\227\344}\365\234\3774\277I\373\342o\365\243\200\322+\tfMt\000.\322\013\357/P\364\342</nn.^\027\257\017\217\205\305\212\036\357\363v\177'~\321\346\313\220~\201\325\017\364\0139iI\326$C\300K\362\300\301\352\375xY\334\321\310\302\344V\326\n^+\250\276\345\003\371\306\336\227\360\237\010\t\365\350\002,U\244:a\342\233\300}\334""\376\033\375(\316OQ\301C\ru\364\214\360\n\263\226!\225\207`v@\200\021\211\326\327\2225\264\272J\261v\325\335\234V\324\222&\264>\226\003\371\200zG` \t0\004\204\251\276jT\363YeX=\030 |\325\317\024\300\225\360\346\\\013m\315GV\003\344^9Z\271Zs\322\036S=`\200\265\032\375&\274\t>\260\242\020\220\345\307\002\251#j\037\035P;z>\353\254\267\nXC\275\n\254\307>\225V\203\312\3322j'\314&\240b,L\303:\022\014\242V\023,\364\343/\353\005}\270\2646\325\002\000\261/\034\275=\320\232B\276\013@\344\217e\215\n\nZX\007\000\020}\004\007>nH\313\331\013v\006\263\372\241~1\357\211\026\177X;\324Z\020\273 +-\016[\362\361\263g{\252L\325}~=W\226\302\340\257V\320j\242\206TR\207\253[\230\266dM@\376J\025}\221\201\223\201\006\255\251\300\307>\022_\310gB\3450B\362\013\375D^\n\271_\214\312W\331\020\243\316`\376\306\333rQ\256\212\202\257\300u\300\216\\\262\335=\010s?\374\273\275\033\\P\310\017!U-\204R\017fI\330\276\312^*h\345\360\345<V\007\004_\2375$\247\n\300\"5d\240g\203u\255\250\325\304\252\004f\003pPS\003\005x\270\275\205V\256\226\250\035\273\273\226\325\242$\370\241\225\226\343[\341\027\305\275pM\332\223\326\326\262z\254,d\314\025I\000\351\321P\201\002\002\000\312\274.#\037CG\017*5\372\2437\364\216\256\207\217\366\323\202X\031\200\370\360?\334\374\033\331\227\305\276\013\210\002r\250\360\275\312\252E\265\23159\360I>\252\001 \010hBsu\001\332\031\211\307\277PC\032\026\001V\214^\027\320\307\244M=P\200\243'\244\2068zXB\014\334\250\030\000T\003\254Np\305\216\260\027\252\214\240NU\005\271O\346K\235\250\036\034=\271U\273`\037\214o\304\267\001\n\222jL\265\371\010\200\202\253`\016\345\363\301\330\272Z?\326\004++\367\244\r\265)\261\234\312\302\357\315\205\031\265%\326\020\313\262\342\250+\225\202\372QG?\004\357\347m!\371\034\253\310;z7p\253\022b\017|X\020\321\212E\200\n\261\"\023\324\2177\365V0\3711\266\304\343{p\004\261\252\242~t\364\304Z\035\253bG\354\215\210\250'\366\352F\356M\213\321\266\330\017v\304X[+\226\321\232\000\364s+^7\250\242\025P\360\243\002\377\002\374r/\317U\271*\010\376g]Q?8z>>\274\306V\006""\003\376\352-a-\312:ZM\037\001ve\365*K\375P]\276\364\263\346\324\017\276\216\217\233kSD\276H5!V\304\200\001\016\014\004\"\013Nld\220\234\254\260\370-9$\236U\261\210H\243\366\304\342\207\274<:\3755\210o\002\310\013\300\243\326V\031\345\357u\362;\230\250\241\022]0\366vp\037| \255\030TjZ\224\214\025p$\310\002\211\371\036\004K2\016\214PV7\261\027\3435\021\340\352\260\210\360h\344\343\"\372\254\"\276O\310\036\306#\025\363\211X\000\224h\025I0Dk\255\370\221\257k\254\0100,\010\254\350\374s\320_\311\034\374fj:\202\255/\026\370\235R\330\215U\244\246#\270\243\363uX\277\3064\302(\237\207\202\037\337y\3416\300\257B\313H\320\302J\354\364\021\010\275)\257\314\266\266\336?*\200\030/\327\302\023\033\225\254\273\036\273ZO\360T\027\206\321\332W\257\002\000\r\334\035vC.k\364\200b\330\224\010l\347h\201t\210*K\203G\343wpX\030Xa1\200\345=eT\321\200\036\234\026\243]\241\215\007|\033?\002\257\014\205\227\200\211\214uE\026\373;\003\\\t\341O\177%\020l\256\233\23375b/>p\332\223\307\357 \026\0147\204\300\317!\225$v\002\215\306\201\257\022\\\021\360\n9\305>\013NIL\032\263\322\306\2609\242\005\177$\003\303\3423b\305\213\266\247\026\322\316\n\242\203ra>[B\322\263\372\021>\002\214\217q[o+\277\004\024B@W\356\367\341\025m\260e(\375\004\037\337\343#\010\360y\005S~\201\030P\004\224\360\035\260\214\336\013\007\337\201\001\020\226_\371\302\230\200B\016\004|\370\246\305G\275&\022vBK\207\305O\231\\\310\265\034\330 V\031\314^\276H\007\004\202\217:s\360K@?'\212\240^\217\360\353\250h\204\374vN\360\307#\020\004H\362\351\313\352W\027\031R\224\370%\374\367\263?\202'\364i>\002\354\013\201\006\333\372\010\271\374\263\362\371\351\330*\274\270\251\004\177#$A\200\034\227_f\271\330\222\001\004\337\006\211\231?\003\342\323(}\231u\301+b\304\343s\330\271\2608\241\r\356\010\n\030S\323\205v\251\237z\341\005m\001\366\364\321@\371\005\004v)`A\262D\007)E\306\365!|\022\017\177\246&\005HG\260\3743\177\343\315\021\014\001\371\351\247\370\000k\277\330\317\005\313\375d-\224/\342\037\014\206_@\245\322\3407\320\2400\032\271\200\271X""]\254>\251\205\305\n\317?\317\375\234\207\237\002\274\021\007\260<\361uqkX\222`\3507\266\"'\257\213\305\257\211\001S4\261\214\034\020\003S\274\037\334\225\360\207\256\277]\025\004\367\004F\005$\240-\205|\2020\250\366A\350\337\3700\2029\240\014\246\240\003\265\340\347*\341\261\034`\036\252\306\210o\000\206E\203\025\037\240\206\327\257\345\361c\277\007\020\276\n\006\034\003\302~)?\005D:YC<\275\000\030\000\326\034*\222\254x\300\016-\357\0062\0068\002,=\240\320&`!\244\2377\303\255\265\036ZV_\003\252\000qN*\224\326\236\340\303\006\2366\002\210\r07\324~`qnh\261\021;\r\334`\362S\350\317[\273\265'\321W\320!\244D\3661XH\251\211!0\220\200\205\223O\262\267\020 >\210\234\037\001H\376R\230@\215>M\004\301J\213\325\314F\320\260\240\t\256'[Z\004\032>1-\000mF(mQ\270\370j\241%\005\306\305\013\001\362_\201\021\267{\354>\356\313H[bI\006\017>>\212\301\247\261\251\230\3331B\341\304\252jO\231\010\265z\330|\231\177\246}\n\300\374#\371\2258h)}\3737\331'\2011\340\214\216\376\332\306\004\270\201z+<\3705\255\226\010\035\033\363\341\343(\316\3025\3407@no\257\265\304\310\341\350J\036*\310\361\2179`\315\204_@g\362\2236\277\245\362kB\"\301\035\314\3560X\225\\\202\234\252[\226(\243\255\245\002\270\257\230\316\363.\372\005\347\027\246y\261\263s1\233]\264Z\037\336N\367u\351OE\374\rD)\371[\345\230\200\032k\2776\342_\370\027B\004\330\260\003\316\337\001k.\374\330ksY\036\374\006x\315\271\254\330\016\316J\342\201S%x>O\357\307~\314\346g\304H\276Xb\367r \240a\341\261\342@\tD\303\023\334\230\366D\244\003^Qd\260\235\313:\002\2730\251\217a$\204z\375\007\245R\360\023|~\255\267tYBB\2527\006\207\202\352\200\273\303\342\330H\201I0$z@\243\215\253\266L\255\334l\337\206?\266\3713\220\001\027\005?\324\023\373\351^<\222{\017\230\274%ZY\205\365\005,=R\n\276i\364{\225&A\006\241\237\206\313w\251\275\027`B\254\324\017\331f\277\346\327R}\022\377\212\360w\223\234\250\204\362\314c:\311\324\214\310\000\000\020\000\000\203pP\200\310@&\021\212\3063n~\324\246\315\017H\244H\201I\034\203@\310!\307\200@\001\000\200\t \022`\020\000""\000$\tQ\216E\314\315\254\235\305\206\367\232W\227,8\213\312\277\201\234C\005#\212\270\300\014\210d\002%\245\341^\030$\372YD\377\010\245\323E\242\010\316\307\t\2048\357\313\217\345\266\303[\310h\213U\020\004ba>\251\331\362\206[U$i\343g}qB\2519\223Y`\266\362\021YXP \350D\254qS\232A\001\244\006C1aL\345=\200|\302\001\026\023\325!&\313\345H\025\306\204\n\313\177\020\361,\010Dm_\242\214/\263\227\367L\031\330U\2253qT\224\305\304Hg\036d0F\203\\\263\265\232\265q\235\252\331\367\364\325\257\363\343\002;C\324sf\216\341q\251&0\325\"\220\226\253\374\261Q\334\315\200\230\375\"2p\315\3243\013\0024_\235Z\223\246\353|\303\256\267\"\270S\354\237\021\323[*FG\027x\230X\354\200\003L\224S-\026:\220\245\222\237]^.~\033zM\374K\364\205\354A\355\310\t\210\374l\214*t\030\273\234\341\235\303\006K\331\007\033\366\250\220O\\\256=[X.sR,\356\327\255>m\317\271\2259\212\376\206=F\001\242\222\032\342\346P\213v%\3402\026\316\334\351ZB\334\210u\306\210.M\246\303\223\271%\305\2414U \340\036\221x\206\013S>\245\267U\231{\0353\254\373\275Sh\305\242\244\374\261\033\265\343q\"\307\010yK\307\037zN\355\306\326\343\002\226\354\243\270\333[\237\236<nm\037\307\303\302\262\"\303Vjh\211/\257\340\027\312|\333G\363\006\330\376n\201\355\"U\"\261\036\212\031O\305\2764\262\264c)\332\024\371=\327\205OnK\2736\343\234\016P\236l\223\020\264\325\316\274\354\0340\245\371\346l\267$\230\315\302w\365*t\224\020\340W\235/\2653=_\265\265\200[\232\246u\243\020\377N\277>/\221\004sx\233o}R\374\241\026L\352\264\333\177u\233\354*Y\177\030\313\32341f\n\241\332\316r_\032\n\272MT\323;g.\353\253\000\304\206\031\342L\326\334C\234&.<\360pyt\321\251:\240\022\305\204roH\233t\30140\265\002\\\211x\211\034Sb\256\234\323\235\337\232\016\032\206l%\263v\264\022\213@\250\275+\367w;v\344\232\312\220E|\223\321\017f-\013\340~\226\352b\230M\217\036\233\315\001\026\256\332G\023\231nCz\334J:#\255\006\245D\256sQ\366\242t\317B\017m\351\271\242\235\362\210\220\337\247\336\000\263\224&gU(\307T8vp\321-\003\007d\3424'O\361'\203\004\222\276s\006\031\r\237L\350E""\272\303\026d\240\030L\205\376\rZ\n\033_I\247\017^\007\034G\226)N\220\310\227\004 O\222,\\}\0228\017=b\365sma\244\373\211P\267\224\025'\312E\335\223\235VV\320\031fU\234\272yH\005\311v6\213IX\255!\232pX\312HY7\266'\\I\274\231yR\314\2327t<\246[\\\337\010\2313`\276}\343\243*\224I\321\211\0213\230#w\205\366.\221\225\005\205r\244=\021\333\227\371<d.\216\274#e\223\027\301@\032\360{\303so\006\252U\357\351d\217\255\366!Ls\215\335\210H\356\253\376n\242\372'\021\n\372\277~\323=3\260\236\363\n \010mPn\324\nMLO\263\372\317\2608\264\374eG\373\2542\030`Ox\230Y\277\014\022\242\354y\001X\333\346\2537\367\330\363\256\001\200y3\2632(\255\360z<\022W\242\005\354\323\t\215&\3363\355\266\340\266\233\334tf\310\320=\221G\0178\001\302\342\250\225\013\234\306\005^\271a=\035\324\022\265X\340\242\253\030\320\0213gC\001|V\202\301\326m\235@\243\241\241\255\343]\270\024\035\023\202\243\320\352\213TA\276\301!\302\024e\361a\031\234\010\357SH\265\017\323\205w%4\020\314fT\235\202\0378\220\322\001\313zm\322\227\360c\226U\250Y>i\321\334U*n[\204l\234\255\336\036\242\353\274\002\010.!\022\341\351\206\345UR\225Y\344\362F\365\262\352\254\300\215~=\365H|\264\306\025\337\206*\212\333wu\213\226`\\69\023\034\376\254\205|\000\241\2608\227\203$\315\267\217\024\240\220Q\177\310\014\303\370\326\367\305\0044\007\272\t\033\330q\367\236*\007.\016\3074Y,eg\026f\010\021\274\343\377\242&s\227-\230{\331\021\251v\207\331\005\315\000\225Pa\224}\340\251\256\270.I\241\334\3073\211\330\344\177\017\312\344\375\356\342\333\301\234~\262\242\274\200\233B_33\261l|%\355\017\312\350\374J\226M\301<\243\253\244\3312%\372\244\220Be\315\255\312*F\253\330\306$\256 F\356\275\307\003H\243@T\345S\021\205\206\332\206\341BZ\020\013\r8\234G\331\256f\331\017\201\335\306B\372#\253\220\353J\267\201\371*zXWt\r\251z\245{<\367\272K\211'.\355\371\037\203\215Z!\220;l\001a\223C..X\305UG\016\326\r\237H\245\000\005\374\034\250)\361\0033\215^r\034v\204 \350\003'\"\024S|\351\213\244\257\305\356\002\215\342\262\272r\200}^\005\025\250\324\302\034\325\303""\376\302\215u\273\354\3616\2465\220,Im]\200\242\234\202\030VMy\025\320\207\372\226\3702E\315z\203\330N\3333\200\277\207\323h\226\313 /?\016i\267\014\220\265+\224\231\335\300\035\310[\222\272\3430\004\037vR\000\320\001\211\365&\347\201\225x\"\300z^Q\253\035\266q\375\020/Na\"w\035\225\025\273(\\\236.\261\027}\306F\202m\243\2152bIR\004.\240|72\206\035\363\237\377~\316Q\311\275\3456\217\0340\316d+-\250h\007\346\302\256\321E\301\035\256&\355~\310\202\020\223?K8\324P \205#J\340\243\336\311\2542\362q\264\031\335\332\252\035\257\0352s\004\375\205)\177@J\365\2742\t\310B\201cTKCU\363P\271\314O;\014\336\016>\2111eth\006\022n$\374\377\203\004a\024'8\340&\336\275)\0314BX\177T\2220\013\263\346\265&\373/,\2563F\261\313\304\222\235\226\037\325\325*_\251v\373\312]\267\026#\302\346\265k;\315\267kn'f\020S\203\376\223\364\230[\230\202\243\312+:\250\241]\017\377\253\304\365\204\201\302\005\017\257\357\221\272\375\210\300\242\004(\204\"<_\031\3140\377A\3357Z\273a\356\347\215\324,{\322\033l\345,\225\033\n\325\330O\002f \313\211\313z\255:\367\353c\036\t\035\347`43/z\376A\337\014\225t\211V\177>#;\340W\206\000\264l\202340(em10GK\232\365\251\305<by\321\277\273\264B\246\315\365`\273\020*\336\342\330\365d\207!\257\023\030@\207\373\376\322eI\262\250\350\252\207$\355\\\020\367\312\2425\206\224\360\211\322\212$\322\2167Q3\336,x\232\276\356\212v\226g\033\303>\275\202LRy7\352\254\220\332\376\322L\264\027\361u\364\362X\022<\335\037g\215\021\256\201\023.\247n\n\353\216\267\004\352\211\361H\273\\\260<\017\237\305\377\217\360\215C\306\214\336i\2641w\247*\220\014\201\033\001\375\004\242<jW\377\300\325\326\242\215\307\227\035\204\010\305\023\340\260\024SB\306\312\036R/4^\215.$\3328\347\341}\354\236E\005\373\317\3713\361H\340\215\311\374\202\032i>\341\341\027\263VR\355\207\014:Z\223\200\217\341u\211r8\202x\373v\341\003\263|Jw\334\3435\306{\266$\033\242\265*\265\260\353\224\263y\277V\013v$c\345r\325\237'4#\267\237\001\232\024\312\035\230\035mYFS\330pg\360\336\222\023\231S\310\212\2406\360\313)\251'\347\351""\360%\026\n\033~F-\270.!\252xC\321\375m\323\n\351_\242\337\230\227a2\253\032LY{\025\242\005\014;\237\320\252\361\353\250w\326xp\026\320\233t*\366\261q\322/QT\251h\362 _\273F\316/\304\227\365j\350d\213\326\203\306\005\263\222S\326\307B\253\360.M\332\r;4T\327\352\310\250\232\222\\\232\361\220\242\\\370\330A\0329\342\216(\005y\316Ie~\n\224\204\025F\345\220\007E\366\263\346\232\205G\205\372\327\257y{l\325\262zU\275\356\333\332\374\240D\024s$Zm\322\266f\225\311lz\2410\003\202\020\236a\312\014\301q\242\\\336\r\027\361!\224\213\212wR\211\350's,\033\027\001\thd%\242\351Z\302\2617\232\346\r\374q\3773\332\353\016\341\243W\004\377\352\3023\n\326\243B\021\020\250\207B\360\r\310\222a\036@\323\035U^S\332nD5\253@PW\341\250\240\344\006S\255)p\307~\324\006d\226\256-\363\305\347:\216\215\200\002\000\314\3740p\275\352\025\362\326\263^F_\374\336N\326\234\374\024`\223\3333\374\256~)\323%f\231\032\312\227r\004\205\302\235\262.\005\354\356m\312\262G\333B\256m\233\247V]#\256\014]\215)\356\021(Hu\2359y(\316\303\307%\322\270D\016i]x\301\234\312T\253\3106G)gT\021Qi\340\321\256\355\351;\320\325)\307ub\003V\343u\010\257|\302bji\305\3027\026\032\007\260^\007\260\221\277\351\313\321\017\033\006\261\305/\371\275\003(\016\216\207-\301\245\224{\230\3128\246\3521P\310\374N\350*54\345g\3639\r\002`\025\323a\321\240%\300G\252\223\t\277\326B\322\263G\t\t\342\002\036\016\237q>|\342\271\353i\215[F\221\244#\217`\377\321&\2426\022\035\265\344'\017\331\355\230P\236m<\370\000\016\344\300\023\001\307\366\201I\230W\020X\r\367\202\255\3608\3479\255\365A\214\270\343\\\222}\252\322\264?\020\277\214B\253N\235\370\321O\010/GV;J\nA\245\302\311g\223\322\220\3307\n\216\344\232\025\267A=\251l\3153\343F\210Y@9U\206\232d<\274\201\316\210#\003\227\010\0131\271\227\215\013\006\201\323\"\214N\255\272\215\207\005\324\245N-\3576I\257KP\311\236l\376\355T\347\317\027\270\020\224\265\347\363C\302\204\334au\373a\324\313\205o\031\341\350\376I\365b\024\366\007\332\226\313\010\023<D\373\307d{84|89\323\376\330p\3073\027\010\324\330""\033\312\330\013\255\217\017\2134h\301wu\220A@\317]`\354\245\301,\022\021\240\271\0223BG\265>Y\260\261\010qy{\271\270\273\243$D\253o\2430\376\342\246\021x\222<\356\273\255\350\204\001\376\222\325\371G\003_\217\362jG\345\202\315\0346\006\3337ts\324d\310\202\361\023\245\207\302r\220\004\007\247\033\324\313\003\303\240\377*\0018|1\301\032\346\364\014s\230\303:\241\"0\347\371?\316\210\007ga_\311W\004I\205\017/\335\021\27549\300\340\334Bz\035\325B\"\n\332D\202\n\307\310\234\034\266Y\276\236\022R\tY\267\350g\262\257\360:6\022\032\271\372\355?\244\303\314\247\216WN+\231\370\225\245\327\214\224Z?\272\000B\265\035\376M\373\347T\027}\327#FY\031p\201t\266X\006\310\307L\334\024\026\247\315\231\331Ma\357:f\225\027\004\300A\213x\0161\210N<\370\351x`p\2600\302*\220k\302\241=I\036>?\006\205\000\276\372\306\360?\211\312\020m\304?\033\377\322$i\263F$\263J?\261I\323NCS\310\n\017\201\177\362k,\247=I\237\313i%\301e\370\243M\304T/\244k:\316\n\261\260\004XGA*&_\376\037\005\014\300\177\340Bl3\343%R,\364\263\3376\277>%4\006h\376\016\237\342&\035\254=\336\217\325u\3157\031\201\215\365tFw\236\203\245\327\327MX\347\013:n\324W\251\264w\300N\\\275xl\356C\006\\N\330\370\324\377\340Pp\014d;\203@\240\363\250rI\246\306\006\010\211e\252\016\363\367\302\326C]\373\261Q\245Q\247J\216I?\352\253\234\300;\3066$5HM}\224%\330\271\001\266\220R\210\024\351P\311\343AU\353\343\245d\373\335J\2350+OjR+\324)\361\003|\231w2\261 S\177i_\037\312{o\256xR~\370\037\274k\230!@\352^\3603@\315F\303\214Z\033\217z\220\213!\322\326\020]\272\362,\243v\267\252\260\314r\372\221c\005j\263\273\3303\334\370\220\211\035\256\254\214\277i\036\375\260}I\271)\351\350\032\3257\000W\315k`\n\020\016U=\177\032\307\240\310M\200\017\003\007\272\024~\230N\314\352\t\375\330+:\221+\306\231^\221cR\336E\376\236\220pF=W\301\213/\315\226\347\177i\007z:\010*d\"\320N$\232YB\343\264\333F\226``\361!\264{\r\204e\200\005\346xL\254\034\353\326G1`.\310\274@`R\227Fd\rW\234z\374\323!v\316\3541sL7\202\0029i\254i\370\201\254~*`FNM\252\215jZ\307'\322\237\nn8F""\236\364\362\216\337l-<\373n\0017\225\010\265|\362M\017\027\343\337$\242\353\327;\356==(\253<\211;\375\rX\366\262xI\276\036\037\246$\332\222\242\302Z@P\n{\264N\021\264\361\250\246f\007\264\355\013-\210[-\377j\3139\274\234\327\237\177w\304I7\2002\267\024\263\300\022\213U\212y\3228\326\021\232\020\307\177H\270\005\020\017X\223\304\020.\377ln\364=\370|\355\330J-\337\310=\300C@\305<\270/%\027\345\360p\003h\364&{\300\2217\247\303`\270\334\376\341\216\363\272\357\255 \177i\260FHt\301\363\250I\006W\343R\"@`\014\213\362\341\375)>uR\353+\341KA \002\340\201\317c\300P\213\256`\332\027\304\202q\371\020\177\336Y\271b\214L@\037@\237\231\250\220%{\202\030\267\246\365f\201\002\003h\3347\312;\373[\302e\341\\\\\021`l\016\024\250\204\347A\010\004t\363\340\356\237f\261\33383\231\023\337<\311gKUeRw\226\252\017\317\237\235\026p\005\030\214\370\253\235'7\375\206k\304]Uy\0166\201\241F\356\264\301\313\244YM~\270\225\031bM$\323\361)\350\231p'\352\327\353\227e\246\347xK\314\322\200\237\306l^\202\344\217Aw\260WD\031c\013;9X \004u\200RI\370eF\020\201\357\324\211W8\311\3107\217X\003\200\206\326;\315c\351\315J\344\3222\342\3611\247\206KDM\362\357IFE,w\016\221t\224\201\226`\026\004:\\\247\177BQ&\213u\020\365\240\222F\340C\031U\016Yg\201C\373I\267j\306\330\353\031\267\254>\003\301\331\311V[\271\335\200F4\022)\242n\356\2435&<)K\205\246\314\022\260\032E\353<\264$\364D\327\231\376\353\261\232\224\014_\000$S\310\035\213u\237\320\235`\370\271\021\022\t,E\233.\2630\216\321\374\003\224zD\376\231\310\344\2647\344\317Y\344\352i\260\200\245V\374\221\243\2658Z}rj<.eTX$\276\352v\374\276\036\204\262\261\351\235\201\023\356\324G\362 \325\\\336'\345sv\215\355\326\260\274\374\375\354\031b\245\300Go(\000\032\244F\014x\034BH\247\301\225\205\374P\272\237\202\311\225\337\016\334\242Plk\336\334t\375\307\340\027+m?\237\266\363\240\363\257oLB\"(\351g\374J\026\220\020XFoLWp\242_\336\016\317\004\253\343\\)\326I\205B\333\300\203\206\007\016l4\022B*\233J\335\n\336\204\227\021\316\351\004\354\362\277\2644\335\t\221#\310m\001""\377$/pK`1\3571\t\007\240Q{\030Jz\017IC\234\000\226\201DAh\014\343\330D\377z\270=a-\335pGf\345f\311\021\027i@h0q\232zC\277\000\256(\360\253%n9u4zg\321\2548`C\373\320\271\370\n+f\204\2529\334\224\335\352\323p\265sH{=\366u\217\314\"\2629\020\301r\352\274\234M\333\351\321\226\364B\350\361\274R\271\214\260\351\2329\225YB\374\306\376\373%O\324\372\200\026\214nCPa\005Z\256:c\r\222R\337,2\331\013[\212\210)\202H\237\320\202\213v\013L\217\376l\177\200\313\035\320\365uK\036gdu\365\271\310&0\243\036\350O\272\270\301\230]q\002\202\261\360\315\t\357a\003\032P\346\364\346~nH\016\326\010\206vq\307\026?}\265q\010\205F\253k\002btZ\000\311p\252\033^\336[*N\013b5.\306V\355\220\316\004Q\316;\230\274\020\311=\307\265I\234-\273\334\254(\327\346D\211\351\004OY\2310\356*[\0370R\344N\0009!\024l2U\270\026\215Qv\025V\377\253Rl\357\215\2675\345\202\331\323\2633\t\211\237\230\233\301z\222`\356h\231~\245\210}\023\021\305\207\340\026O\362\305;\217\354A\005P\023\313\r\247\370\374\235\302\265\200D\0164\000\353u\006P\\f\221\364\342\352\273\355\304/O[\307\256\346.\266dX\321\243/\025\273\014\363\377\261ew\270\370\364G\215\323;\335kW\364.foN\267\274\361\315\035em8\226\220V\230\014%\243q\336\323{.\204\223Z\327\200Z\211\235\304\235\247op\201\335\314\256\306:\234\003\\r:\353DJ\230\0049\211pdC\201\220B\347+\204\244\231C2n\213\346\022\316\007\037\301'\316\331\270\305U\335\202T\241\337\035\264\255n\263\344\312\177\352\216\020\207\2733\r\335\233.\177\352Ym\262$\342\245\32470\227%B|\221\3548AK\017$\362{\324\\\257C\233\024\010n\336`\204\262\301T\360\337\301^\210\364\t\3656,\242\301)\301\026\330\314\211\330\3636Y\254\257\250\240\211\311\354\2601\000%\307\027\3742`N\214J\214\203*_D\024\214\312qlH\354K\340.U\2209P\376\035\256,C\233\276E^\315\346\005\334\035\204\200Q\225\"R1e\216$'L\227\301\254&\320\303\025\251\235Tg\345\321\006\235\246\320\342\311ub~\355t\306Ui\337E6e\313(,\373V\036X\263\007\031\007\206:\341-\\\230@\221\267\225\034\224\375\030\004\037\300^\003oz\345\33673\267`\037\331\376\264%\366\2040W\220\362""\305\2340\204\036E\007\\}\310\034\"\213Kk\361\206\020\277\320Z\000\335\307a,f\211\031\367=\341,!q\362\275\306T\030\223(X\345\200\372\267\374\016Y\354\343\355a\336s:\2000\216\215\216\344\204\035\323\321\034\246\373o\006\200\254:u\014\002\010\342\014\027\265U\037ht\354qL\027\2465\343\202\210\271\036\215P\353\013\251g\241\274\354[3\236\177M\371\023PG\2136m}bp\332\362\347\314\356n\362\014\355*}W\362It\246\347\303\370Zb\000\375)\026\232f+\355l\221\333\372\371V\274P@\377\200\232\265\307\355Zj\314V\321R\203\251=;Y\323\304I4MY(CQ\nq\330\232k\t\334!\001\356\3621@\320\340\346\320\352\334\007\353\013'\025K\217!\371\213\222f\315/\336p$\014^.\034\034_\375\025O36\202\246\256\276\234\014\263\303\350,j\3317ALO:\177\025\221\316\277KYz\334qc\236t\225\277\026\277\037\364Rz\340\356\222C\227\"|\272Q\252\210\265`\211%B9\252\004+\024\255Xx\301\022=0\263\343\340A\205\336\242\216{\372\262\202@\245\232^F\367>\"\035\024\034\034\327\225'\212\307\341\3071\260B\317h\324.\370,\322\364I\375O*\260\036w.sj5\311\366Y\255SJ\272\033\234A\344T\227\035Pf\220u\273\021\003z\314\323C\227\330\212\306N\354\254u\240\313\2629\355\344\254)\271e`)^\255\016\350\027\254\217\352\023\204s\314\324\217\216\300;o\346r\340\357\300\270\224f\203\024\006p\034\250R\366\310\2145\214\214`\031\206\013\277H\3012\354\004\270\271\331\235\241(\360\342\001\302\272\371n\r\317!\324\032\227\267\003\\\373\370\244\340g\375\330\235\235L\337\031:I\253\333\006\250\016\202\361RlW\340|\023\357\354S\260\365\003\320|\245\264^\331\275x@`IF?*\330\237$v\025\031\331\334\265/\001Z\334\tm\231``I,\311'\031\216\305\345_\266\345\263<\321(\217 \r\251\345\306\007:\322\265M\025\265\221\021N\275\337H\331\353h\305\037\366zS)\217\201\177\343\250\027xg,'\235\021Z\016\243\200&FI\375?X\275\257\363\005\362+([?W5\3479>\246\240\220;\027\277\312\320(\244\341kB\376_q\257\217\361\225\367C\364'\237m\307V\020L\373\201s\026\034:\273\262\257p\006p\354\016\325\211\367z\257\350^\204\214\000\2546\261C@\022e\242\225\262\220Uq;'|y\304\\\202\325*#\370\313nax\357\370\036b\304""\224Y?5\313\275\213^\254.\363\365\373\244_\366\357\374xn\204\210\350\013}\262\362S\022\014}x\316\253\214\210\310\240\200b\246$\254\246\234I\376h\336\233\001\231D\376f\0362\254/ \353\347\251\361\333\341\337\0109\342\021\353?\215\203J\262s\001\222\246\376\377\035\313O\207@\022\250#\332TE\323\226\027\375\2334-h\202\324s\272pyN\263|\240\371\034\252\027\213\036\365\210*\224N\\Xo\251Ti\237\206G\341/\264.A/\236\030\017\240\272\257\311\325\tY\327\337\025\222\323f\223\241\"K\340I\206\341=\325@b\226z4_\002\274\343\273\335\010\003F\272L\357\342\304\231\r\323\220f\241Z\021\341\253z@\r\332%\255\020\357\217|\370\252C\026\"g\240V3I\365%,ks\246&z\014G\214p\001\212\033\030Ix \244\211\342/\213P\366\347\"%mrC\0242\\\001\301\314\205}\237\236cZHA\257\2313|\017\037\210,#\0233G\242\323\242\207\351\321U/\02328\224L+Vo>Oy\376,<1g\t\207\030\267\2712\303b\347h\035\230\3320\334\207\377\233o\213BH\244X\2757n3\375\023,\317z\030\033\n\314\370*\250i<\226\036\337\274\235\023\217\247\263A\304\r\377;\017R$u\236#n&\256\335\342\351lx\213\224Q\247\256+\354\222\224\350\021\234{\321\223\323\344e\032\227\266\031\373\021=\025lC_\207\260\010\\\230K\336\347\315u\005\374\276\304\237\331\311\006\201\027\361\355\376\245\232.\302\304\345{<\347\035<\002\362j\274O3K\256\336\031\237*i\211\334C\257HD\026\361\356m\235\364\362\263x\313<j}_\014\203\251\013\271?\333a\017\213\325\325T(6\031\0137\342\346,\242\231r\344h\314\224`\353\226\217\352[G\376\337\347<\330:\213\224\374\334\030\320\344\023A=\022\364\235x|Y\010:\273\262\3352\001\232\260!\336r8\317\013@SWC\223\230[+\213\005\212\272q|\"\247\022\327\206\014 ;\r\254\270\3172\033\362i\010+\023<tPd2\"\261\253\335J\007\356>\342\274]Ct0\307l\313\346E$\272X\343Q\200\321rHf\2617\206\346\034\304\253\\\\0\246#]\271r\320\264\221\nFc/\256\215\2304\022;\320\313\236\331\350\257h\314\031\325\366FF\310\264CY\032\265\324h\031\205\225\225\335 \370M\320)6\364\001\031I\304\2623\334\230%\001\207b\r\225?f]\346\347\001\276\273H\2278b\304\374\251<wb\322+b\206\255^0\305\336\260U\314\371JPLE\205s""'h\241\212\213\006\205_yS\002dP\374]\222\"\227\325\330\316!q\374t\253\014\247\265~\252Y\021j[OK)\246\236;\341P\"6*\335@\370?\300\311\2635\004iq\265\010\006\024H/\tc-\210\303\317\210v\277\237{\314\356\305\262\3560\027\246)\231\235]\377\030v\022h\t\306\206\221c\027\035#\303q\331;\340\022[\261.}oj\2431\363\2411K\233\322\240\003l\325ha\n\233L\nq\035$\005^%\217\327\324\234\306~\3314\231Y\261\345\201\014r\351\347\311W'\347\343\366FY\375\262\305\"agm<\212O\204\265j\006\\N\347y\202\376G\030.\014\302\210\274\217\2003\267\320\233hO\354\360M\356*\246\177\205\n\352\020\025\\gb\\\007\203\263\266;\363K\341\202\000\010v\035g\331U\245\\\320\372\245^\036\032)\023Ts\033\265\347yYVA,c\343\270\026m\220\272\300\332\357\277\243\275\362\026\217\201\205\223r\342g\\\355\223F\313e\344\221\356 \0255\317\304\313\231e..\310_\241GEH\201\317\342\370ht\001\265\232y`\206\317\215+\250\326|\246\367\301?:O\002v\354\301\203O\206\232V\371\272;]\301X\226'\001-\r\373\3346\002\212\345\374\025\023o\245\223Gma\271\0224\215\tuk\355\260]&\350|\307\325/\250z.\231!\034\270\330\336\003\334N\205{\271\311\017\256\321\027\331}h\314\221T\251\247D\007\177\260\006\313\267Qd{\326\202G\220\216\350\277\241\025\014\024\013\254/jY\237\010q\033.\3144\023\301\263S'\021}2o\273\241t\\\211\317\247\227\375\265t\272G\343\222\002`i\371\211\277\226\346\207H?\303\271\222e\327\2726\027\240h\246(\352\205\264\030F\200\230\027V,\233\267s\013\243\206P\034\264\247S&\334\230H\237\262\260;x6\356D\376\0009n\326\204\372\325\337\275\367f\246\331]B\364P,G\"\346F\204\317q\223\344\206\236\346\242\360\360\231\331[\221\027\002W\342\204+ \005\263\207u\024TT\243\235\313\360\"\225\303#\351=.\005\343\007\326\244Vy\033]\253x\016%\243\206pR\377\3320\327\304\001h\"g`j9\032\277\344w52\371\315\225\302\2374\2229\t{\345\330\371\200\2402|\354E\021\222\257b+\323(\260Q\345\035\230y\266\302\3577\367\331\t\362\033d^\037o9y_Y\340\314\026}\223\324\241\375\233\314\320yS[\"\014\027\226r[\321\360\244;\321\335\262b\302\td\205\307j\327\211\362\207\356\024\023\330(\352.""\002\352\367\365@\344L\307qO\351\326\372'\266~+\250\264=\023\0304\222\344\273\254M\242B\333r\322\276iH]\033\255c\306\357\023J.}\222i\354m\2277\354\365\302\032\006\270\205P\363\231\032\256^P\020\300\370\272\020:\016t\253\251\030\3117\371\243\253\341\260\341\225\214=\201T\025)\333\177\346\0162\236\370&\337\n\034R%B\025B\314\337\330+\241\301\310\361\326\212\000\374_\236\201n\204\206\343\037\256\217\0340\025b\0375}F\034l\3666\013\227>\232R\223\310\223Nc\230\356\307~\331\276+1>G\372lK\274\206\314+\024\362\266\320`\036\356-\256j\376\245\301\300\365\310\222\002\034sZ\356\\\003\220\275\340i+\326\203\006\263Y-\332\337\234\3371\214\006D$\240\nX\001\357\013\031\237W\310\267\361Y.\231C\216M\222\311i@\371F\216\263f8v\252\272\332Mdv\302\032\237\360\216\031\227(\034*Gv'.\3616a~\310\n\302\263\203\332\007?^\330\013.nB\231\213\356f\213\016\252\177Q\356\024q\320\353\007*\357\t\227\013\"k\304/\346\323j\251\205\3027\312\226ga:\345\232\220\334a\026X\356\246;C\330\235j7\032z\275\032V\003O\367\371\232X\026\320s\025\233\301\330F\014\242\256\033\014\202\022\243X\370\347\"\014\tv\025\r\226H\020,\353U\000\360\276\346\336\"~\004\335\267\227}A\023\030\205\320\305\207\313@\316\237\3767Q\372\346\273m\003\242\001#\021\374\r\002/\262PB\340\017\201\346\222\020\324\212\206\252\373\364\032e)a\221W\264F\246\223\337y)n\3717\302KwQ\036{\203\222\025Qxxk\345\231\250\340\t\002r.\233\221\013iUe$\317\2766\304/g\215%\002KZ;Jn\323{DA\r\013m:\3340y\2264\030%.\333_\362{\034\240*\276\350_3V\025\340C\003\345\000\243\010M\303\377\370\314Ff1\214\210\200\255\006]\351)\241\344uNH5\252\216j\346\000\347\3076:\233FW<\250+\262\200q}\213\263\275\217\332\267\3022\013\316\202&\005y(\352\321\203^\202\177\314\223\270b\261V\023O'\372M\233&~\214xas\320f^D\321O\252\227\016\313%\257\350\003\224H\341\357\374}\230\247\004\020}\224\237\020z\354\346<\243\341\017r\241\024\200\223=<\246\2544\3365Q2\t0\002%J.\207{\3355\222*\270\247\346\004\231!{L\2535\022\376\"\365 \010E\300\320<\235\323:x\317\014\265\213\236u\315\351\331\267\032\203,>""\221;Wy\027\016{f\n\346\006\2340\267\002\335$\177t6\217 \320L?\3165\222\312C7M\367\367\226\301\036\271\242 \177G\353\036\326#\261?\247\250\036h\037U\003\306u\222\037\0033\010r\365Cc\213)1\321\030M\302\225\230\262Go\237\353l\204\007\237~\264B\224;c\004\036E\021\375\034\002Z\375\2209\245*y\347U\365\014\254T\320\220Y\304\325\2532\316\333\232\2207\316\332\00068r\021\336\250\253\341\377\251I\322\026%\247\241z\346\n\027\343]\226\005\021x\354\355\274\225\014D\016\365\315F\262k\2246\325\254\030\306w\237R\222\227HO\360\014n\220\027\n\327]]\2605Dx\312\273\t3\277\035\300\214H,i\301?\215A\247\010\002\210\032\345r\224\010W3|\234\324\303\235\372\030\345&\000\352&\310\357\300w\246\371\214\225\\*\365\305s\261oigwa\373\212\331\014\217\366\227\016y\002B\314\333\361\2755\316\305\024kK\273\214\003\252bC\320O=\267/\252\207\333;\321\302\256\323\342q\225mrl\326KO43\221\225\354\231S\324\221\305\250D\317\226\235\356\202+\354\277\335\002\300\0342\210\034 \225\353;\342\210\364\215\334\305`\026\231\357!SMmE,#G\231\r\355\026q\256J\246?P\314\2277R\027\265\232\200\001f\302\241\334>\004\246\3354\007c`\253\363\303<\234\272\245\375h\347\024\254W\230\243\300\321\340\345\005z\030\022d90\253\216\304_\311\230\223,Z\253\360[V\373\002g<\251\006U\375X\221[[\337\336`\215\371\222_\264\255 \335\327\027\310\340\r\001W%S\225\034\017\010qs\2429/\025:\201\243(\230#\200\226\362^1\320\226\324=\302\001Z\201'\241\370R\304D\235\222\264Y\236X\327.G\2009\r\350{6Y\315\004\206e|\377%\352\256&\031\2620\215\321\t|\210\243J\321\204r\211\273h-\2574\264R\317xt5N\017\023~jQb1\341\2341#3\"\256\322\252\200\275\205\265c\004Z\234\321\313^\253s/!\\1\342_j\312[k\375s\003#\203m\216\216\374\221\377\204\274\032\367z\371\273\006l\342\254\003s`\200%\026\231\371P\311\222S=>\321\n\010\2312BtU\010b \320N\013a\310\024\336\302\225\326mJ\315\254\255\332\031\324\341\353Gw\213\220\247s!~:\316\2620\337\332\354\355\254\274&`'\275\316\314\260\317N\253\352\271\372\325\"\217y\255\034c*\027\333Eor\265\210b\231?\224\002%|T}_035\275=\333J|b2T\267\304""\2759\241O\303u\321L\033Ld\231\264\214)<\272\341zpj\340@\371e\024\230U\250/}D\nGC\206PT\255f\022 &\"\250\361\005k\021\332\030 B\022\340S\355UdO.\351=\310q\3078)K\371\371\341\264\325\226%\322!h\363v\216A-\350`*d\3379\221\000\031\031\013\263n\211\016\350\272\002\3021\023U\273)\303F\014\326)mra0\210Y\031;w\232\364\t\024\210Tr\251\305b=\005\215\032\253\017\266\222z\234\221_E\320\333\315\320\375\tL\342\021\365hdw\036^e\034@\235x\033\n\n-&6\345\010\346\324\276\273\370*\322`\017\213\005\210\267\025\361\265\247+-\327*\266\026\352\205\363\261\302\300\234\354\375\341x\215\032\304Cy%;\232\207H\226B\014\034\352\025\361u\302\026!\245\2665\222'\346\322\010|Z\365\020\037\302j\325E^.\330t\223\246\241;L*\213\233\302\250\235c\376\303\230J\177\360\224W\271\237\242\326\033i\017\371\237\216q#\374\025\320<\274\316n.u\333=\265\204\272\2771S\216\254L\361vp>z\350\227\215\376\r-\017s\036\355\212DbR\301FP\321\234+Q'ut\266\0074\016\344oUf\217F\337\267\024]\360^4\273\225\266\217?\237q\261\360\244\345\306\036\214L\000D@\r\314\264.!\002\035\253y\223\2442F\261\1771m\260T|\3655\n\254\225\"O\255\324l\225l\230\030J\343\016\322\265\300J\265\026\177\336s\322\361ch\"\310I\340\341>#'\314&7\244\237\354\240\024,\277\031\013\370\013A^\t\245#\337\244s\247\034m\226\202\347\363\253^B\000\345\007\344\320=\032\252\374\331\307\277\036\263\261;\217\010/\002\226\211\215\357\260\33317J\246*\030\013\307\215H,{\255\313\370oBZ\030\326<4\376a#J&\022S//\273+\235\321e\320W\250A\271\272\223$\375\221\253\017\343;\251\325\203b\352\206~\360\315dD2 R.9I\003&xL\244\247\306@R\232'yRg\323\367\326\300\026GLS(\370\264lR\261\364\342;\366\262\375\233\3106\020\rj\336]2\362\253\232~\227\213\277j\255\264\222\252/\331W\316:\227-\313\006H\033]U\"\371\245:l\355j\333G\2363\361\225\240vB\245\343\n{\212\216*\261<cg\220\271\005\320\362t\245 \357\254\207\260+\373\247\360$L\310@\361C\315\205mG\220\261\272p\000.\212\206\261\215g\213\260\r\361\273\270\213.\270\310u\276wp\327\330S\001\253f\371\220\210\020{\312\207\017\021\333\027\317W\277\330\362""\226kYj\325\034\036\013\364'\364\246\304\272\3106\013U\302\264Obvr(\2523\22303\341\006\2668_=\n\270q\0145\016w\331\202\324\274\036^\315o\310\351<l\216`\032\023\327*\222\214\262X\312b\237\333M\0207n\214b\266\230|\236\220\331\272\260\032\237\2655\200<h\341\017\247\005\025\203\201<\234U\017#\253\316\30655\2651\320\\\210{\305\340\036\005ky\205_J\232\023jF\254x4\345B\262\243\230\310\366X\274\311L\325\301U\013\351\010\202\303\r6\377\031\344\245\014\241MR\225\270\037\375g\230\tU\360\254\001\364\334\374\206c\217\202\2512\332\323\365\302\211w\350\257\364\355\310\343xbD\253\355\265\366\007Z\314\253{mF\232\n\001\213g\363\200\261\273\252\004\315\220\031C9\"-j \221v\013(\205N\275\327jQ\270\014\254\201z\372\366\216@\024\222\032\242\022jV\300\222\nk\374It\266\001\325\375\216.X3\223\212\315<\202i_\201B\230\030\035\024LKM\036y\272L#\022\325 \304\356\213\303\350\t\022\312z\223}\265{\000J<G\205z\274\335\267-_W@I\024\010\207\222,z17\002`Q\342\205^!\275f\315^)\033,M\321\202\304')\210\3311-at\020\2576\004B\330\3779\003|\324\361\316\223\216\214y\014\251jw \316\034\243\201'\213\032\030\232\236Z\363!q%h\014\311\262li\362\246\2733Cwwi\314\207\215\\\236C\030&\2157Vz\205\324\263\257\202\354yf\320\204X\021\337y\254\343K!}j\364'\033g\032\317\337\014\253>\267\230\367\375\202\266F\"\211Y\003\237\246\273\207\302M\277.k\027|N\007\000\220\354\326\263\366\330\214\356\200\030\020\247\247C\316\200\303h8\336\027\332\214\303\313\323\r\204O\251\363\005\255\203L\354\333\364r-\375\210a\024\031\346\216\023Z\352\350\337\201\2660\344\312\020#\035\360\344\331L@\177\312\254?\364\362\317MZ\345Z8N\037%\335X\376\236\027\244Xz\205\323\207Y\251i\200Q\230~\300\211+2\272\"x\302\027\224\003\373\026\341\006}\344<\240\227\351\351$o\337\232.\216\222 \360\000\241\366F\313\371$\253\314\317Ho\016\006G\255\2307\330\245$\001E3\306\rZ\235}\013\301\033Oq\3136V\274:\340\034\234`Azn@\014S\277>@\222\217~C\037\216\300\003\257\261\022\003B\223X\013<1\374\266\222V1\027\242:D<\246(!\374\363\006\307\216\263\325Y\020\000\244\317\374zWN?""\303\007{\315\351\032Gi\377.\213Ml2%\013\347\251?\010\200\322\"\024\177\264\360\376\253\032<\252\371\007\324\262/9X\013\302B\013j\266*v\300Qt&\272\220\261\000)E\314\014\273\355\270\226\021\275\"\021K\346\343q\366\352d\014\017T\275\220\010\301\243P#*\305G\310\247}\261\n\016\217tcF\371\022?\266\356\217\033f\272\231t\370aY\261\216R\025\271P\320LH\237\036\255z\356\013\210\314\003\033\256\033,[\177t\273\221\370\361C'*\030g\342X\030\010\177\227\262145{=\346u\337\345<f\277\227\033G<5K.\361\212\001\362\177\\\303\202B\274\237\337!\021\017\251\262\001\262Z\373\316\313\346\262\337'\031\335\031\323K\206\323)|\244\021\205\226\327\250\266\014y\016)\332\211Hh!u\022.\022\352S\300NI\342\302\033\332\364\373:*s\202,\031\244\257\346\236\265]\226Xw\232}\304\372\215\253\305\347\334\020\r\265e\035\032\232\344\002t\331\275\255\371\n\027\255=\364w\005\030\017T\225G\273\257\217jB\t1\020`.L\n)\342\010\307N\222?;5~\001-\316O\374\253\326\rs\023d\351s\314\031\304\306\372\312h\024\302\026\300\276\211\264\245\341f\227\233w\364\202D\317\005\324\234\300b\376pm\362\364\330+q\344u?b=;Za\332^\301t\023\240\210\314`X\227\226u\n!\215\362\010\032\016}T\346\271\214\3606\203\264\336\261\002~\3450\341\344\2576\026;U[\252\035\000/\020r\3652\246\273\251\001\317B\250\375\2575\375\215\256S\340\3459$\274\361\006\017O]xJ\246]B\265\211\201\365eS]s\\C2c\226\322\341N+\274\324C\204\326L\332\264\253\366V\216`is\367\302\347\000\2104\213q\236\270\332x\320\234XU\010\t\343\241\260\351\025 \2709\270\342\376\336S+\2011\332\330\314U\024J\312\340Y\3515$\244\351A\r\330\242\336<\314\277,\317L1d\203e\356H\003r\031\235\272\311\035ietW\371\035'DVv\377\230\220\366m\354\024\210\345{\2472Q\244V!\356\235\374\002\212a\345\375\372\327\262\220\003\030\233\237\222\342\263\257\273fZ\014\267\262c\204h;\251\356\241\036\375\333XJ;\222`\343\007\272\000vJZ\317K\326h\347Z9\243n\232\300g\030l\356\341.\351\221\310F&[7c\314\026=\236\216\210\033\314\177\333\020\202n@\353v+K\3202\372}\224\250\3449\032\275xm'\237v\210y\307\013c\3666!\360\345)\006\255J""\343\304\254\271\362\252Z\251Jx\001\251\277T.\007\242{\025\375`\254f#\305\016\\\3028\313\352\252E1\355\353\307\316]\000\024\301\367\230\306\364\366\r\034\256\315\212\021?\340\256L\231\253\230@\023K@a\020vO$P\213:\346`\313|\260\364\036M\262\234\275\354\nA:\320\210\361\014d>)\322h\315\257\256\341O\260GA\224\2026\025\332n:\221M\367\237\200\014.\341O\306\032 l\220\037\307\347\256=\3578\376j\347l\311\264\363\241\350\007}:\226\201\370{\325\010.6gp\2155\205\310|fZ\242\003\"\262\335\010\351{\311\205H\3458\374\022\001\375\317\340^\3059\344\260\341\003/\372T\316\376\010\034-\354#\257\235\226=\211Z\201\250\016\200\371 9\320\304\377c.\206?";
    PyObject *data = __Pyx_DecompressString(cstring, 15701, 3);
    if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error)
    const char* const bytes = __Pyx_PyBytes_AsString(data);
    #if !CYTHON_ASSUME_SAFE_MACROS
    if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) }
    #endif
    #elif (CYTHON_COMPRESS_STRINGS) == 2 /* compression: bz2 (14981 bytes) */
const char* const cstring = "BZh91AY&SY\010K\371\261\000\023\017\177\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\300@@@@@@@@@@@@\000@\000`D_{\322s;\346\031\272r\276\307\257\231\353\321/\230\321#}\337N\240\017\000N\365\334y\002o\207\274z\275\334\016\235h\\c\240t{\312\357T\202\251\357\270|\207\220\367\332n\363{\244s\256+{\336ow0\320\225\007\273t4\273j\202\213\022\335\025\257\273:\363\266\245\020HS\247E\366\217\030\351\351Z\273)\252\256\275\353\306\355\266m\355\366\356\3236m\235\236\370\017x\200\006\211t\312\242\233Y\245\272\347Gv\n\000\000\017P\035R\201[\320/>\273\255\261\241PI!\010L&\t\264\000&\206A\241\03242\014\215\024yO&2d\0214\014'\246\210\3113#MO)\3514\3040\304 \010 \201\0025Oe=Q\372'\243T\304\364\236j\207\350\241\352z\217)\246\203\021\240=\036\224\375Ph\032\000\006\200z\215\001\202\021$JM\250d\311\350\230\206\365L\200h\304\323&\230\322\036\223\304ji\342O\3234\302LAOM2L\023@\r\007\244\320$\322\204\022A\244\310\006\232\204\302='\251\243\324i\352d\3656\230\206\221\352\r\2116\240\032y&\230F\203j\000\302\017S\324\323i\001\022\220L!S\320\232\003C\3211\r4\006\232\006\215\032z\236\206\240\323@\030\206\236\202d\323M\032\006\236\246\215\000\323\020\t\021\004&\020F\200\232\031L\215T\377@\t\351S\332\247\246j\236\247\250\362jxji\250z\201\240\000\000\006\200\000\032\017\377$\256cOW\266\211\024\321\270\364\3141\361\212p\212s\032\205\345\316\177\370\330\211\022;B\n\n\010\300\363\037m\211\200\262\226\224\241\355\377\227\372\375\377{\361\376$\177\347\345\367cPS\277\313H\272A\267\006\000C\004\221TA4\010,\235\000l\037\222n\006\346\263\357\220\302\376@\347\025\326\320\205\025\342\257\010\001\211\272\026H\252\201\27791\273\2211\260c\006\372\2701\315*l\n\312\010j\035\023Y\243\210A\216(\330C\212zVB@\205a\3323v V\005\035F(\271p\360\001\302\036\365\027\021\311d\207\260=\2232hy|\334\334\377\257\371\374\177o\333\370}\337\215\002\220\212h\244VB*\204^\375?\306\323\252\325\253R\255J\265*\325\361Y\321\021\\B\256\212\345z\341/\377\037\376\3030\0032fL\312\001\365N\254b\004\005!\005\t\025d\020d\213 ,""bH\252\211\003\3420\210\243\024X\"\266(\261\211\262<\210l\010\230B \2261\246\226\232$\032\001\2423\022eN\355s\000m\0213\220\014H`\001\2028*`vA\216;\240\361\2055\327\336\027\215\351yz^\347p\021.\270\271\033\256n\270\273\005:\340\007q\"$R(# \244\026\002 \240*$$QI\024\"\310)\010\244\001H\304 \262E\204bH\n,\005 \244\213\000\021\204Y\000Y\"\222B(,\202\204Qb0Qb\004\330\233\004\201\214\006\2307\364\245\232\0034f\263\3175\237\014v\030\201\246\332c\022\001\257\264\341\230\227\265-\032@\364\317<\316\005mCA\241\201\307\334P\351O\3171\323\333\266\220'\277\326\243\344c0\262\302\243\251\261\242d\207x\351\254\363v\211\301\023\276\346\321\306\355\007\277\356\364k\023\"\215\377|=Q;J\272\306+\305\334j\3622D\212mM'm\267\206\334\313\224]\254\024a\002\"FKP(\005!\021\010\004\200A#\006,\221b0\213#\013\363;l\375\243G\305\352\235\205a>\nIX\n\002\222*\310\240\252\014E\025I\026AU\006H,\221d\021\200$B\020\034\320\231wy\244\001\271\212\300\212\220\202\031\214\331\212\363\217\237\314\223\240\204\024\235;gW\314\234/b\226\020DH*\035\200ncy\021\275\301\033\343\030\030\026I\022\006\310\002\022 >A\334\347\217#<\250.(\024A3\221$\221D\220S\010\"4\212\244\212\270\301i\004o\272\352\2005\365\350bhe\327E\0230\310\253\r\316\200ft\362\321\330D\240\022HDdY\277Ar\r\341/F\323M\032g\312\021\274|89\244\322\"8A\t\237\010\267\237\177W\300\336\223\373\004\262\264\254\355(8\250^\211\200.*\031\324\316\271\303\267\022X`\006\310\330;\330\314\n\364(U\343(!b\031\202\330\315\261\232\232\227\231\230X\2556\265e*\315\001h-+\214\240\210\215\240\300\272\031le9\234x\210\351b\344\21594\367\362-J\014mv4C\020\033\010\314\003MM\346\313\201p\331l\221\260\2448\256B\000\201\233\367\316\314A\210\351\024\010w\031\2106C)E\235p\223\254\223\254\235d:\315\366\026\311l\332\020\315\264Y\353\245\311\246\316\224hB\206\266\341\013z\026\360\r\300\007rw;\201\310\3618\234|'\210\003\247\231c\317\341\346y\005\357\343\210\020#\233\301\311%\310\005\260\271\034\216\007\035\3506\357\351\327\207V\241\262\2438-\351\033\367\206\361oF\3606I\033$p\004k\246""\340f\262L\206\2000\024h\226\2104F\2135\314\272\021\307\2406\005\313\251~\336\243.\203\207DSU\256\224\311+\264\302E\031\221=G:\216|\354.Hr\334\361\256X\255t\032h\006\200i\216\\\271lH\270\250\255gS\277\000k\332n\010lw\336\324$[\247\215\252j\006\3330\355X\322\366\251\253\317\005\274\236x\244w~Z(\346\213v\010\205\307\314\201\002\370R\000\367z\363P\375\220c\345\330\334~\263\376\370\307\315\204C\335\226F\332\335:\347\337\t\035\273\275\2411\311\211\235/\303\373O\320\230\351\035A\307\014/\034\023i\357\035FQTL\277\003A\373\365\035F3\361}\327Y\245^9\177G\207\252I~\204\372\243\2722\233\344\216}\276j\304v=\273a\031\322X\024\236Y\263\3330\230B\351q|M\251BF:\240v\304\357Ap\031\264\262\324\302\014\325|q\243\211\260]\3403xH/L\237e\246\014,^~\233<\3469\255B\367\273\224\304\275\025\365.l\005\031M\235\356je\231K\300\364_\307o\032\334\2228<\026j\003\262k\330\316\232F\177\217\014D`\215\231\252zG\314\257\372\\w\336\315\266 \032o\230\001L\362\257pU?=7O_M\004\032\216R\002\262\341sH\326[\013\006\331\355\262\003\237z|\340AqU\200\357\3772\212\352\373R\203\326\346\336\021\361p`\370mF\270\323\356\277\016\333j\365\027\373\370\226>\356{}\"\310\nm.\230a\245\307iV\261\301\342k\003\267\275\357\006\345\325\177\335\321\\\360\314\315\303'l4\033-w\275\257>5\356f7Y@H\332\222\t\033\274\301\234\304t/\323\324[\013\376\347\311\3129\021\376_\037?Pc0\373\277gg\211\365]\023=|\372\003\362\300\237\177@m\236\362\315j$\007D4\226w\334A\314\355\256\335\333\216\336,\364\240a\214\360\301\206\247\001\353)\317\230\260\265l\235\245\323G\001(\206W<\034@t\032E^\036\264\3472\353\207 \306\177\347w\341\213T\337\206\3543J\244\362m\310ASb\336\203\332I)I\t\272\360\233\016\327`]\205\305\336r\351\243\201\007\344\340\3553\337\333{\351\275\234\032\354u2UfJ[]U\026\360b\241j\t\351&\223\247\251\310\n\370\032\360\030\362B3A\232\026\210\r\222\330E+\251\257\n\027\302\032\036\025\302\267\246\022\340z\310\024\260\334T\312\325<\027%\212VrX\2105I\346&&b\nDCaJ\224+R\201KP\232\376\357\277\374>\203\361\037g3Ah%\331\330\317\316\rr\\\226\241\304""\\\016KU\236h3B\354\374\257M\337\233X\3750\370o\233\277\355\360F\215\202U\343\374\312\252\337+VIV\021Z\265\037\016\032\225\3250R\244S\000\246\245\002\206\360\347\332\327\337\343P8\244q\343\330\330\377x\220\340*A\302`\340\007\016\276\007\333b\2251R\244\024\205B\355\212sU\301\222\3754\343\031\024\312h\246\213\001Q\ne\216\337K\261\303\276\343\243\213R\026\275\215\034\316\037\245\367bW\337\325x\216F\206\373\246\0311bX\225\334Se\304\305\341^/+\327\257oT*o\327:\334\0331\365\204\312Kc\007\303\010>\323!\355Y\220\273\017\265d\315\2270\312U)(\245\227\024\275\341\266\275_C\335\363y\370\357YcP\342c\r\316\304\216\241?A\356|\314T{\274\261\212O\2469\232\340\027s|\205\356/\223a\367\313\367\311\307kW0\\\376\362\336\220\021L4h\024N\3655\221\024\320S)\255\035\021t\251R\313D\241<10=\204\024(PO%\3270\340\323\305\247\222<X#\305\312\023\272\253\305%\216i\302\227C\255\023\377\325\300\241\211\030\217h\272[\367-\201\271\343]\234\216\027\205}\373\364\202\224\213\216]\342\006S\3503h\366n\023\rY\267\326&|\r\004\355\310:1\030&w_3\370\220H,m$\307_\260\211'\343i\241\317\301\374\242\246\210\213C\220\344S\234\270\240\305\331\323\240\3453a\377\034G\317\177\201\317\2248om\305j0\032M\242\024\357\265'{\177\275\033\310\321z\325\206\261g\372\315E\232=[\365e\316\026\351)\257m\233^\346k\025OV\237\007\303\325\027\225\202I\304\242\225Z\247\215\334\2543\353&v\223\025&\201)<\231\270\321\213\2456\244\230b\215_\235w\017\216\314\360\214\313\2360\251\367\250\377k\245\255<\364\307\010\257N\235\010\324sT\346\030[\2377\277\007\244\010uno\247=\347X\246\025\331\371N\321^\\\264\210\256#\223\tE\254\364\345\241\034jB\027\001\017\245A\236Q\231\206A\014>g\022\t7Pg\013\202\n\214\023\211\361\200\353e\010p\255\340^\223\032\351\226\3224\254\355\232V\"\352\014\351S\330\251;.9\225\026U\236\265\256\020N\316\311\224a\231\335\232\206[\335\300P\303Z\275b\220b\320\006\250#6\252\022fA-\276\265o#~:8\314\250\262v\203\206\234\356\231\227\273\323;\374>0\372z\232`P\241\326\343\357\251\214 \231\314\376F\320\245\323;\264y\n\275\244\272\273""\237_N\272\307\017\031HqG\2628\352\r\254Ik\3358\201\3361\352\352jvl7\301M\037\201\031\037\0026\327\224\033\210\327\306\211\346y8U\252\016[\245\204\002kDZ\010\245+T+\023c\334\375\315\310\340\270!\262\022\205W\342\2009\271\017\247{\273\300\266\202D\363\255\325\360\310\2467\r\022\202\002\360\261bd\272.f\3000\230\021\0252\252*\030)\302\204\005!\233\257\334\364\356{C\333t\2511[?\203.\326r\260*I\n\250S\002\272,l\254\336M\225h%\013E\245p\225[\307\224\264\010\252\010*\202*\201T\n\241L^\212a\371\277}QUEZ\263\360\210\254\2277\354\341/xk\241\026~\313\002@h E\200,$X\002=\271z\005\320\035\tt\013\240\350B\301l\006\2505\004j$j\265]\177\001\206{\226}\331\207\257Ah\010\321\006\232%\373\347\273\367\371\007#cS\257]\r\001\032\032\006\201\325\017k\013\005\000\240\026\366}4\002\365\022\212TDQR\226\264\250P\262\253FN'\0018\252-Z\330\246\316\235\230\355\317\341?\006\330\301\034K\276\347\021\037\021)U\002\252\204\252\201`\254\0079\366j\032\263\313&9\310\342\227\313J\222\"T\225\"\221\250\\\313\263\251y*j\207/O\362qp2\023\231\264M\032H\367kju\037\350\006\367\325\312\177\000{j\214\347fp9\203\220<K\265\257\203,\023\253V\301\\>E?rW0-\0136\366\020=A\013E\n\200\373\200\314i\342\261\222|\204U4m\351\235\020+-jSpu\037\365\375t~\177\t\374e\364\312\326\276\361\337s\335\341\033\206\233\246{\352<\221\360:3u}ro-\r\227\016G\333\371\365\370{{_\263\277\321\370\034\373\324&H\254\016Z\034\336)j\225\362`%D\222%\001T+\000]///N\345\270\005+\233\201a,\034HNd\223\211\265b\202T\225\020\004@r\035\177I0\021\222\230\273]\013\211\022\n\326\010\205t\312.\345\3313\2677\021\"\212\034[9\273\207\026\031\202\013\006Eb\014\023\231e\210+\004ATEAm+\306\327d\322\020X\260\n\222l$+\316\372\202V\025\n\225w\267\003\000|:\001@\241\226\t!\320U\2336.\231\210hXv\211\244\002\0219D\3479\221\213\005b\327\340a\274y\304 \210\274\ra\223\225\256\343\217;q6\204\216\211\327\240\\\203\242\364\361\370^\031\362:\214\332#\250\271\306\231\343\243\303\200\266\n\362\272+\353\n\303S\016\020\241c?\036\331\016\311a\275\377\263\031`\366`>\014\235=\264\250u""\250Q2\024\376|ttfp\250*\363r\270yG\360\246}\362\006Q\365tP\335\325\005\233f9A\364\035p\345\375.\316\037\262\376\2402\002A\221\013\"2\013 d\336:\177\325-n\305^\276\245N\221\327\036\306\261\371\302\370.\337\364\225~4\366\325v\375>oy\320q\017*\334\363\370\373p\335R\263\223\306\3374\377\006\027\266\354d\253{\025\242\304M\330V\272\007\3764X\276\256\034\221HhU\352\265\262~\237\323\177]%\tTJ:\222I*\252Uhv\310 \016\330\000v\301\355\203\333\035\262\017l\037+\364\362\307\3247?\266\346\223\377\022\271\010\262dmC?U\255\350\027\372\\\002~\013nN\377N/\230\342\301\007L\304\266\340?(9\261\000\261\001\211+\206,=\316\002<\010\241\271J^\273e\366\324\376\315\272\364c\027_\220\204\317\312\233q]\273\237\035\335wf{\240<x\3153\247Y\246n=\232'dxL\203\310BH\242\"\216|\217\231\026\024[\0220\245\205\030V\340\203\022\265\211\274X\361\255r\375K\246\025\205\265~J\322\320\264\237vu\200, J\301b\302,\026\017`\034\014~\231e-\321\247\243I\024\221I*K\221u,\357\233\306]/\304\365\360\332)\315m\032y\234?#r4\233\021\346\300\351\216\0343M\217*%\206[P\374\365!\375L\367c\177\271\361\354\354NV\2527f\260\033\363/2<\310\363z\314\210\356\234'\352\rN}S\001=OJxOS\314\312~U=8v\246\200e\310X\3416m\235\252b\246\024\351\350\224Q\375\033\243\3058\275\305\3233\362D\354\016\324vI1\304\361\240\316\315\222v\203A\274\313\262\344\226\265\207\256\301\206Z\242\376p\204\210|\371\232\303\362T\207\360\250Zn\311,7\"W\240\247\004\362y\332be\353\327uv6\0005\326\266=o\t\375\305\376\006AuiJ/g\000\0276&\323i$U\303_3\231_G\354\360\372\014\027\205\224\235\233\247\305\232\021Nyr{\2117\230jN-\354\356\353\356c2\352\233\343\017\035\327;\224ul\272\225\207\026\340\326\034\362\277[\372\222\276lRA\360\220\232\243m--o\214:\376\277\007\\\224\233R\256\032\003\312mK\311\204\204D*b$\317U\031\253\031\363\237\313\327\031\031\032\324\332Zv7CkE\302\265W`\021\275\312\376;\032O:\214\263\352A\327\"\211LL\213mzI\227`?\301M?\252~4|\0325\000/\226\255\\~\343:\355b|\027l\333\323{\336\362Y\322\366\233D\370\245t\222.!\026B*\202\350\035\021\300\3434\022'B\370#\211""\026`\310\333\331\253\241b2\004\201\354\341\206\350d\003D\213\020YUd$\002\\T\021\032\323\027v!\201\344q;Sl\n\32251ET\341\245\243\255\013!Fq\340#\204\031\354C\201\035\037\371\303\246\342\036M\024\225\300\317*\302\367\334\272\343\024\262\030\030\360\\\334xM\320tr9E\010<\235&(\264\"f\302\321d\243\277}\005\304\255![\270_/\336I^\270\224\377Wgs`k\365\357\200yn\270\273d\233\306\326\367-t\260\223\334\347_\036\3541\017\2114\007\277\325\035\364\224\356\322\024\257\233\364\374\236\304J\336\353d{P%H\276Z<Q\272\324.Vs\277\032\274\2462<MVlL\314\023`\373\006\252\325\004j\201\252\215Sk[T\340\233\307\311\273\232\002\355\337Y\020eex\270\326,\t\3544.\336\212\225\226NZ\305\221\026DY\020\373 Y\024\250VvfH\255iM'\262\225\354\341llrfa\230\335\361\034Ei@\210\332\037\217m\373\017\013\255q\331\263^\233\034R(\236fg\033of\221\007\341@\361\227\005\210E\321\030C\t\204\302aX:Xs\"z($\254[H\250\332^\006uEQ\025\020dAT\252U\253\277V\236*\267\306\311\023\355\256\nh-\365Y\3304\253\244*\342\n\350\256W\255Z\237\324[\235O\226\371\016{\300\377\327\217\213\373\334PqK\212\356\341\303\343\270p\3267\223\236\241\354\031\246\213B\275r\236\355w\023\022\352a\355\226\224\362z\236!OF\225\r(\353\024\t\325\030\332:\272!y\337\346m!R\351\331\241\030N\234\004\205=8\277}\331\271*B\301\366q4\364\037\322\325\000\363\351\362:-zN\373f\213\355\234\025\245\236^\233\031RvW\352$og\314\367\277\200{\214c\227\275\337\351E \330\366_$\n\332U\032Q\r\361\214Ky7\310|\277\222y\2706]\353w)H\024\rH\333\2004\0073\202\2054\224\370bA\345\"\032\034\322\340I*\010k\231\3256\333{\020H\227(\034L&\332lP\335\n\246\355-\311\212\314[m\\\t\206+\202\333Kh\"\262]\017\230\177\303U\032\025\2374>\325M\244\223%\217\247s\235\036\r\201\201\303\002(1:\267\0061\013J\004\025\230\243\013%\211e\235s\374_\222\271c\373\332n\375\272\013\331\3001?\326\237]\332\255\037G[\361\241\341<\004\003#\365\031\261\320\301\347\017\001|\234%\247N\221\215V,\227.9\342\271tE\3521\226\020\201\314$;\361\215\365\246\016\010{\241\306\244]\330\002\250\327\303q\316Ek\231\200^\013E\034m6\341F""\361\001p\013bZ\3703l\231\021u\2300\331\313$\217\257\266\204\326\024f\240\315-\367\234\334\332\r\206\343\247p\263+\302\271H2\264\210\245\353\264\305\032\006\240B\317W\247\004\251\270\302a D\325\204\235\313.\001\240\343[\353\263\273\351\257\001n\032cI\262\220@\013\240\330\326\202>%P\025N\353q\r\251W\233Z&'5\"\033\236\037q\244\303\337\254T>\250\212rI\200\265N\352\224\325\3061P\212\343la*\366\220\034\323\223\236z\006\030+\225\362!\3023)\324?\307\003\227M\265K2\032S\214\364H\310g\tX4\3304\t\333\210\254 \230\"\001#\354\260\244\324\346c\2241\336\334\247k\220\206\212[\014m\273\253[7r\327-\\qb\264j\370\273\035\325-\306\200;\2103\212\254\255U\nN\302\036\"\024\301#t9\205\304P-\340\307Z\030\261\207\014\256!\033\231Y\207\033\362\273tF#\264p\244phX2\322\307\003]\364Pj\324\351Kj\3531+\350\245\332\371P\325\350Y\022A\222H8\310\017l\210A\234h\316\356g\212Eg\335\214\325\242g\252\262\375\214\322\377\365\346\037?\317\347/\355\010\"=\236\317\233g\273\266\335\216\027\361\233\334\346P\307\\g\242\323\232V\300q\261q\021\216\007;\342\302\237j\246\236\224\3637\272!\212i\260v\272\352>\014\365\232=\033\023r\222B\004c\017&\265\206\nH?PG\271\233\217\271\207F/\017\243\342\215c\345T\204\250\000\323;\242\001\252y\235W\311\333\312\205\214[cu\320\017\241\274\277\201n>\276\024p\356\341\343\342\006\307\270=\334N\267\227\370c\325\227+\340\257\327\031\032I\260\005\343\233%1\244\t\245\267G;\277q\304\262\315'\322`\240\224g\272z\214(\277\357\034\351\014m\261\016\200\024x\304\252\210\262b)\332\2055\222Q\nU,p\343\230!\316\306vR{\3637\264\201\240\327HMnv\375\022\304DW\260\316\006\234\347\r\226Y\347\r\267T\021\r\217\354\003\211\214\322\302_\247Q\014\000m:\205R\321}\210\375m6\232`\273W-8.7n\207I\272\006\315e{\355\301N\230U%\224\225\312\321XF).\245\344\316\375\301S\022 \335\303MA\2465\357Y\026F\221\313\314o\230\340\001\215(\276\235{\237\336x]_\260\351Y\276_+\227\035#\272!z1t|\263\361\271\333\222\307r7C\256\244\215\375\264w\321Pr\231\301\267Bx\321\271\362\035A\005\250*\006\375Z\254\341\032\241K\266S\252\244\210""\302z\016.4\343\272\246\024\373D \366#Y\265\232\250$Uo\245\035\270\357`\270R!\345Psa\263\326\013{C\177\001\346\013\343\370Y\237N3|C\247<N\350\344sThR\025\031ED\025E\n\025\273\336\030\274x*_\364\203\327\364g\\,&\305a\216\023\210\202\020\314\370\366\245\263\030\027\302bL\372\311\301\022\227\235 C&I\225\010j\241\357\261Y\"E\"\037z2\354@\251\261;\207\2706\377p\177k\271\021\365/\025P\246\375\006%&\274\324\344\334\261\227<\342Y \206I h\000\256 \250\213\240\305\006\010\213\305H\301\237\264}\223\211k\230<\261\306\245\307\001\362\336\345#\242\362\300\220T\330\221\013\013\006\365\275\351\032\243H\330\210T\230Te\306R\266XTXe\246\024\346\342\021\231\305M\356\200\300G5\235\010\344\210\204\332\236\334\372\334\035\214\025\315]\231\246\264\310\260G\254Ye\225\264\003Qu\257\202C\014\220l\344\235\321\357\")Q\025\334\3264\277\327\221\"\264H!T\n\010\006\212\262A\000E\214\026#\026\0102\323\220\016\214P\301\322=\016\313\211\363~/\020\375\265TTb\310tf\215\223\307;\360-\n\355\333\201v\375\363\213AP\251\226\326\325\356\244W\257\266\273\236\220\030\243tP\262=\356Nd\303m45\3405F\332\2250K\357\370\253G4'\360R\370wD\211\207\004\014@\214\020\030\217r\363\272\r\236\354/\007\204\355s\"\006\005\227A\276\333t\032xD\246\007\240\233\000\210\"\225\307J\330\345\033\215\264\257NA\031\336b\373-h\333n\"&/\002\233\320\316\2078\235\337\215{\254\023Hu\317\021J\246$\014LP\003\006\\z(\353\245@G5\371\327\027\370\260\334\374\240\313'V\226/\216\207\001\205\222\\\225%\312T\254\254\275<F\003\233\321\304\004H\2630\032\231\375\267z\006\323\355\361\224\245\002\277\274B\3040-A\263\201@\362\354vY\343U\013\222e\242d\351\235h;0\031\325-\3077;\370O\017/\036/<c\252\201\336\362i)\001H#\025chPLn\2200\202\300R,c\021\240c\003\251z\274\231\204\004,\240e@eFTe\312\262\232\333f^\r\r?\242\231Y\225W9\201\225\326\360\030\203e\325(\225\323\213\004\262x\202\022\370?2\261b*\313bw\230\222K\302\245\253\003\2373\272\240\312F\030\220d\222\037R\362\266K\342@\304^ \304\261\364\031\"q\300=\326\364\360\316\260\024e\337\000n\220\030\325\006\210!x""\326\205\340\\\030y\022\234\356\246(P\300\301\340\333\3701\342\210Zn\354\224\356D\261\211N\277g=\347\0149\325;]q\343Ob\353\263sj\370\366U6\0368\323\010\307s\207\232a\006g\275\273Kqi\"\322\322)\213\370\253\031\246!i\201\246\032bZ`i\243M%\267 D\262\027\013\027\357\333\251f\032\256\212\311u\3648\023\347\215\265x\326\366\370\331\025\240n\207\276w\207b\305,\234\276X\037\262/\331\224\215[\014\327p2\250\367-\003@\022cz\212\204i\000u\321\344%Z\004\261>\007\0356<\235\357MN\016\022e\300ulc\035L\250\345\243P6\305\305\263\rp\324\370-\021\022L\035~\013\210\274\t\024\206\314\330\001*P\205\306\004\345[XA\3048\203\225d\026 \225<\201\365l\214\005\002\031\370\231 \010\321\303\374ZY\262\224\"77\243\036t\261m\035\254\006\210\000\221% (C'\014\334\230h+\211\353\211\316\24171|*\250\361\016\2564\250\252\252\210\250\253\342njL\323\223\247<ub\0353\320\031\200\354;\344\351&\013\256z\272e\346\231\326fS<\210\204\364\000`\304\304\232\031D*\304!\210\316\353\356K\312\262\351\002:\275\201\022Xw\036\326\252\3534\023\255\026\221S \217t\246\233ba\275\342\250\025U\245]4\265\357H\301a\nI\202\255o-I\325\240\274B\006i\245\256\260\272H\273\243\252#\002\220\2407\372\341\017\334\305\236\035\365\271\360\204e\330\003)\323\232\000\347\205\234Hn\007@\344-&\002'\025h\000`n\304\240|o\314\343\324\357!^ \211\342\255\254V\237\260\036\312t\272F\315m\\\257e\370\006\271\226\306\341L\363\357#t\344'\327\017>\317\003,},n\356\261\307N\216\274\232+\260\226\272V\205'\241\000\210\004]\205#\031\026\215H6\311\236\2369\350\305\271\213\024\016\324\247\352\275\320\374\364\354\300\214O?\016rp}\300Z5\273v\274\266\330\333,\333\023\274t\005\016\200\034\t\004\23430\326\\D\347SzZ\366\025\273H\310\265`V]\255)g\344\352^wI-\031\226F\325\310\315GH#z\270BV\336)\337\370\312\205\301V{t\004#G\271\025\023\356A \363r\314\344\201lJ\200q\001X\202\204\244\370<\017\035;(W~\235\316]\017ZK\220\273\211\263\311\255\263O\252\315\3246\233]\030\212\rp\306\373\360\235\336@8\220\036$\031k\270\360\324}\302P\366\215\361\022\224\020:\214!\266&\214<\375=|\240s""\034iK\031<+#&y\312RNI\n8n\252r\025`\021\336\366~\214\253\307\365j/O\247\344\332\262\333\331\327v\3578\256\373\221\256\356\300;R\260\ra\255\002\355\264\304 l\026`\367\242\350\033H*4`\317= \240\325$\221\306\220\317\237\276\232\342q\213\032T\223\261\206\344\371\203\316\010\312QjF\243\211\303\241c\t\260 \335H\335\r\244n\356n\024r)Ktr\207\325p\204+\326L\316\375\361\230y^\227\303\260f\027\347\332\032\361\273\002\342\362y]wE\307\212\362\000\230Cf\024\331\264\331_ \207!\261\363Y\252\322\340\327\327CE\334\004\353^\020=\024\223\235\276\316\220\000\025\227\277h\360\2540\363\373\260E\017F\334F\345\300\371\206\206\301o\274\266\326\016\026x\3051\275\253\311\0101\361\003\305\036'\212^(\372\320yy/>+\365\361K\223\336\374\031\350a@\337I\232^QI\371+\315\303P\375]8\271\251\021ZAo\024d\221\361\353kf\335\3064!x_W\333\3312\200*i%\265x\320\247\302\313\274\267\325p7<4^\225(\323&\214A\021\252,\204\316v\223w\226m<\034\034lM\330QPxl&\344;\360\357\021\336\273\321\337\337\227\017\331\347\346Kl:\232 \351\2106&d\222fI&eI*d\230?8\212\001\367\032]=q~\243,q\007p\247\321N\253\363\360\201eZ\300A7\372\224\237)\013zxY;\344\334\275]VL\010\001\320\020x\372\032o\252>;V\213H\264\026\225\2553\233\242\245\225AV\313\357\030\252\326\207aD\364\332\356\271\216Qz\357\350\236\357q\232\205\335\300\255$@6\016\010D6\362\211\340\207\005#/\325\351\2008\r\216\320\033\364\362\263\311\363$DXqPIP*\270K\340\225\261H#\\8\255\330f\317\334XX\344\016\204\303\037\276\006G\343m\215\365\235\2318:\212\252\212<\260\266\215\240-\274\341\374\276\365;\24031\030s\365\006]\307\251\265oY\357\364\037\025\266]G{\366c\256\310\267sl\205\253/gN\220\342\rK\0252\367Tk\263\274\210\324\303\246\350\277\205\0142\024-\337\024\206:\254C\001\244CF\224\036\017\352\335\264\337\271\221\031\251\330H\262-+\321%\006r\372\367#\253\320\230pb\\\016\211\367\266\326T\364\362\026A\246\373q\241\n\321\253%\256L\313\013\327\256\274\214\250\262\360\336^\366\300\344\326Hcl\030\0310l\020\330\013Y\024\220\025X\305+Z\365\260\326\211\350x\0166\356x\242;\323=>zX\353\357:90""\016\034qy=\037\245\361|\2377\320\367\270n\361\263!\203ut\222\035)$\265B\014lohf\220t.\223\237\014W\231\207\373\366*\300\337\305o\350\255Q/Km\235c\243\221f\251Z\315noK\214p\332\267cEx0w\364n\242\250\254Q\203\330oQ\016\341\230H\314@\307>\262p\200V\031I4\2760W\333[h\333Fp\357W\247\2531\027u\373\261\306\221b\206a\360EtIJ\221I\033\272;\273\244GU~Y\253_\363\340\304l\216[-\036PrCT\215\332\225b\002\273\201\327\3639G)jYIBYM#zM-*jz0\216p9\2075PO1\305[F\266\226\333Z\222\244<\251-\254\205H\030\306\232`\225&Q\312\245\304\210Q\0042RL\322\342%\210\014\300\266E\246\356\232o\020\270\345\230\224\346\210s\2455\223 \243t6tD\371\212\363\267\307\302hnP\245\007\250\342\304 \243\364\2668\034D7A\032([\241\222\010`\341=\320\036\2565u\344m\001\204RB\352\340\271\200\303!\233\360G\304\220\267\031\001p\021VJX!\214\032\3161\303\330M(+\r\273%\0100\376w\276\270q\342\232\365wc\273hFzf\021\215\004\2301\006\022Bj\264\266u\016\343\243C#*\337\337\217\216\241\364\001\2604\323\360A\275s\255\333}8|\276=d\033\003\224A5BJ\003\240\226\274\303\222R\001 \263FrB(P*\206\272\032.\350.\033\241+\203\264#\020;\206\303\257.\335\245+\"\\\310\3303\365\2655(\251\210\236\333\246\014M~\214F\240\244\226R\t\224\320hE\"\0219\237\341\030\3230\301y\242j\275\356\350\313\034/\335cc\315H\301\243\262A\314z\274\300\221\212\204\014U \231\231+\270t,\026\265\2646Z65I\006,!\003\006\3265`?C\325\340z\026\365By\030\260S\230\255}\354\000L\272L\320B\r\0240\365\036\235u\266\232IFD@v3\242\200Wad\030+%\310\0262,\364q\252b\021\002\032\352\367\305\232\313\026\320\200c\214\254K\220w-\233dp\312\374\215n-x\252\324\204nxV\01003\023\330\311\273\271?.L\225B\265'K\327\023\241\276`\245f!~\202vte\330V-4m\257(\2514\342DE)@\221\255\267V\307\005\226\225\205L\030\247\345P\372\016\223\303M\006*\312/\014\270\246 \223\030\264H\254f\030\023\010\r\306\030*Ch>\244\203\235P \n\364\341rE\254N\0261\332@\202\360\310a\024\347\266\207\232\264\335\347\363\311\253\270\2221\273Cb:H\034\020\330\337\0042\246\343\014\275\336\317\207\254\206\307Hop\364\007\030\231E\021\202z""\345\221\003\302\022\2208nG#\225f\253TNI\223(\361.$!\301RN\353\317j\023\216\3174\212\010(\203M\376\020\210\221\022d\000\\*\250\253\333\361v:\214)l\321$a\200\3045\200\333\257$\261;\255F%\354\241*\273\026?\017\001\022\r\266\334\3033\237\214=ar_h\036\235\n\t~6<\216M,<\\\215\026\233\200Zo\000\202\026w\263\214\221\353\206\213\004\023\302.d\312\252e\266\250\3532g9\315\227\274\000\250(\301\025\030\221<O\033\271\301\r\264\014\001\265\316\213\253\200\2405ed\206<03\305[rQD\004\306\323S\304\367|y}\237wSd\217-\320\007k95\2455\010pH\337\310\303\312SI\017\305t\207\223f\336\354\272\214\361\005\216[\266M\231\215\302\200m\323\360K`P\013\350\222<Y\241\227\345b7\374\273\303\322i\221\207\000\371\320h\310\033\200!\376\200\361\252\345a\034\213\201z\031\020\244lu\037\335k\245\025Fb\352\302\026\212Qw\334\341\226$E\005$X\3006\235p\360\373\305\354\243\022\263\243\320f\322\002CE\240\260\007\325\2441\002b\324\016\320\202\014\214\2267cl\314[c\273\321\215y\2075j\031##\362\016\373t'b\354J\372\204A\t\202\211\204\224\223?\306\356\340\227\353\021C\207W=\346\240P:\2535\232Z\232#\331\301K\371\3060\210\205\346d\260\227\360\345\201\025;\034\271\350\220\364a\363\260\370u\341\236\330nz;|\226\233\026ppH\360\257\336s\350\002\307p\311\014\331L\ta\312\307W\277\360\243\335 \242\223\303Gq\343\017\302\301\334\ri\322(v\224,3\037\264\356\346\2763\243=\315y\2745_\310@\r.\245l\354\2649\356\021\232\014\236w;&X\177\021\224?F\357\310\"}iA\002\356I\203\027r\007=\210\201\2207X\317\332q\335C\373\313v1u\264\301\262o\017\035\221\025\306P\216\223\311\245\037\335\272:\017\226\2013q]\366[\261Pllc`\306zn\244\237Hf2\t\351\240>\250\306\321Ud7|\224\352\264\356\325|\226\005\2067\233\354,\271$\032\031\226\0050DJ'\302\2200\255\206\323|\341\024Kj\200s\211\327\342\361\265\022\307q\2506\337\3268C\003:\346\006\243`\310\364\312\0108\216^\256j\0043\350\316^pD:G\305m\3564\2526\321\364jMS\343\271\240\371i\266\210\030\306\314+\322\321\200\300I\214\224\300u\333\245\322\306QeIj\211\237\236y\345Orb\237Wv\310\253\231\244\222I\024\261\037\n\200w""\247\177\325\367}c\364\374\271P|t\333\"\321\024\224}\260\206\220T\315FE\240\005\267\2169M\240P$\005\244\000\252\021\010B\262\005d\256\205k\227T\020$\010H\206v\307\231\300\272u\225\246\000\201q\262bA\"m\250\317\033\n\202\214b\"\275\243\271\225\034\244\266\353@\033F\013Q\244\241\234-\270\016h\345\220qf\364)R\227F\200B\2128\203$63\2678\326\264o\234\303}#w\310\216^\277\235\333\355\276 ,KaV'\310\266x\354\2400J\312\276\n\260\370\377\017&\005Xa\250aD<\22448VK\232\216\231L\264\251L\334qm\370\270\014>^2\027n\203<\277jV\r\206~\275\273\376\255B\305\335\214\341\023\365\206\264\275\021\341F\233\306\364\nq\375\237\004\211q\251\243\0160R\020G&\342\033\036\306\375>\022E\010m,\376\"\021\266\331\373\340}f\302\016F\366#\004#G\207M\262\337\257VZ\333Z\373\005\275v\202k}i\0028J\262\000I\265\027\372\025\347\275E\035\000\226\376\310\t\2206\350\300R4W/\250\314\2420\315b;\013R\001`\312~8\354\264\223\230\212\3221\225\3360U\022\004\362\033\244\t\276\327\017\031&C\243\353\372\211\312\024\004{\341\274x\251\350\322\353\247bi\324\356 \237\20112\004E\302\273\\h\233I\242\275\032\307z\251}\267Y\353\325&\220%\327\025\017\234\0324\032m\002s\000\342\322}\014\243m\214\270\306\324}3\"\343E\000\3264\231\010\205\025\231\267\016\360\030{\014\221\034L2a\223-\324\215q-p6E\262\215\303l\3355)|\275\232\3703y\333\337\025\375|\247\340\300\354\263\243\250\340\353n\231Q#(*\325\"\261\371\260\254Q\255:<, \357&\t\274^\031LeJ\261\245\007\203\003\301(\023ii\231I\366\017\334T\205Z\324\231\300d\024\241\0018A\246\205\262\272\014\255'\262\362a\211j\342U\303S\\0\306\202\265e\211M\305^`\n\200B\335\354\235\007p4\006DCl\234V\263\025\270\356\3509\344\330\301\021\":\235E\3013I\003p\305\025\273\211\206i\350\247\220\367\345\260\006\307\222I\0310\334-\237\274\032p\337\201\267\221\367\314\241\203P2\021\306\271\350\362\215\270\332\324\236\006?\222\030\2563\0343\222)Y\n\202\326B\032\305\326[\r\341\005\t&-7\304\214\326`\2739=1>\273\005\256k\227\301\307\374\036\020\303v:\374,\354\246\343\273\210t\352\272\310\266\275\206sf7s\215\315\016U""\263B\371\237+b\270\364n\245q\016\221\354QI\004\202F\322\223\201\256`\222B\264\374\2578\256\333\206\254.\273\020\335i\276.\0267.\241\251\231\222\024\366\367\234\020\366\036\331r\330\327\221\263\324\363E\2745\336q\344\370\346;8\361\341\"\036Z\335\232\375/\360r\033\ntHs\\\360\200I\200\010\216:DAX\337J\024\003\347#\245\317<-L\373\3028\335\226A\317>\014m\t\272\332\246\227\222\267\013\242\241~yA\337\245\234\270\331\202\305\233)v.\257\252\317\035\272\350w\036\013uK\212l*\265\016\374\240\340\353\244(c\006\372\177\005)\021\301\315}q\014{\365\237O-\322\204\225&C\242\245B\304Vs\231\320\2038\226q\031\305\234\016\035\270\3642\347\306\361\263m\017P\341\360\026\232\244\320\312A\330\302\013\220V\001\304\203*\357Gi\367\306Y\031\247\372\371\344\241\357\371-\361R\246\205m\305A\013\210\342\304\203\206\010\360\303 \246\231\275I\246L\262\027;nj\346\345\313\206\274\355M\007\363\247\023[\233\325\201\345#\210|-\355msK\214pa\261\212\224\341\210\244\224J5\031\250\206a\001*\260\252\024G\301\201\010E\344\016\037\273\343I\257!\204\005\035\000\301Y\264\313\026I\230:wer@\367\220|\325\256O\273\3376\2700\210\311\013E\3528\037\204\214\256X\2201\221\255t\305\357{L\r\251y;\212\332X\241Q\020\304\031\010\360\\\356\361k\014\0228F\262\001\252\305\207\027{\307\346J\305\204I{A\001-&gT\032V1\214w]\261X\303\221\342\334\214;y\220)\033V\t~\272H\237\000\000\n\235k\250\034.\\H\023\263\307gl\033\365\232\343\020\355\363E\240\025\202\305XE,\200X\010a\r]\0235\306\264\004P`\313Z}\230pxoC\030\006\210\365\343\206\376L\035\211\006\263\341\211\027\001\220d:8\311i]xZD\0316\250K]\257\344\301\326$\263\254\272\337\225\030K\337#.\210\325\204{H\202\001\341+\254\361\270\260d4 \267\304\260\335\350\352\250\006\270\323\254\233\363f\014x\\\302\014\020c \366\332!\203\336\310\3100\246\3540\373\276\320=I\010^\324\007\264\027\264\rs\\5\321\276\244#\207p'\320\331\331\227xAtMi]\202B\034\223\222d,\014\2368\023\212[\n\206\305\225\370\007\240\236\214\035OT\207\311\207\007S\003\006\033\320\356\2126[m\r\023$k\251*6i\337G\200F\014M\312&D;\3450~""\2000w\372\272\332\3354\222\360$\223\t\230T\302\344YkN\033e\341O\255\213\344a\265\n\342v\034\204|\335\025\317\263\003\303[y\306\227\307\246!\032\010\310y\357\007\222\030\356\254\007\324aE\025\\yJ\2621\022w{c\225\024i\314\300P\332\3322\240F\322\022Y\266M\202\032\375\025M\373E\252\202d\205^\"c\304\3113\006\266w\216\347\232\023\200M\010,\362\006E\na\214*\231\342\2232e\223V\270!\312\274\330\006\2653\336\036\207~x\333\224W\003\014\033\347\314\342\001\315\013\230|\310\352K\345>n\300\366\35690i\034\241@\206\002C@s\017{\227\013U%\356\205\007Z\300\364\266\350\225\252*u\316\202\210\211(\332\275z\350\n\351\001\\+\252\351\025\325u^\355\033\233\2726\212`\311\274\364\307\261\347?\003hj\255\212\036^(H,\005\010\244DQ\200\212\305\203\206\317\031\n\321\001\2237\036l\376LCa\0231\245B\020\2306\333\004y\023\024\302\004y\351\332v\243\264A\333\332v\235\275\266x\272\373J\253,\272\236\021\240\367\020\323q\006\035\246\341\314\373\262F\207\263z=3c\212d\321\303\023\343\260\321\202\306\2122\371w\246\265\254\2754\005\301-`\300\336\032\204\231d&\242T\3521I\221\326\254\361\225\321\317\217\266\375G0\334\026VY\177\210>\001\024\200H#\"(X\0310\310/\027\321\242\341-i\261\302c\242\207\202\222\335\004\2412\212\243\024\004w\257\336\002\361z\350]\223P\315\245n\343\264\322l{Y K\013-\241O \025\020\212\212\242\310\252\225b\241\325\321\353z\334O\214S\211\304\343X\356~\2156\025\033\003Q\345\341\367\216\210L\317M\007\337\202\035\003\r\310}\030\020``\r\355\365\374\357\305\372\177\267\324 \372^\3367\354y\274jq\026R\n\336K\311UC--\201\032V\276T\261[\335*\257\343\313\265\254\3106=\033\252\314\344\356\351\210\026\202\254\247\212^5\361\026|\247\317|iV\355\"\356@\217\017:\354\321\254\261\207X*4\032\316(\352\237\231\362>F\271k\204\275)\007\025c\222\237UW7\311\275\327j\367\036\270\013\036UU\344:\2759^\236\367T\355\303\213u$\333+-\010)R\002\302\270\357%F(:\250\306\205GY\344V|\332\337\ti;\234ZW\007\025.J\254\233\325\366\267\335\255 \266\336hq\033B\270\rn\345M\001\377\277y\020R! \004TPa\266)\357\020T\030\301'\312\220O\266""\204<zui\232\250\310T\242\036/=\"PRA\021\354M\010#T\000\353\346\207Z?\221\001\201\302\241\311\201\303\203i\030\002H$$F\330\225Dk\256\200H\004\201\\\031\375A\353\t\324\344\003P\235z\311|\204\204\372\203\014\257\225\357}\350zNd\366\232\305\325\366\034\nC\003 X\003i)\371.\234\346\002\3760!\367_]\001\022{C\217\210\331l S\3572|m\254\223`CB\005\210\007\334\365\241\251\247$*H\010\200\0020\017q$\224D\344\266\264\001\031%d\225\221 \302\241Q\030\037c\314\373\377\213yC\030\014\006>\3140\310C?#W\376Rz\030\211\250\030S\025\363\023`\342\216\212\002\010\212\231`k\024\033r\303\210&\\\234\244\363Oo\217c\364\326\332\207\327\325\326\243\017\343\242P\265\363\2062;\371\337\343\304s\r\220\256\303i\276t\032\203\004\270\t\202\346\356GcbW\355\371\337*C\324r\343\365\231\370q\254\037s:\003&\351\266\306G8/\332\262\212\301`\254N%]5\202\2064bQ\016\023!\252\204\240E\243\347\374\261\363\313F\203\375\247\3709tOCG\343\337\3750L\240\001\215\343\003q\272K\224\020\023\361\023\200@\025\n\210\240\301\240F@e$\301I\361s*\232\264\024\t\312]\251\n\233\320\246\245\251\265\007l\031\0030\n\376\371LG\006R\223\005\261\031\t\320B\270\2377\354\372>\221\351\262})\007T4zt\233\016\336\376\363\006n@w6\303\224N\211\202\313\365\243%(\t\2443Tj\216\t\021\332\003\025\001l\002N\353\002\243@p\253\030v\326\307\031\r\241`\320GA\032$\003M\355\301\nV\226\266(5\232\301\203\323\371\336\237\317\3742\247\367\347\324C\241\235\242\0260\367$\013B0\207\300\376\230\002\346r\272`E\355pE\252'1 \312N\036\252\343'3BqJg2\352\331\231-8\334\310\303{\313\r\367OE\230\023\024\345\n\206\356b>\234\372?G\324b\236\2414G\335\367s\276\207[\030\326\223\322\226\213C\234RY\251\371*\251\353\332f\003\020\247\250\366\217\232\3043\223\003\005\262\006\240\344\004\006\202\033V\215\035%4\365@]\214|\302\252y\177C\324O\327\375\334\230\010\317\336\327\253\264\326s\243\350H\027\243!pSX\336\201\302\314\374*\302\t\034\234TA&\307\234\206\336\213\220}z4\271d\3251\253<:\326C#0\033\333\233\302q\377Y\306\244\204P\344.c\316\244\003S\2376\021\377\020q\336\207\231\366\327\231""\3469\347F\307{\201^x\244<\366h\010\377\035\354\023-\237\"=1\241\366lX\210s\013\204\300\257\232\270n\343\016\026\305\242@V\262 \260FK(\215\004\355\300\204\014\233;\255~\\\301\023U\347\036\252'\257\353\373O\256'\322\267S\327\306=\315]{\004q\252T\355^i\301Y\230\236M\355\2403H\001>\256\360J#Lh#\240\213\341\202k\010\255\003\252\261I\005\201\246\374\377\260|\003\372\307\240\010\354\364.\230M\032\364\037\241\261\321b\244\013r\343T\325\375\312\330@\024\220\270\0307\204K\231 \223\010y\275\232\370/\001\344\305\241\241\036B\350\367y\3339Ss\247\255\364\237\247\354\375;$\224B\017\335\366_g\354Q\000\231\2307\330q\024\240\371\247o\357\301\247\314+\224 \221\027j\240_\000\261\037\332\255Z\265\316\206\364\351^v\204\253\262@\307\033\240\227\010`\210\025ex@L\370_\207\273\323\337\364\372\037y~D\017\341)\000\200A\320\351\200m\025\325M\347\016\361\344c|\316\222I\246\020\350\250\2047dm\201:\261q\t\313\277\265\277*\034\312\254d\026\231\0201'=\345\236~9\013\241\240\353\212\321\316\0130\331R\007\334=\317\037O@\3573\325}gB\"=P\036VX}\233;\354\233\374\323\213\264g\326I\302\366\nt\352)(.j\311\261\302\362\2458z\264\215\316sH\224\312\031\220\010\263\233\004\341\335\310\243>L5\032g\023q\010eP\211\222C\211\253\306\343\352\326W\r^\275_\364\325\344\t\374\305c\006\241e\245\206@\256\231,+f\201\377\022\224\250_\345\307\334#1!\245\003d\204\010\205j)'\003(\325\001\311\255OTr\001\241\201\375\017\352\375O.\363\231hz\203\245z\236\017\r\031\342\203\324F\360\372\260\212\360\376l\337\033\361\352\205bC\206\000x\312D\203\305lBF\264C\337\375(\027\034\347Sx\360\213\273>\326K9B\213\322\363\236\366)\265;\337XOo\353\237\315\366\r\243\007\255<^\347\343\304w_\361\017\257\315\267\220\373\n\004yQ 0\004\333\346\030\371(\205~Z\342\206\220\034\265\247\023^\317={?\253\365\310\365\307\216\017W\327\272C=c\354\t\275z\367\254\3433D6\375\272h\320\306E\227\312D\312\343\223\032$\014t\200\304ulJLI\002\216\257+G\235\007\237Nd+\345\316o:\333\034\235\037\357\206T\334O\236R\333\336\371\020\204\331@\026j\013\330H?\334\254\244J\224\334""\311\332\363p\031=\026w\337\302\374+\305\365\332\361\253?\332CS\326^!\353x\316\275\236/\212\272\023\331\010p*\215%C\231>Y\353\333\007{\330\033H\271\311\345\016\324\02324\217\226\017\210x\033\362\337\202z\247\303\177|z\325\275\213(\037c\330`y%\036G\330\366\027=\0358&!hm\016W\212\250i:\216\036\221\343\365\375Y\346\n\361\372\321B\375U\344\215?\020\317[+\2041\236C\226q\200_-r\207J\275\207eV\022\326\226\325\325\222\005\354\014\312\234\014\241\331\330\272\003|\215\362\3729}\241\003\343\244\245\351\364\316\276\210\030\026\036\221\023\002#%\305\356\02334\030\307(0U\302y\317\212Kh0\332\344TfqVl\216\357\347.\257\033\357\320\036{\236/\037\206v`\376\205j\205xX\024\271\223\246*\266\203\034\205\007m\004<<\322\374lx\2601\314\030\350\364\375D\277=\373\337\017a\365\027d\260\021\360\275\215\004\367Lb\030\207\036$\035\333\337\213\227\212\205\r5\201\367}\325\357@\177\323\347\217\007\200\305\367u\356\347\206\020\375L\200\217S^\036<W\250\373I\224.\252N\033\034\356\034\357t\365\256\236\221\357\330\367:\303\037[d\014\235\217Y\203/L\r\332N\316\233kq\002\223\337\332\350\366\373\341\373k\357\216\207\221\016\212\357\240(M1\340\267V4\272\250R\tf\340\200.\266\004\013\300\2523\340Dw\373\235}\367\322\276\300\0359:HF\331\304\330\203\252\3645\255h\257\200\005\267\255\327\243\356s\375\376\347v\300\356\376.\314B\224\270\215\365\332\352\201\337a\332\251a\361\324\350\n\035\036\347\332\035\317k\274\021\256\257\321\350\035}\376]\2177\325\331\332c\214\267|\357\213\210\362\323\263\332[\354A\260\337\274w\334\373]\360\207yuy\321\036\364\206\022\022\005\002P\265c\274?\024\207\255\352\365S\342o8\010\354\364\340\276\007\000X\212\025:\203\035\357Hz}\326=\320\200\356\253]\364s\373\272\272\251\"Z\003H0\200T\007L \244qp\026\272\372\340\373\266y\340\351\035\037;\276\034?\004zc\240w\265\337\352]8,luh\312\010\303\313\271\337\007\272\272 \366\373\336\326u\375\020>\341\\\036\245\300}u\225\306\371\270\250\220\354\017\222\344\037\005\236X\367\025\2002\375>\340\357u\317\244i\016\225c\273\340\272\351\353\200n\200}x\304\373""\203\262\014\3445\331\313|\323\355\374^\204~x\366\2404Uv.\312\354\277\271\370'\266\006\226\240\203\303\315\234h\203\2751\210h\016\216\367{\360OQ\037\242|\017\253\300\376I\234\016\"\030\020\\\006KIv?o\227\027\351\021\337\374\013\247\365\000\351\372\003\256ue\276\256\014]}\217\003\027\312\247%`;\2508\345=\037o\334\013\241\017\234\007y4\007\307\350\367 [\001t\006\326\212\357\365t\363\353,`\344+\212\232T\272}\000=\026:=\312-{B\273\335R\372\016\n!\000\026\251\225\032\027A\201p\3667)\347\352t`p\356\210\271\375M\007\201\031\020\357\336\321&\207\245\3415\211\2618o{\317\320s\374\241\351?\275\370@\177\024V\363\323|)\217\030\356\001Z\356wr\020u}\321\004\340r\261\332\234\253\227\243\252\366w\225\375\030\371b\207\250g\310BH#\236\014\357\247\243\242{\244\034D\246\372GM\367\272\376vw\231\311\317\346n~x\203\374HD\371\0313\306\372\240\211\037\034:\207\237\307\316\334\320<\314\376v\346\220\346>\210\017\2335\2375\370\306\363\373\275\346`\362\363\014\377/\320|\354z\027\331\350|Q\202bNx\207\302%\345^3\237\2049\240?\227\230a\344|\317{\006G|\344\\\336^_\375\375\2777\314\377G<\236\206n\211\203\301\311\341\373\274\234\374\277\307/\245\242h\275\303\372=\336\267\372\247E\351\217\335\366kyC\313\3509\337\350=\014\307\242/S\3750\230\ndn<Y\216V@\340\363s\273\240\213\2249a'\272\036<\1777\301\346\177\227\312\365\346\371\240\271\231\020Q\315<_\303\007\264\037\346\330\362\275\320\362A\207\370|\206\231\374\033\304z|\237,\203\315\177\034\032g\010\262\371\355a]F\236\374\333)\251\250S\231O\267\235Ob\231\022\244\351\006\230jA\340\317\233P\243\t\231\017\361\373\233\000s\260~\\\207u\374n\356\305\337^\010\243\275\316\221\335\343\3578\016F\343\207\007\230y2r\366\225W\312\322x\020j\232U\3178\322\337M\232\265@\364%\024\337O\246\264\262\026\277\367;\215\317\216#\263\360\370\376\273\247o\2151\304\244{<\003\341`\342]\237\2508\273,d\034\227n\037\243\271\305\034\215\3722v\273ge\2047e\223\231\207\007\024_\017\0145K\256\316\352/\212\032O\036@\343P\245\265\324[U\274\223\211\315?\003\354\331l\021\3068\242\033\301\363""\341\230<\240\342t7A\353\211\033\306\227\264f\017N\345\201-\324\333\014YZ\326\303Y\226\227\201\010m/\205\204~~\376\222\224\254.\3424}\203\n\255z\233\177SVs\223\227\307\272f\370\204T?\231\343\030v5?\305\362\230s\234\272\374N1\373<\370\312\213c\223\340\332X?mB\223\232\351H\266Q'\225\222\241eb\231<\355\026\026a*\0140\321u\212,\t\231\225\000\346MD(|\277\255c.\333\352[\347\230a\257\233J\265Z\226jky<\017]\035-;\337\344\376\021k\333\252]tp\324\033Wt\371\017[\2569\336\267\237+\363\276\341\311\353\365/\244p\375\315\226\315\352\277\\\306\236\354\3033},\352Iw>W-M\020=\236V\367\230\r\337\370\366#Z<P>P\360\267\233\341\351\376&\264\350k.\260\033\276\340v \366\027\206\356\203p\235\353\361\007\304\217\344\277p\254\207H\335\255\374\312\241O\373\235oq\255\255\361\352~\243\365zw\260N;\373\375\354\374\221X\215\013\306|\271\373\031\361\267\201\237\2628\375\315\233\2569p \341\331hK\340J^j\023O\013\266\367Y\337\215y\377\243\202\033\234\226V\305\006($@^0\216R\332\006\242\330e\273\234\004*H\355\264\2275\335<#\036kk\3368\252\334\023Y\004U\332\035P\010\365\256\325k\223\320(\3262\r\321H\2449\204\022$\000c\223\244L\026\023\"\325#ki\250\215\214\301.\027\033\033\320\225sN\206\326\206&\002\001$6\220\031\212!\240i\025\205\023\275\260s4\026\241\241\302\371\010Q\344\327-J\0101\031\245Z\023b\371g\314Z:i\357\006\242\274\201\214V\031\3016\020\332\017\3648\203/\374\3460\034\342\007l\315\r\206\347\027\n\035\023(&\372\306l\271\037\005!\211`H\261@!7\223!\014\314\315j\217\002\017\341Y\2735v\366?o\305)\rY\257c\322\355\267\370tq\343+m_\036r&\223\323\334\254\251ZV\231\245%A5B9\365TQ\350+\203\031v\206\230\3530X\241\200\021R\265\306\3669\271aZ\367M-\224\207\360\374\214\004K\0162\007\322\374G\031\327r\363\255\\\233gT\355`\360\245f\025\240I\202\332``\264b\332\272\324\021\022\357\n\000e\275T\264\316\3207\032\305\024\270\343X(\206\265b;$\3237H,x\262E\002\320-\020\216\202.\231\340lP\232y0]\322\224>\246Z\344\320e\202\204\314\311\024\022D\246:\366\225\242-j\307\030S\357vP\355<\223\311\035\360\3229\330\247bf/F\210\0251""\301\215d\361\336s.\357\005\343\nvx\312\202\201\030P\265\001Y\302\020\027v\"\030\322\032\032&\0072U\n\264!W\006\250\245\254\022\3516\355\325'T\3655k\025\035h^\245QL$\023\031&f\225U\336P\261CQ6\205\2115B\303\037\017\346}\007\225E\353W\036\200\034\311F)8}Y\247!\354\241a!M,\032\215\002\264\022\027\224\262\254AZda\031\035\242 DM]\3335W\005\257\262 X\322\027\202kw\252M\033\307\217/)\313x\340Mm^{\355\227\264F\301\r!h\344`!\243y`\201\210\021\264H\304b>%2\333\2745p^\250m\331\362.\257Y\260\252S\255+\2427\360\255\355 \302U\252l\351F\245\344j\003\010E\001\261p x\272\360\366\223\322\0303*J\245\321\030\203D\337>;XQDX\3158\325\005\033Zq\003I\254\277\227\243\t\003:\t\321v\204i\243\033\312\2356\212Y\257S$\357kMCL\267\233\360\t\036_g\311\372\330\261#\253\032f5m\020y!\0109DQ\203\001\377\342\356H\247\n\022\001\t\1776 ";
    PyObject *data = __Pyx_DecompressString(cstring, 14981, 2);
    if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error)
    const char* const bytes = __Pyx_PyBytes_AsString(data);
    #if !CYTHON_ASSUME_SAFE_MACROS
    if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) }
    #endif
    #elif (CYTHON_COMPRESS_STRINGS) != 0 /* compression: zlib (16179 bytes) */
const char* const cstring = "x\332\315<I{\023\307\266\230\230\304\020\014\010\314\234A\006\203m0&\262\315d\206<\341\201\230\000F\036\2302t\332R\313n\220\272\245\356\226\247\334\274d\351\245\226Zj\251\245\226Zj\251e/\275\364O\340'\274sN\r]-\311\216\311\275\357{\317\237\245\256:5v\325\231\353\224\306\243\261\341\357\036\333\336J4e$\315\254\236\211\352V*\272dZ\272\263\021\3159\000sM\333\212\272\205\\.c\032\251\341\350<\2466\242\266E_\306p\224\032\017\330N\3242Lo\305p\006\243\037\214\2155\333IEug\271\2205,\317\215\246\241x\306\362\014g\025\006pW\354B\006\3060\242n\016\372OC\267\217\035[O%u\3273\255\345hZ73F*:`Z\271\202w\023:\211\272\346\246\021\315\232nV\367\222+\203\217\013\351\264\341DWMc-\232\262\r7j\331^\324X\317\331.\364\3509f\312p'\2420>\3241\2638k7\232\201\256\243)3\033\035\230\320-6\367\244c\350\236\021\325\243K\254;oE\367\242\246\033M\332\226g.\027\354\202\0335\255h\326\310\332\316\3060\264\352\367\260h\325ph,\307pi]<;\232\316\330\272\007\025p\026:@\227\t\n\275\247n\320@\254\013\234-\257\304G^sLO_\312\030\274\002{\237\264cg\367jkZ)c=\272\006\013\035\3656rF\264\237\303]\303\213\302\332\026\340]\355t\364\367?8\330st\313\245\205\tzb\255\241#\023v\227V\305\260\360]\334\t;S\310Z|\010\273\340aOKv\301J\271\343\321+\251#Q\370\233`+\340\002\222\250\253\320\257\367C3xk=:\277\221\235\262\226M\313\240\371\r\037\241fq\201\010\224{(\376X\241\036\035V\377\242q\253i\201\371\262\363\276\246\326u\330T#\334\025+z\364\350\021[@w\003F\243I\000\002\330\260c\000\310\231\351\rY\213\347\007b\203\004\212\265\024\\\322\257/]\032\344\363\273\036]\242\324\377\203%\300\332\216n\272\206f8\016\020\025\326~mf2\014Hs\"84\323\211\220\n\216\021\035H\031i\275\220\361\242\013N\301\030\034\212\332H\246kP\237\272k\3763=@@\257\340Xn\364\205\215K\230\246\227K2\214\002\252\345\223\001f\360\017vd8c\016\313\214\266\346\350\271\034\243S\334&\255y\237\264]7J\013vj)yi(:\255g\\cP\024\263\321'\005j\003\372\"i\343\374\031\326\313\022$\362\244\355\020% \223J:\266\353\002\337\263S\205\2447\036\235\312\346\274\r`X:\220\232W\200\227d\2256\274""\025\333\032\326\035G\337\230n\3424i\323\021\254f\006z\316\346t\317D\"'\026\006\004\005t\005\\M\262\306\031\225\330\200X\227\215\361h\277\031}\030m_\360p\246\225l\351\265\220?\333\270'\304e-\340\262\014\017\200\205\005K\237\333\030\002\216`.\331v&\272\214\334\n\336\246\340\0003 \3161<c\301\323LE\263v\312\030B\004\204q\200\017\367'\373\341\035\243\375\360\346\310N\372\207\250\255\250\014HJ\253\223\323\035=k\300\330\256,b\0050\003}\335l\2022\211\000\354\3341\327\243z*ez\360&\303\321'J\307\255\365\262\200\302&\254rR\337Om\267\260\004\323M\006U\237-\242\210\203\035\261]\032\216\326\r\267\315\300\215\200\027\305\306\226m\335p\363\005\035\250\206\372IB\247\033\2067\374L\317.\245`\275\n\026\365\030]\321]\244K\240\006`\326\031*\005d\234\230\237B<K\031(8u\244\220\350\"P\245(\036\000j\035\212&]\343!\021\"\341\250(\203ur=\335\302\361p\360\244\236\311,\351\311\017.\223K\026 \013L\006\200\033Q\003w\013\005\010P\261\351\340\366.\331\260(\324[\3005\\Fw\005\027p\023\320y\025\244\"\320\000J\324\350\000N\031\267\024\027#c\254\0172\3065\000\013\343\002\256nP#\352N4\034\024h\313d\245\333\332\305p\3649\356\216\304J(M\351\236\216\357\"z\202Wsi\016|\342Y\033\010%\251'W\214\033i\3074\254\024\214\274\246o\200\334\037\006\255\342\222\243\257\032\031\320\003.\rr6\363Rb\030eo\310?\306B\235e\020S&\024\223L\005\242\231\247\205a\225\177\276\206+\003\025\210f\265\214\371\201\252(\313%Y!L\216c.\257\340\342\226b=\320^\014&\006\351\355\307\243HH\262\335\353\025\003\331*\2756\211fh\365\333o)\273\000\323\371\355\267\350\200H\213%\003\230\344\303\203\214\261\343\206\303:@\317\240\306\310\216\3733\231\325,#\301\014aa\3770\016fA\357\310\237\241\037\234\262a\255\232\216m!*\0039;&\256B\320\305\374\333\347S/\236\314\274\230\322\236\305\237?\236\234\231~\253=\216O\3748\365b\262\037\347Y\300\215\031\360t\030\035T\0301\"0~}\025D\010v\245\010\r9\r>k\306\377\200;M\260IN\367\313q'n d\2321\216\033\212f\305U\236\214\276\001\2105\014r\206\320\031\020\335[\201\351\350\200dI/\330\222%E;\034\217\032\303\313\303\300\272""\006\262CQkPP;\314\035U\307QE\347D=v\331\\\305W\222=\r|\030\212f\206\242\243\203\240\010*\363\031\344\224\261\206\222\024\333`\377\254*\033\205\020\"\305\251`Hv\267\006Kb\300\202A\355\321\241(6\330O\307\330\245\250\315:\226\035\262\001\206\2433\351`w\271|q\243r\177~\373\31552\351a*@\324\"J7-\340j\300\0137\211;\362\275\321]\315M\232\271\215fde\002\036u\225\244\371r#\372\314^{f\000\271M\000\203!\362Y[1\223+(\362\221\303\0258\331R\335~\224\230\236\261\354\000\007\222\335\001Y\256\330)\266a\300\336\232G\233+X\2406e\263\3007\347\013K\212f3\2251\263`i\020G\265\211/HFc\00076\242\313\206\005\004\215\373\036\242O\301\035\331K\246\210\334\306\221I\3466\206Y\016\277\030\333\230c\272\214\3123\330<y\037\222\3612\275\030\365w\335C\255)\215\006\310\020N\350!\356\304`\033e'\304\201v\327>\201\036\207$\243\227u\001:\320\277\036\335\210n\366\017\006\035\200\350\227\342\342\247\365\241(\210\354\315_\206\242?\255_\337\270\2769\024]\277\266qm\363\027\245\376\300O#\200\317C\3211\016\374)z\017d\314\310\330\360/\262\016*\021\017\243V\216),\003#j\353uz\301\301\373\370\335\334>,\237\0062\370F\267F\307F\006\037<'\362}\205\306\0040\311\027\252\376\021\220\362\004iIL\036f\314%\334G\003X<Zh\240W\220\301eE_N\275\2741vw\214\210\3251\336#\331\243\344N\202\301\3462[f\251`\202`\261hG]\242\014\340\031`k\002N\202\320\312A=\265\201\207\214\021\215!D\223~RY\t\2754h\016X\324\317\365?\244DhMJ\343\360\213B\026fG\354\236\351\002\2560Q\r\320\004@\265\266\327\334kI2\216\\\2652\024z$iq\362L\014\303\273\332\244W\220\245:\213&\334D\364jT(\211r\225\270\256\2616<\253\232YH\003\334\032\325\223(.\243\003\244:\315\206uFzy\241~\250\334f\257z\323\373\254\207V\251\201<@V\002\234\221\313\315\264\177\336\315\034H\301\347/\247\347\242\005K\312\tz\261\025syE\361\035H\345\205[\250\303s\260t\260\r\251(`I\306@\323\034\355\0149\035\334\030\256g\315\331k\273\331\243\273p.\276\304.3\362\205\276\3462\342\216q\3662\317\225q p\322\377\245\226N\265,\271\305\250T\014\317\007\232\373\236\225IW\030\236g\343\323:l\032\216\255\010$\304\013""\320%\003,X\264h\312\201}\207\372K\026\363\366\022\222\302\242%\225pc\035D\250\322\227RD\354\030Q\206\027.Z\037\000\263\220\343\022c\223\371\300,\345z\006\254\242{d\321E\271\311!\017\205h\027m\210\2452\006;,`\014\225\373\257\270P+@\350\240w\"\305a\265\214\211\207\341W\\-\211\256\r;\303\236\342\006\")\375\032\264\227e\251\274\243X\034\210~?\374\250\177\360\367\241\350\037}\277\377\321\007f\202f!wArC\324\371n\235\333\244)\324\n\263dp;\005a\316\340\226<\006)d\000o\377\233jsF\206(Y\317\000\225g\014\2061\303`W>PT\026\034\2251\217G\315`\341Ky\2242]|A\203\366\025\365t\215+{\032\327\375\332\030\007X-\315,\003T+\0372C\226\032\357\277\021\331\023\010\374\304\021\262\271\344'\267H;\2374#\215\224\345\375\266XNF\007\320\274\\&S\035Y!\242'`?a=\210\001iaD\243\017\036F\315\350\003\350\232\255w\n\211\207\314l(\370\256\305P\037\214>|\010\334\306\032@\242\0065\315\262\243\302-\242\301\034\301\33674-\232*\020=\242\031\010\210\270\n\n\025\224&Q\267\202BF\225\217\372\243\003\2004\244f O\220\226/4\264\021\253\035\317Vy'c\023\350\021x\004\014\010h\003\250\324%\216\307\252\345\314\344\207\014\371=a\306\314h\221\022\255\331F\375\375\017X+\306<\207\243\2201ID\322T~\377\203\264\302\337\010#\177#m\37570\231\201\271\256\350\253\0063k`\236\n\303\022\"\355S\333\241<\0145rV\334\377|\0231;Ru\227\014`-C\224D\003\251\215/*J\256\267\227L\347`\033E\013*V\227\332&\377qK\264Kr\236\363\217\332\2231)\274\327T\244\342\007b,\252\r\350`\246\032\303\017\230\023;\025b9\255\260(\271w\332\225K(\240\221\253\245@\335\032\030lG\201X\214% '\014=\205\271\233Y\374&K\203\243(`\365\232*\304\006\256p\253j\220:\2673)\313X\333W\367\315N\277\341\334\306:w\342\215G\205k\234\313\301~^ \264\316\357\306\006\265&\320\350\235A\204l\214\310\216[{\031d{\023(\344$\310\006<\307\000E\305\321\227\361\225\006\013R\n\203\016a'\351P\200\010\027-\371\3416\245lCI\351c\247\r\303\005/}\343n\377P\224\371\242nD\327\243\361\370\204\355\342g\005\276<\374@\302M\342g%>?13\023\2377\222\370\201\234i\341g%\276\240[\370\031\301\257\225\270\026_r\341\177X""\323`\2015\215\222\256\276l\360\024\276:%Q\305\301\247\351B\305e\035U[\236E\256\032O\245\340_v\202I\264Q4d\202\224c]R\212u\tI\260\032\223\266\221N\233I\023\367\2340\010\3414\024<\241o\354\327\302\177\331\265\025t\301\216\212\026AoK\307]\327N\316\346\370c8\013\210Ec?~\034{\254\273f\222\276\236\033\236.\023\320\241\260\310\222+F\362\203\246Q\021\200\205,\225\000\301\265y\036\345\005O:\200\212\032\010u\250- `\320&\2639\221\025^3\221/X\256\23664\364\362x\014\204\263\324\320~\206\005j\202\340[rP\233\225\222%\244\367j)\303\262\263\022\226\263\327\014\247\251\036\356\223ff\365e\016\361\354\254\313\222\324\267H\2121\203\327\004\025\020\260\220\245Wt\336\206(\230%-\366p\3117\235\346\315\203b\311\035\224,\243g\006X\207U\314\350I\203kQ\374\021\207\351\361$\251\005j\232\243S\023\210\220\202\303P\310+\311p\003\016Q\353\017g\354e4\035P\363\233\230\230^|1\261\360\366\345\324\20461\373ba\346\311\342\354\342\374\004PiF\267\370\203w\030\344\250\263\t[\210\320 %\020W\205\250\265\327\371\003\326\302P\222\303\270Qt:\252\201\340\367\324\022\332G\0058I\352[(\243bqS\001\233w\023L\235\317\214\225F=d\243)\033n\251@\325\266\317_N\004\251p\013\006P+\207\313\203B\213\271\351\347\rOM\007\353\310\314\r\361\224\275\310\254\350\306\323M<ldO\2459\317\213z.rO`\234\310;\201m\"\347\234\234\004\335\317xN6\202\222\304\325o\312\316\200>\326\006D\314\005u\271]\312\340\261[\031\030\\\255\355\206\247\247\237M.\266\001\266\300\236M>k\001\265VZ\014\235P\264\026\273vf\265\371U\207\023s\315\020Mc~n\255\265\200\363L\246\031\267\253\000\014\0206\314\333\243\212\216\001\000(\013ZJ\2205\265\000\227\r\257\035L#\273\276\245\004T\240\026\230\302\315[\312\010\311Z\241m\306\004\376\226m\2079\002\343\232\301ho\266o\200%.0%\335i)\331mi\200\315\233\331l\201\016\374\333\224\355V\202\242\240\031\230\\\001\316\350~\330h\201\333\2316 \024\246\240\013\265+yo\233V+\334z_\000-\302\330\265@\2231\005-U\360\354\264\031\230j\335\211vX\222\262[\253\025@\\sn\331\266\014\371ms\001\023\211\315\3206(hZ\253\315\240\367z\322^2\365\2265!\211""\332\002,dv\301\016,i\217\035\374\000sC\343~F<Mi\256c\301\316\264\014f\241\375\324\014\244\003\262\026 ;\216m\001\333km@\273\340\006\226\264\303\2156D%T\213\026x;>\325n\031=P\302\334\226n\361\340\326h\003l\217wBO\2314\300b'\0058H\t\361\242B8\313P\000\234\376%\004]yJ\226\021\264\314\202\372\333v(q\354\346N\n\235J&H\034\251\2316\234\270\251\270\205\017\0075\202\324\036\335P\021\360\3150\250\225\273\253\205^\270:\362\271p\016\265E\025\3446C\222\240\2649j\036\324\326\311B6\313\276\304ROMe2f\3165]\212\257\000%B<\305v\005y\336@\344q+\246\362S\350\227\007-G<e3\231\247=V\262\254\027\221g\275\360\014l\247\354\257\2201\234'z6\253\007)\321\227\n`\275\255\347b\370\021\025XR\0249\323\323\323O\236\222z\200\352\300\264\242\261N\243\nb\300\333\310\204\230\277\002`\035Mcl\031}\311*\224\2019+E\2203\035\207\2730%\250\025\000\374R8\326\305\223\371\233\3029\376B-@6\2430\024W\262\t\204\262\335\322\263F\023X\005\311\227\021y\265\033z9\236~\362\224\226\374\211\361\004\014\023\303\232\303WR\222|\246a\010M\363\t\305\3309\013+\272\365\304\373A\317\244\361#\206\375a#g8d\376\211qff@\253\307\205\027OQuFh\373\213\2603\241L\22357\323F\272\267\203\265R\354.\265Z(\265}=\251q\310b>67\004\232\314\204f\373`\206\035\036\360\007\014\013v\344\212\246\005y\323\362\324,[\024\231\025Vu\000\022\020\t\340\303\212\234:*H}XT\236\246w\340iB\241B\026mg\001\002\244h\232+b}\030\222\023\211<O\270\342\3314s\267i\"n0\272\243g(\204\312e\307\000\"hU<\325\216X>\350\210\362\206\225\222i\330?\007\336o\025{[p\314e\333\262\263\006\036\177\n\264\373\361G\307\266\214\344\007\264U2\236\036\316\211\241\232\241\264\240-@\232\3053\2602\236={\365\234\331\217AJ\361\225(@t^\320\251j\030F\001\003Z\006\224\200\014\236\254iI~\264\246\324\342\336\022\364\340\267B) \n\240\304wd\242i\n\014\326\324O\010H\3264B\305\t4\245mk9x\271 \327\324\273R\3204Dk\tMw\261\311\362\342\226\026\213\372\n\031\345m@\255$\335\276R\013E\267\253\306g\305\365\336=j\320\033Q\261:\261\275g\364wSiA\214&\350\256\250\241\326\333e~\241\365\026[\032\304\315IP\323\201\256&""\nd\242\365\345\324\242V\265I\026\206\016\344\302P\206l\002\324\364\006\240\"\277\026OA\224A\236\310\361\231\361\314p]\2246\342)+\312<\257(\263\214b\215Us\302\\5==H\005M\003\010\257m/7\257\3173\357\371K\216\037\323\246\221I1\356\037h\307{\031\377{\333\375!\013\234s\365&\253\231\271P\031p\n\343M\237\3530\364\272x\001J\322k\263\024\275\003&\221\333>7-\370\227UM\261B,\305\252\232L3xn\247\n`Nqf\375\274\220\201\177\331\020\223\322\245M9\326MA\362fL\266s\324r\270\"\304\021B\003\302\023\304\013\215\324,r\237\357C\244?\337\227@oS\013\315\362\224\221\331\245\304]\323sm\212\322f\246]\0134\343\332\367\205%\273\364\005E\240\347\267/\310\312\345x\016Z\207i-\277\320_\300?_p\226\242\005\177\001&\370\013\343\005?\215\020*Gs^\264k\005\263N\232\341\341\255\022\305\263\226\241$\005V\274\000\265\223\242x\025\334|\201\377\036\374\317\004\347\251\220\013\232H\255\233\305\370@w\360\037w\226\205\264\016\347\370\364[\200\324C\023\024\365\031@Oe\202\263\316\254\023\244E\263\227/gg^,L\315\2754_\232\274\177J\260B\323H\032\3502\220\t\321\201\002\340U\3555\370\227\305\230d\235QJT\301\025]\322\361*\301z\216g\225\005F\010\226\342\223W@\322\300'\220\006\037\301D\262\"\305\0237\340\345\206x\343 5\201\307\330M\331V\202i\255\320B-A\025\351\304UA\354\3756\2327B\201\3446\330\341\354\313\r\342'0[\266\317\342)\373\220Y\336\003\317\213\3668\356:|\320\310\005,]\367\346\214tb.17\307\355-\361\024\313\037\344\251\177%K\375\313<\256\256\314(\032\260\204\301b\267\214\0010\"\017C\205p\265X\0059m\032\242\320\223\371\234L\345E\312\225\211\346Wq\233'\317\024h\014\010c\302>H\221P\n\262\352\001H\010J\267\250\232`lL\005\302\026P\005\260Y\240a+\306\301\2104\361T\373`y\331\003\317\312\366\224\307U\3073l\004\260]\307\024\005\272\271j_\256\332R\274{&\010#\nR\320\nCa\261YF\335G\231\233\237\237\333=8{\336H\342\021\361\274\221/\030V\022\355R4M\223\362\304\212\345\330\301\t\246M\305r\301|\301\302\004:\004\211\003\316\233\2409\320W+\005\np\013\335\261\002\036\210k\300\362\230Y\303% \035\227\350\036\357W\346v\351[-o3\210\005""\377\313\031\303\263\203\3040?\305S\000\341C\256\240@\370\207\024\210\364\327(\260\365\\,\310)^\203\000\210n\202 \0272\370\025p\313\370\302\216\014  \016\225L\223,k-\001\321\020\000C\231\227f\220\226\344\246\200\214P\026&\212\346&\340\225\272\030\357\014Gy\3074\236\313\006Y\317)`ne\236\002s\025\307\t\003\010\2155\234\023\324\320\014%\372j\001\022\255\314\027\226\\\374\310\246\005\031\322\300\223\262\0329`)\201\244E\211\234\r\310M)\351fe\216%\341\236\222\006`\310\211\025v^\315\263\020\022\"\206\005\335\3028\013\264\313\205\210hk\243/R\034\203\314\251\031df\240\206kZ3\224\211\247E\313\340~\305 %^^\205\320DC\000\232\254\002\301U\200,\277\370\223B\367bSV\3517\004\226\362\241M\001\027\023mJX\024\326\242E/\254\370\353xF\314/@55\255TV`\255m\350\255^a\020\371p\020O\376znfa*\376\370\331\324\2337\226\355\274\241\177\321!%Y?o\021\243\361#\3124]\217\351\370\275\224\324\227\\=i\323G\224bz\205\276\024\210\207\0375\277B_\001\304M\342G\315\257\320\227\204\244R\302'\036\234\025\006g\203h\240\001r8\266\355\271\"vHc\341\335\272\265!\375v\201\007\0174D\264a\324\300\223P\310\t\236\351\262c]\361\010\364\267v\366\2154\343\321Mo,S\005-\247\233\216.\313\345\231dp\006\031\016\\\t\353\204j\260\212p\007\354\341\026\320]|Q\234\253\356\006!\263\034`$\361#\327\022\322+\364\025@\200\363\272\201\205\210\351\025\372\n xYC\363l\0300\347\026p\274\r+i\332 \022\035\273\340\231\026\274\271\247[\370\031\241/\331\220e\210\356D\232\320\n3j\245\025\372\n \306:\030\343x&\273\264\024[\002\311\316\303\246\371C\343\361\244\270'\264/KtX\203\274\014\250\311\262\013\031\274\006\001\213l\0046>K\323Lx\222&\262d\302\332\233zf\311\204\275\344\032\304\222\355yI-\231\344a\301I\r\372\006\022Nj\357\223\260\003\332\252m\246\264\234\340H|E\370\003\327\210&\0038\226\005S^72x\235*\311\344k2i\247\300\20003\370\001\261\300\037b\2122K\263\024\247\317I\023JPW\007\332\343\t\320\2360\004W\344\r\227\016\203\222\030\256\007\023\325\350P\017\227*\231\261a\2433.\342#!-\330\266\334\360\r\016\254\305\001\265\260{\223\350j\010\242\263\233""\002\265\361\3204P\213\024\035\223'b#w\223\"fE&4\231\002}D\236o\313\204|\377\326\223o\256s\031\216LhB\r\343\261\207\270\342\234\277*\220lNL\214qX\245\310\221\021\350\001\010IMT\004\244\320\304\267\253\2606dj*c\003\026\246\2605dh*SK\332\005\300\030\374\322\354\234\313~\210\240\r\341\356Z0\374\000\371X\306}4\274\233\277\356\337h*\005\347\277\327\007{Q\326\005\241l\226\314=\001!\372\022 \333\205E\360\200\251+\214\036Y\274\312\346\223\250P#\033M\026\034\264\342\341\341\244R\206\221\343\344N'\240\300,S\006$\365e\215\035\211\262o\376\225N\263\3172\352\243)\023\275i\240{i@\360\241\214\0301e\342\255[\240\254\224\235\304/\323K\001'6-\366\255\261\207\233\262\275T\316\205\177\304\025\264Z\350\232\006}i \303\231\261\252\006Q\310\240\t\303\020\021\010\240\332\032\250:\323\027\252\345\232+\364B\002\001\004\014\017`\017\370z\300\341\014\022\r\260\216F\336\310\273\360\257\031\016\3103y\262\006\311$~\202<hZ\006\252\342\032\275;%Y\nt\016\325!\333\346\266\204r\007B\\V\220W\020\244\327\226n\021@\023\350a=\307\242?\330w\200+\017\330\245\226G\014\016r.CW\020\341C\274\33156\200\007\305\322#i-\255'\301@a\337\200z+Y\335\322\330\345\025\016\313\001\333\321\035\340\263\331X\373\002g\305\016\025\000\017g\t\227\264\356\264\271\004D\236\304\037=\341\211\021\364\3361\025\r\026;\235\321A\340\013c\230\036\261\333\364\030\035\241\307\3551x\300\024\361K,r\332v@\367\340\327\363ai\014\356\232u\003\277(&\320\376\"\205C\013\276]qAJ<ySyo\212\022 ~\334e\332\265ev\000\316\306\245\014\220lR&\220da\177\223)\370\207\265\365\226\215&\273\021\263\260\344hg\303\207\273\305\360\201\204\202O9\017)RX\234\2308TV\374\"\302X_F\034]\325\260.3*\265e\262\354\030K]\006\265.\223\306SM\246F-\241(e\207\234x\363\000\326\030\3304\245\360\322\263L\300\233X\313\034\371\010\010\310\307\237i\207\022t5\212R9\320\250@UX\201\216\334\025y\264l\232\032\210H3\005\224\014\232\217\267a\302\232\000\236R\370(\0362\303n\207CI\245.\006\255\350\336\250\306^\035\243\371\223\310\r\030s\024\317\000\277\371\242\232V\016\3765;\235\306\256y\010uK05?""\321\305/\373\003\227P\032\254\000\252\251<\353\212g\300\014T\307\202\311\2177Mk\225\005\202\207\342a\224h\n\021\244\240\234\347\007\247\270\314\275\316<\211\212c+\344\033\t{\027Y\216\370\003%\271\216'-\234\300\242\t\305C(q\361\230\264\255p\216\235\370\261\034\211Z\0235^\tSzAn\003\017\227;c0I.fH\340E?\323%\024\207\206\300\313-\272\214\304.$\361[I\"\272\024\277\361\303\3528\242\216CT\366\236\305\240\211H\264\017\037\264\017\306\306\007q\326+\023\250*y\372\2075$\355\014\343n\202\311e\270`\314\260\003*m\215\342&3\311l\006X~\032\305\276a\311\004\3608@\236\224\003E\026\020Jf\305\205]\245\223O\214\312\322X\367\253Y\"\010\306\223\340+\005HAt\312\351\244\005 \t'TH\031\3740M4c/\303\277`%\220d\354\004\022\241\247RaY\211\306\021Q\341\300\317\225\000q\221\264\035\221Z\307\244\265\314\246C\314\211q(6\204H\005\203\004\020>\214\002 \305!\343e\n\240:\323\327H\026\245\200\246\221P\326\344\325\206\254\236C[\020\376I\274@z\035\377A\336f\361\347\2274\224\017:W\235\231\250\320\262\246\305\376\013 \267A\362\262\204\235\305\";\205\017\223E\021\340O\263d\331i\030\307u\246\311hZ\323\023Uo\253\220c9\034\310\261\001+\301@\245\014F\342\321W\253\220\004\351\030\2046\006\241\214\352o\257\000\313\243;\240\355\302\031-+f\215h\026\262jM\023\337\220\205u\261\344\3178XI\212r\304;q\360A\036g\031|\013\370\027\206Z\3437\245\2401>\211\274\254\234\345P4$gY\370\276JRC\274E\371\000\037F\316.\361i\033\264!\246\020\201h\200\025\206\177\327\266\355\034\020\001\360\356\224KO\220\322v\316c*'\275\240\355\322u8\372\322\200\333\300?g\257\271\034\232Z90f\320\236\316\241\022\004\212\036Y\312\220\311\346\314\2348\222!\277\025h\007\033\370!T\222\t\201v\n\200!\031\002\300\316\310\001\037\242.\341\305\304\223^\220\304\236\370h\362\2425$\322&\330<\360\004ybPb\225V\215+6\232\334E\340R\206\253\026\261\014}\023\353#\267E8GC\347\034{I_b\322\\\313A\016^\0274\316\r)\267\203\244\002d\330\336\014\010\016Tr\033\353h\261\232(\236(\215\262\312\205m\244\234c\200\r\313kq\t\217IRt)U\260\350\256\235\241MY\242\215\0041\337s\030\026\304""\024\020|\225K\335|^\313\343\014P|1\324\315\027@(\002f\213'\242\230\2439\016\210\027\355\275\243\271\312/q\001\372\010Y\341\312D @)X\227\014:\374\2227E0\341\322WP5\360d6=eD\203\000\240\201\313\222)\246\311:\3062\354\021\314\007\307\312BY\226\207\306\362\007]\341\023q\241JT}8\351\362+\246\260\356<\234\230\355\200c\340\277\266\212\363'N\342\254\270\216\031\304\200\005)\307\\^a\022&Hix\223\027\361H\342\222\203w\371\201\226\371Au\020\220,\002\220\30595;\224\206o\223\235B#\3753\377\030}\341g\030\354?\305\330#\220\010PP~o\214Y\327\364\203?\344\264\002\225FqB\241\373IuA\341\315O`i)\230\223\211?^\344\321\301\005<\002WC8\247\255\030\231\034\362iOS5&:\360\340\334\020St,\003\tn@*\347!Z\233\263\021\366\323V\346\262\205\03795L\007\032\221\310rC\202Ge\213g+\227\007dS\\k\350TS\035kt%\025\265\0007\357x\370\301U\305\367gk\200Qm\364\305\250\021\277\314$\377\t\030\017\320\307\263\361\343\240b\314\310\215\342\212\341\253\000\264.oa\240\370\2217\320\332\313\"\345F\232[\300u\335\310\302?2Ivs\226i\3632\016EX=\301v\253\277:\267\324\372\263sA1h\222\031\342\211\374\222\251\270lJ\374\270\351\232)g\322\255w\035\t\202\316G\0261N\366\223\342m\300\331\343\007Z\272\036^\211\n|\215\350eT=\215\036\363\370\341\332\3027H\2675\017\254q\033\375?,`\336c\374\210\\j\322+\005\253Jb\304S\2171\360t\207\274\027\205\002\210\036\300<\264\346\t\001\013\302\027\037\266\373%\030\240<m\210'\262P\220y\341\0305%ZJ\r\335SoT\026\010w\rTc\330\001X!\227\002\314)\340&\320\027\315;H\211uP!D\335!\000\255m\001f%HfuU\243\337t`?3\"\317\211VAHj\234\3545\r\224f\013?x3\033\361\200u,6l}\375;m}]\023W\n\304\263\02577P\347\307\217\273\t\352\334\246\342\275\331T\374\270\233fn\323\266_n\314\262k\341\327\006\344\317d\214\217\317M\274\304\037\222p\275\250\002\244\250\371G\203\007\222#\271\r\277\363k\377\353\357\252\335\376\303\005\177aq\273\353\313\255\373\305d)\262}\264{\273\353\212\177\345vU\257\346\267\273b~l\242\036\363'_\371\257^\003\274\374S\265c\273\353d\261\267\030\333\356:\352\037\215\372\321\261j\274:\357\337\235i\\\360\347\027""\312\261\277:\266;/\227c\345\351J\257\177\340\024T\353\374\342/\350\347\270\177\374\333R\276\374Yy\264\254ow\342Xz\321-].%\374\316X5\002\345[^q\274\364\272\034//T.T\251\227/\267\306\266\362\376\211\353\225\207\265\216P\376v5\022\312\337\253\306C\371\361jB\3447K\337\224\363\025h\376\361\310\201CW\374\276[\325DU\377\330u\340\320\341\255/\266`ZG\267\236\024c\305\370v\3279\377\334\315J\276\332\201s\351\336zW\314\227:p\346\205\255\251\342\251\342D\321+\335*\303\213\037\333\312\224zK\360NC\225\031\350)]\213\3030\376\227_\227\022%}\253c\373\350\251\342\255R\207\177~\264:V]\257\345\353\237\327\365\277:v:q\271na\177=\305\247%\275\224\367;/\224zq\301oC\337ql\025+N\226\016A'\311\362\251\362d\345Pe\261\332\013]\254\326\022\333=\347\240`\261\334[\036+\257V\022\333\335\247\212\243E\375S\232\354\034=\351\237\274RN\370W\357\327Fj\2640\247\212w\330[\260\025:W\216@\345X\233\222\363\010/\307\333\224\364\340\033\227\362mJN#\274\334\321\246\344\014\302\313\221PI\250\nm\336hE\207}8R\353\255\321\214\316\225\216\372}wk\035\265\363\365^^\253\330Q\344\373\177\257\030/\276*\335.GJ\277Wz\001\r\036WWj\272(\232(\346q+\023\260e7+\221\312\265*\356\325\326-\326\032Q\340B\351T)^J\354\3006{[1D\301\374\016lQ|\247\363\330\326r1QL\341\314v:\217l]\332z\274\245\343~\215\003\324,\345\267\217\236,^\243\246\000\033\331\232\333rp\037w`S\306\212\253\2700;]\354\275\306\340\215\017\226/\225\343;\274\361{@\242\243'\212\237\021\316A\342Pq\221^\377\304Y\300\260\333\270\017\333G#E\240\301\343\254O,\200\341\316\024\227\241\333\024\356\2062\n\257z\246\250\373\235\343\265\336\217\237\0378\034)\036\364O\366\001\021\315W>\207u\\\255.\300\272]mt6\000\303O\024;\030\276\003*\"\231\237,\366\371g\256\226\215J\254\022'\354\031\005\212\367\374\373?6b\215)?1\347\317-\372\213@\366\357\374w?\341\232~]\372\251\322Q9\005\225\337V\223\265H\r\266\243\327\357\035\201\206\261\355nD\361\357\375K\343\270m\265g\215\317\032\264\245\261\277`\334\303\333\247\277\003\272\352\251&\220~RP\361v\351d\351.0\202e@\350\256k\225\253\325\203\325\241""\232\216\223\213\343\327\024\276U\367\326k\330\334\205R\304\2770T\231\250\254Uu\334 \267x\245\350\224\"{w\273R\321\367\333\355:\260\270\343'\260\347B\361G\330\254\317\313:\366}|\353w\334\026J\372\307/\023\r\020\370_\245Xi\252L\343\303\333\021\031\3426\036\201\332\260{\333'\"\305\036\330e\035a_\300\306A\376,,\366\251\3224\"\001U\337\371\022\326\275\250\357\257\007\017Q\243M\037\204\003y9\245-B\252\243\2458\353\02512_\354,N\003{\235+\271\345>\340\270\002c\267\007\256W\306`5S\265^Y\025\361\010\006\335\356:\353\237E\036\330Y}Z[\251\353\365<\221\304>\372\214^\006V\263VIU?\245\317\336\362\267 J\216^\364/\216Vc\325\311\332\021\377\361<\010\020\266\313 ^\212O`\255\237\"zb\355Q\177\364I=\317\020\371^\355\\=\002\334\240\253\017\204\314%d\304\270\275?\026\377\205\373\004\210\261\025\331\352\333\322\375\343\203\225o`{O\014\003:\234\350\361{\210\275C\252\030\367O_-\247+\217+f5\230N0\000\322Qw\270\273\376b\244x\265\324Y\212\373_\337\004\242\232\253n\324;\260\345jq\256\270Q\356`\322\3536\020U\027nn\n\231\373\261-\203qj\344@\200\235\376\251+\345W\225[0\003`\317 \"P\212\235\006\244\006J\317\027;\332Lc\007\272X*v\227\336\301\312\352\225?jO\352\261z\234\215\024+>\006\2060\017\254\005\266\241\354T\316V;\232\327\250\r\241\361u\335\273&\321\316.5{\313g`\260\363\270\3134\013\277GYF\344\254\2371\\\376\262\364\000e\356\016$;\213\263\300\262\210\013\247Q\312\002\303B\354\307Q\223B\366\001&\373\347\220\\?\003Fr\224\250\303?;X9Sqa\244\2438\322\303r'\210\270\317*#\225\205\352)@\225\316\332D\315\251\023\261D\010Uf\200\025Sf\020\010\206\255\350\016[\321\235\320\033\260\305\233.]*\375\200\024\275[\341L9\321\374\356\241\302\360\242\305X\351\035\240\214y\320o\356Tz?\275\361\335\322(\t\362\037*\234\206G\267t\340AHk^\371>\354\377\006H\300\010_\255\322\027\245\r\340\304\021\321\361\023\344T;\274\321jq\276\324\301+nw\003\317/\236\001=\253W4\245uq\213\227\212\3128\330\244\223\010\231Q\264\377\365D\375v#\202\033\336S~GT#\310\270\243z\241v\247\336\313\212%sP\306\305-\217\013\0217A#\2378S\314\240\344\332""\016$\027\274T\2141\335x\361u).f\237\006\274F\342\221\214\005\020g\001\346\237W\022G\267\246A\006\344\331X\237\027\r`\022 %O\021M\240Fy\2514[yP\315\327\200\316\276\253~\016|n\260>\306\366\341?<\212\177\375{\320\360\332\r\263\315\207\231 \376\035\014\323\036zt\353\031\260w\320\232>\275\341l \215@L\365\242\372\200\3511\177l\246\021i\3645\364\266|\000\371\320H\345\327ZL$\337U\363\212\220<\r/\230G\3152\304\272\022\300h\274\312\035\240H\306@\373\221\302+=\225\327\325\270\220\313\260Z{\217N\274e\317\321\333MA\221\327\361J\002\204\314\000\210\256\335\340B\226O\225\"\245+ \246z\271\246\2006\312B-\022\360\354\203\345~\320\t{C\274\216)\227\2373#\0105\371/Q\002\010\375\231i\006\275\345\263\214\364\260\262SdjT1]z\\\322C\260\336\355\356H\361$\021!ci\254\224\250\204)_|\027\333\323\330}\020\225\177\372\257,\337\262};\347\347\376\345\377\353\017\205\340\306p\322\333G{P\307E\034=\316\311\017H\315D%{;r\226\221\336\331\342\037dQ\341\253\002\014T'^\307\217>\254%j) \345\330\016'\304w@\225wQ\031\024cx\305\373@\252\260\210\214\321\334\"-d\357\322\211R\276e\225p\301Q\271=U~\\N\302LP/\353\255\336\256\235\002\343I\256\303\267\227\201q\366\241(\251}Ad\325u\265\234B\235\035\266\355l\275\023$\037L?_:\356\367#\325u\326\237\371/5_[\363\327\326\375\365\215\217\007\016lvL\037\204\307\364\301E|,\036\314\342#{\320\302\207u\320\303\207w\260p0\264\206\270f\237\201\216\276ZF\316\347\237\274Z\326\003^\335W2\001\341cm\336f\177;x\257\036\257k\376B\306\317d\375,\356c\313\320\300r\267%n\005\335tV\247k}\2603W\033\035m\201;\221\257\260\241\324\233\002\035*\016\212P(\335\315\320\373r1\201\026\347\2652\037|\215\031\220\270cgA\262\376\200\364\263\303K\014X\217MT(B6\316\030\021\270W\032\007\273\242\203\2417\0314\304\362\317q:!\310\034\"\374q0\366\220\3766\201A\274\253\272\265\313\265\267u\235\2332\247@\326\305\020OP\327\336\016\332\210\345\354>+H\237+\272\343 0\014\241\201\243\242\271Y\215\240\nr\006\230\370U\324\275xb'`\035!\313\3524J\030.tn1\003\0069\371(\232T\333=\027@\306\276\005L\353\005\2733Y=Y\215m\013\275""\341\226\177\353i\243\2671\326\000\366t\243\362\n\254#\253\036b\264\341*La\271V\333\243\212@\255\313\2457L\301\010\274,\314\373\3613\322\351_\310\006\003\273\030m\323\321-]\252\\7Q-\302\r\376;\333\271\333\357\006CP\326\332!g\306\004\372<N\203^~\370\010=w(\023\362\254T\257\202\252q\261>\335 \336y\325\277z\207\244)\237\342\002\276\230\177\000d\000\366|\227\344b\220\000\213fk\262\330\205\256\216\256\255\316-\251\372<\007\3151\277\323\3050e\032\026\373>\272Nj\264\010\347\001\t;\300\362\351\272\353\337}\326\2107\026\375\271yE\301\264\375[B\234\364HC\354\023\332H\316\375\tm\276!\327F|'\022\205\026=\376\225\273\310\223\374\377z\351\277|\355\277~\343\277y+\333])\277\256LV;\374\330\343z/3\307\376\364\277\271\007\306q_\355}\343\010\214\0202\234Q&D\2127\375^\254\321[{\000\326\2200\222\321\342\274T\212\313>\036\300\362,\324/\370?\376\342\377\362+@#h\324k\376\030\316|\301O\000\3647\3777\235I\267\243\021?\362\000\231\351)\377\324 \261z\020\203\247z\230\276\265\t\033v\031\326 U\031\254\216\301N~\006\3669\rC\322\266\277\374\247\177\373ECoxdz\005\302\367\363\022\231\240\035\n)\201\001\332+\254\321\036\241\305\225'\312ne\240*%rB\210`\277\007g\234\370\017\217\324_\2154\217\344\021~\217\226\336W:Z\227\203\361Ve9\326\311\007\311\321(\\w\030\211G\255\373'\350<. \353\030h\337\235\260\037\363\365\216zO\375]\243\340/0<\370\331\377\371\203\377!\323\332\025H\2222uE\262?S&\365\033\254A\020\300ga\370\021d\243\225\223\250N\261\365\231`6 O|<z\340\360\221\035\346\334\241/n#\335\257=\342\030z\374\004h%\310\327\213K`\014\240\300?\215\250z\232\031\345\355\341\274\223\021\324\223jc\265\265\372{\377%\342\262\377\366\2352\211\217]\301\330\247i\215w\350\271K\267;\302\211\241\364-\334\0232/\272'\235\345\024\332\311\245At\003\243w\022T\302c\221\300\022D\353\300\244EGN\324\213=\205\233\177%DG\371wbT\021\331\374\253\322$\314\t\370L\345KP.\320=\245\016J\363\031%\027W\276v\004\325\236\320\270\377\271B6\333\311\342A\356\363\355b\276\317\010(\024v\205\326q\220x%`\356\032\342?\324G<\306&\035M*0\271\307\321\353""\307P\3761\221\313\301\322\000Y\375\371\312\301\312%0\276W\230c\254P|ZZ*w(\275u\227\022\214<Fa\327\332\026\214qW\232(8V\342]M\354V0\t\303\367\266+\230\001C5\337\256\340\307\222Sn\333\325,PA\"T\260\304\3303\033\247\003'\260\323\205\346\344\224\177~\020\024\211\005t\365\375\245,\017YC\202g\214\225\362d\231\200J\002\312\003\2536]\354e\216\336n\224\250\314\323?]\032\302\363\207/\376Z\205\025\235B\356B\247\031\240\272\025A@\241\206\"\217+\256\222Zp\247z\275\366\272\016S\tA\370\010?\024\3432A\312\220\232D\217\310\021bM\250I\216W\023\3505e\2461:\206H\035:y\232\351\355\\5\2121\264x\017+q\n\370\035\251\213_\225~\000\305Y\027\0028\301\014\305&\350+`i\223\225#\250\031\264)}K\306\033\316@\027\323\235\004\276\273T\356`k\3779`H'\2300ih\224\002\254\342\250\355\220/\337+\337\006\3315\tJ{\177\255\247\366\252>R_h\234l\304\220\001\365\212\336\246K<9SLpW+\313K/\33210`'KG\205\n\372\007\020k'\274\241\003\033;\017\332\355$\310\245\221\03279u`D]\210\001;\224])\352Rwnr\363\r\024{w+\272Q\314\357Y\204\211\253\212\343\r\021)\341\237yR\317\013{\206\241\272(\230iD\202\202+%\256\311\2173_-2\265\263\214#\202\236\303\230\226p\371\2235\311\345\333\301b?p\202\336\322\010l\330\030\221p_E\337!$~\013K\275\tF\006 \361\244\360\007\210.\322%\301lv\300\346C\277(W\024\376\033\320\201\344\336N\004\217\240l\377\3064\030\216^#\266\335\007F\200?6Y\237\005iK\247{\307\311}K\256\317e\240\245\210?2\301\230U\253\363Cq\341F\332\347\360l\3421{3\3561\242\263\245\335\213\037\325\226\230\307\324-\222Z<\356\217\007\207\013-~9\346\032@\261{\270\036\331\267_\240\277\026\370\244\376I{\364\037\210\366_\323Idb[\335C:\364\334\021\326\374U\262e\373*i\362GN\327{\231\267c\320\2778B\326\355I\260\341\323\215i\256d\376\233\235\226\356\223\264\234\253\374^\273\212\207\212\377\260\313\216\332\231Z\376\357\272\274$<#a\333S\257\255\326\023\333\221\013\245^\377\34284A\223\374\004s\206\003\347E\353\207,`\351\334\337\2271\333\t\332\354\274\377\0220\024\360\000\264)Pku__\366\227W\304,oq\231\256\230wtP\026p\376\021~\036\221F\273\216\235\236$""\351`o\201i\276! n\374\002\350\340\227\311\212\357\241\343\323\310\216\300\313\375\033\341\273\000\331\234\361\034\357*(x\027\241\250\227\320 \336HHS\374\323\206a=\216\002sX\005U\366C\365\2140\306>y\302\254\247\261&\355\351ozb\215\356\001\216\275B\317P\233\375}\002\272d~;\202\207\220go\203U7\tt\016+~\301\2778F\257\037\333\035\261:\340m<0G\020\317#\227\312\275\345\357\375\021a,\013?\306c<\"Q|\032\242\263\356\255_K\343\320\313\032\0149SO0\251\362\337\250\205 \001\014\241\001\267M\332C\274\370\206\316J\317\241I~\255\362\244z\207\366D\017J\027\312\337\222\004\352 \251?\000\033w\006\217\033w\035\305+\306\2241\376\027\306\375x\362\300\341c\177?r\333Qb\325\037A\265\327\353\277\023\343i7\024\252\235\273\214\361o\365\210\376\004\315\357C\3035\001\306o\227\3772\341'\300HE\007\235\277\261\351o\376\036R\310G\310\355\023h\322#\244\010}J\276M{i/\034C\217\t\222\372Iv,\307\216\233P}\355+\3613\267N\212\035\030-}\000\025$\001\354q\242\232o>\214\003K\234\024\240\273\350\007\334\211\240[\300\363/\337\256.\327\022\376\243\331\306\232\377\n\355@\305\031\360&$Y\243\345c\374\014>\202\013\327\315\364\322G\376#\264\351\375_\227\374\245d\253\350C}\230Q]\0147\375\0167#\216\n\217U@\201\334)\331\342'\005s\255h\373W\230\177w\250a\373\277\024\374\302\252\277\272\366\361\300\201\365\216It\205N\036\234\307\307\374\301\017\370\370p0\203\217\314A\007\037\316A\367\2408\324Y\027GGh\263\2011\"\3277\030\364L\315\253\217\325W\033\t1\355q\340S\351\312t5\020\246\273W\366/\242\273\364s\212\243\021\265\261`\250$O!G\000\331\360\244\023}\030K\225.v\322\331\354\373\333\336\305\367\327C\007\001x.\007\246\005\310\010\214u\230\250\360aL~b\201+~\201\374\275y\026\3314\212r\024u\274\362!\014\233\271\307\214I\264K\246I\235\327Kk\314\245tl\353\003\252s,tJ/\346\325h\201\035\361>\347\270\311\034\301\202Y\177\024\303+&\375\227 \3554_\003\034H\371)C\3018\362=\2126\264\r\313\314\374\356+\232\322\rr\211\234\364\021<\2049\356\337\231m\344I\206\002\261%\375d\212\277\022\307\361\277\360<\373\344\000\324\354\2526\033\230\253\030%$""t\241W\302,\315+\035\034b\362\212\310\202\244h\2724\r\353\270R1\310\367\374y\r\217\326\213?\340)\024\023\301\2417F7H\340\365i\363\272\362=\367\300\247\373t\304}\001T*R^\232[\266u\340\2412\314\254\341.\014\2449\tHK^\325/\376r\266N\211\243&\325/\027\n_\211+^9\007Ub0\216\236\224clO\345i\221\010SxJ\262\031)\377B\215+\324\277\224\370\301\322%\324\345\345rz\242!R|<HN\342\273\260\336Cg\017\002U\031x\326\277|\037&7Y?\322\270\n\274U\326\2275\220\001i\376\330Kb\274\240]\303z\233\276\371~\257r<\227P\312i\021\2377\022\215\224?\007\370\271\342\257\230\242tD \002&\027x\220\327Q\234!\220/F\003\r\324\373\352F\343\236\277\360\306\177\003\314\r\020\321\360\215\264\362\356\243\244\272\335\223L\216\301\226\231\nV\356\025\275S\\\313\216<R\212\250\231\223\024\222#\032\337\"\r\356My\016\003$Bp\344\362\331\212Z\027\217 \307J\177T\344\252\337AA 2wK11\314\275\222\254r\257$E\000\243w\321\031/\240\004P\320%\260\274\273\253\211\326\n\350\026\301\263\213\221\362\002F\2420'\264\010u\364\277\216\241\207+h\345\237\272\214.\021\026\217\325\014^\250|]\225\323\025N\0001\3348y\211\006\200+<\251\306Bp\214\036xX\355h\202\255\201Ip\022\314#\267z\th\370x\335i\234%\204\nUZ'63U=\005*X\252v\023L\376\273`J\006S`\361\205\233\374\035\010x\237\273\315)\363\000\035?\345\340\375\n\002\343\345\231\177\000\0255\036\027u%7E{\366\337\225\204\002\023\014\270\300}\313*\374\026\005\027\252\260K\260?\363\345\256\312g\"\344\251\251t\022\005\264\002{\302O\246:\024\330\017\324G\270\347\037\310\2728_Q\373#\017X\3713\320\025F\311\026\355\251\251\363#\347\034\305wLT<P\005\301\236j*\355,\277\250\252\375\241\343\254\247\374\253\262\241\334\231\006\222\360\r\371LH\363VJgUD\303\023\341\204H,\224\316\243A\002\242\240\353\300\341s\300\366\027\374\336\030\232\022\\`\215\225\377U\035\253\376YO5n\370\257\177\362\177\372\231E\244\365\225V\312)\377\332\003\3409\307\032\372.\255\3215\3673\274\255\206B\215\331oK\237\320\374&,\307\003`\371\337\373s\257\374W\3005\310\370k\333>x\227+\3143v\026:{\303\016O\017o]\364{\206\321\031\252\204t\265+_""\252u\354Qn\262\003\022E\034\243\217\366O\377*;t~\3320A\337cM\327\230\022\316\210\341W\212\241L\264)Y\340\261\265\255%\213<\266\266\265\004\235y\374\350\244\251\204f+^>T\362\226\\\302\035mJ\336Q\244F\244\265\304\377\232N<\252\341F<\261\303\234yE\n\237|\312\225\033b\376\257\211\351\365\266k$\206D\261J\001\267\325\304\036\325\374\257o\240\377\277\262\211\372\325^\335\261\225z\212\223\335\253\032[\266w\273\275Qx=.\240=)\211g\215\274\355\0030\316} \336k`\r\275j\2146\226\030W\344\345^\351.\020\330\333\312R\265\253\326\021\200\013x\270\254fQ\025\272\2560\2555R\264\026\312\027*\367\300 \276LZ\371@\343R\343\tc\247A\2455`\342\327*O1\010\267v\267>R\177\323\340\375\256#\006\306\353\021\220\260\357\375\227 \\5\005.0\323\362\177\376E\200\3632Q\372\014\331e\220=\204\253\024d?\027e\033L\324\262$w|\022\224%6\271\350\355b'\373\327@\342Q\200\2678S\355\274P\352\247\340\345\316\233\376M\260~\3523\240\277\211\364\323\206\256\2340\177\017*\326(\013\322\226\215d7j\013\265'\321\332\277\216\313p\271NQ\354\344f\366ON\326e\\\367)\340\352WXP:/\374\241\321\261{\341\323FoPH\301\364J!\305\2426\227~\374\346\300\241/\267.\341\311\002h\020hxtvm\035\006\375\222\235\177\343a\030P\rj\322?\226\327A\276^\341\007\256S\365\257\330k\304\360:\000w\341\212\343\362\216\355\356\213\220\237\021\307\273s\215\374\016\026a\337\207\266\026i\250+\245<?#\362#\030)\323[\301\353\027[\217\231q\200Q~\240\317\357\034e\341~\371O\030\t\007\351h\031\351\360\326Y\246\357\373g\006*_\220g\217u\271\335\332e\347(\263i\036+\333|\r\217\204\253\237R\377:\035N\264\255?\246LV\242\021\205\370\265\257\257^\003\251\332\376\024\263\266\351\270\274M\375\235\316\250\037\275U}W\373\023\254\224\274\014\3419\010\366+\254J\027\305\264\006\372s\202\231um\307\355)\276\010|X#\215\304n\265f\003;\020\326\300?\320\213\230\337vZ\343\265k\201\003_N\014c\332w\235\032vw\256\362\251\035&\353\221\275\336\266\r\"u\366\225g\253\343 \365\311\265\251.\332\027\177\255\223\217\007\233\312\315\350e\327>\332L\252\374%\354\223V\217\327\027\0337\375\267y?\357\370""\216\367\361\300\201BG\034\275\021\361\203\217\017\"M\022\346_\002\311\217d\325\333\036\267)\350\246y\007\025\344\276\207\274\271\t\271\017S0Q\013r\267\303\2526\3508\246P\3547\3767\243\301\212psS\334+\331u!\366\030H\342\361\030\274\315q\377{\026s\300\016L\202w\334oo\254h\326\277\216L\3651\372!\377I\037\250\371j\376\020\360\334\372\\=\377\317\372\230a'US\365D}\251\321\361\317\372@\243\373O\177\030O\273\034<\230S\373\330\331W\037Q\260^\237Vm\230\204\036\"\005\333\177\216\206\253\237F\353w\237\330\274\3530;\335\247\213\357J\177R\374\376,\320\373s\377-v\013V\371^cJl\357\303\363f\377:j\300\235\365\270?\205w\360\332\277\337\236h\264'\342\206\323}\345g\325#`\355E\032\375\344#\300\350\220\335\361\370\177q&\335\350l\375\275\322G\227J\376}2\346A\200\2372\031\020S\234\221\357\300\262\314T\336\201\201\244\327\327\3207Bw!?\0215\376\255\031|\374\374\300\261\257\3108\365\360\334\270iAb\350\345lZ\220\016:ja\013\202W\037\017\003s\357P\256;\362\243k\274#\2001i\303\345\343\025\350\366\250\177\364+F\341\350=\006\331\204\241\021\301;\260kh:\233\3724\026\215\370#\302\351\006\353\261\266\225,F\224H\305U\020\300K\030\026\263\335)\224p\241\326=i\304\232\302\016/U\237\242\034B\254b\221_\021\301p^\225\307a\365\327jz-\357w\376\310B\342\310;\350\237D\211\220\347\267\322~a\232e\215\304\363W\245g\376\000\236E`\344i\020)yx\3534\206\027\370\235\317\375\347\232\257\375\366w\335\034\331\272\216\301\263_\223\255\262\335\305\316\346\371\r\321\265R\272<U\271X\235\200\251\031\365q<\310\004\304\000\363\031\010\031c~C\001\374\343\270\375\030R\365Z@\356\223;?\200\240F\216a7\035\260\331\260]\207\266\350b\002\213t\203\275\275\300\356\036\204\356_\356V\367,S\023G\312\211&mh\217\026G\374\013xp=RM\204/\336\326\"\237\330\346>\332\340\237\330\206ks\355\332H\0178\273\224\013\266\t_\002\214\n\302\203\355ex\257\367\365\216\335\327\r\014\315[\204\210\035\373}\263]\332\3541K\376fhP;\325\210j\260\320y\330\2475\342[\325\r\225w\367X\237\n\\\3020\200d}\"`d\262|\230b\246\316\223\253I)\230.\363\240\250c[\013\210$\314\367""\263Y\357\251\377\352\317\203\212\001T\221\364\2239?\347\371\336\357\376\357\177\202\016\366_\007\343\007\367\033?\345\225\036\202\301P\000\242\360jw\352\375\215\323\215$\t\022\335\327\205@e\216\237k\030\372RY\253~\250\237mt\354\204!\374~\356a\316\337F\231\373\201\255\033\213\276\027\247\033\314;\361\336\217\342\r\341\223\350\271\331O-\334\214s\024\316\256\3613\207\374nB\316\357\2045a\002{wN\341w^)\277\255\350\302\273I7\222}\340\370\357\374oA\304\263\250\230y\214\000\352F\0170\306&\240\023\026C\205\272N\027\177\302\030c<^\227\214s\270\362\036\346\331\343?\234g\252:n\337\341\255\257\221\370/\343\275\251\303;\360\217\327\316\361D\351\307J\236m\357#0\314\257\322\005V<\374\354dG\207\314]\223\360\017\2008\305\267\356f\306-\210\030\254q\227.\217\335\241\223\233\351\352`-\346\0378\203\243\374\255\325\222\361\337\211\303&\032\254\235^\377Ey\263\372m\275\243\036\331\267\351\322\371\r\036\373\265\204\t\034\254^\255u\326\036\327\322u\n\210\272M\027\332\3600\362t\370|ia\373\304\267\376\267\030\255~\260\326+\323\030\344\320\215\007\230t9\205\005\256~\353\177\367C\243\243\321\003\212\372~\232\340\357\026\034\367o\212\353|\377\271QvD4(\177\177:\035hs\024\026~m\345,p\272r\025Lsu\340\2460\n1\030\036\324\355c~PmG\215P\315\013\345\341s\342\301\201\372 \023\207\267\316\373'/\213\330\272\013\376\251q\177|\316\237\233\027F\246\010\221\343b\353\002\306)\372\003\377\205x\201h+5\212oJ\313\344\211\025\336\201\247\244b\205\330uO\355]=\037j$\225\n\251\\q\355b\252\021\t\377<\004\254\346\205\372-\031\221\177\246\270RZ\241\030\355\316C\376\241\363x\0337V\211\3737`^~\234\007Eo\367])\007|u\267\026\361z\304\177\214\325\321,\223-0(\017/\312Vct3\037y\307{\344H\004?\215\216LJQ\314T\351\003\240{\177\365d\365.\322\337E\377\342p\305\252\001\203'^\377\361\327\216\003\207\272\204\242\211wx\236\"\2379Y\274\204\024\347\177\205\235\007\212\250\374A\211\036R\025x\036\223\\\025y]~R\271E\347\355O\000\263\n\030\236\306\316\215u\366\303\022K\245\016\021\241\374\244|\247r\0054\270W\300\306\361d\357\266\237\230\2473""\334\337BU\207\001\221\316\022\307\237\256]\255\177Q\367\032\267H\r\202EDO\376\216z\213\210\002\305G\3753#<6`\3730Eo\260\337-\240 \313\027\344s\345B\202\375\326\306\035`\007\247+i\350\276\037d\324k\272\027\355\037CS\277\277r\266z\010\346w\033$H'\271S\205t\331r\375\223x\353\033\267\302\357\374\325\377\225\335\277\352\336zEQ\255\247@:\036DO\001#5\024U#\265\305\372\345\372b\343\022\376\362\001\210+`\372\354\200>\345\247@\235[n\016n\270\016\365\257\300\002Bm\366\303(\334O\362-\336\254\373\256\372e\355~\375\203\237\230C\315\363V\251\21397\277\370\353_\250\206\342U\010<\214?V\323\245\237\256M\263{\030\017RN(\315\020\343\236\325\216\325u\211\224\207\220\245\037\331:\303D\326(h\337=\305\005\240\261[\225C\225W\030p\264\375eO\361Y\371X%\013\213\024\331\376\022\203\264\016\200\240\376x\342\000\210\242\316\303\376a\272!\364\305_\233\024\022\267\310\216\255W\271ap\370\024]\341-\224\344\261\035\022r\030J7\211\213\032\375\340D7\020\331i\024\207\373\2573I\016\351[\225\016q\371\362hp\346\352\226oT\334\352M\346\357m\352\222\"\347\001\001\333A1\220y\231\235\223\204\312Q4=\301sl\365\016Z'\256q\350\226\331\366a\\I\243\310U\201\377h\016\007\377\224\374~[\213\267|Z\376P\375\246\226\017\242AO\227tq\363\204\342^!K\367\353>\243_\263\371?*\371\333\351\322=u\026b\320\324\315\377}\t\205\205\203%\031z\211\213\265\370\377\363\227hG\313\354R\373\377f\211+\234\023\300XZK\276\247c\275)2\342\232\371\n\005\234\024\367\007\245\370\236b\374\377\024\272\276\353Z\267\237\363\037t%\2253\234P\t\305\222\226\233Y\033\035\300}\302\372R\204\021\217\202\333OO\355\241\237\372V\033\315\304\3617s\331\035s\326\332\361\213\340\244\222\202\363\232\327\210.P\226\022\373z3\372y\037:\252\355m+\255\022\373z\337\366#\356\376V\233t\371\343n\233]gk\204J,\335\001\026\245\371`\227\245\\\\G\3733\020\237\t\266(\237\261\341\302\222\001,\267}A\2326\335e[\365\311-\345,\332\367\367\367u\361'\342\\\372\251\220f\232\240\010\234}u\274\311\"UI\005\300\237\273\010\227\376Iqk\207\310\324PKP5\344\206\215\370\255(\274\252\303\202I\023\342.j""\244\231\313\263\013\246\006\375\254O\210\371\372\247P\311\243\037e\243\213R\301`\323\345\201\312M\026x\317\316\347\341\005\216meK#\245D\213\014\271\245\340z\263\030\332\255\344\001[\301\235@\207\006\034\335\276{\037\203\205\352tb\2123\373\274\242ssS\t\244\344\276\222Ph%\013\253\230\006\026\375\001\354Q\247~\221\333\014\344\224@\347\324It\232p\217\203\342\315\355\335\243|\\\234\365\206\313w=\311\275V\031\254\306\252\263\376\004\206&\371?\203>\377\336\177\377\241\271\203\235n<\026\262+\t0\237f\371O\230\311\276\330\331\241W\211\221g\273\265\351\271\322\221\362M\230\366p\3758\006\323\342\335\244\277iKN\271\360\274\377#gy\377F\337h\347j\376$\273G\303\274\333\273\367\275\257S\262n\2648ga\361\237\327\277\245\260\321\271O;\267\212\373\235`\\:\276\343\356\355h\377x\354\300\241\363\245\303\314Jr\267z\271\035\313\343\252=\232\035]\234\274Elc\222\\f\354WM\344\355\036\272-\270\300~_\n\232\214I\254\336>\014D\r\364=Z\224\277H\023\333a\361\337\376\271\037\0331\366\273>\322\016\272\302/\016\242\243\3523\372Q\253\333\354t\245g+A\347\033\302h\343\367y\200\323\217\020\177:\t\204\362\230\302\263:\2307q\234\211\201m1\326\035:\303p\301p\364\000?am\316\3415Q\031\236$\275\204\354\332~\017\267a\332G\224\215c\350\324\337\364p\232\305\204\355\031O\325\241xQ.\001k\352\345?K\306\375\305z\250B\017\305Y\336\206\216\337W\277\020\001\030J\363\233\364\353\021\207\230;\272\265\371\337{i\026k\327\352\361\246N\207\350\016\305b\2557\350\024Y'\305\256\243\227\370Lp\260\206\277\223\241\370q\321:\356\022(\317p\343\n\373\t,\341\202W1~T\034^\345w\010\t/o%\330\275\221\323t;v\002c/w\304\201\327\245\006\2063B\3574\026G\374\241\312,\3758\326(\206i\315\373\363\257\374W\214\nE\347<PGv\307G\373r\353{\212\204\272\\~\007\026\357\345\352\233Zb\247\223\375J\014L\0211\266\217y\320b\374\340\357\310\326\025\346\360aG~\370\333t\207Jo\220 \374k\323\3654c}d\360\306\245K\204\273\010\226\212\374\004\243\213\220\375*\342\017\335;>\207\301`\342L}\275\361/\377'\026\257\217\276o\340\266\350\251\346\007U\254\346*Lv\263v\026\035y""\376\201\363\376\371k\225^AA(8\273z\232(\212~gD\006z\311\375E\227/\272?\344i\347mb\333<3&b~\330O\221\216\001\027~@\207K}\342\005.\027\023\341\370\277\327\030\210\251\350O\255?\376(\317\333\n\252\242\267w\325\274p\227CE\377\000l\343\307kb\006}\362Z\216\322\325\211b\027JQ\001Yc\367Y\326T\277J^j\204\333\207\361\\\361\010\275 \336t\030a\367\3346U\275>/\255\206\355\303'($M\321\320\277\302\255o\003?\207L\244\r\374<\376\202\300N\347!\036|\370'\377\035\247/\2172\304\020\2767<\2578\301\355H\306\3238\312\240\307\356\204\010\344\026Argi\300\310\354\377\000`\200\320\r";
    PyObject *data = __Pyx_DecompressString(cstring, 16179, 1);
    if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error)
    const char* const bytes = __Pyx_PyBytes_AsString(data);
    #if !CYTHON_ASSUME_SAFE_MACROS
    if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) }
    #endif
    #else /* compression: none (44530 bytes) */
const char* const bytes = ": 1.0Both decimal and binary precision supplied. Supply only one. Both (or neither) keyword arguments for Interval should be specifiedBroadcasting failed (input/arg size mismatch)Buffer view does not expose stridesC order implies last dim (Can only create a buffer that is contiguous in memory.Can't convert expression to floatCannot assign to read-only memoryviewCannot create writable memory view from read-only memoryviewCannot index with type 'Cannot set values of {}Cannot transpose memoryview with indirect dimensionsColumn index out of bounds: %d\n    Converts an expression 'a' into a SymEngine type.\n\n    Arguments\n    =========\n\n    a ............. An expression to convert.\n\n    Examples\n    ========\n\n    >>> from symengine import sympify\n    >>> sympify(1)\n    1\n    >>> sympify(\"a+b\")\n    a + b\n    \n    Converts an expression 'a' into a SymEngine type.\n\n    Arguments\n    =========\n\n    a ............. An expression to convert.\n    raise_error ... Will raise an error on a failure (default True), otherwise\n                    it returns None if 'a' cannot be converted.\n\n    Examples\n    ========\n\n    >>> from symengine.li.symengine_wrapper import _sympify\n    >>> _sympify(1)\n    1\n    >>> _sympify(\"abc\", False)\n    >>>\n\n    Dimension %d is not directDimensions incorrect for cross product: Empty shape tuple for cython.arrayF order implies first dim (Incompatible size of output argumentIndex out of range: 'i = Index out of range: 'i=Indirect dimensions not supportedInternal error in symengine.py, tribool got a fourth value.Invalid mode, expected 'c' or 'fortran', got Invalid reshape parameters Invalid shape in axis Invalid shapes for matrix addition. Got Invalid shapes for matrix multiplication. Got Invalid shapes for matrix subtraction. Got LU decomposition not implemented for non-square matrices yet.Lambda function has to be realLambdifyCSE is deprecated. Use Lambdify(..., cse=True)\n    Lambdify instances are callbacks that nu""merically evaluate their symbolic\n    expressions from user provided input (real or complex) into (possibly user\n    provided) output buffers (real or complex). Multidimensional data are\n    processed in their most cache-friendly way (i.e. \"ravelled\").\n\n    Parameters\n    ----------\n    args: iterable of Symbols\n    \\*exprs: array_like of expressions\n        the shape of exprs is preserved\n    real : bool\n        Whether datatype is ``double`` (``double complex`` otherwise).\n    backend : str\n        'llvm' or 'lambda'. When ``None`` the environment variable\n        'SYMENGINE_LAMBDIFY_BACKEND' is used (taken as 'llvm' if available, otherwise 'lambda').\n    order : 'C' or 'F'\n        C- or Fortran-contiguous memory layout. Note that this affects\n        broadcasting: e.g. a (m, n) matrix taking 3 arguments and given a\n        (k, l, 3) (C-contiguous) input will give a (k, l, m, n) shaped output,\n        whereas a (3, k, l) (C-contiguous) input will give a (m, n, k, l) shaped\n        output. If ``None`` order is taken as ``self.order`` (from initialization).\n    as_scipy : bool\n        return a SciPy LowLevelCallable which can be used in SciPy's integrate\n        methods\n    cse : bool\n        Run Common Subexpression Elimination on the output before generating\n        the callback.\n    dtype : numpy.dtype type\n\n    Returns\n    -------\n    callback instance with signature f(inp, out=None)\n\n    Examples\n    --------\n    >>> from symengine import var, Lambdify\n    >>> var('x y z')\n    >>> f = Lambdify([x, y, z], [x+y+z, x*y*z])\n    >>> f([2, 3, 4])\n    [ 9., 24.]\n    >>> out = np.array(2)\n    >>> f(x, out); out\n    [ 9., 24.]\n\n    Lambdify (line 5342)<MemoryView of Not supportedNote that Cython is deliberately stricter than PEP-484 and rejects subclasses of builtin types. If you need to pass subclasses then set the 'annotation_typing' directive to False.Number of elements should equal rows*columns.Number of equations and s""ymbols do not matchOnly C & F order supported for now.Out of bounds on buffer access (axis Output argument needs to be C-contiguousOutput argument needs to be F-contiguousOutput argument needs to be writeableOutput array need to be contiguousRealMPFR unavailable for high precision numerical values.Required at least one argument to FunctionRow index out of bounds: %dSciPy LowLevelCallable supports only functions with 1 outputSize of inp incompatible with number of args.Size of out incompatible with number of exprs.Support for zero arguments not yet supportedUnable to convert item to objectUnexpected extra arguments Unexpected integer argumentUnknown ConstantUnknown SymEngine backend: %s\nUsing backend='lambda'Unknown numpy dtype.Unknown order '%s'Unsupported SymEngine class.Unsupported method.Variable w.r.t should be givenWrong matrix shape( ?.>'){, }${}$add_note and  at 0xcannot determine truth value of Booleancannot determine truth value of Relationalcollections.abc<contiguous and direct><contiguous and indirect>disableenableeval_complex_double is deprecated. Use evalf(..., real=False)eval_double is deprecated. Use evalf(..., real=True)eval is deprecated. Use evalf(..., real=False)eval_mpc is deprecated. Use evalf(..., real=False)eval_mpfr is deprecated. Use evalf(..., real=True)eval_real is deprecated. Use evalf(..., real=True)gc (got got differing extents in dimension  <= i < isenableditemsize <= 0 for cython.array) == len(args) (no default __reduce__ due to non-trivial __cinit__ object>' (of type out parameter too shortoutput array with ndim > 1 assumes one outputpickling for Symbol subclass not implemented{} required. {} is of type {}`self` and `other` must have the same number of columns.`self` and `other` must have the same number of rows.`self` and `rhs` must have the same number of rows.`self` and `rhs` must have the same number of columns.self.begin,self.end cannot be converted to a Python object for picklingself.c cannot be converted to a Python object fo""r picklingself.thisptr cannot be converted to a Python object for picklingshape mismatch for output arraysizes don't match.<strided and direct><strided and direct or indirect><strided and indirect>subs_dict() is deprecated. Use subs() insteadsubs/msubs takes one or two arguments (%d given)subs_oldnew() is deprecated. Use subs() insteadsymengine_wrapper.pyxsympify: Cannot convert 'sympify (line 504)_sympify (line 537)sympy2symengine: Cannot convert ') to a symengine type.(tree fragment)unable to allocate array data.unable to allocate shape and strides.utf-8', valid - x AACosACoshACotACothACscACschASCIIASecASechASinASinhATanATan2ATanhA_AbsAbs.__new__Abs._sage_Abs._sympy_Abs.funcAbs.is_negativeAbs.is_realAddAdd.__new__Add._from_argsAdd._sage_Add._sympy_Add.as_coefficients_dictAdd.funcAdd.is_AddAndAnd.__new__And._sympy_AppliedUndefAssocOpAssocOp.make_argsBB1BasicBasicMetaBasicMeta.__instancecheck__Basic.__complex__Basic.__reduce__Basic._diffBasic._repr_latex_Basic._richcmp_Basic._symbolic_Basic._unsafe_resetBasic.args_as_sageBasic.args_as_sympyBasic.as_coefficients_dictBasic.as_numer_denomBasic.as_powers_dictBasic.as_real_imagBasic.atomsBasic.coeffBasic.copyBasic.diffBasic.expandBasic.hasBasic.msubsBasic.nBasic.simplifyBasic.subsBasic.subs_dictBasic.subs_oldnewBasic.xreplaceBooleanBooleanAtomBooleanFalseBooleanFalse._sage_BooleanFalse._sympy_BooleanTrueBooleanTrue._sage_BooleanTrue._sympy_Boolean.logical_notCCFUNCTYPEC_CONTIGUOUSCatalanCatalan._sage_Catalan._sympy_ComplementComplement.__new__Complement._sympy_ComplexComplexBaseComplexBase.imaginary_partComplexBase.real_partComplexDoubleComplexDouble.__complex__ComplexDouble._sage_ComplexDouble._sympy_ComplexInfinityComplexInfinity._sage_ComplexInfinity._sympy_ComplexMPCComplexMPC._sage_ComplexMPC._sympy_Complex._sage_Complex._sympy_ConditionSetConditionSet.__new__ConstantConstant._sage_Constant._sympy_ContainsContains.__new__Contains._sympy_CosCoshCotCothCscCschDDenseMatrixDenseMatrixBaseDenseMatrixBaseIterDenseMatrixBa""seIter.__init__DenseMatrixBaseIter.__iter__DenseMatrixBaseIter.__next__DenseMatrixBase.FFLDUDenseMatrixBase.FFLUDenseMatrixBase.LDLDenseMatrixBase.LUDenseMatrixBase.LUdecompositionDenseMatrixBase.LUsolveDenseMatrixBase.QRDenseMatrixBase.__array__DenseMatrixBase.__reduce_cython__DenseMatrixBase.__setstate_cython__DenseMatrixBase._applyfuncDenseMatrixBase._diffDenseMatrixBase._getDenseMatrixBase._get_indexDenseMatrixBase._matDenseMatrixBase._repr_latex_DenseMatrixBase._sage_DenseMatrixBase._setDenseMatrixBase._submatrixDenseMatrixBase._sympy_DenseMatrixBase.add_matrixDenseMatrixBase.add_scalarDenseMatrixBase.applyfuncDenseMatrixBase.as_immutableDenseMatrixBase.as_mutableDenseMatrixBase.atomsDenseMatrixBase.choleskyDenseMatrixBase.colDenseMatrixBase.col_insertDenseMatrixBase.col_joinDenseMatrixBase.conjugateDenseMatrixBase.conjugate_transposeDenseMatrixBase.crossDenseMatrixBase.detDenseMatrixBase.diffDenseMatrixBase.dotDenseMatrixBase.dump_complexDenseMatrixBase.dump_realDenseMatrixBase.expandDenseMatrixBase.getDenseMatrixBase.invDenseMatrixBase.jacobianDenseMatrixBase.msubsDenseMatrixBase.mul_matrixDenseMatrixBase.mul_scalarDenseMatrixBase.multiply_elementwiseDenseMatrixBase.ncolsDenseMatrixBase.nrowsDenseMatrixBase.ravelDenseMatrixBase.reshapeDenseMatrixBase.rowDenseMatrixBase.row_insertDenseMatrixBase.row_joinDenseMatrixBase.setDenseMatrixBase.simplifyDenseMatrixBase.solveDenseMatrixBase.subsDenseMatrixBase.tolistDenseMatrixBase.traceDenseMatrixBase.transposeDenseMatrixBase.xreplaceDerivativeDerivative.__new__Derivative._sage_Derivative._sympy_Derivative.exprDerivative.funcDerivative.is_DerivativeDerivative.variablesDictBasicDictBasicIterDictBasicIter.__reduce_cython__DictBasicIter.__setstate_cython___DictBasic_DictBasic.__reduce_cython__DictBasic.__repr___DictBasic.__setstate_cython__DictBasic.__str___DictBasic.add_DictBasic.add_dict_DictBasic.as_dict_DictBasic.clear_DictBasic.copyDummyDummy._sympy_EEllipsisEmptySetEmptySet.__new__EmptySet._sympy_EmptySet.funcEqEqu""alityEquality.__new__Equality._sage_Equality._sympy_Equality.funcEquality.is_EqualityEulerGammaEulerGamma._sage_EulerGamma._sympy_Exp1Exp1._sage_Exp1._sympy_ExprFFFGJFFLDUFFLUF_CONTIGUOUSFiniteSetFiniteSet.__new__FiniteSet._sympy_FloatFloat.__new__Float.is_FloatFloat.is_irrationalFloat.is_rationalFloat.is_realFunctionFunctionSymbolFunctionSymbol._sage_FunctionSymbol._sympy_FunctionSymbol.funcFunctionSymbol.get_nameFunctionSymbol.nameFunction.__new__Function.funcFunction.is_FunctionGJGammaGeGoldenRatioGoldenRatio._sage_GoldenRatio._sympy_GreaterThanGtHalfHalf.__new__HyperbolicFunctionIImageSetImageSet.__new__ImaginaryUnitImaginaryUnit.as_powers_dictImmutableDenseMatrixImmutableDenseMatrix.__reduce_cython__ImmutableDenseMatrix.__setstate_cython__ImmutableDenseMatrix._applyfuncImmutableMatrixInfinityInfinity._sage_Infinity._sympy_IntegerInteger.__hash__Integer.__int__Integer.__new__Integer.__richcmp__Integer._richcmp_Integer._sage_Integer._sympy_Integer.doitInteger.funcInteger.get_num_denInteger.is_IntegerInteger.is_integerInteger.pInteger.qIntegersIntegers.__new__Integers._sympy_Integers.funcIntegralIntersectionIntervalInterval.__new__Interval._sympy_Interval.endInterval.startInverseTrigonometricFunctionKKroneckerDeltaKroneckerDelta.__new__KroneckerDelta._sage_KroneckerDelta._sympy_LLDLLLVMDoubleLLVMDouble.__reduce__LLVMDouble.as_ctypesLLVMDouble.as_scipy_low_level_callableLLVMDouble.unsafe_evalLLVMDouble.unsafe_realLLVMFloatLLVMFloat.__reduce__LLVMFloat.unsafe_evalLLVMFloat.unsafe_real_LLVMLambdifyLLVMLongDoubleLLVMLongDouble.__reduce__LLVMLongDouble.unsafe_evalLLVMLongDouble.unsafe_realLULUdecompositionLUsolveLambdaComplexDoubleLambdaComplexDouble.__reduce_cython__LambdaComplexDouble.__setstate_cython__LambdaComplexDouble.unsafe_complexLambdaComplexDouble.unsafe_evalLambdaDoubleLambdaDouble.__reduce_cython__LambdaDouble.__setstate_cython__LambdaDouble.as_ctypesLambdaDouble.as_scipy_low_level_callableLambdaDouble.unsafe_evalLambdaDouble.unsafe_realLambdifyLambdifyCSE""LambdifyLowLevelCallable_Lambdify_Lambdify.__reduce_cython___Lambdify.__setstate_cython___Lambdify.eval_complex_Lambdify.eval_real_Lambdify.unsafe_evalLambertWLambertW.__new__LambertW._sage_LeLessThanLessThan.__new__LessThan._sage_LessThan._sympy_LeviCivitaLeviCivita.__new__LeviCivita._sympy_LogLowLevelCallableLtMPComplexFieldMatrixMatrixBaseMatrixBase.__reduce_cython__MatrixBase.__setstate_cython__MatrixBase._richcmp_MatrixBase._symbolic_MatrixErrorMaxMax.__new__Max._sage_Max._sympy_Max.funcMinMin.__new__Min._sage_Min._sympy_Min.funcModularIntegerMulMul.__new__Mul._from_argsMul._sage_Mul._sympy_Mul.as_coefficients_dictMul.as_powers_dictMul.funcMul.is_MulMutableDenseMatrixMutableDenseMatrix.__reduce_cython__MutableDenseMatrix.__setstate_cython__MutableDenseMatrix.col_delMutableDenseMatrix.col_swapMutableDenseMatrix.fillMutableDenseMatrix.row_delMutableDenseMatrix.row_swapMutableDenseMatrix.rowaddMutableDenseMatrix.rowmulMutableMappingNaNNaN._sage_NaN._sympy_NandNeNegativeInfinityNegativeInfinity._sage_NegativeInfinity._sympy_NegativeInfinity.as_powers_dictNegativeOneNegativeOne.__new__NonSquareMatrixErrorNorNotNotImplementedNot.__new__Not._sympy_NumberOneOneArgFunctionOneArgFunction._sage_OneArgFunction._sympy_OneArgFunction.get_argOne.__new__OrOr.__new__Or._sympy_PPOINTERPiPi._sage_Pi._sympy_PiecewisePiecewise.__new__Piecewise._sympy_PowPow.__new__Pow._sage_Pow._sympy_Pow.as_base_expPow.as_powers_dictPow.basePow.expPow.funcPow.is_PowPow.is_commutativePyFunctionPyFunctionClassPyFunctionClass.__reduce_cython__PyFunctionClass.__setstate_cython__PyFunction.__init__PyFunction._sage_PyFunction._sympy_PyFunction.pyobjectPyModulePyNumberPyNumber._sage_PyNumber._sympy_PyNumber.pyobject__Pyx_PyDict_NextRefQRQRRationalRational.__new__Rational._sage_Rational._sympy_Rational.funcRational.get_num_denRational.is_RationalRational.is_finiteRational.is_integerRational.is_rationalRational.is_realRational.pRational.qRationalsRationals.__new__Rationals._sympy_Rationals.funcRealDoubleRe""alDoubleFieldRealDouble.__complex__RealDouble.__float__RealDouble.__new__RealDouble._sage_RealDouble._sympy_RealFieldRealMPFRRealMPFR.__new__RealMPFR._sage_RealMPFR._sympy_RealMPFR.get_precRealNumberRealsReals.__new__Reals._sympy_Reals.funcRelRelationalRelational.__bool__Relational.is_RelationalSSRSYMENGINE_LAMBDIFY_BACKENDSecSechSequenceSetSet.complementSet.containsSet.intersectionSet.unionShapeErrorSieveSieve.__reduce_cython__Sieve.__setstate_cython__Sieve.generate_primesSieve_iteratorSieve_iterator.__reduce_cython__Sieve_iterator.__setstate_cython__SinSingletonSingleton.CatalanSingleton.ComplexInfinitySingleton.EmptySetSingleton.EulerGammaSingleton.Exp1Singleton.GoldenRatioSingleton.HalfSingleton.ImaginaryUnitSingleton.InfinitySingleton.IntegersSingleton.NaNSingleton.NegativeInfinitySingleton.NegativeOneSingleton.OneSingleton.PiSingleton.RationalsSingleton.RealsSingleton.UniversalSetSingleton.ZeroSingleton.falseSingleton.trueSinhStrictGreaterThanStrictLessThanStrictLessThan.__new__StrictLessThan._sage_StrictLessThan._sympy_SubsSubs.__new__Subs._sage_Subs._sympy_Subs.exprSubs.funcSubs.pointSubs.variablesSymbolSymbol.__reduce__Symbol._sage_Symbol._sympy_SympifyErrorTanTanhTrigFunctionTrigonometricFunctionUUndefFunctionUndefFunction.__call__UndefFunction.__init__UnequalityUnequality.__new__Unequality._sage_Unequality._sympy_Unequality.funcUnevaluatedExprUnevaluatedExpr.__new__UnevaluatedExpr.is_finiteUnevaluatedExpr.is_integerUnevaluatedExpr.is_numberUnionUnion.__new__Union._sympy_UniversalSetUniversalSet.__new__UniversalSet._sympy_UniversalSet.funcVView.MemoryViewWRITEABLEXXnorXorXor.__new__Xor._sympy_YZeroZero.__new___aa1a__aabcabsacosacos.__new__acoshacosh.__new__acotacot.__new__acothacoth.__new__acscacsc.__new__acschacsch.__new__addadd_dictadd_matrixadd_scalarallall_rootsallocate_bufferanyapplyfunc_applyfuncargargsargs_as_sageargs_as_sympyarrarray__array__as_base_expas_coefficients_dictas_ctypesas_deg_coef_pairas_dictas_immutableas_mutableas_numer_denomas_powers""_dictas_real_imagas_scipyas_scipy_low_level_callableasanyarrayascontiguousarrayasecasec.__new__asechasech.__new__asinasin.__new__asinhasinh.__new__assign_to_capsuleasyncio.coroutinesatanatan2atan2.__new__atan2._sage_atan2._sympy_atan.__new__atanhatanh.__new__atexitatomsbb1b__bbackendbackend_defaultbasebase_basic_exprbernoullibetabeta.__new__beta._sage_beta._sympy_binomialbits__bool__bottc_cc_doublec_ic_intc_jc_sc_void_p__call__capsulecapsule_to_basiccarmichaelcastcatalanccodeceilceilingceiling.__new__ceiling._sage_choleskyci__class____class_getitem___classesclearcline_in_tracebackcloseclscoefcoeffcolcol_delcol_insertcol_joincol_swapcolicollectionscollections.abccolscomplement__complex__complex128conditioncondition_conditionsetconjugateconjugate.__new__conjugate_transposecontainercontainer_containsconvert_to_integerconvert_to_mpcomplex_numberconvert_to_rationalconvert_to_real_numbercopy__copy__coscos.__new__coshcosh.__new__cotcot.__new__cothcoth.__new__countcount_opscreate_low_level_callablecreate_low_level_callable.<locals>.LambdifyLowLevelCallablecreate_low_level_callable.<locals>.LambdifyLowLevelCallable.__init__create_low_level_callable.<locals>.LambdifyLowLevelCallable.__new__create_sage_modulecreate_sympy_modulecrosscrtcsccsc.__new__cschcsch.__new__csectypescur_argcurrddeepdefaultdict_dendetdiag__dict__dict_dict_diffdiffdigammadirichlet_etadirichlet_eta.__new__divides__doc__doitdomaindomain_domainsdotdpsdps_to_precdtypedtype_is_objectdump_complexdump_realee_elementaryemptyempty_set_singletonemptysetencodeendend_enumerateeqeqseqs_erferf.__new__erfcerfc.__new__erroreuler_gammaeulergammaevaleval_complexeval_complex_doubleeval_doubleeval_mpceval_mpfreval_realevalfex_exexpexpandexpand.<locals>.<lambda>expand_mulexprexpr_exprseyeff1f2f_factorfactor_lehman_methodfactor_pollard_pm1_methodfactor_pollard_rho_methodfactorialfactorsfalsefibonaccifibonacci2fillfinitesetflags__float__float16float32float64floorfloor.__new__formatfortranfree_symbols_from_argsfromiterfunc__func""__funcsfunctionfunction_symbolfunctionsfunctoolsggammagamma.__new__gamma_incgamma_inc_lowergcdgcd_extgegenerate_primesgenexprget_getget_argget_dictget_function_class_get_indexget_nameget_num_denget_precgetenv__getstate__golden_ratiogthalfhashas_symbol__hash__have_flinthave_llvmhave_llvm_long_doublehave_mpchave_mpfrhave_numpyhave_piranhahintshyperbolicii_i__ididentityigcdex_imagimagesetimaginary_partimmutable__import__indexindices__init____init__.<locals>.genexprinpinp_offsetinstance__instancecheck____int__int_okinteger_nthrootintegersintegers_singletonintersectionintervalinvis_Addis_Derivativeis_Equalityis_Floatis_Functionis_Integeris_Mulis_Powis_Rationalis_Relationalis_commutativeis_complex_is_coroutineis_finiteis_integeris_irrationalis_negativeis_nonnegativeis_nonpositiveis_numberis_positiveis_rationalis_realis_sequenceis_squareis_zeroisprimeitit_enditemitemsitemsize__iter__iteriterenditeritemsitertoolsjjacobijacobiankk_keykroneckerkronecker_deltakwargsllambda<lambda>lambdifylambert_wlatexlcmleleft_openleft_open_legendrelengthlhslinsolvelist_argsllvmllvm_float_loading_funcllvm_loading_funcllvm_long_double_loading_func_loadload_basicloglog.__new__log_gammaloggammaloggamma.__new__loggamma._sage_logical_andlogical_notlogical_orlogical_xorlongdoublelowerlowergammalowergamma.__new__lowergamma._sage_lowergamma._sympy_ltlucaslucas2mm1_m__main__make_argsmap_matmat_expr_maxmaxmememview__metaclass__method_minminminus_oneminus_oomod_modmod_inversemodemodularintegermodule__module__module_cleanupmodules__mro_entries__msubsmsubs.<locals>.<lambda>mulmul_matrixmul_scalarmultiplicative_ordermultiply_elementwisenn1n2_nname__name__nannargsnbroadcastncncolsndimndindexne__new__new__next__nextnext_argnextprimenpnrnrowsnthroot_modnthroot_mod_listnum_numnumbersnumpyoobjobjectoldoneonesooopoperandsoperatoropt_levelorderosotherother_outout_offsetpp_p__packpairperfect_powerpermpipiecewisepointpolypolygammapolygamma.__new__polygamma._sympy_polyspoppospowermodpowermod_list_precprecprec_precis""ionprefix__prepare__prevprime_factor_multiplicitiesprime_factorsprimesprimitive_rootprimitive_root_listprobab_prime_ppropertypyfunction_pyfunctionpyfunction_class_pyfunction_classpyobject__pyx_capi____pyx_checksum__pyx_result__pyx_state__pyx_type__pyx_unpickle_Enum__pyx_unpickle_Sieve__pyx_unpickle__Lambdify__pyx_vtable__qq_q____qualname__quotientquotient_modr_rr_ir_jr_sraise_errorratrationalsrationals_singletonravelreal_realreal_partrealsreals_singleton__reduce__reduce__reduce_cython____reduce_ex__reduced_exprsregisterrelrem_remreplacereplacements__repr__repr_latex_repr_latex_repsrequireresreshaperesultretret_valretriesrhsri_richcmp___richcmp__right_openright_open_ringrootroot_listroundrowrow_delrow_insertrow_joinrow_swaprowaddrowirowmulrowss_sage_sagesage.allsage_modulesage.symbolic.symengine_conversionsscipysecsec.__new__sechsech.__new__selfsendseriesset_setset_complementset_complement_helperset_intersection__set_name__set_unionsetdefault__setstate____setstate_cython__shapesignsign.__new__sign.is_complexsign.is_finitesimplifysimplify.<locals>.<lambda>sinsin.__new__sinhsinh.__new__sizesolvesqrtsqrt_modssetsset_startstart_statestaticmethodstepstopstore_pickle__str__struct_submatrixsubssubs_dictsubs.<locals>.<lambda>subs_oldnewsupersymsym_symarraysymbol_symbolic_symbols_symengine_symengine.lib.symengine_wrappersymengine.utilitiessympify_sympifysympysympy2symengine_sympy_sympy_AppliedUndefsympy.core.functionsympy_modulesymssyms_systtantan.__new__tanhtanh.__new__tbool__test__throwtmptocopytolisttotienttracetransposetrigammatrigonometrictruetypesuumapunicodeunionuniversal_set_singletonuniversalsetuniverseuniverse_unpackunsafe_complexunsafe_evalunsafe_real_unsafe_resetunsigned_infinityupdateupperuppergammauppergamma.__new__uppergamma._sage_uppergamma._sympy_use_setstatevv_valuevaluesvariablesvec__version__warnwarningswrap_sage_functionxx0_xx_xreplacexreplace.<locals>.<lambda>yzerozeroszetazeta.__new__zeta._sympy_zipzooPyObject *(SymEngine::RCP<const SymEngine::Basic>)""\000c2py\320\004\035\320\0350\260\r\320=T\320TU\330\010\013\210;\220c\230\021\330\014\r\330\010%\320%6\260a\260q\330\0101\3201C\3001\320DV\320VW\330\010%\240[\260\001\330\010\022\220!\2201\330\010\014\320\014 \320 4\260A\260S\3208I\310\032\320ST\2401\200\001\330\004#\2401\240F\250!\320\000\023\2201\330\004\007\200q\330\010\017\320\017\037\230q\240\003\2403\240a\330\004\013\210;\220a\220s\230#\230Q\320\0041\260\021\330\010\017\210t\220:\230W\240A\240T\250\032\2601\200\001\330\004\013\2104\210q\320\020+\250=\270\001\200\001\330\004\013\2104\210q\320\020+\2506\260\021\200\001\330\004\013\2104\210q\320\020+\2509\260A\200\001\330\004\013\2104\210q\320\020+\250:\260Q\200\001\330\004\013\2104\210z\230\036\240q\250\001\200\001\360\n\000\005%\320$5\260Q\260a\360\010\000\005\t\210\007\210q\330\010\014\210G\2201\220A\330\010\030\320\030/\250q\260\001\260\021\330\010\r\210Z\220q\230\001\330\004\007\200u\210E\220\023\220C\220t\2305\240\001\330\010\016\210l\230!\2301\330\004,\250I\260Q\260f\270A\330\004\013\320\013\035\230Q\230a\210\001\330\014\023\2205\230\001\320\0313\2604\260x\270q\300\006\300a\200\001\340\004\022\220!\2205\230\001\330\004\024\220J\230a\230q\320\004\032\230!\330\010\013\2106\220\023\220A\330\014\023\2201\220D\230\005\230Q\230c\240\023\240D\250\005\250U\260!\2604\260v\270Q\330\024\030\230\005\230U\240!\2404\240v\250Q\330\r\023\2203\220a\330\014\023\2201\220D\230\005\230Q\230c\240\023\240D\250\005\250U\260!\2604\260v\270Q\330\024\030\230\005\230U\240!\2404\240v\250Q\340\014\022\320\022%\240Q\320&;\2702\270Q\200\001\330\004\023\2207\230!\2301\330\004\013\2104\210z\230\030\240\021\240!\2401\200\001\330\004\023\2207\230!\2301\330\004\013\2104\210z\230\031\240!\2401\240A\200\001\330\004\023\2207\230!\2301\330\004\013\2104\210z\230\024\230Q\230a\230q\200\001\330\004\023\2207\230!\2301\330\004\013\2104\210z\230\025\230a\230q\240\001\200\001\330\004\023\2207\230!\2301\330\004\013\2104\210z\230\026\230q\240\001\240\021\200\001\330\004\023\2207\230!\2301\330\004\023\2207""\230!\2301\330\004\013\2104\210q\320\020+\2503\250a\250q\260\n\270!\2701\200\001\330\004\030\230\014\320$8\270\001\270\031\300!\330\004\013\2104\210q\220\001\220\021\200\001\330\004\013\2109\220A\220V\2306\240\021\230{\250!\2509\260B\260h\270a\200\001\330\004\013\2109\220C\220q\330\010\r\210Q\210l\230/\250\021\250*\260A\330\004\013\2105\220\001\220\021\200\001\360\010\000\005\032\230\023\230A\230Q\340\004\007\200t\2101\330\010\017\210q\340\004\024\220A\340\004\016\210g\220Q\220d\230!\2301\340\004\n\210\"\210B\210a\330\010\013\210:\220Q\220i\230q\330\014\022\220*\230A\230Q\340\010\013\2102\210R\210r\220\023\220A\340\014\023\2204\220v\230Q\230a\340\010\023\2207\230!\2304\230q\240\002\240\"\240A\340\010\013\210:\220Q\220j\240\001\330\014\020\220\003\2201\220A\330\014\020\220\005\220U\230!\2301\330\020\027\220t\2306\240\021\240!\330\014\021\220\021\330\014\017\210r\220\023\220A\330\020\027\220q\330\014\026\220g\230Q\230d\240!\2401\340\014\023\2204\220v\230Q\230a\330\014\021\220\021\330\014\026\220a\320\004:\270!\360\006\000\t\021\220\002\320\022$\240A\240S\250\006\250a\250v\260T\270\031\300&\310\004\310A\330\010\020\220\001\330\010\014\210G\2205\230\001\230\021\330\014\022\220$\320\026&\240e\2501\250A\250U\260!\2603\260a\260t\320;K\3101\310E\320QR\320RU\320UV\320VZ\320Z[\200\001\330\004\035\230[\250\001\250\023\250A\250Y\260c\270\021\270!\330\004!\320!2\260!\2601\330\r\022\220!\220?\320\":\270!\2701\270L\310\003\3101\330\004\013\2101\200A\330\010\t\330\0250\260\001\260\024\260Q\330\010\016\210d\220!\2206\230\022\2308\2403\240g\250Q\330\010*\250&\260\002\260,\270a\330\010\014\210A\330\010\014\210E\220\021\330\014\r\210W\220A\220T\230\021\320\032,\250C\250w\260a\330\010\017\210s\220%\220r\230\021\200A\330\010\t\330\0250\260\001\260\024\260Q\330\010\016\210d\220!\2206\230\022\2308\2403\240h\250a\330\010*\250&\260\002\260,\270a\330\010\014\210A\330\010\014\210E\220\021\330\014\r\210W\220A\220T\230\021\320\032,\250C\250x\260q\330\017\020\330\010\017\210u\220K\230q\240\006""\240a\200A\330\010\017\210{\230!\2301\200A\330\010\017\320\017#\2401\240A\200A\330\010\017\210|\2301\230E\240\021\200A\330\010\013\2101\330\014\023\2201\330\014\020\220\n\230!\2306\240\021\330\020\021\220\024\220Q\220a\330\014\020\220\007\220q\330\020\021\220\027\230\001\230\023\230F\240\"\240A\330\014\023\2201\340\013\022\220$\220a\200A\330\010\013\2101\330\014\023\2201\330\014\020\220\n\230!\2306\240\021\330\020\021\220\024\220Q\220a\330\014\020\220\007\220t\2301\330\020\021\220\027\230\001\230\023\230F\240\"\240A\330\014\023\2201\340\014\023\2204\220q\200A\330\010\017\210|\2301\210\001\330\014\020\220\014\230A\200A\330\010\013\2102\210R\210q\220\004\220F\230#\230R\230s\240$\240a\330\014\022\220*\230A\230Q\330(+\2504\250w\260d\270!\330\010\013\2102\210R\210q\330\014\021\220\024\220Q\330\010\027\320\027/\250q\260\004\260J\270h\300a\300q\330\010\017\210q\200A\330\010\013\2102\210R\210q\220\004\220F\230#\230R\230s\240$\240a\330\014\022\220*\230A\230Q\330 #\2404\240w\250d\260!\330\010\013\2102\210R\210q\330\014\021\220\024\220Q\330\010\027\320\027/\250q\260\004\260J\270h\300a\300q\330\010\017\210q\200A\330\010!\240\037\260\001\330\014\033\320\0333\2601\260D\270\n\320BS\320ST\330\010\017\210s\220!\2201\220G\2301\230J\240e\2501\200A\330\0103\3203G\300q\310\004\310A\330\0109\270\030\300\021\300!\330\010$\240F\250\"\250I\260Q\330\010\014\210K\220|\2401\240A\330\010\t\210\021\210$\210a\320\017)\250\036\260q\330\020.\250a\330\020\024\320\024/\250q\260\001\330\020\024\220A\320\025&\240f\250B\250i\260q\330\010\017\210q\200A\330\0103\3203G\300q\310\004\310A\360\006\000\t\r\210K\220|\2401\240A\330\010\t\210\021\210'\220\021\220&\230\004\230A\320\035/\250v\260R\260y\300\001\330\010\017\210v\220R\220y\240\001\330\010\017\210t\2206\230\021\330\010\022\220$\220d\230!\330\010\016\210e\2203\220a\330\014\r\210Q\210d\220!\320\023%\240V\2505\260\001\330\024\030\230\001\320\031+\2506\260\025\260a\330\014\017\210q\220\001\330\010\017\210q\200A\330\0103\3203G\300q\310\004\310A\340\010\016""\210b\220\r\230Z\240w\250a\250}\270G\3001\300A\330\010\017\210t\2201\220B\220g\230S\240\002\240$\240a\240r\250\027\260\001\200A\330\0103\3203G\300q\310\004\310A\330\010\016\210d\220!\2206\230\022\2308\2403\240g\250Q\330\010\017\210s\220!\2201\200A\330\0103\3203G\300q\310\004\310A\330\010\016\210d\220!\2206\230\022\2308\2403\240h\250a\330\010\017\210s\220!\2201\200A\330\0103\3203G\300q\310\004\310A\330\010!\240\026\240r\250\031\260!\330\010\017\210t\2201\320\024&\240f\250B\250i\260q\330\010\013\2105\220\003\2201\330\014\020\220\013\230<\240q\250\001\340\014\020\220\004\220O\2401\340\010\r\210Q\210f\220A\330\010\021\220\021\220$\220a\330\010\016\210c\220\023\220A\330\014\023\2204\220q\320\030*\250&\260\003\2601\330\014\022\220$\220a\320\027)\250\026\250s\260!\330\014\017\210t\220=\240\004\240D\250\003\2502\250T\260\023\260D\270\004\270C\270r\300\021\330\020\021\220\021\220!\2201\220I\230Q\340\020\021\220\021\220)\2301\330\014\017\210q\220\001\340\010\017\210q\200A\340\0103\3203G\300q\310\004\310A\330\010\017\210t\2201\220F\230\"\230H\240A\200A\340\0103\3203G\300q\310\004\310A\330\010\017\210t\2201\220F\230\"\230I\240Q\200A\330\0103\3203G\300q\310\004\310A\330\010\017\210t\2201\220F\230\"\230I\240Q\330\010\016\210d\220!\2206\230\022\2308\2401\330\010\017\210t\2207\230#\230S\240\003\2407\250!\200A\330\0103\3203G\300q\310\004\310A\330\010\017\210t\2201\220F\230\"\230I\240Q\330\010\016\210d\220!\2206\230\022\2308\2401\330\010\017\210t\2208\2303\230c\240\023\240H\250A\200A\330\010\013\2103\210a\210{\230#\230R\230t\240;\250a\250y\270\001\270\021\330\014\023\2204\220q\230\007\230y\250\001\250\021\330\010\017\210t\2201\220G\2301\200A\340\010\013\2103\210a\210v\220S\230\001\330\014\023\2204\220q\330\r\020\220\001\220\026\220s\230!\330\014\023\2204\220q\230\001\340\010\017\210s\220\"\220A\200A\330\010\013\2103\210a\210v\220S\230\004\230A\230Q\330\014\022\220*\230A\320\035C\3006\310\021\330\010!\240\024\240Z\250q\260\001\330\010\027\320\027/\250q\260\001\260\032\2707\300!\3006""\310\021\330\010\017\210q\200A\330\010\013\2103\210a\210v\220S\230\001\330\014\020\220\004\220A\330\014\020\220\003\2201\220C\220s\230!\330\020\026\220l\240!\2401\330\014\023\2204\220v\230Q\230a\230t\2401\330\010\017\210u\220A\220W\230A\200A\340\010\013\2103\210f\220B\220d\230!\330\014\022\220*\230A\230Q\330\010\r\210T\220\026\220q\330\010\r\210T\220\026\220q\330\010\014\210F\220%\220q\230\001\330\014\020\220\006\220e\2301\230A\330\020\023\2201\220B\220a\220s\230\"\230O\250<\260q\270\001\330\0240\260\006\260d\270)\3004\300q\310\004\310A\200A\340\010\013\2103\210f\220B\220d\230!\330\014\022\220*\230A\230Q\330\010\r\210T\220\026\220q\330\010\r\210T\220\026\220q\330\010\014\210F\220%\220q\230\001\330\014\020\220\006\220e\2301\230A\330\020\023\2201\220B\220a\220s\230\"\230O\320+?\270q\300\001\330\0240\260\006\260d\270)\3004\300q\310\004\310A\200A\330\010\013\2103\210f\220C\220t\2301\330\014\022\220*\230A\230Q\330\010\013\2103\210f\220C\220t\2301\330\014\022\220*\230A\230Q\330\010\014\210L\230\001\230\025\230a\200A\330\010\013\2103\210f\220C\220t\2301\330\014\022\220*\230A\230Q\330\010\013\2103\210f\220C\220t\2301\330\014\022\220*\230A\230Q\330\010\014\210O\2301\230E\240\021\200A\330\010\017\320\017!\240\021\240!\200A\330\0104\3204I\310\021\310$\310a\330\010\016\210d\220!\2206\230\022\2308\2403\240g\250Q\330\010%\240V\2502\250^\2701\330\010%\240V\2502\250Z\260q\330\010\014\210A\330\010\014\210E\220\025\220a\220q\230\005\230Q\330\014\r\210Q\210d\220!\320\023%\240Q\240a\240t\2507\260!\330\020\024\220A\320\025'\240q\250\001\250\024\250W\260A\330\010\017\210s\220%\220q\230\001\200A\330\0104\3204I\310\021\310$\310a\330\010\016\210d\220!\2206\230\022\2308\2403\240h\250a\330\010%\240V\2502\250^\2701\330\010%\240V\2502\250Z\260q\330\010\014\210A\330\010\014\210A\330\010\014\210E\220\025\220a\220q\230\005\230Q\330\014\r\210W\220A\220T\230\021\320\032,\250A\250Q\250d\260(\270!\330\014\r\210W\220A\220T\230\021\320\032,\250A\250Q\250d\260(\270!\330\017\020\330\010\017\210u\220E\230""\021\230%\230s\240!\200A\330\010\t\330\0254\260A\260T\270\021\330\010\017\210v\220R\220y\240\002\240'\250\021\250!\330\010\017\210s\220!\2201\200A\330\010\013\2104\210q\220\006\220c\230\021\330\014\023\2205\230\013\2401\240A\340\014\022\320\022%\240Q\240a\200A\330\010!\240\027\250\001\250\021\330\010\013\2104\210r\220\021\330\014\022\220$\220f\230B\230a\330\010\013\2104\210r\220\021\330\014\022\220!\330\r\021\220\022\2204\220q\330\014\022\220$\220a\330\010\013\2104\210v\220S\230\001\230\021\330\014\022\220*\230A\230Q\330\010!\240\024\240Z\250q\260\001\330\010\027\320\027/\250q\260\001\260\032\270;\300a\300\177\320Vn\320no\320op\320p|\320|}\330\010\017\210q\200A\330\010\013\2104\210s\220!\330\014\024\220C\220q\230\001\330\014\017\210v\220S\230\001\330\020\026\220i\230q\240\001\330\021\027\220s\230!\330\020\027\220}\240A\240T\250\021\250!\330\021\027\220r\230\021\330\020\026\220i\230q\320 =\270Q\270d\300!\3001\340\010\017\210u\220A\220Z\230t\2408\2501\250A\200A\330\010\013\2104\210t\220;\230a\230s\240!\330\010\017\210t\2205\230\001\230\023\230A\200A\330\010\013\2104\210t\220;\230a\230s\240!\330\010\017\210t\2205\230\001\230\023\230C\230q\200A\330\010!\240\027\250\001\250\021\330\010\013\2104\210v\220R\220t\2306\240\023\240B\240c\250\021\250&\260\002\260!\2606\270\023\270A\330\014\022\220*\230A\230Q\330\037#\2407\250$\250i\260q\270\007\270q\300\001\330\010&\240d\250*\260A\260T\270\027\300\004\300A\330\021\027\220q\230\017\320'?\270q\300\004\300L\320P_\320_w\320wx\320xy\360\000\000z\001F\002\360\000\000F\002U\002\360\000\000U\002m\002\360\000\000m\002n\002\360\000\000n\002t\002\360\000\000t\002u\002\330\010\017\210q\200A\330\010\013\2104\210v\220S\230\003\2304\230v\240Q\330\014\022\320\022&\240a\330\010\017\210t\2201\220F\230$\230i\240t\2501\200A\330\010!\240\027\250\001\250\021\330\010\013\2104\210v\220S\230\001\230\021\330\014\022\220*\230A\230Q\330\010!\240\024\240Z\250q\260\001\330\010\027\320\027/\250q\260\001\260\032\2709\300A\300_\320Tl\320lm\320mn\320no\330\010""\017\210q\200A\330\010\013\2104\210v\220S\230\004\230A\330\014\022\320\022%\240Q\240a\330\010!\240\024\240Z\250q\260\004\260F\270$\270d\300&\310\001\330\010!\240\024\240Z\250q\260\004\260F\270$\270d\300&\310\001\340\021\034\230A\330\014\033\320\0333\2601\260D\270\001\330\014\033\320\0333\2601\260A\260Q\330\014\033\320\0333\2601\260A\260Q\330\014\r\330\010\017\210s\220#\220Q\320\004\032\230*\240A\330\010\013\2104\210w\220a\330\014\023\2205\230\001\230\027\240\004\240H\250A\250Q\340\010\013\2104\210w\220e\2304\230z\250\027\260\001\330\014\022\220*\230A\230Q\340\010\013\2104\210s\220%\220t\230:\240S\250\001\330\014\022\220!\330\010\013\210:\220S\230\001\330\014\030\230\013\2401\240A\340\010\013\210:\220R\220q\330\014\017\210z\230\021\230%\230z\250\024\250Z\260s\270#\270Y\300a\330\020\027\220q\330\014\023\2208\2301\230C\230q\240\006\240a\330\010\013\210:\220R\220q\330\014\022\220*\230A\230Q\330\r\027\220q\230\005\230Q\330\014\023\2201\340\014\023\220:\230Q\230e\2401\240A\200A\330\010#\2404\240z\260\021\260!\330\010\026\220d\230&\240\001\330\010\026\220d\230&\240\001\340\010\014\210E\220\025\220a\220q\330\014\020\220\005\220U\230!\2301\330\020\025\220W\230A\230Q\230a\230t\2405\250\001\250\023\250A\330\020\023\2203\220g\230Q\330\024\032\230#\230Y\240d\250!\2503\250c\260\022\2601\330\010\017\210q\200A\340\0105\3205J\310!\3104\310q\330\010-\250V\2603\260n\300A\330\010\017\320\017!\240\021\240!\200A\340\0105\3205J\310!\3104\310q\330\010)\250\026\250s\260*\270A\330\010\017\320\017!\240\021\240!\200A\340\0105\3205J\310!\3104\310q\330\010\017\210t\2201\220F\230#\230X\240Q\200A\330\010%\320%6\260a\260q\330\010\017\210t\220:\230\\\250\021\250!\200\014\210A\330\004\023\2207\230!\2301\330\004\007\200t\2103\210a\330\010\017\210t\2201\320\024/\250s\260!\2601\260A\330\004\023\2207\230!\2301\330\004\013\2104\210q\320\020+\2503\250a\250q\260\n\270!\2701\200\r\320\r$\240A\330\004\023\2207\230!\2301\340\004\007\200u\210C\210q\330\010\025\220Q\330\t\n\330\010\025\220Q\340\010\025\220Q\330""\004\013\2104\210q\320\020+\2506\260\021\260&\270\001\270\033\300F\310!\200A\330\010&\320&7\260q\270\001\330\010\017\210t\220:\230T\240\021\240!\320\000\024\220A\330\004\023\2208\2301\230A\330\004\023\2208\2301\230A\330\004\013\2101\210D\220\010\230\001\330\004\010\210\004\210A\330\010\017\210t\2201\220M\240\026\240q\340\010\030\230\013\2401\240F\250!\250;\260f\270A\270Q\200A\330\010\031\230\027\240\001\240\021\330\0108\3208L\310A\310U\320RS\330\010\017\210t\2201\320\024&\240o\3205I\310\021\310$\310a\330\024#\2401\240A\200A\330\010\031\230\027\240\001\240\021\330\0108\3208L\310A\310U\320RS\330\010\017\210t\2201\320\024&\240o\3205I\310\021\310$\310a\330\024%\240Q\240a\200A\330\010\031\230\027\240\001\240\021\330\0108\3208L\310A\310U\320RS\330\010\017\210t\2201\320\024&\240o\3205I\310\021\310$\310a\330\024\036\230a\230q\200A\340\021 \240\001\240\024\320%8\270\007\270q\320@P\320PW\320WX\320XY\330\010\017\210t\2201\320\024%\240W\250D\260\001\3201B\300!\200A\330\010\017\210\177\320\0369\270\021\270$\270j\310\n\320RS\200\001\330\004\035\230[\250\001\250\023\250A\330\r\021\220\021\220/\320!9\270\021\270!\270<\300q\330\004\013\2101\200A\330\010\017\210{\230\"\230A\200A\330\010\017\210\177\320\036<\270A\270T\300\032\320K]\320]^\200A\330\021$\240A\240_\3204L\310A\310T\320Q]\320]`\320`a\200A\330\010\t\330\014\021\320\021<\270A\330\014\023\320\023)\250\021\250!\330\017\020\330\023\024\330\014\023\2204\220z\240\021\240#\240Q\240d\250)\2604\260q\270\003\2701\270A\200A\330\010\014\210A\330\010'\240\177\3206N\310a\310t\320ST\330\010\014\210E\220\025\220a\220q\230\006\230a\330\014\020\220\001\330\014\020\220\005\220U\230!\2301\230F\240!\330\020\021\220\027\230\001\230\024\230Q\230a\230t\2401\240C\240s\250(\260!\330\014\r\210W\220A\220Q\330\017\020\330\010\017\210u\320\024$\240A\240Q\200A\330\010\014\210A\330\010'\240\177\3206N\310a\310t\320ST\330\010\014\210E\220\025\220a\220q\230\006\230a\330\014\020\220\001\330\014\020\220\005\220U\230!\2301\230F\240!\330\020\021\220\027\230\001""\230\024\230Q\230a\230t\2401\240C\240s\250'\260\021\330\014\r\210W\220A\220Q\330\017\020\330\010\017\210t\2207\230!\2303\230j\250\001\200A\330\010\t\330\014\021\320\021<\270A\330\014\023\320\023%\240Q\240a\330\017\020\330\023\024\330\014\023\2204\220x\230q\240\003\2401\240A\200A\330\010\t\330\014\021\320\021<\270A\330\014\023\320\023.\250a\250q\330\017\020\330\023\024\330\014\023\2204\220\177\240a\240s\250!\2504\250y\270\004\270A\270S\300\001\300\024\300Z\310u\320TW\320WX\320X\\\320\\k\320kl\200A\330\010\t\330\014\021\320\021<\270A\330\014\023\320\023&\240a\240q\330\017\020\330\014\022\220$\220l\240!\330\014\023\2203\220a\220r\230\027\240\003\2402\240S\250\001\250\022\2507\260!\200A\330\010\014\210C\210q\220\001\330\010\014\210C\210q\220\001\360\014\000\t\n\340\014\021\220\021\330\014\021\220\021\330\014\023\2204\220q\320\030;\270>\310\021\310$\310a\330\017\020\340\014\022\220#\220Q\220b\230\007\230q\240\001\330\025 \240\001\240\025\240a\330\014\022\220#\220Q\220b\230\007\230q\240\001\330\025 \240\001\240\025\240a\330\014\023\2204\220q\320\0302\260(\270!\2704\270w\300j\320PX\320XY\320YZ\200A\330\010\014\210C\210q\220\001\360\010\000\t\n\340\014\021\220\021\330\014\025\220Q\330\017\020\340\014\025\220Q\330\014\022\220#\220Q\220b\230\007\230q\240\001\330\025 \240\001\240\025\240a\340\010\013\2101\330\014\023\2204\220q\320\0302\260(\270!\2701\340\014\023\2204\220q\320\0302\260(\270!\2701\200A\330\010\014\210C\210s\220!\330\014\023\2206\230\021\230)\2403\240a\240v\250Q\250a\330\016\021\220\023\220A\330\014\023\2204\220v\230Q\230i\240s\250!\2506\260\021\260!\340\014\023\2201\200A\330\010\014\210C\210s\220!\330\014\034\230C\230q\240\006\240a\240{\260&\270\001\270\021\330\016\021\220\023\220A\330\014\034\230D\240\001\240\026\240q\250\013\2606\270\021\270!\330\010\014\210C\210s\220!\330\014\023\2204\220q\320\0303\2603\260a\260q\270\n\300!\3001\330\016\021\220\023\220A\330\014\023\2204\220q\320\0303\2603\260a\260q\270\n\300!\3001\330\016\021\220\023\220A\330\014\023\2204""\220q\320\0303\2603\260a\260q\270\n\300!\3001\330\016\021\220\023\220A\330\014\023\2204\220q\320\0303\2603\260a\260q\270\n\300!\3001\200A\330\010\014\210D\220\002\220!\2205\230\001\330\010\013\2104\210z\230\021\230$\230o\250Q\330\014\022\220)\2301\230A\330\010\017\210w\220a\220q\200A\330\017\020\330\010\014\210D\220\001\330\010\014\210A\330\010\014\210E\220\025\220a\220s\230#\230Q\230d\240!\330\014\r\210W\220B\220a\220q\230\002\230(\240$\240a\240q\250\002\250\"\250B\250h\260a\330\010\017\210u\220J\230b\240\001\200A\330\017\020\330\010\014\210D\220\r\230Q\330\010\017\210t\2203\220b\230\001\200A\330\017\020\330\010\014\210D\220\r\230Q\330\010\017\210t\2204\220r\230\021\200A\330\017\020\330\010\014\210D\220\016\230a\330\010\017\210u\220C\220r\230\021\200A\330\017\020\330\010\014\210D\220\016\230a\330\010\017\210u\220D\230\002\230!\200A\330\017\020\330\010\014\210D\220\016\230a\330\010\017\210u\220I\230R\230q\200A\330\017\020\330\010\014\210D\220\016\230a\330\010\017\210u\220K\230r\240\021\200A\330\017\020\330\010\014\210D\220\016\230a\330\010\017\210u\220O\2402\240Q\200A\330\017\020\330\010\014\210D\220\016\230b\240\001\240\021\330\010\017\210u\220D\230\001\230\021\200A\340\010\020\220\004\220E\320\031)\250\024\250T\260\024\260Q\200A\330\010\014\210E\220\025\220a\220t\2301\330\014\020\220\005\220U\230!\2304\230q\330\020\024\220A\220S\230\005\230Q\200A\330\010\014\210F\220!\200\001\360\010\000\005\r\210A\330\004\014\210G\2201\220F\230,\240a\330\004\007\200v\210W\220E\230\024\230Q\330\010\022\220!\330\010\027\220q\340\010\027\220q\330\004\007\200q\330\010\017\320\017&\240d\250!\2507\260+\270W\300A\340\010\017\320\017&\240d\250!\2507\260+\270Q\200A\330\010\014\210H\220A\200A\330\010\014\210H\220A\220S\230\001\330\010\014\210H\220A\220S\230\001\330\010\013\2105\220\n\230!\2303\230i\240t\250:\260Q\260c\270\021\330\014\020\220\003\2203\220a\330\020\027\220q\330\022\025\220S\230\001\330\020\027\220q\330\014\023\2201\330\010\017\210w\220j\240\001\240\023\240C\240q\200A\330""\010\034\230H\240B\240a\330\010\017\210t\220:\230Q\230a\200A\330\010\034\230H\240B\240a\330\010\017\210t\220:\230V\2401\240D\250\n\260!\2601\200A\330\010\034\230H\240B\240a\330\010\017\210t\220:\230Y\240a\240t\250:\260Q\260a\200A\330\010\014\210H\220D\230\006\230b\240\001\330\010\014\210D\220\006\220b\230\004\230B\230f\240B\240d\250\"\250A\330\014\023\2204\220r\230\025\230a\230t\2406\250\023\250D\260\002\260'\270\024\270V\3002\300T\310\022\3101\340\014\022\220!\200A\330\010\014\210H\220F\230!\200A\330\010\014\210I\220Q\330\010\014\210E\220\021\200A\330\010\014\210K\220|\2401\240A\330\010\016\210f\220D\230\014\240A\330\010\013\2104\210}\230D\240\004\240C\240r\250\024\250S\260\004\260D\270\003\2702\270Q\330\014\r\210Q\210a\210q\220\010\230\001\230\021\340\014\r\210Q\210h\220a\330\010\017\210q\200A\330\010\014\210K\220|\2401\240A\330\010\t\210\021\210(\220!\330\010\017\210q\200A\330\010\014\210K\220|\2401\240A\330\010\t\210\021\210-\220q\330\010\017\210q\200A\330\010\014\210K\220|\2401\240A\330\010\t\210\021\210-\220q\330\010\t\210\021\210&\220\001\330\010\017\210q\200A\330\010\020\220\005\220Q\320\026G\300q\330\010\017\210t\2205\230\002\230!\200A\330\010\020\220\005\220Q\320\026I\310\021\330\010\017\210t\2205\230\002\230%\230q\200A\330\010\013\210:\220Q\220a\330\014\023\2206\230\027\240\001\240\025\240a\240q\340\014\023\2201\200A\340\010\013\210:\220Q\220c\230\021\330\014\020\220\001\330\014\020\220\002\220'\230\021\230!\2302\230V\2404\240q\250\002\250$\250a\340\014\020\220\005\220Y\230a\230z\250\021\330\020\024\220D\230\001\230\025\230a\200A\340\010\013\210:\220Q\220f\230A\330\014\023\2204\220q\340\014\024\220G\2301\230A\200A\330\010\017\210~\230Q\230j\250\001\200A\340\021\035\230Q\230o\320-F\300a\300t\3101\330$3\2601\3204D\300O\320ST\320TU\330\010\017\210q\220\004\220A\320\025&\240g\250T\260\021\3202C\3001\200A\330\010\r\210T\220\026\220q\330\010\r\210T\220\026\220q\330\010\013\2102\210R\210q\330\014\021\220\021\330\010\013\2102\210R\210q\330\014\021\220\021\330""\010\013\2102\210R\210r\220\023\220B\220c\230\021\330\014\022\220*\230A\320\035;\2702\270Q\330\010\013\2102\210R\210r\220\023\220B\220c\230\021\330\014\022\220*\230A\320\035>\270b\300\001\330\010\017\210s\220!\200A\340\010:\320:U\320UV\320VZ\320Z[\330\010\017\210t\2201\220F\230\"\230H\240A\200A\330\010%\240V\2504\250y\270\t\300\021\330\010\014\210A\330\010\014\210E\220\025\220a\220q\230\005\230Q\330\014\r\210W\220A\220T\230\021\320\032,\250A\250Q\250d\260'\270\021\330\010\017\210q\200A\330\010%\240V\2504\250y\270\t\300\021\330\010\014\210A\330\010\014\210E\220\025\220a\220q\230\005\230Q\330\014\r\210W\220A\220T\230\021\320\032,\250A\250Q\250d\260(\270!\330\010\017\210q\200A\330\010\035\230W\240A\240Q\330\010\013\210:\220Q\220c\230\021\330\014\022\220!\2201\340\014\022\220$\220a\330\010&\240c\250\021\250$\250f\260D\270\004\270F\300!\330\010\016\210d\220)\320\0332\260!\2606\270\022\270;\300f\310F\320RS\330\010\017\210q\200A\330\010\035\230W\240A\240Q\330\010\013\210:\220Q\220c\230\021\330\014\022\220!\2201\340\014\022\220$\220a\330\010&\240c\250\021\250$\250f\260D\270\004\270F\300!\330\010\016\210d\220)\230;\240a\240v\250R\250{\270&\300\006\300a\330\010\017\210q\200A\330\010\035\230W\240A\240Q\330\010\013\210:\220Q\220c\230\021\330\014\022\220!\2201\340\014\022\220$\220a\330\010&\240c\250\021\250$\250f\260D\270\001\270\026\270q\330\010\016\210d\220)\230;\240a\240v\250R\250{\270&\300\006\300a\330\010\017\210q\200A\330\010\"\240'\250\021\250!\330\010!\240\024\240Z\250q\260\004\260F\270$\270a\270v\300Q\330\021\032\230!\320\033:\270&\300\004\300A\330\020/\250v\260R\260q\330\020)\250\026\250q\260\001\330\010\017\210q\200A\330\010!\240\024\240Z\250q\260\004\260F\270$\270d\300&\310\001\330\010!\240\024\240Z\250q\260\004\260F\270$\270d\300&\310\004\310A\310S\320PT\320TZ\320Z\\\320\\]\320]a\320ag\320gh\330\010\016\210d\220)\2305\240\001\240\026\240q\250\001\340\010\014\210E\220\025\220a\220t\2306\240\021\330\014\020\220\005\220U\230!\2302\230R\230s\240$\240f\250A\330\020\021""\220\024\220Q\220c\230\023\230A\230T\240\021\240#\240Q\330\020\021\220\024\220Q\220c\230\023\230A\330\014\r\210T\220\021\220#\220S\230\001\230\024\230Q\230c\240\021\340\010\017\210s\220!\200A\330\010!\240\024\240Z\250q\260\004\260F\270$\270d\300&\310\001\330\010!\240\024\240Z\250q\260\004\260F\270$\270d\300&\310\001\330\010!\240\024\240Z\250q\260\004\260F\270$\270d\300&\310\001\330\010\016\210d\220)\2306\240\021\240&\250\001\250\033\260F\270!\270;\300f\310A\310Q\330\010\017\210s\220#\220Q\200A\330\010!\240\024\240Z\250q\260\004\260F\270$\270d\300&\310\001\330\010!\240\024\240Z\250q\260\004\260F\270$\270d\300&\310\001\330\010\016\210d\220)\2303\230a\230v\240Q\240k\260\026\260q\270\001\330\010\017\210s\220!\200A\330\010!\240\024\240Z\250q\260\004\260F\270$\270d\300&\310\001\330\010!\240\024\240Z\250q\260\004\260F\270$\270d\300&\310\001\330\010\016\210d\220)\2304\230q\240\006\240a\240{\260&\270\001\270\021\330\010\017\210s\220!\200A\330\010!\240\024\240Z\250q\260\004\260F\270$\270d\300&\310\001\330\010\016\210d\220)\2309\240A\240V\2501\250A\330\010\017\210q\200A\330\010!\240\024\240Z\250q\260\004\260G\2704\270q\330\021\026\220a\320\0276\260f\270D\300\001\330\020\021\220\032\320\0334\260F\270!\2701\330\010\017\210q\200A\330\010\"\240'\250\021\250!\330\010!\240\024\240Z\250q\260\001\260\026\260t\2701\270F\300!\330\021\"\240!\240?\3202J\310!\3104\310q\330\014\033\320\0333\2601\260B\260a\330\014\033\320\0333\2601\260A\260Q\330\010\017\210q\200A\330\010\r\210^\230:\240Z\250w\260f\270I\300Q\330\010\013\2104\210~\230R\230q\330\014\022\220,\230a\230q\330\010\020\220\004\220A\220X\230Q\230a\330\030!\240\021\240*\250G\2607\270!\270;\300a\330\010\020\220\004\220A\220X\230T\240\037\260\004\260D\270\001\330\010\017\320\017(\250\001\250\026\250w\260a\200A\330\010\r\210^\230:\240Z\250w\260f\270I\300Q\330\010\013\2104\210t\2201\330\014\022\220,\230a\230q\330\010\013\2104\210~\230R\230q\330\014\022\220,\230a\230q\330\010\020\220\004\220A\220X\230Q\230a\330\030!\240\021\240*\250G\2607""\270!\270;\300a\330\010\020\220\004\220A\220X\230T\240\037\260\004\260D\270\001\330\010\017\320\017(\250\001\250\026\250w\260a\200A\360\022\000\t\016\210^\230:\240Z\250w\260f\270I\300Q\330\010\013\2104\210t\2201\330\014\022\220,\230a\230q\330\010\020\220\004\220A\220X\230Q\230a\330\030!\240\021\240*\250G\2601\260K\270w\300a\300{\320RS\330\010\020\220\004\220A\220X\230T\240\037\260\004\260D\270\001\330\010\017\210w\220a\200A\360\022\000\t\016\210^\230:\240Z\250w\260f\270I\300Q\330\010\020\220\004\220A\220X\230Q\230a\330\030!\240\021\240*\250G\2601\260K\270w\300a\300{\320RS\330\010\020\220\004\220A\220X\230T\240\037\260\004\260D\270\001\330\010\017\210w\220a\200A\330\010\025\220_\320$<\270A\270Q\270j\310\010\320PQ\320Q`\320`x\320xy\320yz\320z{\330\010\014\210C\210s\220!\330\014\023\2202\220R\220q\330\016\021\220\023\220A\330\014\023\2202\220S\230\001\330\016\021\220\023\220A\330\014\023\2202\220S\230\001\330\016\021\220\023\220A\330\014\023\2202\220S\230\001\330\016\021\220\023\220A\330\014\023\2202\220R\220q\330\016\021\220\023\220A\330\014\023\2202\220S\230\001\340\014\023\2201\200A\330\010\016\210a\330\010\r\210T\220\022\2206\230\021\330\010\016\210c\220\023\220D\230\002\230$\230a\330\014\017\210q\220\004\220A\220V\2303\230k\250\024\250Q\250f\260C\260q\330\014\017\210q\220\001\330\010\017\210q\200A\330\010\017\210\177\230a\230t\2408\2501\200A\340\021\036\230a\230t\320#6\260g\270Q\320>O\310w\320VW\320WX\330\010\017\210t\2201\320\024%\240X\250T\260\021\3202C\3001\200A\330\010 \240\016\250a\250v\260T\270\021\330\010\020\220\r\230Q\200A\330\010>\320>]\320]^\320^b\320bc\330\010\017\210t\2201\220F\230\"\230H\240A\200A\330\017\020\330\010\016\210d\220)\2301\330\010\013\2107\220!\2205\230\001\330\014\023\2203\220g\230Q\330\010\017\210q\200A\330\010!\240\027\250\001\250\021\330\010&\240d\250*\260A\260T\270\027\300\004\300A\330\021\025\220Q\220o\320%=\270Q\270d\300,\310o\320]u\320uv\320vw\360\000\000x\001D\002\360\000\000D\002S\002\360\000\000S\002k\002\360\000\000k\002l""\002\360\000\000l\002r\002\360\000\000r\002s\002\330\010\013\2103\210a\210x\220s\230!\330\014\023\2206\230\021\230#\230Q\340\014\023\2201\200A\330\010&\240d\250*\260A\260T\270\026\270t\3004\300v\310Q\330\010\016\210d\220)\230:\240Q\240f\250F\260!\330\010\017\210q\200A\330\010&\240d\250*\260A\260T\270\026\270t\3004\300v\310Q\330\010\016\210d\220)\320\033/\250q\260\006\260f\270A\330\010\017\210q\200A\330\010\016\210d\220,\230a\330\010\017\210s\220!\2202\220X\230S\240\002\240#\240Q\240b\250\010\260\001\200A\330\010\026\220d\230&\240\001\330\010\026\220d\230&\240\001\330\010\014\210E\220\025\220a\220q\330\014\020\220\005\220U\230!\2301\330\020\024\220E\230\021\230#\230S\240\001\240\021\240$\240e\2501\250C\250q\200A\330\010\016\210i\220q\230\001\200A\330\017\020\330\010\032\230$\230i\240q\330\010\022\220!\2203\220c\230\021\230%\230q\240\005\240Q\320&9\270\021\270!\330\010\017\210u\220F\230!\2303\230a\230w\240a\200A\330\010\016\210k\230\021\230!\330\010\013\210;\220a\220q\330\010\017\320\017#\2401\240A\200A\340\010\017\210q\200A\330\010\030\230\007\230q\240\001\330\021#\2401\240O\3203K\3101\310D\320P\\\320\\_\320_b\320bd\320de\330\010\017\210q\200A\330\010\017\210q\200A\340\010\030\230\007\230q\240\001\330\010\013\2103\210g\220Q\330\014\022\220$\220i\230t\2401\240C\240s\250\"\250A\200A\330\021'\240q\250\017\3207O\310q\320PT\320T`\320`c\320cd\200A\330\017\020\330\010\017\210q\220\004\220A\200A\360\006\000\022(\240q\250\010\260\001\330\010\014\210A\330\010\014\210E\220\025\220a\220v\230U\240!\330\014\r\210W\220A\220V\2301\230A\330\010\017\210q\200A\330\017\020\330\010\017\210q\220\005\220Q\200A\330\010\017\210q\220\001\220\024\220Q\220f\230F\240$\240h\250e\2601\260D\270\006\270a\330\020\024\220H\230E\240\021\240$\240f\250A\200A\330\010\030\230\007\230q\240\001\330\021&\240a\240\177\3206N\310a\310t\320S_\320_b\320bd\320de\330\010\017\210q\200A\330\010\030\230\007\230q\240\001\330\010&\240d\250*\260A\260T\270\026\270t\3004\300v\310Q\330\010\016\210d\220)\230;\240a\240r\250""\032\2606\270\026\270q\330\010\017\210q\200A\330\010\030\230\007\230q\240\001\330\010\017\210t\2201\320\024&\240o\3205I\310\021\310$\310a\330\024\035\230Q\230b\240\001\200A\330\010\017\210r\220\022\2201\200\014\210A\330\004\007\200r\210\023\210A\330\010\014\210A\330\004\035\230[\250\001\250\023\250A\330\r\022\220!\220?\320\":\270!\2701\270A\330\004\013\2101\200A\330\010\017\210r\220\026\220q\230\004\230G\2401\200A\340\010\017\210s\220!\2201\200A\330\010\017\210s\220!\2201\220J\230a\230v\240X\250T\260\032\2701\200A\330\010\r\210]\230!\330\010\017\210s\220\"\220D\230\001\200A\330\017\020\330\010\017\210t\2201\200A\330\010\017\210t\2201\220A\200A\330\010\017\210t\2201\220D\230\007\230q\200A\340\010\017\210t\2201\220F\230$\230i\240t\2501\250C\250q\200A\330\010\017\210t\2201\220O\320#;\2701\270D\300\n\310&\320PQ\200A\340\010\017\210t\2201\200A\330\010\017\210t\2201\320\024%\240_\3204P\320PQ\320QU\320U_\320_i\320ij\200A\330\010\017\210t\2201\320\024%\240_\3204P\320PQ\320QU\320U_\320_n\320no\200A\330\010\017\210t\2201\320\024&\240o\3205M\310Q\310d\320R\\\320\\h\320hi\200A\330\010\017\210t\2202\220Q\200A\330\010\017\210t\2202\220T\230\025\230a\230q\240\014\250C\250q\260\006\260c\270\021\270(\300$\300e\3109\320TX\320X^\320^c\320ce\320ef\200A\330\017\020\330\010\017\210t\2203\220a\220t\2309\240A\200A\330\017\020\330\010\017\210t\2203\220g\230Q\230c\240\021\240!\200A\330\010\017\210t\2204\220q\200A\340\010\017\210t\2205\230\001\230\021\200A\340\010\017\210t\2205\230\001\230\022\2301\200A\330\017\020\330\010\017\210t\2205\230\001\230\024\230X\240R\240w\250a\200A\330\017\020\330\010\017\210t\2205\230\002\230$\230m\2501\200A\330\017\020\330\010\017\210t\2206\230\022\2304\230}\250A\200A\330\010\017\210t\2207\230$\230a\200A\330\010\017\210t\2208\2301\200A\340\010\017\210t\2209\230A\200A\330\010\017\210t\2209\230A\330\010\017\210\177\230a\230w\240a\200A\330\017\020\330\010\017\210t\2209\230A\330\010\017\210t\2209\230A\230U\240\"\240D\250\r\260Q\200A\330\017\020\330\010\017\210t\2209""\230A\330\010\017\210u\220I\230Q\230e\2402\240T\250\036\260q\200A\330\010\031\230\021\330\010\017\210t\220:\320\0351\260\021\260!\200A\330\017\020\330\010\017\210t\320\023#\2402\240Q\240e\2501\250A\200A\330\017\020\330\010\017\210t\320\023#\2402\240T\250\035\260a\200A\330\010\017\210t\220:\230Q\230a\200A\330\017\020\330\010\017\210t\220:\230Q\230d\240(\250\"\250G\2601\200A\330\017\020\330\010\017\210t\220:\230R\230t\240=\260\001\200A\330\017\020\330\010\017\210t\220:\230R\230w\240c\250\022\2504\250s\260\"\260D\270\017\300r\310\027\320PQ\200A\330\017\020\330\010\017\210t\220:\230R\230x\240s\250\"\250E\260\023\260B\260d\270/\310\022\3108\320ST\200A\330\010\017\210t\220:\230U\240!\2404\240z\260\021\260!\200A\330\010\017\210t\220;\230a\230q\200A\340\010\017\210t\220<\230r\240\021\240!\200A\330\017\020\330\010\017\210u\220A\200A\330\010\017\210u\220A\220W\230A\200A\330\010\017\210u\220A\200A\330\017\020\330\010\017\210u\220B\220a\200A\330\017\020\330\010\017\210u\220E\230\022\2304\230~\250Q\200A\330\017\020\330\010\017\210u\220F\230!\2303\230a\230u\240A\240Q\200A\330\017\020\330\010\017\210u\220F\230!\2305\240\001\240\021\200A\330\017\020\330\010\017\210u\220F\230\"\230A\230S\240\010\250\003\2504\250w\260d\270!\200A\330\017\020\330\010\017\210u\220F\230\"\230D\240\016\250a\200A\330\017\020\330\010\017\210u\220G\2301\230C\230q\240\001\200A\330\017\020\330\010\017\210u\220H\230A\230S\240\001\240\021\200A\330\017\020\330\010\017\210u\220H\230A\230T\240\031\250!\200A\330\017\020\330\010\017\210u\220I\230R\230q\240\003\2408\2503\250d\260'\270\024\270Q\200A\330\017\020\330\010\017\210u\220J\230b\240\001\240\023\240H\250C\250t\2607\270$\270a\200A\330\017\020\330\010\017\210u\220J\230b\240\004\240N\260!\200A\330\017\020\330\010\017\210u\220K\230r\240\024\240^\2601\200A\330\017\020\330\010\017\210u\220K\230r\240\021\240#\240X\250S\260\004\260G\2704\270q\200A\330\017\020\330\010\017\210u\220O\2402\240T\250\036\260q\200A\330\010\017\210v\220Q\200A\330\010\017\210v\220T\230\031\240&""\250\001\200A\360\010\000\t\030\220v\230T\320!1\260\026\260q\330\010\017\320\017#\2404\240|\2604\260\177\300d\310-\320W[\320[\\\330\014\020\220\n\230$\230h\240d\320*<\270D\300\016\310a\200A\360\010\000\t\030\220v\230T\320!1\260\026\260q\330\010\017\320\017)\250\024\250\\\270\024\270_\310D\320P]\320]a\320ab\330\014\020\220\n\230$\230h\240d\320*<\270D\300\016\310a\200A\360\010\000\t\030\220v\230T\320!1\260\026\260q\330\010\017\320\017/\250t\260<\270t\300?\320RV\320Vc\320cg\320gh\330\014\020\220\n\230$\230h\240d\320*<\270D\300\016\310a\200A\330\010\017\210v\220T\230\031\240%\240q\200A\330\010\027\220v\230X\240Q\240a\330\010\t\210\033\320\024.\250h\260a\260q\330\010\017\210q\200A\330\010\027\220v\230X\240Q\240a\330\010\t\210\033\320\024.\250h\260b\270\001\330\010\017\210q\200A\330\010\027\220v\230X\240Q\240a\330\010\t\210\033\320\024.\250i\260q\270\003\2701\330\010\017\210q\200A\330\010\017\210w\220a\220\177\320&?\270q\300\004\300J\310i\320WX\200A\330\010\027\220w\230a\230q\330\010\017\210t\220:\230^\2501\250A\250Q\200A\330\010\027\220w\230a\230q\330\010\017\210t\220:\230T\240\021\240!\2401\200A\330\010\027\220w\230a\230q\330\010\017\210t\220:\230U\240!\2401\240A\200A\330\010\027\220w\230a\230q\330\010\017\210t\220:\230V\2401\240A\240Q\200A\330\010\027\220w\230a\230q\330\010\017\210t\220:\230X\240Q\240a\240q\200A\330\010\027\220w\230a\230q\330\010\017\210t\220:\230Y\240a\240q\250\001\200A\330\010\027\220w\230a\230q\330\010\017\210t\220:\230Z\240q\250\001\250\021\200A\330\010\027\220w\230a\230q\330\010\017\210t\220:\320\035.\250a\250q\260\001\200A\330\010\027\220w\230a\230q\330\010\027\220w\230a\230q\340\010\014\210I\220Q\220a\330\010\014\210J\220a\220q\330\010\017\210t\2202\220W\230A\230U\240!\200A\330\010\027\220w\230a\230q\330\010\027\220w\230a\230q\330\010\017\210t\220:\230[\250\001\250\021\250*\260A\260Q\200A\330\010\027\220w\230a\230q\330\010\027\220w\230a\230q\330\010\017\210t\220:\320\035-\250Q\250a\250z\270\021\270!\200A\330\010\027\220w\230a\230q\330\010\027""\220w\230a\230q\330\010\017\210t\220:\230U\240!\2401\240J\250a\250q\200A\330\010\027\220w\230a\230q\330\010\027\220w\230a\230q\330\010\017\210t\220:\230V\2401\240A\240Z\250q\260\001\200A\330\010\027\220w\230a\230q\330\010\027\220w\230a\230q\330\010\017\210t\220:\230Z\240q\250\001\250\032\2601\260A\200A\330\017\020\330\010\017\210w\220a\220s\230(\240!\240;\250d\260*\270I\300V\3103\310b\320PQ\200A\330\010\017\210w\220a\220t\2308\2402\240Y\250b\260\010\270\001\200A\330\010\017\210w\220a\220u\230A\230Q\200A\330\010\017\210w\220a\220u\230E\240\021\240+\250Q\200A\330\017\020\330\010\017\210w\220a\220v\230T\240\032\2509\260F\270#\270Q\270d\300(\310\"\310G\320ST\200A\330\017\020\330\010\017\210w\220a\220w\230d\240*\250J\260a\260t\2708\3002\300X\310Q\200A\330\010\017\210x\220\177\320&A\300\021\300$\300j\320P^\320^_\200A\330\010\017\210x\220\177\320&?\270q\300\004\300J\310n\320\\]\200A\330\010\017\210x\220q\200A\330\010\017\210x\220q\230\003\2303\230a\200A\330\010\017\210x\220q\230\005\230V\2401\200A\330\010\017\210x\220q\230\006\230a\200A\330\010\017\210y\230\001\230\021\200A\330\010\017\210y\230\002\230!\200A\330\010\017\210y\230\001\200A\330\010\017\210z\230\022\2301\200A\330\010\017\210z\230\021\230*\240D\250\001\200\001\330\004\031\230\027\240\001\240\021\330\004\032\230'\240\021\240!\330\004/\320/C\3001\300I\310Q\330\004/\320/C\3001\300J\310a\330\004\013\2104\210q\320\020+\250?\270!\2703\270a\200\001\330\004\032\230'\240\021\240!\330\004\031\230\027\240\001\240\021\330\004/\320/C\3001\300J\310a\330\004/\320/C\3001\300I\310Q\330\004\013\2104\210q\320\020+\320+A\300\021\300#\300Q\200\001\330\004\014\210E\220\021\320\022D\300A\330\004\013\2105\220\001\220\023\220F\230%\230q\200\001\330\004\014\210E\220\021\320\022H\310\001\330\004\013\2105\220\001\220\023\220F\230%\230q\200\001\330\004\014\210E\220\021\320\022J\310!\330\004\013\2105\220\001\220\023\220D\230\005\230Q\200\001\330\004\014\210E\220\021\320\022S\320ST\330\004\013\2105\220\001\220\023\220D\230\005\230Q\200\001""\360\036\000\005\013\210\"\210F\220!\2207\230&\240\001\330\004\010\210\t\220\022\2208\2301\230A\330\010\013\2101\210I\220V\2301\230K\240x\250s\260%\260q\270\003\2701\270E\300\034\310Q\330\004\013\2101\200\001\340\004\024\220G\2301\230A\330\004\013\2101\210D\220\001\330\r\033\2301\230I\240_\3204L\310A\310R\310q\340\004\013\2101\330\004\010\210\005\210U\220!\2207\230%\230q\330\010\014\210D\220\001\320\021#\2407\250!\2501\330\010\014\210B\210g\220Q\330\014\020\220\001\220\025\220a\340\014\020\220\001\220\026\220q\330\004\013\2101\200\001\340\004\024\220G\2301\230A\330\004\013\2101\210D\220\001\330\r\033\2301\230I\240_\3204L\310A\310R\310q\330\004\010\210\001\330\004\010\210\005\210U\220!\2207\230%\230q\330\010\t\210\027\220\001\220\024\220Q\320\026(\250\007\250q\260\001\330\004\013\2101\200\001\330\004\024\220G\2301\230A\330\004\013\2101\210D\220\001\330\0043\3203K\3101\310B\310a\330\004\013\2104\210q\320\020*\250(\260!\2601\200\001\330\004\024\220G\2301\230A\330\004\013\2101\210D\220\001\330\0043\3203K\3101\310B\310a\330\004\013\2104\210q\320\020*\250+\260Q\260a\200\001\330\004\024\220G\2301\230A\330\004\013\2101\210D\220\001\330\0044\3204L\310A\310R\310q\330\004\013\2104\210q\320\020+\250<\260q\270\001\200\001\330\004\024\220G\2301\230A\330\004\013\2101\210D\220\001\330\004\013\2104\210q\320\020+\250:\260Q\260o\320E]\320]^\320^`\320`a\200\001\330\004\024\220G\2301\230A\330\004\013\2101\210D\220\001\340\004 \320 5\260Z\270\177\310a\310q\330\010\027\320\027/\250q\260\002\260!\330\004\010\210\010\220\003\2201\330\010\017\210t\2201\320\024%\240Q\340\010\017\210q\200\001\330\004\024\220G\2301\230A\330\004\013\2101\210D\220\001\330\004\024\220N\240!\240?\3202J\310!\3102\310Q\200\001\330\004\024\220G\2301\230A\330\004\013\2101\210D\220\001\330\004\024\220O\2401\240O\3203K\3101\310B\310a\320\000!\240\021\330\004\024\220G\2301\230A\330\004\013\2101\210D\220\001\340\004 \320 :\270*\300O\320ST\320TU\330\010\027\320\027/\250q\260\002\260,\270a\330\004\010\210\010\220\003\2201""\330\010\017\210t\2201\320\024%\240Q\340\010\017\210q\320\000!\240\030\250\021\330\004\024\220G\2301\230A\330\004\013\2101\210D\220\001\340\004 \320 :\270*\300O\320ST\320TU\330\010\027\320\027/\250q\260\002\260,\270c\300\021\330\004\010\210\010\220\003\2201\330\010\017\210t\2201\320\024%\240Q\340\010\017\210q\200\001\340\004\024\220G\2301\230A\330\004\013\2101\210D\220\001\330\004$\240O\260:\270_\310A\310Q\330\010\027\320\027/\250q\260\002\260!\330\004\007\200x\210s\220!\330\010\017\210q\330\004\013\2104\210q\320\020!\240\021\200\001\330\004\024\220G\2301\230A\330\004\013\2101\210D\220\001\340\004 \240\013\250:\260_\300A\300U\310/\320Yq\320qr\320rt\360\000\000u\001A\002\360\000\000A\002B\002\330\004\014\210D\220\001\320\021\"\240%\240x\250s\260!\200\001\340\004\024\220G\2301\230A\330\004\013\2101\210D\220\001\330\r!\240\021\240!\330\010\027\320\027/\250q\260\002\260!\330\004\010\210\001\330\004\010\210\005\210U\220!\2209\230E\240\021\330\010\t\210\027\220\001\220\024\220Q\320\026(\250\t\260\021\260!\330\004\013\2101\200\001\330\004\024\220G\2301\230A\330\004\024\220G\2301\230A\330\004\013\2101\210D\220\001\330\004\013\2101\210D\220\001\330\0044\3204L\310A\310R\310q\330\0044\3204L\310A\310R\310q\340\004\036\320\0363\260:\270_\310A\310Q\330\010\014\210A\330\004\007\200t\2101\330\010\017\210q\330\004\013\2104\210q\320\020!\240\021\200\001\330\004\024\220G\2301\230A\330\004\024\220G\2301\230A\330\004\013\2101\210D\220\001\330\004\013\2101\210D\220\001\330\004\013\2104\210q\320\020+\2504\250q\260\017\320?W\320WX\320XZ\320Z[\330\010\027\320\027/\250q\260\002\260!\200\001\330\004\024\220G\2301\230A\330\004\024\220G\2301\230A\330\004\013\2101\210D\220\001\330\004\013\2101\210D\220\001\330\004\024\220G\2301\230O\320+C\3001\300B\300a\330\010\027\320\027/\250q\260\002\260!\200\001\330\004\024\220G\2301\230A\330\004\024\220G\2301\230A\330\004\013\2101\210D\220\001\330\004\013\2101\210D\220\001\330\004\024\220H\230A\230_\320,D\300A\300R\300q\330\010\027\320\027/\250q\260\002""\260!\200\001\330\004\024\220G\2301\230A\330\004\024\220G\2301\230A\330\004\013\2101\210D\220\001\330\004\013\2101\210D\220\001\330\004\024\220I\230Q\230o\320-E\300Q\300b\310\001\330\010\027\320\027/\250q\260\002\260!\200\001\330\004\024\220G\2301\230A\330\004\024\220G\2301\230A\330\004\013\2101\210D\220\001\330\004\013\2101\210D\220\001\330\004\024\220J\230a\230\177\320.F\300a\300r\310\021\330\010\027\320\027/\250q\260\002\260!\200\001\340\004\024\220G\2301\230A\330\004\024\220G\2301\230A\330\004\013\2101\210D\220\001\330\004\013\2101\210D\220\001\330\004 \240\014\250J\260o\300Q\300a\330\010\027\320\027/\250q\260\002\260,\270o\320Me\320ef\320fh\320hi\330\004\007\200x\210s\220!\330\010\017\210q\330\004\013\2104\210q\320\020!\240\021\200\001\330\004\024\220G\2301\230A\330\004\024\220G\2301\230A\330\004\013\2101\210D\220\001\330\004\013\2101\210D\220\001\340\r\025\220Z\230\177\250a\250}\270O\3101\310M\320Yh\320hi\320ij\330\010\027\320\027/\250q\260\002\260,\270o\320Me\320ef\320fh\320hi\330\004\014\210D\220\001\320\021\"\240$\240d\250!\320+<\270D\300\004\300A\320EV\320VW\200\001\340\004\024\220G\2301\230A\330\004\024\220G\2301\230A\330\004\024\220G\2301\230A\330\004\013\2101\210D\220\001\330\004\013\2101\210D\220\001\330\004\013\2101\210D\220\001\330\0044\3204L\310A\310R\310q\330\0044\3204L\310A\310R\310q\330\0044\3204L\310A\310R\310q\330\004$\240L\260\n\270/\310\021\310'\320QU\320UY\320YZ\330\004\007\200t\2101\330\010\017\210q\330\004\013\2104\210q\320\020!\240\021\200\001\340\004\024\220G\2301\230A\330\004\024\220G\2301\230A\330\004\024\220G\2301\230A\330\004\013\2101\210D\220\001\330\004\013\2101\210D\220\001\330\004\013\2101\210D\220\001\330\0044\3204L\310A\310R\310q\330\0044\3204L\310A\310R\310q\330\0044\3204L\310A\310R\310q\330\r\036\230a\230{\250$\250d\260!\330\004\010\210\001\330\004\010\210\005\210U\220!\2209\230E\240\021\330\010\t\210\027\220\001\220\024\220Q\320\026(\250\t\260\021\260!\330\004\013\2101\200\001\330\004\024\220G\2301\230A\330\004\024\220G\2301""\230A\330\004\025\220W\230A\230Q\330\004\013\2101\210D\220\001\330\004\013\2101\210D\220\001\330\0044\3204L\310A\310R\310q\330\0044\3204L\310A\310R\310q\330\0043\3203J\310!\3102\310Q\340\004$\240I\250Z\260\177\300a\300w\310d\320RV\320VW\330\004\007\200x\210s\220!\330\010\017\210q\330\004\013\2104\210q\320\020!\240\021\200\001\330\004\024\220G\2301\230A\330\004\024\220G\2301\230A\330\004\025\220W\230A\230Q\330\004\013\2101\210D\220\001\330\004\013\2101\210D\220\001\330\0044\3204L\310A\310R\310q\330\0044\3204L\310A\310R\310q\330\0043\3203J\310!\3102\310Q\360\006\000\016\034\2301\230C\230t\2404\240q\330\004\010\210\001\330\004\010\210\005\210U\220!\2201\220E\230\021\330\010\t\210\027\220\001\220\024\220Q\320\026(\250\001\250\021\250!\330\004\013\2101\200\001\360\n\000\005\t\210\010\220\001\330\010\014\210G\2201\220A\330\010\013\210:\220Q\220a\220q\330\r\021\220\021\220.\240\017\250q\330\004\014\320\014\034\230A\230_\320,=\270Q\270a\320\000\022\220!\330\004\024\220G\2301\230A\330\004\026\220g\230Q\230a\330\004\013\2101\210F\220!\330\0042\3202I\310\021\310$\310a\330\004\007\200w\210c\220\021\330\010\017\210t\2201\320\024/\250v\260Q\260b\270\n\300!\330\004\027\220w\230a\230q\330\004/\320/C\3001\300G\3101\330\004\013\2104\210q\320\020+\2506\260\021\260\"\260J\270c\300\021\200\001\340\004\021\220\027\230\001\230\021\330\004\024\220H\230A\230V\240:\250Z\260w\270a\270q\320\004K\320K]\320]^\330\010\016\210d\320\022\"\240%\240q\250\001\250\023\250A\250]\270!\2703\270a\270q\200\001\330\004\034\230L\320(<\270A\270Y\300a\330\004\023\2207\230!\2301\330\004\t\210\025\210a\210q\320\004M\320M_\320_`\330\010\016\210d\320\022\"\240%\240q\250\001\250\023\250A\250]\270!\2703\270a\270q\200\001\330\004\n\210+\220Q\320\004\035\320\035-\250Q\330\010\024\220D\230\001\230\021\330\010\r\210Z\220w\230f\240E\250\033\260C\260w\270e\300:\310S\320PV\320V[\320[f\320fm\320mn\330\014\022\220*\230A\230Q\330\010\013\210:\220W\230A\330\014\025\220W\230A\230Q\330\010\013\210;\220g\230Q\330\014\025\220W\230A""\230Q\330\010\017\210x\220r\230\021\200\001\360\006\000\005\t\210\005\210Q\330\010\r\210W\220A\220Q\330\010\t\210\032\2201\220B\220a\330\004\013\2104\210z\230\024\230Q\230a\200\001\360\006\000\005\t\210\005\210Q\330\010\r\210W\220A\220Q\330\010\t\210\027\220\001\320\021#\2402\240Q\330\004\013\2104\210q\320\020+\250:\260Q\260a\200\001\360\006\000\005\t\210\005\210Q\330\010\r\210W\220A\220Q\330\010\t\210\027\220\n\320\0322\260!\2602\260Q\330\004\013\2104\210q\320\020+\250=\270\001\270\021\200\001\360\006\000\005\t\210\005\210Q\330\010\r\210W\220A\220Q\330\010\t\210\027\220\n\320\0322\260!\2602\260Q\330\004\013\2104\210q\320\020+\250;\260a\260q\200\001\360\006\000\005\t\210\005\210Q\330\010\r\210W\220A\220Q\330\010\t\210\027\220\n\320\0322\260!\2602\260Q\330\004\013\2104\210q\320\020+\250<\260q\270\001\200\001\360\006\000\005\t\210\005\210Q\330\010\r\210W\220A\220Q\330\010\013\2103\210g\220Q\330\014\r\210Z\220q\230\002\230!\330\004\013\2104\210z\320\031)\250\021\250$\250g\260Q\260j\300\001\200\001\360\006\000\005\t\210\005\210Q\330\010\r\210W\220A\220Q\330\010\t\210\032\220:\320\0355\260Q\260b\270\001\330\004\013\2104\210q\320\020+\250=\270\001\270\021\200\001\360\006\000\005\t\210\005\210Q\330\010\r\210W\220A\220Q\330\010\t\210\032\220:\320\0355\260Q\260b\270\001\330\004\013\2104\210q\320\020+\250<\260q\270\001\200\001\360\006\000\005\t\210\005\210Q\330\010\r\210W\220A\220Q\330\010\t\210\027\220\n\320\032.\250a\250r\260\021\330\004\013\2104\210q\320\020+\320+<\270A\270Q\200\001\360\006\000\005\t\210\005\210Q\330\010\r\210W\220A\220Q\330\010\t\210\027\220\n\320\032.\250a\250r\260\021\330\004\013\2104\210q\320\020+\250:\260Q\260a\200\r\210Q\330\004\007\200r\210\023\210A\330\010\014\210A\330\004\035\230[\250\001\250\023\250A\330\r\023\2201\220O\320#;\2701\270A\270Q\330\004\013\2101\200\001\330\004\013\210:\220Q\220f\230D\240\t\250\024\250T\260\031\270$\270a\200\001\330\004\013\210:\220Q\220f\230F\240!\200\001\360\010\000\005\016\210T\320\021#\2404\240|\2604\260z\300\024""\300^\320SW\320W_\320_c\320cp\320pt\320t{\320{\177\360\000\000@\002A\002\330\004\014\210G\2201\220F\230,\240a\330\004\007\200v\210W\220E\230\024\230Q\330\010\022\220!\330\010\027\220q\340\010\027\220t\230=\250\007\250u\260C\260t\2707\300'\310\025\310c\320QU\320Ua\320ah\320hi\330\004\007\200q\330\010\017\320\017*\250$\250a\250w\260k\300\027\310\001\340\010\017\320\017*\250$\250a\250w\260k\300\021\200\001\360\010\000\005\t\210\005\210U\220!\2203\220a\220q\330\010\r\210W\220A\220S\230\001\230\021\330\010\017\210q\220\004\220A\330\010\014\210J\220j\320 8\270\001\270\022\2701\330\010\r\210W\220A\220S\230\001\230\021\330\010\017\210q\220\004\220A\330\010\014\210J\220j\320 8\270\001\270\022\2701\360\006\000\005\030\220t\230:\240_\260A\260T\270\026\270q\330\004\007\200t\2101\330\010\017\210q\330\004\013\2104\210q\320\020!\240\021\320\004W\320Wi\320ij\330\010\016\210d\320\022\"\240%\240q\250\001\250\023\250A\250]\270!\2703\270a\270q\320\004%\240Y\250a\330\010\017\210u\220A\220V\2306\240\021\320\004\025\220Z\320\037/\250q\330\010\013\2102\210S\220\001\330\014\r\330\010\031\230\023\230A\230R\230w\240a\240q\340\010\025\220[\240\001\240\024\240V\2501\330\010\017\210t\2201\320\024.\250j\270\001\270\024\320=S\320ST\320TU\200\001\330\004\t\210\035\220a\330\004#\2401\330\010\t\340\010\t\340\004\013\320\013#\2401\240K\250q\200\001\330\004\013\210>\230\021\230&\240\006\240a\200\016\210a\330\004\013\2107\220!\2202\220W\230A\230Q\320\000\036\230a\360\006\000\005\r\210E\220\021\320\022L\310A\330\004\013\2108\2201\220G\2307\240$\240f\250F\260)\2701\320\000\026\220a\330\004\024\220G\2301\230A\330\004\013\2101\210D\220\001\330\004\024\220O\2401\240O\3203K\3101\310B\310l\320Z`\320`c\320cd\200\016\210a\330\004\024\220G\2301\230A\330\004\013\2101\210D\220\001\340\004 \240\007\240z\260\037\300\001\300\021\330\010\027\320\027/\250q\260\002\260,\270a\330\004\010\210\010\220\003\2201\330\010\017\210t\2201\320\024%\240Q\340\010\017\210q\320\004\036\230a\330\010\"\240'\250\021\250!\330\010!\240\024""\240Z\250q\260\002\260&\270\004\270B\270f\300A\340\010\013\2106\220\026\220s\230#\230Q\340\025&\240a\240\177\3206N\310a\310t\320ST\330\020\037\320\0377\260q\270\002\270!\330\020\037\320\0377\260q\270\001\270\021\330\r\023\2206\230\023\230C\230q\330\025 \240\001\240\037\3200H\310\001\310\024\310Q\330\020\037\320\0377\260q\270\002\270!\330\020\037\320\0377\260q\270\001\270\021\330\r\023\2206\230\023\230C\230q\330\025\037\230q\240\017\320/G\300q\310\004\310A\330\020\037\320\0377\260q\270\002\270!\330\020\037\320\0377\260q\270\001\270\021\330\r\023\2206\230\023\230C\230q\330\025 \240\001\240\037\3200H\310\001\310\024\310Q\330\020\037\320\0377\260q\270\002\270!\330\020\037\320\0377\260q\270\001\270\021\340\014\022\220)\2301\230A\340\010\017\210q\320\004\031\230\021\330\010&\240d\250*\260A\260T\270\026\270t\3004\300v\310Q\340\010\013\2106\220\026\220s\230#\230Q\340\014\022\220$\220i\230t\2401\240F\250&\260\001\330\r\023\2206\230\023\230C\230q\330\025\"\240!\240?\3202J\310!\3104\310q\330\020\037\320\0377\260q\270\006\270a\330\r\023\2206\230\023\230C\230q\330\025 \240\001\240\037\3200H\310\001\310\024\310Q\330\020\037\320\0377\260q\270\006\270a\340\014\022\220)\2301\230A\330\010\017\210q\200\001\360\n\000\005\t\210\006\210g\220Q\330\010\014\210G\2201\220A\330\010\014\210G\2201\220A\330\010\t\210\031\320\022#\2401\240A\330\010\t\210\032\320\023:\320:R\320RS\320ST\320TU\330\010\013\210:\220Q\220a\330\004\013\2104\210z\230\032\2401\240D\320(@\300\001\300\021\200\001\330\004\026\220g\230Q\230a\330\004\036\230g\240Q\240a\330\0043\3203K\3101\310J\320VW\330\004\013\2104\210q\320\020+\250=\270\001\270\024\270Z\300q\200\001\330\004\026\220g\230Q\230a\330\004\027\220w\230a\230q\330\004\025\220W\230A\230Q\330\004/\320/C\3001\300E\310\021\330\004\013\2104\210q\320\020+\2509\260A\260T\270\032\3005\310\n\320RS\200\001\330\004\026\220h\230h\240a\240q\330\004\005\320\005\031\320\031+\2501\250A\320-@\300\001\320AX\320XY\320YZ\330$%\240Q\330\004\013\2101\200\001\330\004\026\220h\230h\240a""\240q\330\004\005\320\005\031\320\031+\2501\250A\320-A\300\021\320BY\320YZ\320Z[\330$%\240Q\330\004\013\2101\230j\250\001\250\031\260!\2601\320\004:\270!\330\010\016\210j\230\001\230\021\230j\250\001\250\025\250a\250q\230j\250\001\250\026\250q\260\001\230k\250\021\250'\260\022\2608\2701\320\000\033\320\033.\250n\270A\330\r\035\230[\250\001\360^\001\000\005\010\200x\210s\220!\330\010\032\230*\240J\250a\330\010\022\220\"\220G\2301\320\034:\270!\330\004\007\200x\210s\220!\330\010\013\2106\220\023\220A\330\014\024\220B\220a\330\010\013\2106\220\023\220B\220a\330\014\022\220*\230A\230W\240G\2505\260\006\260f\270G\3004\300u\310F\320RT\320T`\320`a\330\r\023\2203\220b\230\001\330\014\022\220)\2301\230G\2407\250%\250v\260V\2707\300$\300e\3106\320QS\320S_\320_`\330\r\023\2203\220b\230\001\330\014\022\220.\240\001\240\027\250\007\250u\260F\270&\300\007\300t\3105\320PV\320VX\320Xg\320gh\340\014\022\220*\230A\230Q\340\010\013\2101\330\014\023\2203\320\0262\260!\330\010\017\210q\330\t\021\220\023\220A\360\006\000\t\021\220\005\220Q\320\026N\310b\320PQ\330\004\007\200q\330\010\016\210l\230!\2307\240'\250\025\250f\260F\270'\300\024\300W\310A\340\010\016\320\016!\240\021\240'\250\027\260\005\260V\2706\300\027\310\004\310G\320ST\330\004\007\200q\330\010\017\210s\320\022.\250a\330\004\013\2101\320\004^\320^n\320no\330\010\r\210V\2204\220r\230\023\230D\240\002\240!\330\010&\240d\250*\260C\260t\2702\270U\300#\300U\310\"\310E\320QU\320UW\320W\\\320\\_\320_d\320df\320fg\330\010\016\210d\220)\230:\240Q\240f\250F\260+\270U\300%\300u\310E\320QV\320VW\330\010\017\210q\200\001\340\004\037\230q\320 0\260\013\270;\300k\320QR\330\004\023\2205\230\010\240\001\240\021\330\004\007\200|\2207\230!\330\010'\240q\250\010\260\016\270a\330\004\013\2101\200\001\340\004\037\230q\320 0\260\013\270;\300k\320QR\330\004\023\2209\230H\240A\240Q\330\004\007\200|\2207\230!\330\010+\2501\250L\270\016\300a\330\004\013\2101\200\001\330\004\005\360\006\000\005\n\210\026\210q\330\004\013\2103\210c\220\024\220T\230\032""\2405\250\005\250V\2607\270!\330\013\024\220L\240\016\250m\2706\300\021\330\013\026\220a\320\000\027\220q\360\020\000\014\r\330\004\t\320\t$\240A\330\004\007\200z\220\021\220#\220U\230!\330\010\017\210v\220Q\220a\220q\330\t\023\2201\220C\220u\230A\330\010\017\210u\220A\220Q\220a\330\t\023\2201\220C\220u\230A\330\010\017\210s\220\"\220A\220_\240A\240S\250\r\260T\270\025\270a\270q\330\t\023\2201\220C\220u\230A\330\010\017\210s\220\"\220A\220_\240A\240S\250\r\260T\270\025\270a\270q\330\t\023\2201\220D\230\005\230V\2405\250\001\330\010\013\2104\210q\220\014\230A\330\010\017\210\177\230a\230s\240-\250s\260/\300\021\300#\300Q\330\t\023\2201\220C\220u\230A\330\010\017\210w\220a\220q\230\001\330\t\023\2201\220C\220u\230A\330\010\017\210w\220a\220q\230\004\230B\230g\240Q\240a\240q\330\t\023\2201\220C\220u\230A\330\010\013\2101\210G\2202\220Q\330\014\023\2208\2301\230C\230q\240\004\240A\240Q\340\014\023\220:\230Q\230e\2401\240A\330\t\013\2103\210e\2201\330\010\017\210q\330\t\013\2103\210e\2201\330\010\017\210q\330\t\013\2103\210e\2201\330\010\017\210q\330\t\013\2103\210e\2201\330\010\017\210q\330\t\013\2103\210e\2201\330\010\017\210q\330\t\013\2103\210e\2201\330\010\017\210q\330\t\013\2103\210e\2202\220Q\330\010\017\210q\330\t\013\2103\210e\2202\220Q\330\010\017\210q\330\t\013\2103\210e\2202\220Q\330\010\017\210q\330\t\013\2103\210e\2201\330\010\017\210q\330\t\013\2103\210e\2202\220Q\330\010\017\210q\330\t\013\2103\210e\2202\220Q\330\010\017\210q\330\t\023\2201\220C\220u\230J\240k\260\036\270q\330\010\013\210:\220Q\220c\230\025\230a\330\014\023\2203\220a\220q\230\005\230Q\230a\330\r\027\220q\230\003\2305\240\001\330\014\023\2203\220a\220q\230\005\230Q\230a\330\r\027\220q\230\003\2305\240\001\330\014\023\2203\220a\220q\230\005\230Q\230a\330\r\027\220q\230\003\2305\240\001\330\014\023\2203\220a\220q\230\005\230Q\230a\330\r\027\220q\230\003\2305\240\001\330\014\023\2203\220a\220q\230\005\230Q\230a\330\r\027\220q\230\003\2305\240\001\330\014\023\2203\220a\220q\230\005\230Q\230a""\330\t\023\2201\220C\220u\230J\240k\260\036\270q\330\010\013\210:\220Q\220c\230\025\230a\330\014\023\2204\220q\230\001\230\025\230a\230q\330\r\027\220q\230\003\2305\240\001\330\014\023\2204\220q\230\001\230\025\230a\230q\330\r\027\220q\230\003\2305\240\001\330\014\023\2204\220q\230\001\230\025\230a\230q\330\r\027\220q\230\003\2305\240\001\330\014\023\2204\220q\230\001\230\025\230a\230q\330\r\027\220q\230\003\2305\240\001\330\014\023\2204\220q\230\001\230\025\230a\230q\330\r\027\220q\230\003\2305\240\001\330\014\023\2204\220q\230\001\230\025\230a\230q\330\r\027\220q\230\003\2305\240\001\330\014\023\2205\230\002\230!\2301\330\t\023\2201\220C\220u\230J\240k\260\033\270A\330\010\013\210:\220Q\220c\230\025\230a\330\014\023\2204\220q\230\001\230\025\230a\230q\330\r\027\220q\230\003\2305\240\001\330\014\023\2204\220q\230\001\230\025\230a\230q\330\r\027\220q\230\003\2305\240\001\330\014\023\2204\220q\230\001\230\025\230a\230q\330\r\027\220q\230\003\2305\240\001\330\014\023\2204\220q\230\001\230\025\230a\230q\330\r\027\220q\230\003\2305\240\001\330\014\023\2204\220q\230\001\230\025\230a\230q\330\r\027\220q\230\003\2305\240\001\330\014\023\2204\220q\230\001\230\025\230a\230q\330\t\023\2201\220C\220u\230A\330\010\017\210u\220A\220Q\220e\2301\230A\330\t\023\2201\220C\220u\230A\330\010\017\210u\220A\220Q\220e\2301\230A\330\t\023\2201\220C\220u\230A\330\010\017\210u\220A\220Q\220e\2301\230A\330\t\023\2201\220C\220u\230A\330\010\017\210u\220A\220Q\220e\2301\230A\330\t\023\2201\220C\220u\230A\330\010\017\210s\220!\2201\220E\230\021\230!\330\t\023\2201\220C\220u\230A\330\010\017\210s\220!\220?\240!\2401\240E\250\021\250$\250a\330\t\023\2201\220C\220u\230A\330\010\017\210t\2202\220Q\220a\330\t\023\2201\220C\220u\230A\330\010\017\210t\2202\220Q\220a\330\t\023\2201\220C\220u\230A\330\010\017\210r\220\022\2201\220A\330\t\023\2201\220C\220u\230A\330\010\017\210r\220\022\2201\220A\330\t\023\2201\220C\220u\230A\330\010\017\210r\220\022\2201\220A\330\t\023\2201\220C\220u\230A\330\010\017""\210r\220\022\2201\220A\330\t\023\2201\220C\220u\230A\330\010\017\210r\220\022\2201\220A\330\t\023\2201\220C\220u\230A\330\010\017\210r\220\022\2201\220A\330\t\023\2201\220C\220u\230A\330\010\017\210x\220q\230\001\230\025\230a\230q\330\t\023\2201\220C\220u\230A\330\010\017\210t\2202\220Q\220a\330\t\023\2201\220C\220u\230A\330\010\017\210}\230A\230Q\230e\2401\240A\330\t\023\2201\220C\220u\230A\330\010\017\210~\230R\230q\240\001\330\t\023\2201\220C\220u\230A\330\010\017\210z\230\022\2301\230A\330\t\023\2201\220C\220u\230A\330\010\017\210s\220!\2201\220E\230\021\230!\330\t\023\2201\220C\220u\230A\330\010\017\210t\2201\220A\220U\230!\2301\330\t\023\2201\220C\220u\230A\330\010\017\210z\230\022\2301\230A\330\t\023\2201\220C\220u\230A\330\010\017\210z\230\022\2301\230A\330\t\023\2201\220C\220u\230A\330\010\017\210x\220q\230\001\230\025\230a\230q\330\t\023\2201\220C\220u\230A\330\010\017\210t\2202\220Q\220a\330\t\023\2201\220C\220u\230A\330\010\017\210y\230\002\230!\2301\330\t\023\2201\220C\220u\230A\330\010\017\210t\2201\220A\220U\230!\2301\330\t\023\2201\220C\220u\230A\330\010\017\210u\220A\220Q\220e\2301\230A\330\t\023\2201\220C\220u\230A\330\010\017\210w\220a\220q\230\005\230Q\230a\330\t\023\2201\220C\220u\230A\330\010\017\210y\230\001\230\021\230%\230q\240\001\330\t\023\2201\220C\220u\230A\330\010\017\210{\230\"\230A\230Q\330\t\023\2201\220C\220u\230A\330\010\017\210z\230\022\2301\230A\330\t\023\2201\220C\220u\230A\330\010\017\210{\230!\2301\230E\240\021\240!\330\t\023\2201\220C\220u\230A\330\010\017\210s\220\"\220A\220Q\330\t\023\2201\220C\220u\230A\330\010\017\210t\2202\220Q\220a\330\t\023\2201\220C\220u\230A\330\010\017\210{\230\"\230A\230Q\330\t\023\2201\220C\220u\230A\330\010\017\210u\220A\220Q\220e\2301\230A\330\t\023\2201\220C\220u\230A\330\010\017\210z\230\021\230!\2308\2401\240A\330\t\023\2201\220C\220u\230A\330\010\017\210t\2201\220A\220W\230A\230\\\250\021\250!\330\t\023\2201\220C\220q\330\010\017\210s\220!\2201\220A\330\010\017\210\177\230a\230x\240q\250""\001\330\t\023\2201\220D\230\005\230Q\330\010\017\210y\230\003\2301\230A\330\t\013\2103\210e\2202\220Q\330\010\017\210q\220\001\330\t\013\2103\210e\2202\220Q\330\010\017\210q\220\001\330\t\013\2103\210e\2202\220Q\330\010\017\210q\220\001\330\t\023\2201\220C\220u\230A\330\010\017\210x\220s\230!\2301\330\t\013\2103\210e\2202\220Q\330\010\017\210q\220\001\330\t\013\2103\210e\2202\220Q\330\010\017\210q\220\001\330\t\023\2201\220C\220u\230A\330\010\017\210y\230\003\2301\230A\330\t\023\2201\220C\220u\230A\330\010\017\210x\220s\230!\2301\330\t\023\2201\220C\220u\230A\330\010\017\210y\230\003\2301\230A\330\t\023\2201\220C\220u\230A\330\010\017\320\017\037\230s\240!\2401\330\t\023\2201\220C\220u\230A\330\010\017\210~\230S\240\001\240\021\330\t\023\2201\220C\220u\230A\330\010\017\210x\220s\230!\2301\330\t\023\2201\220C\220u\230A\330\010\017\210z\230\021\230#\230Q\230g\240Q\240g\250Q\330\t\023\2201\220C\220u\230A\330\010\017\210\177\230a\230q\240\005\240Q\240a\330\t\023\2201\220C\220u\230A\330\010\r\210V\2201\220A\330\010\014\210A\330\010\014\210E\220\021\220'\230\021\330\014\020\220\005\220Q\330\020\021\220\027\230\001\230\021\330\010\013\210:\220Q\220c\230\025\230a\330\014\023\320\023%\240Q\240e\2505\260\001\330\r\027\220q\230\003\2305\240\001\330\014\023\320\023'\240q\250\005\250U\260!\340\014\022\220!\330\t\023\2201\220C\220u\230F\240(\250/\270\021\330\010\017\210x\220q\230\003\2301\330\t\016\210m\2302\230Q\330\010\013\210:\220Q\220c\230\025\230a\330\014\023\2205\230\001\230\021\230%\230q\240\001\330\r\027\220q\230\003\2305\240\001\330\014\023\2205\230\001\230\021\230%\230q\240\001\330\r\027\220q\230\003\2305\240\001\330\014\023\220<\230s\240!\2401\340\004\007\200q\330\010\016\210l\230\"\230A\3308;\2704\270q\300\001\200\001\330\004'\240q\250\006\250a\320\004\031\230\021\330\010\030\230\007\230q\240\001\330\010\017\210q\220\004\220A\330\010\030\230\007\230q\240\001\330\010\017\210t\220:\230V\2401\240F\250$\250k\270\026\270r\300\033\310F\320RT\320TU\200\001\330\004\007\200r""\210\022\2101\330\010\016\210a\330\004\013\2104\210q\320\020+\2506\260\021\260!\200\001\330\004\007\200r\210\022\2101\330\010\016\210a\330\004\013\2104\210q\320\020+\250:\260Q\260a\200\001\330\004\007\200r\210\022\2101\330\010\016\210a\330\004\024\220G\2301\230A\330\004\013\2101\210D\220\001\330\004\013\2104\210q\320\020*\250)\2601\260O\320C[\320[\\\320\\^\320^j\320jk\200\001\330\004\007\200r\210\022\2101\330\010\016\210a\340\r\024\220J\230o\250Q\250n\270O\3101\310E\320QR\330\004\013\2101\210D\220\001\320\021\"\240%\240t\2501\320,=\270Q\200\001\330\004\007\200r\210\022\2101\330\010\016\210a\340\r\030\230\n\240/\260\021\260.\300\017\310q\320PU\320UV\330\004\013\2101\210D\220\001\320\021\"\240%\240t\2501\320,=\270Q\200\001\330\004\007\200r\210\023\210A\330\010\016\210a\330\004\024\220G\2301\230A\330\004\024\220G\2301\230A\330\004\013\2101\210D\220\001\330\004\013\2101\210D\220\001\330\004\013\2104\210q\320\020+\2504\250q\260\017\320?W\320WX\320XZ\320Z[\330\010\027\320\027/\250q\260\002\260!\200\001\330\004\007\200r\210\023\210A\330\010\016\210a\330\004\024\220G\2301\230A\330\004\024\220G\2301\230A\330\004\013\2101\210D\220\001\330\004\013\2101\210D\220\001\330\004\013\2104\210q\320\020+\2509\260A\260_\320D\\\320\\]\320]_\320_`\330\010\027\320\027/\250q\260\002\260!\200\001\330\004\007\200r\210\023\210A\330\010\016\210a\340\004\024\220G\2301\230A\330\004\024\220G\2301\230A\330\004\013\2101\210D\220\001\330\004\013\2101\210D\220\001\330\r\032\230*\240O\2601\260M\300\037\320PQ\320QR\330\010\027\320\027/\250q\260\002\260,\270o\320Me\320ef\320fh\320hi\330\004\014\210D\220\001\320\021\"\240$\240d\250!\320+<\270A\320\004`\320`r\320rs\330\010\016\210d\320\022\"\240%\240q\250\001\250\023\250A\250]\270!\2703\270a\270q\200\001\360\016\000\005\031\230\t\240\021\330\004\007\200s\210!\2106\220\023\220A\330\010\013\210;\220a\220t\2301\230A\330\014\020\220\003\2205\230\003\2301\230D\240\001\240\024\240T\250\021\250!\330\020\021\220\024\220Q\220c\230\021\340\014\r\210T\220\021\220$""\220a\220t\2304\230q\240\001\330\010\017\210q\330\t\014\210A\210V\2203\220a\330\010\016\210d\220!\2201\340\010\016\210i\220q\320\030K\3101\330\020\023\2201\220A\330\004\007\200z\220\021\220%\220q\330\010\017\210q\330\004\010\210\003\2105\220\003\2206\230\021\330\010\t\210\024\210Q\210c\220\021\330\004\013\2101\200\001\340\004\017\210s\220#\220Q\220e\2302\230S\240\001\240\022\2401\240B\240a\240q\200\001\330\004\007\200t\210:\220Q\220e\2301\330\010\016\210i\220q\320\0307\260w\270a\270s\300%\300t\3101\310A\320\004\030\230\001\330\010\027\220w\230a\230q\330\010\013\2102\210S\220\001\330\014\023\2204\220z\240\024\240Q\240a\240q\330\010\027\220w\230a\230q\330\010\017\210t\220:\230T\240\021\240!\240:\250Q\250a\320\004\030\230\001\330\010\027\220w\230a\230q\330\010\013\2102\210S\220\001\330\014\023\2204\220z\240\025\240a\240q\250\001\330\010\027\220w\230a\230q\330\010\017\210t\220:\230U\240!\2401\240J\250a\250q\200\001\330\004\027\220w\230a\230q\330\004\"\240(\250!\2506\260\025\260a\330\004\013\210:\220Q\220a\200\001\330\004\027\220w\230a\230q\330\004\024\220F\230!\2306\240\025\240j\260\007\260q\270\001\200\001\330\004\027\220w\230a\230q\330\004\"\240/\260\021\260&\270\005\270Q\330\004\013\210:\220Q\220a\200\001\330\004\027\220w\230a\230q\330\004\025\220W\230A\230Q\330\004/\320/C\3001\300E\310\021\330\004\013\2104\210q\320\020+\2509\260A\260U\270*\300A\200\001\330\004\027\220w\230a\230q\330\004\"\240,\250a\250v\260U\270!\330\004\013\210:\220Q\220a\200\017\210x\220v\230U\240!\360\010\000\005\026\220W\230A\230Q\330\004\013\2103\210a\330\004\007\200t\2101\330\010\017\210q\360\006\000\005\010\200r\210\023\210A\330\010\r\210T\220\021\220%\220q\230\001\340\010\r\210W\220A\220Q\330\004\013\2101\210D\220\001\330\004\013\2103\210c\220\021\330\010\017\210q\340\004\007\200s\210#\210Q\330\010\016\210c\220\025\220b\230\004\230C\230r\240\021\340\0042\3202I\310\021\310\"\310A\360\010\000\005\010\200t\2101\330\010\014\210D\220\001\320\021,\250O\2707\300!\3003\300j\320PS\320SV\320V_\320_`""\330\010\013\2103\210c\220\021\330\014\020\220\001\220\025\220b\230\004\230C\230r\240\021\330\010\017\210q\340\004\013\210?\230'\240\021\240#\240Z\250s\260#\260X\270Q\340\004\013\2104\210v\220Q\330\004\016\210d\220$\220a\330\004\013\2101\330\004\010\210\001\330\004\n\210%\210s\220!\330\010\t\210\027\220\001\220\021\220&\230\005\230X\240T\250\021\320*F\300f\310E\320QR\330\010\013\2101\210A\330\004\007\200q\330\010\017\210q\330\004\013\2103\210b\220\001\200\001\360\006\000\005\010\200z\220\021\220&\230\001\330\010\023\2201\330\010\030\230\006\230a\230\177\320.F\300a\300x\310|\320[_\320_b\320bi\320ij\320jk\340\010\025\220W\230A\230Q\330\010\030\230\006\230a\230v\240Z\250z\270\027\300\001\300\021\320\000\031\320\031*\250!\330\004\007\200z\220\021\220'\230\021\330\010\024\220A\330\004\007\200z\220\021\220%\220q\330\010\025\220Q\330\004\031\230\027\240\001\240\021\330\004\027\220w\230a\230q\330\004\036\230a\330\004\037\230q\330\0043\3203J\310!\3106\320QR\330\0043\3203J\310!\3104\310q\330\004\013\2104\210z\230\031\240!\2404\240t\250<\260q\200\001\360$\000\005\010\200z\220\021\220#\220Q\330\010\017\210t\220:\230V\2401\240A\240W\250A\250Q\330\t\023\2201\220C\220q\330\010\014\210A\330\010\014\210E\220\021\330\014\r\210W\220A\220W\230A\230Q\330\010\017\210u\220A\220Q\330\t\023\2201\220C\220q\330\010\014\210A\330\010\014\210E\220\021\330\014\r\210W\220A\220W\230A\230Q\330\010\017\210q\330\004\013\2108\2201\220C\220q\320\000\020\220\001\360*\000\005\010\200z\220\021\220$\220g\230Q\330\010\017\210q\330\t\023\2201\220C\220q\330\010\020\220\010\230\007\230q\330\t\023\2201\220C\220w\230a\330\010\017\210w\220a\220q\330\t\023\2201\220C\220q\330\010\017\210z\230\021\230!\330\t\024\220D\230\n\240!\2404\240r\250\032\2602\260Q\330\010\017\210z\230\021\230!\330\t\023\2201\220C\220q\330\010\017\210}\230A\230Q\330\t\020\220\001\220\023\220A\330\010\017\210x\220q\230\001\230\034\240T\250\021\330\t\020\220\001\220\023\220A\330\010\017\210x\220q\230\001\230\030\240\024\240Q\330\t\020\220\001""\220\023\220A\330\010\017\210x\220q\230\001\230\031\240$\240a\340\004\005\330\017\020\330\010\017\210\177\230a\230s\240!\330\013\014\360\006\000\005\010\200q\330\010\016\210l\230!\330\014\r\330\020\023\2204\220q\230\001\200\001\330\004\007\200z\220\021\220&\230\001\360\006\000\t\020\210u\220A\220W\230A\330\004\013\2105\220\001\220\027\230\001\230\030\240\021O";
    PyObject *data = NULL;
    CYTHON_UNUSED_VAR(__Pyx_DecompressString);
    #endif
    PyObject **stringtab = __pyx_mstate->__pyx_string_tab;
    Py_ssize_t pos = 0;
    for (int i = 0; i < 1483; i++) {
      Py_ssize_t bytes_length = index[i].length;
      PyObject *string = PyUnicode_DecodeUTF8(bytes + pos, bytes_length, NULL);
      if (likely(string) && i >= 134) PyUnicode_InternInPlace(&string);
      if (unlikely(!string)) {
        Py_XDECREF(data);
        __PYX_ERR(0, 1, __pyx_L1_error)
      }
      stringtab[i] = string;
      pos += bytes_length;
    }
    for (int i = 1483; i < 1874; i++) {
      Py_ssize_t bytes_length = index[i].length;
      PyObject *string = PyBytes_FromStringAndSize(bytes + pos, bytes_length);
      stringtab[i] = string;
      pos += bytes_length;
      if (unlikely(!string)) {
        Py_XDECREF(data);
        __PYX_ERR(0, 1, __pyx_L1_error)
      }
    }
    Py_XDECREF(data);
    for (Py_ssize_t i = 0; i < 1874; i++) {
      if (unlikely(PyObject_Hash(stringtab[i]) == -1)) {
        __PYX_ERR(0, 1, __pyx_L1_error)
      }
    }
    #if CYTHON_IMMORTAL_CONSTANTS
    {
      PyObject **table = stringtab + 1483;
      for (Py_ssize_t i=0; i<391; ++i) {
        #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
        #if PY_VERSION_HEX < 0x030E0000
        if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1)
        #else
        if (PyUnstable_Object_IsUniquelyReferenced(table[i]))
        #endif
        {
          Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL);
        }
        #else
        Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT);
        #endif
      }
    }
    #endif
  }
  {
    PyObject **numbertab = __pyx_mstate->__pyx_number_tab;
    double const c_constants[] = {1.0,3.3219280948873626};
    for (int i = 0; i < 2; i++) {
      numbertab[i] = PyFloat_FromDouble(c_constants[i]);
      if (unlikely(!numbertab[i])) __PYX_ERR(0, 1, __pyx_L1_error)
    }
  }
  {
    PyObject **numbertab = __pyx_mstate->__pyx_number_tab + 2;
    int8_t const cint_constants_1[] = {0,-1,1,2,3,4,5,6,10,15,16,25,53};
    int32_t const cint_constants_4[] = {136983863L,163199335L,238750788L};
    for (int i = 0; i < 16; i++) {
      numbertab[i] = PyLong_FromLong((i < 13 ? cint_constants_1[i - 0] : cint_constants_4[i - 13]));
      if (unlikely(!numbertab[i])) __PYX_ERR(0, 1, __pyx_L1_error)
    }
  }
  #if CYTHON_IMMORTAL_CONSTANTS
  {
    PyObject **table = __pyx_mstate->__pyx_number_tab;
    for (Py_ssize_t i=0; i<18; ++i) {
      #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
      #if PY_VERSION_HEX < 0x030E0000
      if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1)
      #else
      if (PyUnstable_Object_IsUniquelyReferenced(table[i]))
      #endif
      {
        Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL);
      }
      #else
      Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT);
      #endif
    }
  }
  #endif
  return 0;
  __pyx_L1_error:;
  return -1;
}
/* #### Code section: init_codeobjects ### */
typedef struct {
    unsigned int argcount : 3;
    unsigned int num_posonly_args : 1;
    unsigned int num_kwonly_args : 3;
    unsigned int nlocals : 4;
    unsigned int flags : 10;
    unsigned int first_line : 13;
} __Pyx_PyCode_New_function_description;
/* NewCodeObj.proto */
static PyObject* __Pyx_PyCode_New(
        const __Pyx_PyCode_New_function_description descr,
        PyObject * const *varnames,
        PyObject *filename,
        PyObject *funcname,
        PyObject *line_table,
        PyObject *tuple_dedup_map
);


static int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate) {
  PyObject* tuple_dedup_map = PyDict_New();
  if (unlikely(!tuple_dedup_map)) return -1;
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3930};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_x};
    __pyx_mstate_global->__pyx_codeobj_tab[0] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_lambda_2, __pyx_mstate->__pyx_kp_b_iso88591_j_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[0])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3944};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_x};
    __pyx_mstate_global->__pyx_codeobj_tab[1] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_lambda_2, __pyx_mstate->__pyx_kp_b_iso88591_j_aq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[1])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3948};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_x};
    __pyx_mstate_global->__pyx_codeobj_tab[2] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_lambda_2, __pyx_mstate->__pyx_kp_b_iso88591_j_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[2])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4136};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_x};
    __pyx_mstate_global->__pyx_codeobj_tab[3] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_lambda_2, __pyx_mstate->__pyx_kp_b_iso88591_9Bha, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[3])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4139};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_x};
    __pyx_mstate_global->__pyx_codeobj_tab[4] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_lambda_2, __pyx_mstate->__pyx_kp_b_iso88591_k_81, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[4])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 4956};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_expr};
    __pyx_mstate_global->__pyx_codeobj_tab[5] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_kp_b_iso88591_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[5])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS), 5139};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_lambdify, __pyx_mstate->__pyx_n_u_args};
    __pyx_mstate_global->__pyx_codeobj_tab[6] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_init, __pyx_mstate->__pyx_kp_b_iso88591_A_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[6])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS), 5141};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_args, __pyx_mstate->__pyx_n_u_kwargs};
    __pyx_mstate_global->__pyx_codeobj_tab[7] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_new, __pyx_mstate->__pyx_kp_b_iso88591_5_34xq_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[7])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 38};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_capsule};
    __pyx_mstate_global->__pyx_codeobj_tab[8] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_capsule_to_basic, __pyx_mstate->__pyx_kp_b_iso88591_8_4q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[8])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 42};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_capsule, __pyx_mstate->__pyx_n_u_value};
    __pyx_mstate_global->__pyx_codeobj_tab[9] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_assign_to_capsule, __pyx_mstate->__pyx_kp_b_iso88591_L_AYa_7_1_aq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[9])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 14, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 271};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_a, __pyx_mstate->__pyx_n_u_raise_error, __pyx_mstate->__pyx_n_u_sympy, __pyx_mstate->__pyx_n_u_sympy_AppliedUndef, __pyx_mstate->__pyx_n_u_x, __pyx_mstate->__pyx_n_u_y, __pyx_mstate->__pyx_n_u_name, __pyx_mstate->__pyx_n_u_row, __pyx_mstate->__pyx_n_u_col, __pyx_mstate->__pyx_n_u_v, __pyx_mstate->__pyx_n_u_r, __pyx_mstate->__pyx_n_u_e, __pyx_mstate->__pyx_n_u_x, __pyx_mstate->__pyx_n_u_x};
    __pyx_mstate_global->__pyx_codeobj_tab[10] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sympy2symengine, __pyx_mstate->__pyx_kp_b_iso88591_q_A_z_U_vQaq_1CuA_uAQa_1CuA_s_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[10])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 504};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_a, __pyx_mstate->__pyx_n_u_v, __pyx_mstate->__pyx_n_u_e};
    __pyx_mstate_global->__pyx_codeobj_tab[11] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sympify, __pyx_mstate->__pyx_kp_b_iso88591_z_Q_t_V1AWAQ_1Cq_A_E_WAWAQ_uAQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[11])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 537};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_a, __pyx_mstate->__pyx_n_u_raise_error, __pyx_mstate->__pyx_n_u_sympy};
    __pyx_mstate_global->__pyx_codeobj_tab[12] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sympify_2, __pyx_mstate->__pyx_kp_b_iso88591_z_gQ_q_1Cq_q_1Cwa_waq_1Cq_z_D_4, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[12])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 590};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_function, __pyx_mstate->__pyx_n_u_module};
    __pyx_mstate_global->__pyx_codeobj_tab[13] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_get_function_class, __pyx_mstate->__pyx_kp_b_iso88591_9Cq_Ql_A_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[13])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 599};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[14] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_Zero, __pyx_mstate->__pyx_kp_b_iso88591_A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[14])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 603};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[15] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_One, __pyx_mstate->__pyx_kp_b_iso88591_A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[15])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 607};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[16] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_NegativeOne, __pyx_mstate->__pyx_kp_b_iso88591_A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[16])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 611};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[17] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_Half, __pyx_mstate->__pyx_kp_b_iso88591_A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[17])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 615};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[18] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_Pi, __pyx_mstate->__pyx_kp_b_iso88591_A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[18])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 619};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[19] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_NaN, __pyx_mstate->__pyx_kp_b_iso88591_A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[19])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 623};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[20] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_Infinity, __pyx_mstate->__pyx_kp_b_iso88591_A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[20])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 627};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[21] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_NegativeInfinity, __pyx_mstate->__pyx_kp_b_iso88591_A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[21])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 631};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[22] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_ComplexInfinity, __pyx_mstate->__pyx_kp_b_iso88591_A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[22])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 635};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[23] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_Exp1, __pyx_mstate->__pyx_kp_b_iso88591_A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[23])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 639};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[24] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_GoldenRatio, __pyx_mstate->__pyx_kp_b_iso88591_A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[24])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 643};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[25] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_Catalan, __pyx_mstate->__pyx_kp_b_iso88591_A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[25])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 647};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[26] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_EulerGamma, __pyx_mstate->__pyx_kp_b_iso88591_A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[26])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 651};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[27] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_ImaginaryUnit, __pyx_mstate->__pyx_kp_b_iso88591_A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[27])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 655};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[28] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_true, __pyx_mstate->__pyx_kp_b_iso88591_A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[28])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 659};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[29] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_false, __pyx_mstate->__pyx_kp_b_iso88591_A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[29])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 663};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[30] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_EmptySet, __pyx_mstate->__pyx_kp_b_iso88591_A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[30])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 667};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[31] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_UniversalSet, __pyx_mstate->__pyx_kp_b_iso88591_A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[31])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 671};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[32] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_Integers, __pyx_mstate->__pyx_kp_b_iso88591_A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[32])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 675};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[33] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_Rationals, __pyx_mstate->__pyx_kp_b_iso88591_A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[33])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 679};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[34] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_Reals, __pyx_mstate->__pyx_kp_b_iso88591_A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[34])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[35] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[35])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state};
    __pyx_mstate_global->__pyx_codeobj_tab[36] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[36])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 710};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_ret, __pyx_mstate->__pyx_n_u_it};
    __pyx_mstate_global->__pyx_codeobj_tab[37] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_as_dict, __pyx_mstate->__pyx_kp_b_iso88591_A_a_T_6_c_D_a_q_AV3k_QfCq_q_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[37])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 718};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_d, __pyx_mstate->__pyx_n_u_D, __pyx_mstate->__pyx_n_u_key, __pyx_mstate->__pyx_n_u_value};
    __pyx_mstate_global->__pyx_codeobj_tab[38] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_add_dict, __pyx_mstate->__pyx_kp_b_iso88591_A_Qc_2V4q_a_Yaz_D_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[38])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 727};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_key, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_K, __pyx_mstate->__pyx_n_u_V, __pyx_mstate->__pyx_n_u_pair};
    __pyx_mstate_global->__pyx_codeobj_tab[39] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_add, __pyx_mstate->__pyx_kp_b_iso88591_A_waq_waq_IQa_Jaq_t2WAU, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[39])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 735};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[40] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_copy, __pyx_mstate->__pyx_kp_b_iso88591_A_y, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[40])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 756};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[41] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_clear, __pyx_mstate->__pyx_kp_b_iso88591_A_F, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[41])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[42] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[42])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state};
    __pyx_mstate_global->__pyx_codeobj_tab[43] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[43])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 776};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_key, __pyx_mstate->__pyx_n_u_value};
    __pyx_mstate_global->__pyx_codeobj_tab[44] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_str, __pyx_mstate->__pyx_kp_b_iso88591_A_t2T_aq_Cq_c_e9TXX_cceef, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[44])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 779};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[45] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_repr, __pyx_mstate->__pyx_kp_b_iso88591_A_t81, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[45])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS), 782};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_args, __pyx_mstate->__pyx_n_u_D, __pyx_mstate->__pyx_n_u_k, __pyx_mstate->__pyx_n_u_v, __pyx_mstate->__pyx_n_u_arg};
    __pyx_mstate_global->__pyx_codeobj_tab[46] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_get_dict, __pyx_mstate->__pyx_kp_b_iso88591_s_6_A_at1A_5_1D_T_Qc_T_at4q_q_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[46])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 830};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_s};
    __pyx_mstate_global->__pyx_codeobj_tab[47] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_load_basic, __pyx_mstate->__pyx_kp_b_iso88591_4z_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[47])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 844};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_s};
    __pyx_mstate_global->__pyx_codeobj_tab[48] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_reduce, __pyx_mstate->__pyx_kp_b_iso88591_A_avT_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[48])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 848};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[49] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_repr_latex_2, __pyx_mstate->__pyx_kp_b_iso88591_A_Qa_6_aq_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[49])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 860};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[50] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_unsafe_reset, __pyx_mstate->__pyx_kp_b_iso88591_A_HF, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[50])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 969};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_A, __pyx_mstate->__pyx_n_u_B, __pyx_mstate->__pyx_n_u_op};
    __pyx_mstate_global->__pyx_codeobj_tab[51] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_richcmp, __pyx_mstate->__pyx_kp_b_iso88591_A_Cs_Cq_a_A_D_q_6_Cs_4q_33aq_1_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[51])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 983};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_deep};
    __pyx_mstate_global->__pyx_codeobj_tab[52] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_expand, __pyx_mstate->__pyx_kp_b_iso88591_1_t_WAT_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[52])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 986};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_x};
    __pyx_mstate_global->__pyx_codeobj_tab[53] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_diff, __pyx_mstate->__pyx_kp_b_iso88591_A_t_U_4z, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[53])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS), 989};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_args, __pyx_mstate->__pyx_n_u_f};
    __pyx_mstate_global->__pyx_codeobj_tab[54] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_diff_2, __pyx_mstate->__pyx_kp_b_iso88591_A_3avS_A_1Cs_l_1_4vQat1_uAWA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[54])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS), 997};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_args};
    __pyx_mstate_global->__pyx_codeobj_tab[55] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_subs_dict, __pyx_mstate->__pyx_kp_b_iso88591_A_Q_Gq_t5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[55])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1001};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_old, __pyx_mstate->__pyx_n_u_new_2};
    __pyx_mstate_global->__pyx_codeobj_tab[56] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_subs_oldnew, __pyx_mstate->__pyx_kp_b_iso88591_A_Q_I_t5_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[56])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS), 1005};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_args, __pyx_mstate->__pyx_n_u_D};
    __pyx_mstate_global->__pyx_codeobj_tab[57] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_subs, __pyx_mstate->__pyx_kp_b_iso88591_A_HBa_t_V1D_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[57])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS), 1009};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_args, __pyx_mstate->__pyx_n_u_D};
    __pyx_mstate_global->__pyx_codeobj_tab[58] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_xreplace, __pyx_mstate->__pyx_kp_b_iso88591_A_HBa_t_Yat_Qa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[58])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS), 1015};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_args, __pyx_mstate->__pyx_n_u_D};
    __pyx_mstate_global->__pyx_codeobj_tab[59] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_msubs, __pyx_mstate->__pyx_kp_b_iso88591_A_HBa_t_V1D_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[59])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1019};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_num_2, __pyx_mstate->__pyx_n_u_den};
    __pyx_mstate_global->__pyx_codeobj_tab[60] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_as_numer_denom, __pyx_mstate->__pyx_kp_b_iso88591_A_8_q_PPWWXXY_t1_WD_1B, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[60])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1024};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_real_2, __pyx_mstate->__pyx_n_u_imag};
    __pyx_mstate_global->__pyx_codeobj_tab[61] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_as_real_imag, __pyx_mstate->__pyx_kp_b_iso88591_A_at_6gQ_OwVWWX_t1_XT_2C1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[61])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1029};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_prec_2, __pyx_mstate->__pyx_n_u_real};
    __pyx_mstate_global->__pyx_codeobj_tab[62] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_n, __pyx_mstate->__pyx_kp_b_iso88591_Ya_uAV6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[62])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1156};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[63] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_copy, __pyx_mstate->__pyx_kp_b_iso88591_A_q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[63])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1159};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_ring};
    __pyx_mstate_global->__pyx_codeobj_tab[64] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_symbolic, __pyx_mstate->__pyx_kp_b_iso88591_A_t1D_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[64])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS), 1162};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_types, __pyx_mstate->__pyx_n_u_s, __pyx_mstate->__pyx_n_u_arg};
    __pyx_mstate_global->__pyx_codeobj_tab[65] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_atoms, __pyx_mstate->__pyx_kp_b_iso88591_A_1_1_6_Qa_t1_F_A_1_4q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[65])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS), 1173};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_args, __pyx_mstate->__pyx_n_u_kwargs};
    __pyx_mstate_global->__pyx_codeobj_tab[66] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_simplify, __pyx_mstate->__pyx_kp_b_iso88591_A_wat82Yb, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[66])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1176};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_d};
    __pyx_mstate_global->__pyx_codeobj_tab[67] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_as_coefficients_dict, __pyx_mstate->__pyx_kp_b_iso88591_A_K_1A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[67])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1181};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_x, __pyx_mstate->__pyx_n_u_n, __pyx_mstate->__pyx_n_u_x_3, __pyx_mstate->__pyx_n_u_n_2};
    __pyx_mstate_global->__pyx_codeobj_tab[68] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_coeff, __pyx_mstate->__pyx_kp_b_iso88591_q_q_A_q_t_V1F_k_r_FRTTU, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[68])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS), 1187};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_symbols, __pyx_mstate->__pyx_n_u_symbol};
    __pyx_mstate_global->__pyx_codeobj_tab[69] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_has, __pyx_mstate->__pyx_kp_b_iso88591_A_s_1JavXT_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[69])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1190};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_Y, __pyx_mstate->__pyx_n_u_s, __pyx_mstate->__pyx_n_u_i};
    __pyx_mstate_global->__pyx_codeobj_tab[70] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_args_as_sage, __pyx_mstate->__pyx_kp_b_iso88591_A_V4y_A_E_aq_Q_WAT_AQd_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[70])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1197};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_Y, __pyx_mstate->__pyx_n_u_s, __pyx_mstate->__pyx_n_u_i};
    __pyx_mstate_global->__pyx_codeobj_tab[71] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_args_as_sympy, __pyx_mstate->__pyx_kp_b_iso88591_A_V4y_A_E_aq_Q_WAT_AQd_q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[71])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1213};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_f};
    __pyx_mstate_global->__pyx_codeobj_tab[72] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_complex, __pyx_mstate->__pyx_kp_b_iso88591_A_D_5_4z_oQ_1A_waq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[72])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1219};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_d};
    __pyx_mstate_global->__pyx_codeobj_tab[73] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_as_powers_dict, __pyx_mstate->__pyx_kp_b_iso88591_A_K_1A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[73])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 15, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1225};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_ex, __pyx_mstate->__pyx_n_u_x, __pyx_mstate->__pyx_n_u_x0, __pyx_mstate->__pyx_n_u_n, __pyx_mstate->__pyx_n_u_as_deg_coef_pair, __pyx_mstate->__pyx_n_u_ex_2, __pyx_mstate->__pyx_n_u_syms, __pyx_mstate->__pyx_n_u_x_3, __pyx_mstate->__pyx_n_u_X, __pyx_mstate->__pyx_n_u_umap, __pyx_mstate->__pyx_n_u_iter_2, __pyx_mstate->__pyx_n_u_iterend, __pyx_mstate->__pyx_n_u_b, __pyx_mstate->__pyx_n_u_poly, __pyx_mstate->__pyx_n_u_l};
    __pyx_mstate_global->__pyx_codeobj_tab[74] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_series, __pyx_mstate->__pyx_kp_b_iso88591_xvU_WAQ_3a_t1_q_r_A_T_q_WAQ_1D, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[74])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1296};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sympy};
    __pyx_mstate_global->__pyx_codeobj_tab[75] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sympy_2, __pyx_mstate->__pyx_kp_b_iso88591_A_uG1Cq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[75])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1300};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[76] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_reduce, __pyx_mstate->__pyx_kp_b_iso88591_A_4q_c_5_1A_Qa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[76])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1306};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sage_2};
    __pyx_mstate_global->__pyx_codeobj_tab[77] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sage, __pyx_mstate->__pyx_kp_b_iso88591_A_t3gQc, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[77])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1343};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sympy};
    __pyx_mstate_global->__pyx_codeobj_tab[78] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sympy_2, __pyx_mstate->__pyx_kp_b_iso88591_A_uF_3auAQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[78])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS), 1356};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_prefix, __pyx_mstate->__pyx_n_u_shape, __pyx_mstate->__pyx_n_u_kwargs, __pyx_mstate->__pyx_n_u_arr, __pyx_mstate->__pyx_n_u_index};
    __pyx_mstate_global->__pyx_codeobj_tab[79] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_symarray, __pyx_mstate->__pyx_kp_b_iso88591_F_7_81A_1IV1Kxs_q_1E_Q_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[79])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1388};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[80] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sympy_2, __pyx_mstate->__pyx_kp_b_iso88591_A_iq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[80])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1391};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[81] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sage, __pyx_mstate->__pyx_kp_b_iso88591_A_iq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[81])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1400};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_d};
    __pyx_mstate_global->__pyx_codeobj_tab[82] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_as_powers_dict, __pyx_mstate->__pyx_kp_b_iso88591_A_K_1A_q_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[82])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1413};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sympy};
    __pyx_mstate_global->__pyx_codeobj_tab[83] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sympy_2, __pyx_mstate->__pyx_kp_b_iso88591_A_uA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[83])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1417};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sage_2};
    __pyx_mstate_global->__pyx_codeobj_tab[84] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sage, __pyx_mstate->__pyx_kp_b_iso88591_A_t1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[84])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1429};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sympy};
    __pyx_mstate_global->__pyx_codeobj_tab[85] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sympy_2, __pyx_mstate->__pyx_kp_b_iso88591_A_uA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[85])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1433};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sage_2};
    __pyx_mstate_global->__pyx_codeobj_tab[86] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sage, __pyx_mstate->__pyx_kp_b_iso88591_A_t1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[86])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1445};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sympy};
    __pyx_mstate_global->__pyx_codeobj_tab[87] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sympy_2, __pyx_mstate->__pyx_kp_b_iso88591_A_uA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[87])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1449};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sage_2};
    __pyx_mstate_global->__pyx_codeobj_tab[88] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sage, __pyx_mstate->__pyx_kp_b_iso88591_A_t1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[88])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1461};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sympy};
    __pyx_mstate_global->__pyx_codeobj_tab[89] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sympy_2, __pyx_mstate->__pyx_kp_b_iso88591_A_uA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[89])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1465};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sage_2};
    __pyx_mstate_global->__pyx_codeobj_tab[90] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sage, __pyx_mstate->__pyx_kp_b_iso88591_A_t1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[90])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1477};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sympy};
    __pyx_mstate_global->__pyx_codeobj_tab[91] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sympy_2, __pyx_mstate->__pyx_kp_b_iso88591_A_uA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[91])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1481};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sage_2};
    __pyx_mstate_global->__pyx_codeobj_tab[92] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sage, __pyx_mstate->__pyx_kp_b_iso88591_A_t1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[92])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1490};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[93] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_logical_not, __pyx_mstate->__pyx_kp_b_iso88591_A_t1_o5MQdR_hhi, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[93])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1513};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sympy};
    __pyx_mstate_global->__pyx_codeobj_tab[94] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sympy_2, __pyx_mstate->__pyx_kp_b_iso88591_A_uBa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[94])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1517};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[95] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sage, __pyx_mstate->__pyx_kp_b_iso88591_A_q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[95])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1532};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sympy};
    __pyx_mstate_global->__pyx_codeobj_tab[96] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sympy_2, __pyx_mstate->__pyx_kp_b_iso88591_A_uBa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[96])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1536};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[97] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sage, __pyx_mstate->__pyx_kp_b_iso88591_A_q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[97])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS), 1550};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_args};
    __pyx_mstate_global->__pyx_codeobj_tab[98] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_new, __pyx_mstate->__pyx_kp_b_iso88591_A_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[98])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1553};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sympy, __pyx_mstate->__pyx_n_u_s};
    __pyx_mstate_global->__pyx_codeobj_tab[99] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sympy_2, __pyx_mstate->__pyx_kp_b_iso88591_A_D_a_uD, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[99])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS), 1561};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_args};
    __pyx_mstate_global->__pyx_codeobj_tab[100] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_new, __pyx_mstate->__pyx_kp_b_iso88591_A_z_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[100])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1564};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sympy, __pyx_mstate->__pyx_n_u_s};
    __pyx_mstate_global->__pyx_codeobj_tab[101] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sympy_2, __pyx_mstate->__pyx_kp_b_iso88591_A_D_a_uCr, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[101])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1572};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_x};
    __pyx_mstate_global->__pyx_codeobj_tab[102] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_new, __pyx_mstate->__pyx_kp_b_iso88591_A_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[102])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1575};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sympy, __pyx_mstate->__pyx_n_u_s};
    __pyx_mstate_global->__pyx_codeobj_tab[103] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sympy_2, __pyx_mstate->__pyx_kp_b_iso88591_A_D_b_uD, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[103])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS), 1583};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_args};
    __pyx_mstate_global->__pyx_codeobj_tab[104] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_new, __pyx_mstate->__pyx_kp_b_iso88591_A_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[104])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1586};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sympy, __pyx_mstate->__pyx_n_u_s};
    __pyx_mstate_global->__pyx_codeobj_tab[105] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sympy_2, __pyx_mstate->__pyx_kp_b_iso88591_A_D_a_uD, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[105])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1594};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[106] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_is_Relational, __pyx_mstate->__pyx_kp_b_iso88591_A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[106])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1598};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[107] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_bool, __pyx_mstate->__pyx_kp_b_iso88591_A_iq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[107])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS), 1607};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_args};
    __pyx_mstate_global->__pyx_codeobj_tab[108] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_new, __pyx_mstate->__pyx_kp_b_iso88591_A_r_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[108])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1610};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sympy, __pyx_mstate->__pyx_n_u_s};
    __pyx_mstate_global->__pyx_codeobj_tab[109] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sympy_2, __pyx_mstate->__pyx_kp_b_iso88591_A_D_a_uIRq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[109])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1615};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sage_2, __pyx_mstate->__pyx_n_u_s};
    __pyx_mstate_global->__pyx_codeobj_tab[110] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sage, __pyx_mstate->__pyx_kp_b_iso88591_A_D_Q_t3b, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[110])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1620};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[111] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_is_Equality, __pyx_mstate->__pyx_kp_b_iso88591_A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[111])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1624};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[112] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_func, __pyx_mstate->__pyx_kp_b_iso88591_A_t1_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[112])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS), 1634};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_args};
    __pyx_mstate_global->__pyx_codeobj_tab[113] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_new, __pyx_mstate->__pyx_kp_b_iso88591_A_r_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[113])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1637};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sympy, __pyx_mstate->__pyx_n_u_s};
    __pyx_mstate_global->__pyx_codeobj_tab[114] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sympy_2, __pyx_mstate->__pyx_kp_b_iso88591_A_D_a_uKr, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[114])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1642};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sage_2, __pyx_mstate->__pyx_n_u_s};
    __pyx_mstate_global->__pyx_codeobj_tab[115] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sage, __pyx_mstate->__pyx_kp_b_iso88591_A_D_Q_t3b, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[115])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1647};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[116] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_func, __pyx_mstate->__pyx_kp_b_iso88591_A_t1_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[116])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS), 1657};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_args};
    __pyx_mstate_global->__pyx_codeobj_tab[117] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_new, __pyx_mstate->__pyx_kp_b_iso88591_A_r_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[117])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1660};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sympy, __pyx_mstate->__pyx_n_u_s};
    __pyx_mstate_global->__pyx_codeobj_tab[118] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sympy_2, __pyx_mstate->__pyx_kp_b_iso88591_A_D_a_uIRq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[118])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1665};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sage_2, __pyx_mstate->__pyx_n_u_s};
    __pyx_mstate_global->__pyx_codeobj_tab[119] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sage, __pyx_mstate->__pyx_kp_b_iso88591_A_D_Q_t3b, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[119])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS), 1676};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_args};
    __pyx_mstate_global->__pyx_codeobj_tab[120] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_new, __pyx_mstate->__pyx_kp_b_iso88591_A_r_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[120])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1679};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sympy, __pyx_mstate->__pyx_n_u_s};
    __pyx_mstate_global->__pyx_codeobj_tab[121] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sympy_2, __pyx_mstate->__pyx_kp_b_iso88591_A_D_a_uO2Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[121])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1684};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sage_2, __pyx_mstate->__pyx_n_u_s};
    __pyx_mstate_global->__pyx_codeobj_tab[122] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sage, __pyx_mstate->__pyx_kp_b_iso88591_A_D_Q_t3b, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[122])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 8, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1745};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_p, __pyx_mstate->__pyx_n_u_q, __pyx_mstate->__pyx_n_u_p_2, __pyx_mstate->__pyx_n_u_q_2, __pyx_mstate->__pyx_n_u_p_3, __pyx_mstate->__pyx_n_u_q_3, __pyx_mstate->__pyx_n_u_tmp};
    __pyx_mstate_global->__pyx_codeobj_tab[123] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_new, __pyx_mstate->__pyx_kp_b_iso88591_A_Cq_Cq_4q_a_Qb_q_a_Qb_q_a_4q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[123])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1766};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[124] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_is_Rational, __pyx_mstate->__pyx_kp_b_iso88591_A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[124])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1770};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[125] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_is_rational, __pyx_mstate->__pyx_kp_b_iso88591_A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[125])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1774};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[126] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_is_real, __pyx_mstate->__pyx_kp_b_iso88591_A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[126])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1778};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[127] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_is_finite, __pyx_mstate->__pyx_kp_b_iso88591_A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[127])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1782};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[128] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_is_integer, __pyx_mstate->__pyx_kp_b_iso88591_A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[128])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1786};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[129] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_p, __pyx_mstate->__pyx_kp_b_iso88591_A_t_r, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[129])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1790};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[130] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_q, __pyx_mstate->__pyx_kp_b_iso88591_A_t_r, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[130])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1794};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_num_2, __pyx_mstate->__pyx_n_u_den};
    __pyx_mstate_global->__pyx_codeobj_tab[131] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_get_num_den, __pyx_mstate->__pyx_kp_b_iso88591_A_Qo_Fat1_314DOSTTU_q_A_gT_2C1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[131])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1800};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_rat};
    __pyx_mstate_global->__pyx_codeobj_tab[132] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sympy_2, __pyx_mstate->__pyx_kp_b_iso88591_A_d_a_s_2XS_Qb, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[132])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1804};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_convert_to_rational, __pyx_mstate->__pyx_n_u_rat};
    __pyx_mstate_global->__pyx_codeobj_tab[133] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sage, __pyx_mstate->__pyx_kp_b_iso88591_A_A_aq_l_3ar_2S_7, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[133])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1812};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[134] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_func, __pyx_mstate->__pyx_kp_b_iso88591_A_t1_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[134])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1819};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_i_3, __pyx_mstate->__pyx_n_u_i_4, __pyx_mstate->__pyx_n_u_tmp, __pyx_mstate->__pyx_n_u_int_ok};
    __pyx_mstate_global->__pyx_codeobj_tab[135] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_new, __pyx_mstate->__pyx_kp_b_iso88591_A_Cq_Q_Q_Qb_q_a_1_4q_2_1_4q_2_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[135])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1839};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[136] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_is_Integer, __pyx_mstate->__pyx_kp_b_iso88591_A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[136])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1843};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[137] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_is_integer, __pyx_mstate->__pyx_kp_b_iso88591_A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[137])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS), 1847};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_hints};
    __pyx_mstate_global->__pyx_codeobj_tab[138] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_doit, __pyx_mstate->__pyx_kp_b_iso88591_A_q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[138])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1850};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[139] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_hash, __pyx_mstate->__pyx_kp_b_iso88591_A_vT_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[139])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1853};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_a, __pyx_mstate->__pyx_n_u_b, __pyx_mstate->__pyx_n_u_op, __pyx_mstate->__pyx_n_u_A, __pyx_mstate->__pyx_n_u_B};
    __pyx_mstate_global->__pyx_codeobj_tab[140] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_richcmp_2, __pyx_mstate->__pyx_kp_b_iso88591_A_HAS_HAS_5_3it_Qc_3a_q_S_q_1_wj, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[140])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1864};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_A, __pyx_mstate->__pyx_n_u_B, __pyx_mstate->__pyx_n_u_op, __pyx_mstate->__pyx_n_u_i};
    __pyx_mstate_global->__pyx_codeobj_tab[141] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_richcmp, __pyx_mstate->__pyx_kp_b_iso88591_A___AQj_PQQ_xxyyzz_Cs_2Rq_A_2S_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[141])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1881};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sympy};
    __pyx_mstate_global->__pyx_codeobj_tab[142] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sympy_2, __pyx_mstate->__pyx_kp_b_iso88591_A_uHAS, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[142])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1885};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_convert_to_integer, __pyx_mstate->__pyx_n_u_sage_2};
    __pyx_mstate_global->__pyx_codeobj_tab[143] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sage, __pyx_mstate->__pyx_kp_b_iso88591_A_A_Qa_4xq_1A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[143])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1893};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_s};
    __pyx_mstate_global->__pyx_codeobj_tab[144] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_int, __pyx_mstate->__pyx_kp_b_iso88591_A_31D_BSST_s_1G1Je1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[144])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1898};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[145] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_p, __pyx_mstate->__pyx_kp_b_iso88591_A_s_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[145])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1902};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[146] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_q, __pyx_mstate->__pyx_kp_b_iso88591_A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[146])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1906};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[147] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_get_num_den, __pyx_mstate->__pyx_kp_b_iso88591_A_vQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[147])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1909};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[148] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_func, __pyx_mstate->__pyx_kp_b_iso88591_A_t1_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[148])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1914};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_n};
    __pyx_mstate_global->__pyx_codeobj_tab[149] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_dps_to_prec, __pyx_mstate->__pyx_kp_b_iso88591_s_Qe2S_1Baq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[149])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1920};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_instance};
    __pyx_mstate_global->__pyx_codeobj_tab[150] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_instancecheck, __pyx_mstate->__pyx_kp_b_iso88591_A_z_D, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[150])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1925};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[151] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_is_rational, __pyx_mstate->__pyx_kp_b_iso88591_A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[151])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1929};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[152] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_is_irrational, __pyx_mstate->__pyx_kp_b_iso88591_A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[152])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1933};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[153] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_is_real, __pyx_mstate->__pyx_kp_b_iso88591_A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[153])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1937};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[154] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_is_Float, __pyx_mstate->__pyx_kp_b_iso88591_A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[154])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1941};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_num, __pyx_mstate->__pyx_n_u_dps, __pyx_mstate->__pyx_n_u_precision};
    __pyx_mstate_global->__pyx_codeobj_tab[155] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_new, __pyx_mstate->__pyx_kp_b_iso88591_A_4wa_5_HAQ_4we4z_AQ_4s_t_S_S_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[155])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1970};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_i_3};
    __pyx_mstate_global->__pyx_codeobj_tab[156] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_new, __pyx_mstate->__pyx_kp_b_iso88591_A_t_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[156])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1974};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sympy};
    __pyx_mstate_global->__pyx_codeobj_tab[157] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sympy_2, __pyx_mstate->__pyx_kp_b_iso88591_A_uF_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[157])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1978};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sage_2};
    __pyx_mstate_global->__pyx_codeobj_tab[158] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sage, __pyx_mstate->__pyx_kp_b_iso88591_A_t_2Qe1A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[158])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1982};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[159] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_float, __pyx_mstate->__pyx_kp_b_iso88591_A_9_j_RS, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[159])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1985};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[160] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_complex, __pyx_mstate->__pyx_kp_b_iso88591_A_wauAQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[160])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1991};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[161] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_real_part, __pyx_mstate->__pyx_kp_b_iso88591_A_t1__4PPQQUU__iij, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[161])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1994};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[162] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_imaginary_part, __pyx_mstate->__pyx_kp_b_iso88591_A_t1__4PPQQUU__nno, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[162])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2014};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sympy};
    __pyx_mstate_global->__pyx_codeobj_tab[163] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sympy_2, __pyx_mstate->__pyx_kp_b_iso88591_A_t_Rxs_E_Bd_8ST, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[163])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2018};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sage_2};
    __pyx_mstate_global->__pyx_codeobj_tab[164] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sage, __pyx_mstate->__pyx_kp_b_iso88591_A_t_Rwc_4s_D_r_PQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[164])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2022};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[165] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_complex, __pyx_mstate->__pyx_kp_b_iso88591_A_AT_K, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[165])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2028};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_prec_2, __pyx_mstate->__pyx_n_u_base, __pyx_mstate->__pyx_n_u_i_3, __pyx_mstate->__pyx_n_u_m};
    __pyx_mstate_global->__pyx_codeobj_tab[166] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_new, __pyx_mstate->__pyx_kp_b_iso88591_Z_q_2S_ARwaq_V1_t1_j_SSTTU, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[166])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2036};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[167] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_get_prec, __pyx_mstate->__pyx_kp_b_iso88591_A_wa_q_JiWX, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[167])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2039};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sympy, __pyx_mstate->__pyx_n_u_prec_3, __pyx_mstate->__pyx_n_u_prec_2};
    __pyx_mstate_global->__pyx_codeobj_tab[168] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sympy_2, __pyx_mstate->__pyx_kp_b_iso88591_A_iq_3c_q_Q_9_uF_3awa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[168])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2045};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_convert_to_real_number, __pyx_mstate->__pyx_n_u_sage_2};
    __pyx_mstate_global->__pyx_codeobj_tab[169] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sage, __pyx_mstate->__pyx_kp_b_iso88591_A_A_4z_Qd_4q_1A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[169])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2062};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sympy};
    __pyx_mstate_global->__pyx_codeobj_tab[170] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sympy_2, __pyx_mstate->__pyx_kp_b_iso88591_A_t_Rxs_E_Bd_8ST, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[170])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2066};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_convert_to_mpcomplex_number, __pyx_mstate->__pyx_n_u_sage_2};
    __pyx_mstate_global->__pyx_codeobj_tab[171] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sage, __pyx_mstate->__pyx_kp_b_iso88591_A_A_aq_4_as_4y_AS_ZuTWWXX_kkl, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[171])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2077};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sympy};
    __pyx_mstate_global->__pyx_codeobj_tab[172] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sympy_2, __pyx_mstate->__pyx_kp_b_iso88591_A_t_Rxs_E_Bd_8ST, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[172])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2081};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sage_2};
    __pyx_mstate_global->__pyx_codeobj_tab[173] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sage, __pyx_mstate->__pyx_kp_b_iso88591_A_t_Rwc_4s_D_r_PQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[173])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2095};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sympy};
    __pyx_mstate_global->__pyx_codeobj_tab[174] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sympy_2, __pyx_mstate->__pyx_kp_b_iso88591_A_uA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[174])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2099};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sage_2};
    __pyx_mstate_global->__pyx_codeobj_tab[175] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sage, __pyx_mstate->__pyx_kp_b_iso88591_A_t1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[175])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2115};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sympy};
    __pyx_mstate_global->__pyx_codeobj_tab[176] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sympy_2, __pyx_mstate->__pyx_kp_b_iso88591_A_q_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[176])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2119};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sage_2};
    __pyx_mstate_global->__pyx_codeobj_tab[177] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sage, __pyx_mstate->__pyx_kp_b_iso88591_A_q_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[177])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2123};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_d};
    __pyx_mstate_global->__pyx_codeobj_tab[178] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_as_powers_dict, __pyx_mstate->__pyx_kp_b_iso88591_A_K_1A_q_q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[178])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2142};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sympy};
    __pyx_mstate_global->__pyx_codeobj_tab[179] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sympy_2, __pyx_mstate->__pyx_kp_b_iso88591_A_uA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[179])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2146};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sage_2};
    __pyx_mstate_global->__pyx_codeobj_tab[180] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sage, __pyx_mstate->__pyx_kp_b_iso88591_A_t1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[180])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2174};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sympy};
    __pyx_mstate_global->__pyx_codeobj_tab[181] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sympy_2, __pyx_mstate->__pyx_kp_b_iso88591_A_uA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[181])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2178};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sage_2};
    __pyx_mstate_global->__pyx_codeobj_tab[182] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sage, __pyx_mstate->__pyx_kp_b_iso88591_A_t1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[182])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2186};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_r};
    __pyx_mstate_global->__pyx_codeobj_tab[183] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_new, __pyx_mstate->__pyx_kp_b_iso88591_A_vXQa_haq_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[183])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2195};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_r};
    __pyx_mstate_global->__pyx_codeobj_tab[184] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_new, __pyx_mstate->__pyx_kp_b_iso88591_A_vXQa_haq_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[184])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2204};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_r};
    __pyx_mstate_global->__pyx_codeobj_tab[185] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_new, __pyx_mstate->__pyx_kp_b_iso88591_A_vXQa_hb_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[185])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2213};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_q};
    __pyx_mstate_global->__pyx_codeobj_tab[186] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_new, __pyx_mstate->__pyx_kp_b_iso88591_A_vXQa_iq_1_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[186])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2223};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_expr};
    __pyx_mstate_global->__pyx_codeobj_tab[187] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_make_args, __pyx_mstate->__pyx_kp_b_iso88591_A_QfA_4q_G1A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[187])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS), 2235};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_args, __pyx_mstate->__pyx_n_u_kwargs, __pyx_mstate->__pyx_n_u_v_2};
    __pyx_mstate_global->__pyx_codeobj_tab[188] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_new, __pyx_mstate->__pyx_kp_b_iso88591_A_7q_t_T, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[188])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2239};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_args};
    __pyx_mstate_global->__pyx_codeobj_tab[189] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_from_args, __pyx_mstate->__pyx_kp_b_iso88591_A_3avS_4q_s_4q_s_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[189])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2248};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[190] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_is_Add, __pyx_mstate->__pyx_kp_b_iso88591_A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[190])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2252};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_Add};
    __pyx_mstate_global->__pyx_codeobj_tab[191] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sympy_2, __pyx_mstate->__pyx_kp_b_iso88591_A_s_D, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[191])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2256};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_X, __pyx_mstate->__pyx_n_u_a, __pyx_mstate->__pyx_n_u_b};
    __pyx_mstate_global->__pyx_codeobj_tab[192] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sage, __pyx_mstate->__pyx_kp_b_iso88591_A_33Gq_A_b_Zwa_G1A_t1BgS_ar, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[192])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2262};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[193] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_func, __pyx_mstate->__pyx_kp_b_iso88591_A_t1_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[193])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2266};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_X, __pyx_mstate->__pyx_n_u_umap, __pyx_mstate->__pyx_n_u_iter_2, __pyx_mstate->__pyx_n_u_iterend, __pyx_mstate->__pyx_n_u_d};
    __pyx_mstate_global->__pyx_codeobj_tab[194] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_as_coefficients_dict, __pyx_mstate->__pyx_kp_b_iso88591_A_33Gq_A_K_1A_A_vRy_vRy_t6_d_e3a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[194])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS), 2286};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_args, __pyx_mstate->__pyx_n_u_kwargs, __pyx_mstate->__pyx_n_u_v_2};
    __pyx_mstate_global->__pyx_codeobj_tab[195] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_new, __pyx_mstate->__pyx_kp_b_iso88591_A_7q_t_T, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[195])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2290};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_args};
    __pyx_mstate_global->__pyx_codeobj_tab[196] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_from_args, __pyx_mstate->__pyx_kp_b_iso88591_A_3avS_4q_s_4q_s_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[196])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2299};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[197] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_is_Mul, __pyx_mstate->__pyx_kp_b_iso88591_A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[197])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2303};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_Mul};
    __pyx_mstate_global->__pyx_codeobj_tab[198] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sympy_2, __pyx_mstate->__pyx_kp_b_iso88591_A_s_D, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[198])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2307};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_X, __pyx_mstate->__pyx_n_u_a, __pyx_mstate->__pyx_n_u_b};
    __pyx_mstate_global->__pyx_codeobj_tab[199] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sage, __pyx_mstate->__pyx_kp_b_iso88591_A_33Gq_A_b_Zwa_G1A_t1BgS_ar, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[199])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2313};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[200] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_func, __pyx_mstate->__pyx_kp_b_iso88591_A_t1_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[200])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2317};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_X, __pyx_mstate->__pyx_n_u_one, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_d};
    __pyx_mstate_global->__pyx_codeobj_tab[201] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_as_coefficients_dict, __pyx_mstate->__pyx_kp_b_iso88591_A_33Gq_A_9_F_IQ_K_1A_a_q_a_q_A_f, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[201])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 9, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2328};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_X, __pyx_mstate->__pyx_n_u_m, __pyx_mstate->__pyx_n_u_coef, __pyx_mstate->__pyx_n_u_d, __pyx_mstate->__pyx_n_u_it, __pyx_mstate->__pyx_n_u_it_end, __pyx_mstate->__pyx_n_u_base, __pyx_mstate->__pyx_n_u_exp};
    __pyx_mstate_global->__pyx_codeobj_tab[202] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_as_powers_dict, __pyx_mstate->__pyx_kp_b_iso88591_A_33Gq_A_r_t1_fBiq_5_1_q_O1_QfA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[202])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2353};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_a, __pyx_mstate->__pyx_n_u_b};
    __pyx_mstate_global->__pyx_codeobj_tab[203] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_new, __pyx_mstate->__pyx_kp_b_iso88591_A_xq_3a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[203])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2356};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_X};
    __pyx_mstate_global->__pyx_codeobj_tab[204] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_base, __pyx_mstate->__pyx_kp_b_iso88591_A_33Gq_A_t1F_IQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[204])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2361};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_X};
    __pyx_mstate_global->__pyx_codeobj_tab[205] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_exp, __pyx_mstate->__pyx_kp_b_iso88591_A_33Gq_A_t1F_HA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[205])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2366};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[206] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_as_base_exp, __pyx_mstate->__pyx_kp_b_iso88591_A_t7_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[206])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2369};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[207] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_is_Pow, __pyx_mstate->__pyx_kp_b_iso88591_A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[207])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2373};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[208] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_is_commutative, __pyx_mstate->__pyx_kp_b_iso88591_A_E_T_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[208])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2377};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_X, __pyx_mstate->__pyx_n_u_base, __pyx_mstate->__pyx_n_u_exp};
    __pyx_mstate_global->__pyx_codeobj_tab[209] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sympy_2, __pyx_mstate->__pyx_kp_b_iso88591_A_33Gq_A_t1F_IQ_d_6_81_t83c_HA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[209])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2383};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_X, __pyx_mstate->__pyx_n_u_base, __pyx_mstate->__pyx_n_u_exp};
    __pyx_mstate_global->__pyx_codeobj_tab[210] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sage, __pyx_mstate->__pyx_kp_b_iso88591_A_33Gq_A_t1F_IQ_d_6_81_t7_S_7, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[210])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2389};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[211] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_func, __pyx_mstate->__pyx_kp_b_iso88591_A_t1_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[211])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2393};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_d, __pyx_mstate->__pyx_n_u_base, __pyx_mstate->__pyx_n_u_exp};
    __pyx_mstate_global->__pyx_codeobj_tab[212] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_as_powers_dict, __pyx_mstate->__pyx_kp_b_iso88591_A_K_1A_fD_A_4_D_Cr_S_D_2Q_Qaq_Qh, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[212])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS), 2405};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_args, __pyx_mstate->__pyx_n_u_kwargs, __pyx_mstate->__pyx_n_u_nargs};
    __pyx_mstate_global->__pyx_codeobj_tab[213] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_new, __pyx_mstate->__pyx_kp_b_iso88591_A_4s_Cq_vS_iq_s_AT_r_iq_Qd_1_uAZ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[213])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2417};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[214] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_is_Function, __pyx_mstate->__pyx_kp_b_iso88591_A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[214])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS), 2421};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_values, __pyx_mstate->__pyx_n_u_sys};
    __pyx_mstate_global->__pyx_codeobj_tab[215] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_func, __pyx_mstate->__pyx_kp_b_iso88591_A_was_d_IV3bPQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[215])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2428};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_X};
    __pyx_mstate_global->__pyx_codeobj_tab[216] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_get_arg, __pyx_mstate->__pyx_kp_b_iso88591_A_bbc_t1F_HA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[216])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2432};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sympy};
    __pyx_mstate_global->__pyx_codeobj_tab[217] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sympy_2, __pyx_mstate->__pyx_kp_b_iso88591_A_wawd_Jat82XQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[217])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2436};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sage_2};
    __pyx_mstate_global->__pyx_codeobj_tab[218] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sage, __pyx_mstate->__pyx_kp_b_iso88591_A_wavT_9F_Qd_GST, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[218])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2448};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_x, __pyx_mstate->__pyx_n_u_X};
    __pyx_mstate_global->__pyx_codeobj_tab[219] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_new, __pyx_mstate->__pyx_kp_b_iso88591_A_waq_t_V1AQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[219])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2453};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_x, __pyx_mstate->__pyx_n_u_X};
    __pyx_mstate_global->__pyx_codeobj_tab[220] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_new, __pyx_mstate->__pyx_kp_b_iso88591_A_waq_t_Yaq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[220])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2457};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sage_2};
    __pyx_mstate_global->__pyx_codeobj_tab[221] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sage, __pyx_mstate->__pyx_kp_b_iso88591_A_t_Qd_G1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[221])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2462};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_s, __pyx_mstate->__pyx_n_u_a, __pyx_mstate->__pyx_n_u_S, __pyx_mstate->__pyx_n_u_A};
    __pyx_mstate_global->__pyx_codeobj_tab[222] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_new, __pyx_mstate->__pyx_kp_b_iso88591_waq_2S_4z_aq_waq_t_U_1Jaq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[222])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2469};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sympy};
    __pyx_mstate_global->__pyx_codeobj_tab[223] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sympy_2, __pyx_mstate->__pyx_kp_b_iso88591_A_uE_4_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[223])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2474};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_x, __pyx_mstate->__pyx_n_u_X};
    __pyx_mstate_global->__pyx_codeobj_tab[224] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_new, __pyx_mstate->__pyx_kp_b_iso88591_A_waq_t_1AQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[224])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2479};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_x, __pyx_mstate->__pyx_n_u_y, __pyx_mstate->__pyx_n_u_X, __pyx_mstate->__pyx_n_u_Y};
    __pyx_mstate_global->__pyx_codeobj_tab[225] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_new, __pyx_mstate->__pyx_kp_b_iso88591_A_waq_waq_t_Qaz, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[225])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2484};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sympy};
    __pyx_mstate_global->__pyx_codeobj_tab[226] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sympy_2, __pyx_mstate->__pyx_kp_b_iso88591_A_uO2T_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[226])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2488};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sage_2};
    __pyx_mstate_global->__pyx_codeobj_tab[227] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sage, __pyx_mstate->__pyx_kp_b_iso88591_A_t_2T_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[227])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS), 2493};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_args, __pyx_mstate->__pyx_n_u_v};
    __pyx_mstate_global->__pyx_codeobj_tab[228] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_new, __pyx_mstate->__pyx_kp_b_iso88591_A_6aq_t, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[228])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2497};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sympy};
    __pyx_mstate_global->__pyx_codeobj_tab[229] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sympy_2, __pyx_mstate->__pyx_kp_b_iso88591_A_uKr_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[229])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2502};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_x, __pyx_mstate->__pyx_n_u_X};
    __pyx_mstate_global->__pyx_codeobj_tab[230] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_new, __pyx_mstate->__pyx_kp_b_iso88591_A_waq_t_T_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[230])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2507};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_x, __pyx_mstate->__pyx_n_u_X};
    __pyx_mstate_global->__pyx_codeobj_tab[231] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_new, __pyx_mstate->__pyx_kp_b_iso88591_A_waq_t_U_1A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[231])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2512};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_x, __pyx_mstate->__pyx_n_u_y, __pyx_mstate->__pyx_n_u_X, __pyx_mstate->__pyx_n_u_Y};
    __pyx_mstate_global->__pyx_codeobj_tab[232] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_new, __pyx_mstate->__pyx_kp_b_iso88591_A_waq_waq_t_AQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[232])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2517};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sympy};
    __pyx_mstate_global->__pyx_codeobj_tab[233] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sympy_2, __pyx_mstate->__pyx_kp_b_iso88591_A_uKr_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[233])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2521};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sage_2};
    __pyx_mstate_global->__pyx_codeobj_tab[234] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sage, __pyx_mstate->__pyx_kp_b_iso88591_A_t_2T_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[234])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2526};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_x, __pyx_mstate->__pyx_n_u_y, __pyx_mstate->__pyx_n_u_X, __pyx_mstate->__pyx_n_u_Y};
    __pyx_mstate_global->__pyx_codeobj_tab[235] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_new, __pyx_mstate->__pyx_kp_b_iso88591_A_waq_waq_t_AQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[235])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2531};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sympy};
    __pyx_mstate_global->__pyx_codeobj_tab[236] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sympy_2, __pyx_mstate->__pyx_kp_b_iso88591_A_uKr_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[236])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2535};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sage_2};
    __pyx_mstate_global->__pyx_codeobj_tab[237] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sage, __pyx_mstate->__pyx_kp_b_iso88591_A_t_Rt, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[237])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2540};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_x, __pyx_mstate->__pyx_n_u_X};
    __pyx_mstate_global->__pyx_codeobj_tab[238] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_new, __pyx_mstate->__pyx_kp_b_iso88591_A_waq_t_Yaq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[238])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2544};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sage_2};
    __pyx_mstate_global->__pyx_codeobj_tab[239] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sage, __pyx_mstate->__pyx_kp_b_iso88591_A_t_Qd_G1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[239])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2549};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_x, __pyx_mstate->__pyx_n_u_y, __pyx_mstate->__pyx_n_u_X, __pyx_mstate->__pyx_n_u_Y};
    __pyx_mstate_global->__pyx_codeobj_tab[240] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_new, __pyx_mstate->__pyx_kp_b_iso88591_A_waq_waq_t_U_1Jaq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[240])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2554};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sympy};
    __pyx_mstate_global->__pyx_codeobj_tab[241] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sympy_2, __pyx_mstate->__pyx_kp_b_iso88591_A_uE_4_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[241])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2558};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sage_2};
    __pyx_mstate_global->__pyx_codeobj_tab[242] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sage, __pyx_mstate->__pyx_kp_b_iso88591_A_t5_m1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[242])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2563};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_x, __pyx_mstate->__pyx_n_u_y, __pyx_mstate->__pyx_n_u_X, __pyx_mstate->__pyx_n_u_Y};
    __pyx_mstate_global->__pyx_codeobj_tab[243] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_new, __pyx_mstate->__pyx_kp_b_iso88591_A_waq_waq_t_Zq_1A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[243])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2568};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sympy};
    __pyx_mstate_global->__pyx_codeobj_tab[244] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sympy_2, __pyx_mstate->__pyx_kp_b_iso88591_A_uJb_N, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[244])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2574};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[245] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_is_complex, __pyx_mstate->__pyx_kp_b_iso88591_A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[245])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2578};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[246] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_is_finite, __pyx_mstate->__pyx_kp_b_iso88591_A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[246])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2582};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_x, __pyx_mstate->__pyx_n_u_X};
    __pyx_mstate_global->__pyx_codeobj_tab[247] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_new, __pyx_mstate->__pyx_kp_b_iso88591_A_waq_t_U_1A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[247])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2587};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_x, __pyx_mstate->__pyx_n_u_X};
    __pyx_mstate_global->__pyx_codeobj_tab[248] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_new, __pyx_mstate->__pyx_kp_b_iso88591_A_waq_t_V1AQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[248])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2592};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_x, __pyx_mstate->__pyx_n_u_X};
    __pyx_mstate_global->__pyx_codeobj_tab[249] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_new, __pyx_mstate->__pyx_kp_b_iso88591_A_waq_t_XQaq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[249])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2596};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sage_2};
    __pyx_mstate_global->__pyx_codeobj_tab[250] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sage, __pyx_mstate->__pyx_kp_b_iso88591_A_t5_XRwa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[250])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2601};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_x, __pyx_mstate->__pyx_n_u_X};
    __pyx_mstate_global->__pyx_codeobj_tab[251] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_new, __pyx_mstate->__pyx_kp_b_iso88591_A_waq_t_Zq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[251])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2606};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_x, __pyx_mstate->__pyx_n_u_y, __pyx_mstate->__pyx_n_u_X, __pyx_mstate->__pyx_n_u_Y};
    __pyx_mstate_global->__pyx_codeobj_tab[252] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_new, __pyx_mstate->__pyx_kp_b_iso88591_waq_2S_4z_Qaq_waq_t_T_Qa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[252])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2614};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_x, __pyx_mstate->__pyx_n_u_X};
    __pyx_mstate_global->__pyx_codeobj_tab[253] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_new, __pyx_mstate->__pyx_kp_b_iso88591_A_waq_t_T_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[253])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2619};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_x, __pyx_mstate->__pyx_n_u_X};
    __pyx_mstate_global->__pyx_codeobj_tab[254] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_new, __pyx_mstate->__pyx_kp_b_iso88591_A_waq_t_T_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[254])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2624};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_x, __pyx_mstate->__pyx_n_u_X};
    __pyx_mstate_global->__pyx_codeobj_tab[255] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_new, __pyx_mstate->__pyx_kp_b_iso88591_A_waq_t_T_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[255])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2629};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_x, __pyx_mstate->__pyx_n_u_X};
    __pyx_mstate_global->__pyx_codeobj_tab[256] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_new, __pyx_mstate->__pyx_kp_b_iso88591_A_waq_t_T_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[256])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2634};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_x, __pyx_mstate->__pyx_n_u_X};
    __pyx_mstate_global->__pyx_codeobj_tab[257] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_new, __pyx_mstate->__pyx_kp_b_iso88591_A_waq_t_T_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[257])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2639};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_x, __pyx_mstate->__pyx_n_u_X};
    __pyx_mstate_global->__pyx_codeobj_tab[258] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_new, __pyx_mstate->__pyx_kp_b_iso88591_A_waq_t_T_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[258])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2644};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_x, __pyx_mstate->__pyx_n_u_X};
    __pyx_mstate_global->__pyx_codeobj_tab[259] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_new, __pyx_mstate->__pyx_kp_b_iso88591_A_waq_t_U_1A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[259])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2649};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_x, __pyx_mstate->__pyx_n_u_X};
    __pyx_mstate_global->__pyx_codeobj_tab[260] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_new, __pyx_mstate->__pyx_kp_b_iso88591_A_waq_t_U_1A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[260])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2654};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_x, __pyx_mstate->__pyx_n_u_X};
    __pyx_mstate_global->__pyx_codeobj_tab[261] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_new, __pyx_mstate->__pyx_kp_b_iso88591_A_waq_t_U_1A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[261])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2659};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_x, __pyx_mstate->__pyx_n_u_X};
    __pyx_mstate_global->__pyx_codeobj_tab[262] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_new, __pyx_mstate->__pyx_kp_b_iso88591_A_waq_t_U_1A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[262])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2664};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_x, __pyx_mstate->__pyx_n_u_X};
    __pyx_mstate_global->__pyx_codeobj_tab[263] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_new, __pyx_mstate->__pyx_kp_b_iso88591_A_waq_t_U_1A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[263])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2669};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_x, __pyx_mstate->__pyx_n_u_X};
    __pyx_mstate_global->__pyx_codeobj_tab[264] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_new, __pyx_mstate->__pyx_kp_b_iso88591_A_waq_t_U_1A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[264])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2674};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_x, __pyx_mstate->__pyx_n_u_X};
    __pyx_mstate_global->__pyx_codeobj_tab[265] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_new, __pyx_mstate->__pyx_kp_b_iso88591_A_waq_t_U_1A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[265])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2679};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_x, __pyx_mstate->__pyx_n_u_X};
    __pyx_mstate_global->__pyx_codeobj_tab[266] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_new, __pyx_mstate->__pyx_kp_b_iso88591_A_waq_t_U_1A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[266])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2684};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_x, __pyx_mstate->__pyx_n_u_X};
    __pyx_mstate_global->__pyx_codeobj_tab[267] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_new, __pyx_mstate->__pyx_kp_b_iso88591_A_waq_t_U_1A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[267])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2689};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_x, __pyx_mstate->__pyx_n_u_X};
    __pyx_mstate_global->__pyx_codeobj_tab[268] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_new, __pyx_mstate->__pyx_kp_b_iso88591_A_waq_t_U_1A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[268])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2694};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_x, __pyx_mstate->__pyx_n_u_X};
    __pyx_mstate_global->__pyx_codeobj_tab[269] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_new, __pyx_mstate->__pyx_kp_b_iso88591_A_waq_t_U_1A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[269])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2699};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_x, __pyx_mstate->__pyx_n_u_X};
    __pyx_mstate_global->__pyx_codeobj_tab[270] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_new, __pyx_mstate->__pyx_kp_b_iso88591_A_waq_t_U_1A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[270])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2704};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_x, __pyx_mstate->__pyx_n_u_X};
    __pyx_mstate_global->__pyx_codeobj_tab[271] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_new, __pyx_mstate->__pyx_kp_b_iso88591_A_waq_t_V1AQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[271])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2709};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_x, __pyx_mstate->__pyx_n_u_X};
    __pyx_mstate_global->__pyx_codeobj_tab[272] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_new, __pyx_mstate->__pyx_kp_b_iso88591_A_waq_t_V1AQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[272])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2714};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_x, __pyx_mstate->__pyx_n_u_X};
    __pyx_mstate_global->__pyx_codeobj_tab[273] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_new, __pyx_mstate->__pyx_kp_b_iso88591_A_waq_t_V1AQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[273])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2719};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_x, __pyx_mstate->__pyx_n_u_X};
    __pyx_mstate_global->__pyx_codeobj_tab[274] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_new, __pyx_mstate->__pyx_kp_b_iso88591_A_waq_t_V1AQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[274])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2724};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_x, __pyx_mstate->__pyx_n_u_X};
    __pyx_mstate_global->__pyx_codeobj_tab[275] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_new, __pyx_mstate->__pyx_kp_b_iso88591_A_waq_t_V1AQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[275])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2729};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_x, __pyx_mstate->__pyx_n_u_X};
    __pyx_mstate_global->__pyx_codeobj_tab[276] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_new, __pyx_mstate->__pyx_kp_b_iso88591_A_waq_t_V1AQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[276])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2734};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_x, __pyx_mstate->__pyx_n_u_y, __pyx_mstate->__pyx_n_u_X, __pyx_mstate->__pyx_n_u_Y};
    __pyx_mstate_global->__pyx_codeobj_tab[277] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_new, __pyx_mstate->__pyx_kp_b_iso88591_A_waq_waq_t_V1AZq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[277])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2739};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sympy};
    __pyx_mstate_global->__pyx_codeobj_tab[278] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sympy_2, __pyx_mstate->__pyx_kp_b_iso88591_A_uF_D_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[278])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2743};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sage_2};
    __pyx_mstate_global->__pyx_codeobj_tab[279] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sage, __pyx_mstate->__pyx_kp_b_iso88591_A_t6_4_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[279])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2782};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_x, __pyx_mstate->__pyx_n_u_X};
    __pyx_mstate_global->__pyx_codeobj_tab[280] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_new, __pyx_mstate->__pyx_kp_b_iso88591_A_waq_t_aq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[280])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2786};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[281] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_is_number, __pyx_mstate->__pyx_kp_b_iso88591_A_t5_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[281])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2790};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[282] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_is_integer, __pyx_mstate->__pyx_kp_b_iso88591_A_t5_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[282])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2794};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[283] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_is_finite, __pyx_mstate->__pyx_kp_b_iso88591_A_t5_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[283])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2801};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[284] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_is_real, __pyx_mstate->__pyx_kp_b_iso88591_A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[284])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2805};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[285] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_is_negative, __pyx_mstate->__pyx_kp_b_iso88591_A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[285])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2809};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_x, __pyx_mstate->__pyx_n_u_X};
    __pyx_mstate_global->__pyx_codeobj_tab[286] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_new, __pyx_mstate->__pyx_kp_b_iso88591_A_waq_t_T_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[286])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2813};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_X, __pyx_mstate->__pyx_n_u_arg};
    __pyx_mstate_global->__pyx_codeobj_tab[287] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sympy_2, __pyx_mstate->__pyx_kp_b_iso88591_A_33Gq_A_d_6_83ha_s_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[287])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2818};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_X, __pyx_mstate->__pyx_n_u_arg};
    __pyx_mstate_global->__pyx_codeobj_tab[288] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sage, __pyx_mstate->__pyx_kp_b_iso88591_A_33Gq_A_d_6_83gQ_s_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[288])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2823};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[289] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_func, __pyx_mstate->__pyx_kp_b_iso88591_A_t1_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[289])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2829};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_X, __pyx_mstate->__pyx_n_u_name};
    __pyx_mstate_global->__pyx_codeobj_tab[290] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_get_name, __pyx_mstate->__pyx_kp_b_iso88591_A_4AT_vRy_s_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[290])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2835};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[291] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_name, __pyx_mstate->__pyx_kp_b_iso88591_A_t9A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[291])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2839};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sympy, __pyx_mstate->__pyx_n_u_name};
    __pyx_mstate_global->__pyx_codeobj_tab[292] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sympy_2, __pyx_mstate->__pyx_kp_b_iso88591_A_t9A_uIQe2T_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[292])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2844};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sage_2, __pyx_mstate->__pyx_n_u_name};
    __pyx_mstate_global->__pyx_codeobj_tab[293] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sage, __pyx_mstate->__pyx_kp_b_iso88591_A_t9A_t9AU_D_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[293])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS), 2849};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_values, __pyx_mstate->__pyx_n_u_name};
    __pyx_mstate_global->__pyx_codeobj_tab[294] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_func, __pyx_mstate->__pyx_kp_b_iso88591_A_t9A_awa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[294])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2855};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_name};
    __pyx_mstate_global->__pyx_codeobj_tab[295] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_init, __pyx_mstate->__pyx_kp_b_iso88591_A_HA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[295])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS), 2858};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_values};
    __pyx_mstate_global->__pyx_codeobj_tab[296] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_call, __pyx_mstate->__pyx_kp_b_iso88591_A_at81, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[296])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2894};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_s};
    __pyx_mstate_global->__pyx_codeobj_tab[297] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_create_sympy_module, __pyx_mstate->__pyx_kp_b_iso88591_hhaq_1A_A_BYYZZ_Q_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[297])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2900};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_s};
    __pyx_mstate_global->__pyx_codeobj_tab[298] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_create_sage_module, __pyx_mstate->__pyx_kp_b_iso88591_hhaq_1A_AXXYYZ_Q_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[298])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2916};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sympy};
    __pyx_mstate_global->__pyx_codeobj_tab[299] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sympy_2, __pyx_mstate->__pyx_kp_b_iso88591_A_uHAT, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[299])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2920};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sage_2, __pyx_mstate->__pyx_n_u_res};
    __pyx_mstate_global->__pyx_codeobj_tab[300] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sage, __pyx_mstate->__pyx_kp_b_iso88591_A_d_1_7_5_3gQ_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[300])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2927};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[301] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_pyobject, __pyx_mstate->__pyx_kp_b_iso88591_A_x_q_Jn, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[301])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 8, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2933};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyfunction, __pyx_mstate->__pyx_n_u_args, __pyx_mstate->__pyx_n_u_pyfunction_class, __pyx_mstate->__pyx_n_u_module, __pyx_mstate->__pyx_n_u_v, __pyx_mstate->__pyx_n_u_pyfunction_class_2, __pyx_mstate->__pyx_n_u_pyfunction_2};
    __pyx_mstate_global->__pyx_codeobj_tab[302] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_init, __pyx_mstate->__pyx_kp_b_iso88591_0_TTU_c_6aq_11C1DVVW_1_4AS8I_ST, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[302])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2942};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sympy};
    __pyx_mstate_global->__pyx_codeobj_tab[303] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sympy_2, __pyx_mstate->__pyx_kp_b_iso88591_A_uHAT, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[303])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2946};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sage_2};
    __pyx_mstate_global->__pyx_codeobj_tab[304] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sage, __pyx_mstate->__pyx_kp_b_iso88591_A_t3at9A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[304])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2950};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[305] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_pyobject, __pyx_mstate->__pyx_kp_b_iso88591_A_x_A_jP, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[305])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[306] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[306])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state};
    __pyx_mstate_global->__pyx_codeobj_tab[307] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[307])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2960};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_func};
    __pyx_mstate_global->__pyx_codeobj_tab[308] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_wrap_sage_function, __pyx_mstate->__pyx_kp_b_iso88591_QfD_T_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[308])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS), 2966};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_args};
    __pyx_mstate_global->__pyx_codeobj_tab[309] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_new, __pyx_mstate->__pyx_kp_b_iso88591_A_t2Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[309])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2969};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sympy, __pyx_mstate->__pyx_n_u_s};
    __pyx_mstate_global->__pyx_codeobj_tab[310] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sympy_2, __pyx_mstate->__pyx_kp_b_iso88591_A_D_a_uD, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[310])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2974};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sage_2, __pyx_mstate->__pyx_n_u_s};
    __pyx_mstate_global->__pyx_codeobj_tab[311] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sage, __pyx_mstate->__pyx_kp_b_iso88591_A_D_Q_t4r, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[311])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2979};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[312] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_func, __pyx_mstate->__pyx_kp_b_iso88591_A_t1_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[312])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS), 2985};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_args};
    __pyx_mstate_global->__pyx_codeobj_tab[313] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_new, __pyx_mstate->__pyx_kp_b_iso88591_A_t2Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[313])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2988};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sympy, __pyx_mstate->__pyx_n_u_s};
    __pyx_mstate_global->__pyx_codeobj_tab[314] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sympy_2, __pyx_mstate->__pyx_kp_b_iso88591_A_D_a_uD, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[314])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2993};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sage_2, __pyx_mstate->__pyx_n_u_s};
    __pyx_mstate_global->__pyx_codeobj_tab[315] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sage, __pyx_mstate->__pyx_kp_b_iso88591_A_D_Q_t4r, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[315])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2998};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[316] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_func, __pyx_mstate->__pyx_kp_b_iso88591_A_t1_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[316])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS), 3005};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_expr, __pyx_mstate->__pyx_n_u_variables};
    __pyx_mstate_global->__pyx_codeobj_tab[317] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_new, __pyx_mstate->__pyx_kp_b_iso88591_A_3a_Rt_ay_4q_y_t1G1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[317])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3010};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[318] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_is_Derivative, __pyx_mstate->__pyx_kp_b_iso88591_A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[318])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3014};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_X};
    __pyx_mstate_global->__pyx_codeobj_tab[319] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_expr, __pyx_mstate->__pyx_kp_b_iso88591_A_UUVVZZ_t1F_HA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[319])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3019};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[320] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_variables, __pyx_mstate->__pyx_kp_b_iso88591_A_t5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[320])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3023};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_X, __pyx_mstate->__pyx_n_u_arg, __pyx_mstate->__pyx_n_u_Y, __pyx_mstate->__pyx_n_u_s, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_sympy};
    __pyx_mstate_global->__pyx_codeobj_tab[321] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sympy_2, __pyx_mstate->__pyx_kp_b_iso88591_A_0_Q_d_6_83ha_a_A_E_WAT_Cxq_uKq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[321])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3034};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_X, __pyx_mstate->__pyx_n_u_arg, __pyx_mstate->__pyx_n_u_Y, __pyx_mstate->__pyx_n_u_s, __pyx_mstate->__pyx_n_u_i};
    __pyx_mstate_global->__pyx_codeobj_tab[322] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sage, __pyx_mstate->__pyx_kp_b_iso88591_A_0_Q_d_6_83gQ_a_A_E_WAT_Cwa_s_r, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[322])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3044};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[323] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_func, __pyx_mstate->__pyx_kp_b_iso88591_A_t1_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[323])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3051};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_expr, __pyx_mstate->__pyx_n_u_variables, __pyx_mstate->__pyx_n_u_point};
    __pyx_mstate_global->__pyx_codeobj_tab[324] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_new, __pyx_mstate->__pyx_kp_b_iso88591_A_wauE_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[324])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3054};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_me};
    __pyx_mstate_global->__pyx_codeobj_tab[325] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_expr, __pyx_mstate->__pyx_kp_b_iso88591_A_55J_4q_t1F_XQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[325])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3059};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_me, __pyx_mstate->__pyx_n_u_variables};
    __pyx_mstate_global->__pyx_codeobj_tab[326] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_variables, __pyx_mstate->__pyx_kp_b_iso88591_A_55J_4q_V3nA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[326])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3065};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_me, __pyx_mstate->__pyx_n_u_point};
    __pyx_mstate_global->__pyx_codeobj_tab[327] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_point, __pyx_mstate->__pyx_kp_b_iso88591_A_55J_4q_s_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[327])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 9, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3071};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_X, __pyx_mstate->__pyx_n_u_arg, __pyx_mstate->__pyx_n_u_V, __pyx_mstate->__pyx_n_u_P, __pyx_mstate->__pyx_n_u_v, __pyx_mstate->__pyx_n_u_p, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_sympy};
    __pyx_mstate_global->__pyx_codeobj_tab[328] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sympy_2, __pyx_mstate->__pyx_kp_b_iso88591_A_44I_a_d_6_83ha_V2_1_V2Zq_A_A_E, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[328])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3084};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_X, __pyx_mstate->__pyx_n_u_arg, __pyx_mstate->__pyx_n_u_V, __pyx_mstate->__pyx_n_u_P, __pyx_mstate->__pyx_n_u_v, __pyx_mstate->__pyx_n_u_i};
    __pyx_mstate_global->__pyx_codeobj_tab[329] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sage, __pyx_mstate->__pyx_kp_b_iso88591_A_44I_a_d_6_83gQ_V2_1_V2Zq_A_E_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[329])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3095};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[330] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_func, __pyx_mstate->__pyx_kp_b_iso88591_A_t1_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[330])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS), 3102};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_args};
    __pyx_mstate_global->__pyx_codeobj_tab[331] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_new, __pyx_mstate->__pyx_kp_b_iso88591_A_y_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[331])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3105};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sympy, __pyx_mstate->__pyx_n_u_a, __pyx_mstate->__pyx_n_u_l, __pyx_mstate->__pyx_n_u_i};
    __pyx_mstate_global->__pyx_codeobj_tab[332] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sympy_2, __pyx_mstate->__pyx_kp_b_iso88591_A_D_A_E_as_Qd_WBaq_aq_Bha_uJb, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[332])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3116};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_a, __pyx_mstate->__pyx_n_u_other, __pyx_mstate->__pyx_n_u_other_2};
    __pyx_mstate_global->__pyx_codeobj_tab[333] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_intersection, __pyx_mstate->__pyx_kp_b_iso88591_A_88LAURS_t1_o5I_a_Qa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[333])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3122};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_a, __pyx_mstate->__pyx_n_u_other, __pyx_mstate->__pyx_n_u_other_2};
    __pyx_mstate_global->__pyx_codeobj_tab[334] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_union, __pyx_mstate->__pyx_kp_b_iso88591_A_88LAURS_t1_o5I_a_aq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[334])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3128};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_a, __pyx_mstate->__pyx_n_u_other, __pyx_mstate->__pyx_n_u_other_2};
    __pyx_mstate_global->__pyx_codeobj_tab[335] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_complement, __pyx_mstate->__pyx_kp_b_iso88591_A_88LAURS_t1_o5I_a_1A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[335])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3134};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_a, __pyx_mstate->__pyx_n_u_a_2};
    __pyx_mstate_global->__pyx_codeobj_tab[336] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_contains, __pyx_mstate->__pyx_kp_b_iso88591_A_q_t1_o5I_a_Qb, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[336])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 2, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS), 3142};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_left_open, __pyx_mstate->__pyx_n_u_right_open, __pyx_mstate->__pyx_n_u_args, __pyx_mstate->__pyx_n_u_list_args};
    __pyx_mstate_global->__pyx_codeobj_tab[337] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_new, __pyx_mstate->__pyx_kp_b_iso88591_Q_D_ZwfE_Cwe_SPVV_ffmmn_AQ_WA_W, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[337])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3152};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[338] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_start, __pyx_mstate->__pyx_kp_b_iso88591_A_t5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[338])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3156};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[339] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_end, __pyx_mstate->__pyx_kp_b_iso88591_A_t5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[339])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3160};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sympy, __pyx_mstate->__pyx_n_u_arg};
    __pyx_mstate_global->__pyx_codeobj_tab[340] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sympy_2, __pyx_mstate->__pyx_kp_b_iso88591_A_uIRq_83d_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[340])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3167};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[341] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_new, __pyx_mstate->__pyx_kp_b_iso88591_A_xq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[341])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3170};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sympy};
    __pyx_mstate_global->__pyx_codeobj_tab[342] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sympy_2, __pyx_mstate->__pyx_kp_b_iso88591_A_uBa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[342])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3174};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[343] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_func, __pyx_mstate->__pyx_kp_b_iso88591_A_t1_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[343])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3181};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[344] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_new, __pyx_mstate->__pyx_kp_b_iso88591_A_uA_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[344])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3184};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sympy};
    __pyx_mstate_global->__pyx_codeobj_tab[345] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sympy_2, __pyx_mstate->__pyx_kp_b_iso88591_A_uBa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[345])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3188};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[346] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_func, __pyx_mstate->__pyx_kp_b_iso88591_A_t1_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[346])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3195};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[347] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_new, __pyx_mstate->__pyx_kp_b_iso88591_A_y_3, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[347])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3198};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sympy};
    __pyx_mstate_global->__pyx_codeobj_tab[348] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sympy_2, __pyx_mstate->__pyx_kp_b_iso88591_A_uBa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[348])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3202};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[349] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_func, __pyx_mstate->__pyx_kp_b_iso88591_A_t1_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[349])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3209};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[350] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_new, __pyx_mstate->__pyx_kp_b_iso88591_A_xq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[350])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3212};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sympy};
    __pyx_mstate_global->__pyx_codeobj_tab[351] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sympy_2, __pyx_mstate->__pyx_kp_b_iso88591_A_uBa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[351])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3216};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[352] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_func, __pyx_mstate->__pyx_kp_b_iso88591_A_t1_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[352])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3223};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[353] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_new, __pyx_mstate->__pyx_kp_b_iso88591_A_1_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[353])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3226};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sympy};
    __pyx_mstate_global->__pyx_codeobj_tab[354] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sympy_2, __pyx_mstate->__pyx_kp_b_iso88591_A_uBa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[354])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3230};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[355] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_func, __pyx_mstate->__pyx_kp_b_iso88591_A_t1_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[355])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS), 3237};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_args};
    __pyx_mstate_global->__pyx_codeobj_tab[356] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_new, __pyx_mstate->__pyx_kp_b_iso88591_A_y_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[356])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3240};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sympy, __pyx_mstate->__pyx_n_u_arg};
    __pyx_mstate_global->__pyx_codeobj_tab[357] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sympy_2, __pyx_mstate->__pyx_kp_b_iso88591_A_uJb_HCt7_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[357])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3247};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_expr, __pyx_mstate->__pyx_n_u_sset};
    __pyx_mstate_global->__pyx_codeobj_tab[358] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_new, __pyx_mstate->__pyx_kp_b_iso88591_A_xq_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[358])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3250};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sympy, __pyx_mstate->__pyx_n_u_arg};
    __pyx_mstate_global->__pyx_codeobj_tab[359] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sympy_2, __pyx_mstate->__pyx_kp_b_iso88591_A_uIRq_83d_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[359])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS), 3257};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_args};
    __pyx_mstate_global->__pyx_codeobj_tab[360] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_new, __pyx_mstate->__pyx_kp_b_iso88591_A_y_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[360])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3260};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sympy, __pyx_mstate->__pyx_n_u_arg};
    __pyx_mstate_global->__pyx_codeobj_tab[361] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sympy_2, __pyx_mstate->__pyx_kp_b_iso88591_A_uF_AS_4wd, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[361])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3267};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_universe, __pyx_mstate->__pyx_n_u_container};
    __pyx_mstate_global->__pyx_codeobj_tab[362] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_new, __pyx_mstate->__pyx_kp_b_iso88591_A_Qj, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[362])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3270};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sympy, __pyx_mstate->__pyx_n_u_arg};
    __pyx_mstate_global->__pyx_codeobj_tab[363] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sympy_2, __pyx_mstate->__pyx_kp_b_iso88591_A_uKr_XS_G4q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[363])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3277};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sym, __pyx_mstate->__pyx_n_u_condition};
    __pyx_mstate_global->__pyx_codeobj_tab[364] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_new, __pyx_mstate->__pyx_kp_b_iso88591_A_1E, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[364])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3283};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sym, __pyx_mstate->__pyx_n_u_expr, __pyx_mstate->__pyx_n_u_base};
    __pyx_mstate_global->__pyx_codeobj_tab[365] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_new, __pyx_mstate->__pyx_kp_b_iso88591_A_xq_V1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[365])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3305};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_A, __pyx_mstate->__pyx_n_u_B, __pyx_mstate->__pyx_n_u_op};
    __pyx_mstate_global->__pyx_codeobj_tab[366] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_richcmp, __pyx_mstate->__pyx_kp_b_iso88591_A_Cs_6_3avQa_A_4vQis_6_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[366])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3316};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_ring};
    __pyx_mstate_global->__pyx_codeobj_tab[367] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_symbolic, __pyx_mstate->__pyx_kp_b_iso88591_A_t1D_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[367])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[368] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[368])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state};
    __pyx_mstate_global->__pyx_codeobj_tab[369] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[369])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3416};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[370] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_repr_latex_2, __pyx_mstate->__pyx_kp_b_iso88591_A_Qa_6_aq_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[370])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3639};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_rhs, __pyx_mstate->__pyx_n_u_o, __pyx_mstate->__pyx_n_u_d};
    __pyx_mstate_global->__pyx_codeobj_tab[371] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_row_join, __pyx_mstate->__pyx_kp_b_iso88591_A_4vS_AQ_Zq_q_9A_Tllmmnno_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[371])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3647};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_bott, __pyx_mstate->__pyx_n_u_o, __pyx_mstate->__pyx_n_u_d};
    __pyx_mstate_global->__pyx_codeobj_tab[372] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_col_join, __pyx_mstate->__pyx_kp_b_iso88591_A_4vS_AQ_Zq_q_9A_Tllmmnno_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[372])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3655};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pos, __pyx_mstate->__pyx_n_u_bott, __pyx_mstate->__pyx_n_u_o, __pyx_mstate->__pyx_n_u_d};
    __pyx_mstate_global->__pyx_codeobj_tab[373] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_row_insert, __pyx_mstate->__pyx_kp_b_iso88591_A_4r_fBa_4r_4q_a_4vS_AQ_Zq_q_a_V, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[373])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3669};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pos, __pyx_mstate->__pyx_n_u_bott, __pyx_mstate->__pyx_n_u_o, __pyx_mstate->__pyx_n_u_d};
    __pyx_mstate_global->__pyx_codeobj_tab[374] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_col_insert, __pyx_mstate->__pyx_kp_b_iso88591_A_4r_fBa_4r_4q_a_4vS_AQ_Zq_q_a_V, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[374])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3683};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_b, __pyx_mstate->__pyx_n_u_o, __pyx_mstate->__pyx_n_u_result};
    __pyx_mstate_global->__pyx_codeobj_tab[375] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_dot, __pyx_mstate->__pyx_kp_b_iso88591_A_d_AT_A_Qo_Qd_o_uuvvw_x_D_D_S_S, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[375])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3692};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_b, __pyx_mstate->__pyx_n_u_o, __pyx_mstate->__pyx_n_u_result};
    __pyx_mstate_global->__pyx_codeobj_tab[376] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_cross, __pyx_mstate->__pyx_kp_b_iso88591_A_4vRt6_Bc_6_A_AQ_7_iq_q_d_AT_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[376])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3713};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[377] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_nrows, __pyx_mstate->__pyx_kp_b_iso88591_A_vT, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[377])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3716};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[378] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_ncols, __pyx_mstate->__pyx_kp_b_iso88591_A_vT, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[378])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3730};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_order, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_j, __pyx_mstate->__pyx_n_u_j, __pyx_mstate->__pyx_n_u_i};
    __pyx_mstate_global->__pyx_codeobj_tab[379] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_ravel, __pyx_mstate->__pyx_kp_b_iso88591_6_A_1D_Qc_D_U_4vQ_U_4vQ_3a_1D_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[379])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3740};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_rows, __pyx_mstate->__pyx_n_u_cols, __pyx_mstate->__pyx_n_u_r};
    __pyx_mstate_global->__pyx_codeobj_tab[380] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_reshape, __pyx_mstate->__pyx_kp_b_iso88591_A_3avS_AQ_A_C6_Zq_q_7_6_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[380])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3747};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_j, __pyx_mstate->__pyx_n_u_nr, __pyx_mstate->__pyx_n_u_nc};
    __pyx_mstate_global->__pyx_codeobj_tab[381] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_get_index, __pyx_mstate->__pyx_kp_b_iso88591_A_T_q_T_q_2Rq_2Rq_2Rr_Bc_A_2Q_2R, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[381])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3760};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_j};
    __pyx_mstate_global->__pyx_codeobj_tab[382] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_get, __pyx_mstate->__pyx_kp_b_iso88591_A_4t_as_t5_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[382])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3764};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_j};
    __pyx_mstate_global->__pyx_codeobj_tab[383] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_get_2, __pyx_mstate->__pyx_kp_b_iso88591_A_t1F_it1Cq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[383])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3768};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_j};
    __pyx_mstate_global->__pyx_codeobj_tab[384] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_col, __pyx_mstate->__pyx_kp_b_iso88591_A_t4q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[384])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3771};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_i};
    __pyx_mstate_global->__pyx_codeobj_tab[385] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_row, __pyx_mstate->__pyx_kp_b_iso88591_A_t1A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[385])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3774};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_j, __pyx_mstate->__pyx_n_u_e};
    __pyx_mstate_global->__pyx_codeobj_tab[386] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_set, __pyx_mstate->__pyx_kp_b_iso88591_A_4t_as_t5_Cq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[386])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3778};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_j, __pyx_mstate->__pyx_n_u_e, __pyx_mstate->__pyx_n_u_e_2};
    __pyx_mstate_global->__pyx_codeobj_tab[387] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_set_2, __pyx_mstate->__pyx_kp_b_iso88591_A_q_3gQ_it1Cs_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[387])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3784};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[388] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_det, __pyx_mstate->__pyx_kp_b_iso88591_A_4vS_4vQ_a_t1F_it1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[388])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3789};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_method, __pyx_mstate->__pyx_n_u_result};
    __pyx_mstate_global->__pyx_codeobj_tab[389] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_inv, __pyx_mstate->__pyx_kp_b_iso88591_d_AT_t4vQ_6_s_Q_it1F_6_Cq_2J_4q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[389])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3805};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_A, __pyx_mstate->__pyx_n_u_A_3, __pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_result};
    __pyx_mstate_global->__pyx_codeobj_tab[390] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_add_matrix, __pyx_mstate->__pyx_kp_b_iso88591_A_WAQ_Qc_1_a_c_fD_F_d_avR_a_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[390])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3815};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_A, __pyx_mstate->__pyx_n_u_A_3, __pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_result};
    __pyx_mstate_global->__pyx_codeobj_tab[391] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_mul_matrix, __pyx_mstate->__pyx_kp_b_iso88591_A_WAQ_Qc_1_a_c_fD_q_d_avR_a_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[391])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3825};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_A, __pyx_mstate->__pyx_n_u_A_3, __pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_result};
    __pyx_mstate_global->__pyx_codeobj_tab[392] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_multiply_elementwise, __pyx_mstate->__pyx_kp_b_iso88591_A_WAQ_Qc_1_a_c_fD_F_d_2_6_fFRS_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[392])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3835};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_k, __pyx_mstate->__pyx_n_u_k_2, __pyx_mstate->__pyx_n_u_result};
    __pyx_mstate_global->__pyx_codeobj_tab[393] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_add_scalar, __pyx_mstate->__pyx_kp_b_iso88591_A_q_d_AT_t4vQ_d_ar_6_q_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[393])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3841};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_k, __pyx_mstate->__pyx_n_u_k_2, __pyx_mstate->__pyx_n_u_result};
    __pyx_mstate_global->__pyx_codeobj_tab[394] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_mul_scalar, __pyx_mstate->__pyx_kp_b_iso88591_A_q_d_AT_t4vQ_d_ar_6_q_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[394])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3847};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_result};
    __pyx_mstate_global->__pyx_codeobj_tab[395] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_transpose, __pyx_mstate->__pyx_kp_b_iso88591_A_d_AT_t4vQ_d_QfF_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[395])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3852};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_result};
    __pyx_mstate_global->__pyx_codeobj_tab[396] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_conjugate, __pyx_mstate->__pyx_kp_b_iso88591_A_d_AT_t4vQ_d_QfF_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[396])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3857};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_result};
    __pyx_mstate_global->__pyx_codeobj_tab[397] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_conjugate_transpose, __pyx_mstate->__pyx_kp_b_iso88591_A_d_AT_t4vQ_d_q_fA_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[397])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3866};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[398] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_trace, __pyx_mstate->__pyx_kp_b_iso88591_A_t1O_1D_PQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[398])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 8, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3909};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_f, __pyx_mstate->__pyx_n_u_out, __pyx_mstate->__pyx_n_u_nr, __pyx_mstate->__pyx_n_u_nc, __pyx_mstate->__pyx_n_u_e_2, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_j};
    __pyx_mstate_global->__pyx_codeobj_tab[399] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_applyfunc, __pyx_mstate->__pyx_kp_b_iso88591_A_4z_d_d_E_aq_U_1_WAQat5_A_3gQ_Y, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[399])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3921};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_f, __pyx_mstate->__pyx_n_u_nr, __pyx_mstate->__pyx_n_u_nc, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_j};
    __pyx_mstate_global->__pyx_codeobj_tab[400] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_applyfunc_2, __pyx_mstate->__pyx_kp_b_iso88591_A_d_d_E_aq_U_1_E_S_e1Cq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[400])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS), 3928};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_args, __pyx_mstate->__pyx_n_u_D};
    __pyx_mstate_global->__pyx_codeobj_tab[401] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_msubs, __pyx_mstate->__pyx_kp_b_iso88591_A_HBa_t_Qa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[401])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3932};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_x, __pyx_mstate->__pyx_n_u_R};
    __pyx_mstate_global->__pyx_codeobj_tab[402] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_diff, __pyx_mstate->__pyx_kp_b_iso88591_A_Zq_G4q_a_6fD_4F_1_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[402])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS), 3938};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_args};
    __pyx_mstate_global->__pyx_codeobj_tab[403] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_diff_2, __pyx_mstate->__pyx_kp_b_iso88591_A_uAWA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[403])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS), 3942};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_args, __pyx_mstate->__pyx_n_u_D};
    __pyx_mstate_global->__pyx_codeobj_tab[404] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_subs, __pyx_mstate->__pyx_kp_b_iso88591_A_HBa_t_Qa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[404])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS), 3946};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_args, __pyx_mstate->__pyx_n_u_D};
    __pyx_mstate_global->__pyx_codeobj_tab[405] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_xreplace, __pyx_mstate->__pyx_kp_b_iso88591_A_HBa_t_Qa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[405])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {7, 0, 0, 8, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3957};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_r_i, __pyx_mstate->__pyx_n_u_c_i, __pyx_mstate->__pyx_n_u_r_j, __pyx_mstate->__pyx_n_u_c_j, __pyx_mstate->__pyx_n_u_r_s, __pyx_mstate->__pyx_n_u_c_s, __pyx_mstate->__pyx_n_u_result};
    __pyx_mstate_global->__pyx_codeobj_tab[406] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_submatrix, __pyx_mstate->__pyx_kp_b_iso88591_nno_V4r_D_d_Ct2U_U_EQUUWW___ddf, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[406])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3963};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_L, __pyx_mstate->__pyx_n_u_U};
    __pyx_mstate_global->__pyx_codeobj_tab[407] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_LU, __pyx_mstate->__pyx_kp_b_iso88591_A_Zq_F_d_Zq_F_d_d_3avQk_q_s, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[407])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3969};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_L, __pyx_mstate->__pyx_n_u_U, __pyx_mstate->__pyx_n_u_perm};
    __pyx_mstate_global->__pyx_codeobj_tab[408] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_LUdecomposition, __pyx_mstate->__pyx_kp_b_iso88591_A_4vS_A_Qa_Zq_F_d_Zq_F_d_A_31D_3, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[408])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3982};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_L, __pyx_mstate->__pyx_n_u_D};
    __pyx_mstate_global->__pyx_codeobj_tab[409] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_LDL, __pyx_mstate->__pyx_kp_b_iso88591_A_Zq_F_d_Zq_F_d_d_4q_a_s, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[409])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3988};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_b, __pyx_mstate->__pyx_n_u_method, __pyx_mstate->__pyx_n_u_b_2, __pyx_mstate->__pyx_n_u_x};
    __pyx_mstate_global->__pyx_codeobj_tab[410] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_solve, __pyx_mstate->__pyx_kp_b_iso88591_a_Zq_BfA_6_s_Q_a_6NatST_7q_7q_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[410])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4014};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_b, __pyx_mstate->__pyx_n_u_b_2, __pyx_mstate->__pyx_n_u_x};
    __pyx_mstate_global->__pyx_codeobj_tab[411] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_LUsolve, __pyx_mstate->__pyx_kp_b_iso88591_A_Zq_t1F_2J_4q_31Ba_31AQ_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[411])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4022};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_L, __pyx_mstate->__pyx_n_u_U, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_j};
    __pyx_mstate_global->__pyx_codeobj_tab[412] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_FFLU, __pyx_mstate->__pyx_kp_b_iso88591_A_Zq_F_d_Zq_F_d_ASPTTZZ_aaggh_d, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[412])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4035};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_L, __pyx_mstate->__pyx_n_u_D, __pyx_mstate->__pyx_n_u_U};
    __pyx_mstate_global->__pyx_codeobj_tab[413] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_FFLDU, __pyx_mstate->__pyx_kp_b_iso88591_A_Zq_F_d_Zq_F_d_Zq_F_d_d_6_F_fAQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[413])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4042};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_Q_2, __pyx_mstate->__pyx_n_u_R};
    __pyx_mstate_global->__pyx_codeobj_tab[414] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_QR, __pyx_mstate->__pyx_kp_b_iso88591_A_Zq_F_d_Zq_F_d_d_3avQk_q_s, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[414])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4048};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_L};
    __pyx_mstate_global->__pyx_codeobj_tab[415] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_cholesky, __pyx_mstate->__pyx_kp_b_iso88591_A_Zq_F_d_d_9AV1A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[415])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4053};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_x, __pyx_mstate->__pyx_n_u_x_4, __pyx_mstate->__pyx_n_u_R};
    __pyx_mstate_global->__pyx_codeobj_tab[416] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_jacobian, __pyx_mstate->__pyx_kp_b_iso88591_A_Zq_F_avQ_A_vRq_q_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[416])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4061};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_s, __pyx_mstate->__pyx_n_u_A, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_l, __pyx_mstate->__pyx_n_u_j, __pyx_mstate->__pyx_n_u_sympy};
    __pyx_mstate_global->__pyx_codeobj_tab[417] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sympy_2, __pyx_mstate->__pyx_kp_b_iso88591_A_A_6NatST_E_aq_a_U_1F_Qat1Cs_WA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[417])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4072};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_s, __pyx_mstate->__pyx_n_u_A, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_l, __pyx_mstate->__pyx_n_u_j, __pyx_mstate->__pyx_n_u_sage_2};
    __pyx_mstate_global->__pyx_codeobj_tab[418] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sage, __pyx_mstate->__pyx_kp_b_iso88591_A_A_6NatST_E_aq_a_U_1F_Qat1Cs_WA_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[418])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4083};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_out, __pyx_mstate->__pyx_n_u_ri, __pyx_mstate->__pyx_n_u_ci, __pyx_mstate->__pyx_n_u_nr, __pyx_mstate->__pyx_n_u_nc};
    __pyx_mstate_global->__pyx_codeobj_tab[419] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_dump_real, __pyx_mstate->__pyx_kp_b_iso88591_A_3fBd_AQ_T_q_T_q_F_q_e1A_1Bas_O, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[419])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4094};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_out, __pyx_mstate->__pyx_n_u_ri, __pyx_mstate->__pyx_n_u_ci, __pyx_mstate->__pyx_n_u_nr, __pyx_mstate->__pyx_n_u_nc};
    __pyx_mstate_global->__pyx_codeobj_tab[420] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_dump_complex, __pyx_mstate->__pyx_kp_b_iso88591_A_3fBd_AQ_T_q_T_q_F_q_e1A_1Bas_O_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[420])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4108};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[421] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_as_mutable, __pyx_mstate->__pyx_kp_b_iso88591_A_4, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[421])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4111};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[422] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_as_immutable, __pyx_mstate->__pyx_kp_b_iso88591_A_1A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[422])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4114};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_rowi, __pyx_mstate->__pyx_n_u_coli};
    __pyx_mstate_global->__pyx_codeobj_tab[423] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_tolist, __pyx_mstate->__pyx_kp_b_iso88591_A_q_QfF_he1D_a_HE_fA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[423])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4118};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[424] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_array_2, __pyx_mstate->__pyx_kp_b_iso88591_A_r_q_G1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[424])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4121};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[425] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_mat, __pyx_mstate->__pyx_kp_b_iso88591_A_q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[425])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS), 4124};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_types, __pyx_mstate->__pyx_n_u_s, __pyx_mstate->__pyx_n_u_arg};
    __pyx_mstate_global->__pyx_codeobj_tab[426] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_atoms, __pyx_mstate->__pyx_kp_b_iso88591_A_1_1_6_Qa_q_F_A_1_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[426])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS), 4135};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_args, __pyx_mstate->__pyx_n_u_kwargs};
    __pyx_mstate_global->__pyx_codeobj_tab[427] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_simplify, __pyx_mstate->__pyx_kp_b_iso88591_A_t_aq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[427])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS), 4138};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_args, __pyx_mstate->__pyx_n_u_kwargs};
    __pyx_mstate_global->__pyx_codeobj_tab[428] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_expand, __pyx_mstate->__pyx_kp_b_iso88591_A_t_Qa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[428])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[429] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[429])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state};
    __pyx_mstate_global->__pyx_codeobj_tab[430] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[430])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4144};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_d};
    __pyx_mstate_global->__pyx_codeobj_tab[431] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_init, __pyx_mstate->__pyx_kp_b_iso88591_A_IQ_E, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[431])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4148};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[432] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_iter, __pyx_mstate->__pyx_kp_b_iso88591_A_q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[432])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4151};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[433] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_next, __pyx_mstate->__pyx_kp_b_iso88591_A_HD_b_D_b_BfBd_A_4r_at6_D_V2T_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[433])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4162};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_j};
    __pyx_mstate_global->__pyx_codeobj_tab[434] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_col_swap, __pyx_mstate->__pyx_kp_b_iso88591_A_q_7OqPTT_ccd, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[434])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4165};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_j};
    __pyx_mstate_global->__pyx_codeobj_tab[435] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_fill, __pyx_mstate->__pyx_kp_b_iso88591_A_E_at1_U_4q_AS_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[435])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4170};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_j};
    __pyx_mstate_global->__pyx_codeobj_tab[436] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_row_swap, __pyx_mstate->__pyx_kp_b_iso88591_A_A_4LATQ_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[436])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS), 4173};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_c, __pyx_mstate->__pyx_n_u_args, __pyx_mstate->__pyx_n_u_c_2};
    __pyx_mstate_global->__pyx_codeobj_tab[437] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_rowmul, __pyx_mstate->__pyx_kp_b_iso88591_A_q_a_6NatS__bbdde_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[437])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS), 4178};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_j, __pyx_mstate->__pyx_n_u_c, __pyx_mstate->__pyx_n_u_args, __pyx_mstate->__pyx_n_u_c_2};
    __pyx_mstate_global->__pyx_codeobj_tab[438] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_rowadd, __pyx_mstate->__pyx_kp_b_iso88591_A_q_1O3K1DP___bbdde_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[438])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4183};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_i};
    __pyx_mstate_global->__pyx_codeobj_tab[439] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_row_del, __pyx_mstate->__pyx_kp_b_iso88591_A_2Rq_F_Rs_a_AQ_4wd_2Rq_Q_q_Jhaq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[439])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4192};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_i};
    __pyx_mstate_global->__pyx_codeobj_tab[440] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_col_del, __pyx_mstate->__pyx_kp_b_iso88591_A_2Rq_F_Rs_a_AQ_4wd_2Rq_Q_q_Jhaq_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[440])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[441] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[441])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state};
    __pyx_mstate_global->__pyx_codeobj_tab[442] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[442])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4208};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_f, __pyx_mstate->__pyx_n_u_res};
    __pyx_mstate_global->__pyx_codeobj_tab[443] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_applyfunc_2, __pyx_mstate->__pyx_kp_b_iso88591_A_k_aq_1A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[443])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[444] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[444])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state};
    __pyx_mstate_global->__pyx_codeobj_tab[445] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[445])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4225};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_n, __pyx_mstate->__pyx_n_u_d};
    __pyx_mstate_global->__pyx_codeobj_tab[446] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_eye, __pyx_mstate->__pyx_kp_b_iso88591_A_9_q_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[446])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS), 4240};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_values, __pyx_mstate->__pyx_n_u_d, __pyx_mstate->__pyx_n_u_V};
    __pyx_mstate_global->__pyx_codeobj_tab[447] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_diag, __pyx_mstate->__pyx_kp_b_iso88591_AYc_2_1_1L_1_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[447])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4247};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_r, __pyx_mstate->__pyx_n_u_c, __pyx_mstate->__pyx_n_u_d};
    __pyx_mstate_global->__pyx_codeobj_tab[448] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_ones, __pyx_mstate->__pyx_kp_b_iso88591_A_r_A_A_A_1A_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[448])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4255};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_r, __pyx_mstate->__pyx_n_u_c, __pyx_mstate->__pyx_n_u_d};
    __pyx_mstate_global->__pyx_codeobj_tab[449] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_zeros, __pyx_mstate->__pyx_kp_b_iso88591_Q_r_A_A_A_1O_1AQ_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[449])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4264};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_n, __pyx_mstate->__pyx_n_u_primes, __pyx_mstate->__pyx_n_u_s, __pyx_mstate->__pyx_n_u_i};
    __pyx_mstate_global->__pyx_codeobj_tab[450] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_generate_primes, __pyx_mstate->__pyx_kp_b_iso88591_A_q_A_E_avU_WAV1A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[450])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_3, __pyx_mstate->__pyx_n_u_use_setstate};
    __pyx_mstate_global->__pyx_codeobj_tab[451] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_A_G1F_a_vWE_Q_q_q_q_d_7_WA_d_7, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[451])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state};
    __pyx_mstate_global->__pyx_codeobj_tab[452] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_1F, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[452])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[453] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[453])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state};
    __pyx_mstate_global->__pyx_codeobj_tab[454] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[454])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4296};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[455] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_module_cleanup, __pyx_mstate->__pyx_kp_b_iso88591_q_3c_T_5_V7_L_m6_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[455])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS), 4309};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_expr, __pyx_mstate->__pyx_n_u_args};
    __pyx_mstate_global->__pyx_codeobj_tab[456] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_diff_2, __pyx_mstate->__pyx_kp_b_iso88591_z_uAWA_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[456])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 10, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS), 4317};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_expr, __pyx_mstate->__pyx_n_u_args, __pyx_mstate->__pyx_n_u_prev, __pyx_mstate->__pyx_n_u_b, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_length, __pyx_mstate->__pyx_n_u_l, __pyx_mstate->__pyx_n_u_cur_arg, __pyx_mstate->__pyx_n_u_next_arg, __pyx_mstate->__pyx_n_u__10};
    __pyx_mstate_global->__pyx_codeobj_tab[457] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_diff, __pyx_mstate->__pyx_kp_b_iso88591_AQ_t1_q_A_gQd_1_Ba_Qiq_AQ_2Rr_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[457])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4354};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_x, __pyx_mstate->__pyx_n_u_deep};
    __pyx_mstate_global->__pyx_codeobj_tab[458] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_expand, __pyx_mstate->__pyx_kp_b_iso88591_a_7_2WAQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[458])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS), 4359};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_name, __pyx_mstate->__pyx_n_u_args, __pyx_mstate->__pyx_n_u_v, __pyx_mstate->__pyx_n_u_e_2, __pyx_mstate->__pyx_n_u_e};
    __pyx_mstate_global->__pyx_codeobj_tab[459] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_function_symbol, __pyx_mstate->__pyx_kp_b_iso88591_Q_WAQ_3gQ_Zq_4z_gQj, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[459])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4368};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_x, __pyx_mstate->__pyx_n_u_X};
    __pyx_mstate_global->__pyx_codeobj_tab[460] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sqrt, __pyx_mstate->__pyx_kp_b_iso88591_7_1_4z_aq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[460])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4372};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_x, __pyx_mstate->__pyx_n_u_X};
    __pyx_mstate_global->__pyx_codeobj_tab[461] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_exp, __pyx_mstate->__pyx_kp_b_iso88591_7_1_4z_Qaq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[461])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4376};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_n, __pyx_mstate->__pyx_n_u_n_2};
    __pyx_mstate_global->__pyx_codeobj_tab[462] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_perfect_power, __pyx_mstate->__pyx_kp_b_iso88591_G1A_1D_N_2J_2Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[462])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4381};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_n, __pyx_mstate->__pyx_n_u_n_2};
    __pyx_mstate_global->__pyx_codeobj_tab[463] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_is_square, __pyx_mstate->__pyx_kp_b_iso88591_G1A_1D_O1O3K1Ba, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[463])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4386};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_a, __pyx_mstate->__pyx_n_u_n, __pyx_mstate->__pyx_n_u_a_3, __pyx_mstate->__pyx_n_u_r_2, __pyx_mstate->__pyx_n_u_ret_val};
    __pyx_mstate_global->__pyx_codeobj_tab[464] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_integer_nthroot, __pyx_mstate->__pyx_kp_b_iso88591_G1A_1D__AU_Yqqrrt_u_A_A_B_D_xs, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[464])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS), 4393};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_args, __pyx_mstate->__pyx_n_u_v, __pyx_mstate->__pyx_n_u_e_2, __pyx_mstate->__pyx_n_u_e};
    __pyx_mstate_global->__pyx_codeobj_tab[465] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_max, __pyx_mstate->__pyx_kp_b_iso88591_Q_WAQ_1Ba_4z_Qa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[465])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS), 4401};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_args, __pyx_mstate->__pyx_n_u_v, __pyx_mstate->__pyx_n_u_e_2, __pyx_mstate->__pyx_n_u_e};
    __pyx_mstate_global->__pyx_codeobj_tab[466] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_min, __pyx_mstate->__pyx_kp_b_iso88591_Q_WAQ_1Ba_4z_Qa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[466])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4409};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_x, __pyx_mstate->__pyx_n_u_X};
    __pyx_mstate_global->__pyx_codeobj_tab[467] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_gamma, __pyx_mstate->__pyx_kp_b_iso88591_7_1_4z_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[467])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4413};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_lhs, __pyx_mstate->__pyx_n_u_rhs, __pyx_mstate->__pyx_n_u_X, __pyx_mstate->__pyx_n_u_Y};
    __pyx_mstate_global->__pyx_codeobj_tab[468] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_eq, __pyx_mstate->__pyx_kp_b_iso88591_A_7_1_t3a_t1_s_1A_7_1_4q_3aq_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[468])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4420};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_lhs, __pyx_mstate->__pyx_n_u_rhs, __pyx_mstate->__pyx_n_u_X, __pyx_mstate->__pyx_n_u_Y};
    __pyx_mstate_global->__pyx_codeobj_tab[469] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_ne, __pyx_mstate->__pyx_kp_b_iso88591_7_1_7_1_4q_3aq_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[469])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4425};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_lhs, __pyx_mstate->__pyx_n_u_rhs, __pyx_mstate->__pyx_n_u_X, __pyx_mstate->__pyx_n_u_Y};
    __pyx_mstate_global->__pyx_codeobj_tab[470] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_ge, __pyx_mstate->__pyx_kp_b_iso88591_7_1_7_1_4q_3aq_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[470])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4432};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_lhs, __pyx_mstate->__pyx_n_u_rhs, __pyx_mstate->__pyx_n_u_X, __pyx_mstate->__pyx_n_u_Y};
    __pyx_mstate_global->__pyx_codeobj_tab[471] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_gt, __pyx_mstate->__pyx_kp_b_iso88591_7_1_7_1_4q_3aq_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[471])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4439};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_lhs, __pyx_mstate->__pyx_n_u_rhs, __pyx_mstate->__pyx_n_u_X, __pyx_mstate->__pyx_n_u_Y};
    __pyx_mstate_global->__pyx_codeobj_tab[472] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_le, __pyx_mstate->__pyx_kp_b_iso88591_7_1_7_1_4q_3aq_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[472])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4444};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_lhs, __pyx_mstate->__pyx_n_u_rhs, __pyx_mstate->__pyx_n_u_X, __pyx_mstate->__pyx_n_u_Y};
    __pyx_mstate_global->__pyx_codeobj_tab[473] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_lt, __pyx_mstate->__pyx_kp_b_iso88591_7_1_7_1_4q_3aq_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[473])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4449};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_x, __pyx_mstate->__pyx_n_u_X};
    __pyx_mstate_global->__pyx_codeobj_tab[474] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_digamma, __pyx_mstate->__pyx_kp_b_iso88591_7_1_4z_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[474])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4453};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_x, __pyx_mstate->__pyx_n_u_X};
    __pyx_mstate_global->__pyx_codeobj_tab[475] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_trigamma, __pyx_mstate->__pyx_kp_b_iso88591_7_1_4z_1A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[475])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS), 4457};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_args, __pyx_mstate->__pyx_n_u_s, __pyx_mstate->__pyx_n_u_e_2, __pyx_mstate->__pyx_n_u_e};
    __pyx_mstate_global->__pyx_codeobj_tab[476] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_logical_and, __pyx_mstate->__pyx_kp_b_iso88591_Q_WAQ_2_2Q_4q_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[476])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS), 4465};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_args, __pyx_mstate->__pyx_n_u_s, __pyx_mstate->__pyx_n_u_e_2, __pyx_mstate->__pyx_n_u_e};
    __pyx_mstate_global->__pyx_codeobj_tab[477] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_logical_or, __pyx_mstate->__pyx_kp_b_iso88591_Q_WAQ_2_2Q_4q_aq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[477])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS), 4473};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_args, __pyx_mstate->__pyx_n_u_s, __pyx_mstate->__pyx_n_u_e_2, __pyx_mstate->__pyx_n_u_e};
    __pyx_mstate_global->__pyx_codeobj_tab[478] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_Nor, __pyx_mstate->__pyx_kp_b_iso88591_Q_WAQ_2_2Q_4q_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[478])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS), 4481};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_args, __pyx_mstate->__pyx_n_u_s, __pyx_mstate->__pyx_n_u_e_2, __pyx_mstate->__pyx_n_u_e};
    __pyx_mstate_global->__pyx_codeobj_tab[479] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_Nand, __pyx_mstate->__pyx_kp_b_iso88591_Q_WAQ_2_2Q_4q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[479])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4489};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_x, __pyx_mstate->__pyx_n_u_x_4, __pyx_mstate->__pyx_n_u_x_3};
    __pyx_mstate_global->__pyx_codeobj_tab[480] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_logical_not, __pyx_mstate->__pyx_kp_b_iso88591_G1A_1D_44LARq_4q_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[480])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS), 4495};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_args, __pyx_mstate->__pyx_n_u_v, __pyx_mstate->__pyx_n_u_e_2, __pyx_mstate->__pyx_n_u_e};
    __pyx_mstate_global->__pyx_codeobj_tab[481] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_logical_xor, __pyx_mstate->__pyx_kp_b_iso88591_Q_WAQ_5Qb_4q_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[481])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS), 4503};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_args, __pyx_mstate->__pyx_n_u_v, __pyx_mstate->__pyx_n_u_e_2, __pyx_mstate->__pyx_n_u_e};
    __pyx_mstate_global->__pyx_codeobj_tab[482] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_Xnor, __pyx_mstate->__pyx_kp_b_iso88591_Q_WAQ_5Qb_4q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[482])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4511};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_x, __pyx_mstate->__pyx_n_u_bits, __pyx_mstate->__pyx_n_u_real, __pyx_mstate->__pyx_n_u_X, __pyx_mstate->__pyx_n_u_d};
    __pyx_mstate_global->__pyx_codeobj_tab[483] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_evalf, __pyx_mstate->__pyx_kp_b_iso88591_A_7_1_uCq_Q_Q_Q_4q_6_F, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[483])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4522};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_x};
    __pyx_mstate_global->__pyx_codeobj_tab[484] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_eval_double, __pyx_mstate->__pyx_kp_b_iso88591_E_J_5_D_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[484])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4526};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_x};
    __pyx_mstate_global->__pyx_codeobj_tab[485] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_eval_complex_double, __pyx_mstate->__pyx_kp_b_iso88591_E_SST_5_D_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[485])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4538};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_x, __pyx_mstate->__pyx_n_u_prec_2};
    __pyx_mstate_global->__pyx_codeobj_tab[486] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_eval_mpfr, __pyx_mstate->__pyx_kp_b_iso88591_E_H_5_F_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[486])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4543};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_x, __pyx_mstate->__pyx_n_u_prec_2};
    __pyx_mstate_global->__pyx_codeobj_tab[487] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_eval_mpc, __pyx_mstate->__pyx_kp_b_iso88591_E_H_5_F_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[487])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4554};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_obj, __pyx_mstate->__pyx_n_u_t};
    __pyx_mstate_global->__pyx_codeobj_tab[488] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_require, __pyx_mstate->__pyx_kp_b_iso88591_t_Qe1_iq_7was_t1A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[488])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4558};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_x, __pyx_mstate->__pyx_n_u_prec_2};
    __pyx_mstate_global->__pyx_codeobj_tab[489] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_eval, __pyx_mstate->__pyx_kp_b_iso88591_E_DA_5_F_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[489])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4562};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_x, __pyx_mstate->__pyx_n_u_prec_2};
    __pyx_mstate_global->__pyx_codeobj_tab[490] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_eval_real, __pyx_mstate->__pyx_kp_b_iso88591_E_H_5_F_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[490])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4566};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_n, __pyx_mstate->__pyx_n_u_reps, __pyx_mstate->__pyx_n_u_n_2};
    __pyx_mstate_global->__pyx_codeobj_tab[491] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_probab_prime_p, __pyx_mstate->__pyx_kp_b_iso88591_a_G1A_1D_O1O3K1BlZ_ccd, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[491])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4573};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_n, __pyx_mstate->__pyx_n_u_n_2};
    __pyx_mstate_global->__pyx_codeobj_tab[492] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_nextprime, __pyx_mstate->__pyx_kp_b_iso88591_G1A_1D_4q_QoE_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[492])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4578};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_a, __pyx_mstate->__pyx_n_u_b, __pyx_mstate->__pyx_n_u_a_3, __pyx_mstate->__pyx_n_u_b_3};
    __pyx_mstate_global->__pyx_codeobj_tab[493] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_gcd, __pyx_mstate->__pyx_kp_b_iso88591_G1A_G1A_1D_1D_4q_4q_WWXXZZ_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[493])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4586};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_a, __pyx_mstate->__pyx_n_u_b, __pyx_mstate->__pyx_n_u_a_3, __pyx_mstate->__pyx_n_u_b_3};
    __pyx_mstate_global->__pyx_codeobj_tab[494] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_lcm, __pyx_mstate->__pyx_kp_b_iso88591_G1A_G1A_1D_1D_4q_4q_WWXXZZ_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[494])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4594};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_a, __pyx_mstate->__pyx_n_u_b, __pyx_mstate->__pyx_n_u_a_3, __pyx_mstate->__pyx_n_u_b_3, __pyx_mstate->__pyx_n_u_g, __pyx_mstate->__pyx_n_u_s, __pyx_mstate->__pyx_n_u_t};
    __pyx_mstate_global->__pyx_codeobj_tab[495] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_gcd_ext, __pyx_mstate->__pyx_kp_b_iso88591_G1A_G1A_1D_1D_Z_a_O1MYhhiij_q_o, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[495])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4606};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_a, __pyx_mstate->__pyx_n_u_b, __pyx_mstate->__pyx_n_u_a_3, __pyx_mstate->__pyx_n_u_b_3};
    __pyx_mstate_global->__pyx_codeobj_tab[496] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_mod, __pyx_mstate->__pyx_kp_b_iso88591_r_A_a_G1A_G1A_1D_1D_4q_4q_WWXXZ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[496])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4616};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_a, __pyx_mstate->__pyx_n_u_b, __pyx_mstate->__pyx_n_u_a_3, __pyx_mstate->__pyx_n_u_b_3};
    __pyx_mstate_global->__pyx_codeobj_tab[497] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_quotient, __pyx_mstate->__pyx_kp_b_iso88591_r_A_a_G1A_G1A_1D_1D_4q_9A_D, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[497])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4626};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_a, __pyx_mstate->__pyx_n_u_b, __pyx_mstate->__pyx_n_u_q, __pyx_mstate->__pyx_n_u_r, __pyx_mstate->__pyx_n_u_a_3, __pyx_mstate->__pyx_n_u_b_3};
    __pyx_mstate_global->__pyx_codeobj_tab[498] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_quotient_mod, __pyx_mstate->__pyx_kp_b_iso88591_r_A_a_G1A_G1A_1D_1D_O1M_PQQR_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[498])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4638};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_a, __pyx_mstate->__pyx_n_u_b, __pyx_mstate->__pyx_n_u_inv, __pyx_mstate->__pyx_n_u_a_3, __pyx_mstate->__pyx_n_u_b_3, __pyx_mstate->__pyx_n_u_ret_val};
    __pyx_mstate_global->__pyx_codeobj_tab[499] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_mod_inverse, __pyx_mstate->__pyx_kp_b_iso88591_G1A_G1A_1D_1D_JoQa_q_oMeeffhhi, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[499])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 8, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4650};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_rem, __pyx_mstate->__pyx_n_u_mod, __pyx_mstate->__pyx_n_u_rem_2, __pyx_mstate->__pyx_n_u_mod_2, __pyx_mstate->__pyx_n_u_a_3, __pyx_mstate->__pyx_n_u_ret_val, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_c};
    __pyx_mstate_global->__pyx_codeobj_tab[500] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_crt, __pyx_mstate->__pyx_kp_b_iso88591_U_3aq_WAS_q_A_Jj_8_1_WAS_q_A_Jj, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[500])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4668};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_n};
    __pyx_mstate_global->__pyx_codeobj_tab[501] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_fibonacci, __pyx_mstate->__pyx_kp_b_iso88591_r_1_a_4q_Qa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[501])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4673};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_n, __pyx_mstate->__pyx_n_u_f1, __pyx_mstate->__pyx_n_u_f2};
    __pyx_mstate_global->__pyx_codeobj_tab[502] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_fibonacci2, __pyx_mstate->__pyx_kp_b_iso88591_r_1_a_qPUUV_1D_t1_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[502])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4680};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_n};
    __pyx_mstate_global->__pyx_codeobj_tab[503] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_lucas, __pyx_mstate->__pyx_kp_b_iso88591_r_1_a_4q_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[503])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4685};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_n, __pyx_mstate->__pyx_n_u_f1, __pyx_mstate->__pyx_n_u_f2};
    __pyx_mstate_global->__pyx_codeobj_tab[504] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_lucas2, __pyx_mstate->__pyx_kp_b_iso88591_r_1_a_JoQnO1EQR_1D_t1_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[504])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4692};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_n, __pyx_mstate->__pyx_n_u_k, __pyx_mstate->__pyx_n_u_n_2};
    __pyx_mstate_global->__pyx_codeobj_tab[505] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_binomial, __pyx_mstate->__pyx_kp_b_iso88591_r_1_a_G1A_1D_4q_1OC_jjk, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[505])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4699};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_n};
    __pyx_mstate_global->__pyx_codeobj_tab[506] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_factorial, __pyx_mstate->__pyx_kp_b_iso88591_r_1_a_4q_Qa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[506])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4704};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_a, __pyx_mstate->__pyx_n_u_b, __pyx_mstate->__pyx_n_u_a_3, __pyx_mstate->__pyx_n_u_b_3};
    __pyx_mstate_global->__pyx_codeobj_tab[507] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_divides, __pyx_mstate->__pyx_kp_b_iso88591_G1A_G1A_1D_1D_HA__DARq_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[507])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4712};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_n, __pyx_mstate->__pyx_n_u_B1, __pyx_mstate->__pyx_n_u_n_2, __pyx_mstate->__pyx_n_u_f, __pyx_mstate->__pyx_n_u_ret_val};
    __pyx_mstate_global->__pyx_codeobj_tab[508] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_factor, __pyx_mstate->__pyx_kp_b_iso88591_a_G1A_1D_z_q_a_1_t1_Q_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[508])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4723};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_n, __pyx_mstate->__pyx_n_u_n_2, __pyx_mstate->__pyx_n_u_f, __pyx_mstate->__pyx_n_u_ret_val};
    __pyx_mstate_global->__pyx_codeobj_tab[509] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_factor_lehman_method, __pyx_mstate->__pyx_kp_b_iso88591_G1A_1D_5Z_aq_q_1_t1_Q_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[509])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4734};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_n, __pyx_mstate->__pyx_n_u_B, __pyx_mstate->__pyx_n_u_retries, __pyx_mstate->__pyx_n_u_n_2, __pyx_mstate->__pyx_n_u_f, __pyx_mstate->__pyx_n_u_ret_val};
    __pyx_mstate_global->__pyx_codeobj_tab[510] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_factor_pollard_pm1_method, __pyx_mstate->__pyx_kp_b_iso88591_G1A_1D_OSTTU_q_c_1_t1_Q_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[510])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4745};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_n, __pyx_mstate->__pyx_n_u_retries, __pyx_mstate->__pyx_n_u_n_2, __pyx_mstate->__pyx_n_u_f, __pyx_mstate->__pyx_n_u_ret_val};
    __pyx_mstate_global->__pyx_codeobj_tab[511] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_factor_pollard_rho_method, __pyx_mstate->__pyx_kp_b_iso88591_G1A_1D_OSTTU_q_a_1_t1_Q_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[511])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4756};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_n, __pyx_mstate->__pyx_n_u_factors, __pyx_mstate->__pyx_n_u_n_2, __pyx_mstate->__pyx_n_u_s, __pyx_mstate->__pyx_n_u_i};
    __pyx_mstate_global->__pyx_codeobj_tab[512] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_prime_factors, __pyx_mstate->__pyx_kp_b_iso88591_G1A_1D_1I_4LARq_U_7_q_Q_q_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[512])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4766};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_n, __pyx_mstate->__pyx_n_u_factors, __pyx_mstate->__pyx_n_u_n_2, __pyx_mstate->__pyx_n_u_r, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_i};
    __pyx_mstate_global->__pyx_codeobj_tab[513] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_prime_factor_multiplicities, __pyx_mstate->__pyx_kp_b_iso88591_G1A_1D_1I_4LARq_1_U_7_q_D_7_1_B, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[513])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4781};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_n};
    __pyx_mstate_global->__pyx_codeobj_tab[514] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_bernoulli, __pyx_mstate->__pyx_kp_b_iso88591_r_1_a_4q_Qa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[514])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4786};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_n, __pyx_mstate->__pyx_n_u_g, __pyx_mstate->__pyx_n_u_n_2, __pyx_mstate->__pyx_n_u_ret_val};
    __pyx_mstate_global->__pyx_codeobj_tab[515] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_primitive_root, __pyx_mstate->__pyx_kp_b_iso88591_G1A_1D_O__AQ_q_xs_q_4q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[515])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4796};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_n, __pyx_mstate->__pyx_n_u_root_list, __pyx_mstate->__pyx_n_u_n_2, __pyx_mstate->__pyx_n_u_s, __pyx_mstate->__pyx_n_u_i};
    __pyx_mstate_global->__pyx_codeobj_tab[516] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_primitive_root_list, __pyx_mstate->__pyx_kp_b_iso88591_G1A_1D_q_U_9E_Q_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[516])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4807};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_n, __pyx_mstate->__pyx_n_u_n_2, __pyx_mstate->__pyx_n_u_m};
    __pyx_mstate_global->__pyx_codeobj_tab[517] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_totient, __pyx_mstate->__pyx_kp_b_iso88591_G1A_1D_33K1Ba_4q_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[517])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4813};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_n, __pyx_mstate->__pyx_n_u_n_2, __pyx_mstate->__pyx_n_u_m};
    __pyx_mstate_global->__pyx_codeobj_tab[518] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_carmichael, __pyx_mstate->__pyx_kp_b_iso88591_G1A_1D_33K1Ba_4q_Qa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[518])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 8, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4819};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_a, __pyx_mstate->__pyx_n_u_n, __pyx_mstate->__pyx_n_u_n_2, __pyx_mstate->__pyx_n_u_a_3, __pyx_mstate->__pyx_n_u_n1, __pyx_mstate->__pyx_n_u_a1, __pyx_mstate->__pyx_n_u_o, __pyx_mstate->__pyx_n_u_c};
    __pyx_mstate_global->__pyx_codeobj_tab[519] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_multiplicative_order, __pyx_mstate->__pyx_kp_b_iso88591_G1A_G1A_1D_1D_44LARq_44LARq_3, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[519])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4833};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_a, __pyx_mstate->__pyx_n_u_n, __pyx_mstate->__pyx_n_u_n_2, __pyx_mstate->__pyx_n_u_a_3};
    __pyx_mstate_global->__pyx_codeobj_tab[520] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_legendre, __pyx_mstate->__pyx_kp_b_iso88591_G1A_G1A_1D_1D_IQo_EQb_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[520])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4841};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_a, __pyx_mstate->__pyx_n_u_n, __pyx_mstate->__pyx_n_u_n_2, __pyx_mstate->__pyx_n_u_a_3};
    __pyx_mstate_global->__pyx_codeobj_tab[521] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_jacobi, __pyx_mstate->__pyx_kp_b_iso88591_G1A_G1A_1D_1D_G1O_C1Ba_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[521])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4849};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_a, __pyx_mstate->__pyx_n_u_n, __pyx_mstate->__pyx_n_u_n_2, __pyx_mstate->__pyx_n_u_a_3};
    __pyx_mstate_global->__pyx_codeobj_tab[522] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_kronecker, __pyx_mstate->__pyx_kp_b_iso88591_G1A_G1A_1D_1D_Ja_Far_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[522])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 11, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4857};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_a, __pyx_mstate->__pyx_n_u_n, __pyx_mstate->__pyx_n_u_m, __pyx_mstate->__pyx_n_u_root, __pyx_mstate->__pyx_n_u_n_2, __pyx_mstate->__pyx_n_u_a_3, __pyx_mstate->__pyx_n_u_m_2, __pyx_mstate->__pyx_n_u_n1, __pyx_mstate->__pyx_n_u_a1, __pyx_mstate->__pyx_n_u_m1, __pyx_mstate->__pyx_n_u_ret_val};
    __pyx_mstate_global->__pyx_codeobj_tab[523] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_nthroot_mod, __pyx_mstate->__pyx_kp_b_iso88591_G1A_G1A_G1A_1D_1D_1D_44LARq_44L, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[523])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 12, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4873};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_a, __pyx_mstate->__pyx_n_u_n, __pyx_mstate->__pyx_n_u_m, __pyx_mstate->__pyx_n_u_root_list, __pyx_mstate->__pyx_n_u_n_2, __pyx_mstate->__pyx_n_u_a_3, __pyx_mstate->__pyx_n_u_m_2, __pyx_mstate->__pyx_n_u_n1, __pyx_mstate->__pyx_n_u_a1, __pyx_mstate->__pyx_n_u_m1, __pyx_mstate->__pyx_n_u_s, __pyx_mstate->__pyx_n_u_i};
    __pyx_mstate_global->__pyx_codeobj_tab[524] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_nthroot_mod_list, __pyx_mstate->__pyx_kp_b_iso88591_G1A_G1A_G1A_1D_1D_1D_44LARq_44L_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[524])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4890};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_a, __pyx_mstate->__pyx_n_u_p, __pyx_mstate->__pyx_n_u_all_roots};
    __pyx_mstate_global->__pyx_codeobj_tab[525] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_sqrt_mod, __pyx_mstate->__pyx_kp_b_iso88591_1_q_q_3a_as_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[525])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 11, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4895};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_a, __pyx_mstate->__pyx_n_u_b, __pyx_mstate->__pyx_n_u_m, __pyx_mstate->__pyx_n_u_a_3, __pyx_mstate->__pyx_n_u_m_2, __pyx_mstate->__pyx_n_u_b_3, __pyx_mstate->__pyx_n_u_a1, __pyx_mstate->__pyx_n_u_m1, __pyx_mstate->__pyx_n_u_b1, __pyx_mstate->__pyx_n_u_root, __pyx_mstate->__pyx_n_u_ret_val};
    __pyx_mstate_global->__pyx_codeobj_tab[526] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_powermod, __pyx_mstate->__pyx_kp_b_iso88591_G1A_G1A_WAQ_1D_1D_44LARq_44LARq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[526])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 12, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4910};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_a, __pyx_mstate->__pyx_n_u_b, __pyx_mstate->__pyx_n_u_m, __pyx_mstate->__pyx_n_u_a_3, __pyx_mstate->__pyx_n_u_m_2, __pyx_mstate->__pyx_n_u_b_3, __pyx_mstate->__pyx_n_u_a1, __pyx_mstate->__pyx_n_u_m1, __pyx_mstate->__pyx_n_u_b1, __pyx_mstate->__pyx_n_u_v, __pyx_mstate->__pyx_n_u_s, __pyx_mstate->__pyx_n_u_i};
    __pyx_mstate_global->__pyx_codeobj_tab[527] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_powermod_list, __pyx_mstate->__pyx_kp_b_iso88591_G1A_G1A_WAQ_1D_1D_44LARq_44LARq_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[527])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4927};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_obj, __pyx_mstate->__pyx_n_u_symbol, __pyx_mstate->__pyx_n_u_b, __pyx_mstate->__pyx_n_u_s};
    __pyx_mstate_global->__pyx_codeobj_tab[528] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_has_symbol, __pyx_mstate->__pyx_kp_b_iso88591_A_81A_81A_1D_A_t1M_q_1F_fAQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[528])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4993};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_inp, __pyx_mstate->__pyx_n_u_out};
    __pyx_mstate_global->__pyx_codeobj_tab[529] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_eval_real, __pyx_mstate->__pyx_kp_b_iso88591_A_3fCt1_AQ_3fCt1_AQ_L_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[529])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5000};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_inp, __pyx_mstate->__pyx_n_u_out};
    __pyx_mstate_global->__pyx_codeobj_tab[530] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_eval_complex, __pyx_mstate->__pyx_kp_b_iso88591_A_3fCt1_AQ_3fCt1_AQ_O1E, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[530])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5007};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_inp, __pyx_mstate->__pyx_n_u_out, __pyx_mstate->__pyx_n_u_nbroadcast};
    __pyx_mstate_global->__pyx_codeobj_tab[531] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_unsafe_eval, __pyx_mstate->__pyx_kp_b_iso88591_j_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[531])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_3, __pyx_mstate->__pyx_n_u_use_setstate};
    __pyx_mstate_global->__pyx_codeobj_tab[532] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_T_4_4z_SWW__ccpptt_A_G1F_a_vWE, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[532])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state};
    __pyx_mstate_global->__pyx_codeobj_tab[533] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_q_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[533])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS), 5136};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_lambdify, __pyx_mstate->__pyx_n_u_args, __pyx_mstate->__pyx_n_u_LowLevelCallable, __pyx_mstate->__pyx_n_u_LambdifyLowLevelCallable};
    __pyx_mstate_global->__pyx_codeobj_tab[534] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_create_low_level_callable, __pyx_mstate->__pyx_kp_b_iso88591_a_1_1Kq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[534])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5155};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_inp, __pyx_mstate->__pyx_n_u_out, __pyx_mstate->__pyx_n_u_inp_offset, __pyx_mstate->__pyx_n_u_out_offset};
    __pyx_mstate_global->__pyx_codeobj_tab[535] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_unsafe_real, __pyx_mstate->__pyx_kp_b_iso88591_MM___d_q_A_3aq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[535])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5158};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_inp, __pyx_mstate->__pyx_n_u_out, __pyx_mstate->__pyx_n_u_nbroadcast};
    __pyx_mstate_global->__pyx_codeobj_tab[536] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_unsafe_eval, __pyx_mstate->__pyx_kp_b_iso88591_AS_avT_A_G5_e1AU_3at_K1EQRRUUVV, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[536])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5166};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[537] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_as_scipy_low_level_callable, __pyx_mstate->__pyx_kp_b_iso88591_A_ZwfIQ_4_Rq_aq_AXQa_G7_a_AXT_D, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[537])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5175};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[538] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_as_ctypes, __pyx_mstate->__pyx_kp_b_iso88591_A_ZwfIQ_AXQa_G1Kwa_RS_AXT_D_wa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[538])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[539] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[539])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state};
    __pyx_mstate_global->__pyx_codeobj_tab[540] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[540])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5200};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_inp, __pyx_mstate->__pyx_n_u_out, __pyx_mstate->__pyx_n_u_inp_offset, __pyx_mstate->__pyx_n_u_out_offset};
    __pyx_mstate_global->__pyx_codeobj_tab[541] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_unsafe_complex, __pyx_mstate->__pyx_kp_b_iso88591_rrs_d_q_A_3aq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[541])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5203};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_inp, __pyx_mstate->__pyx_n_u_out, __pyx_mstate->__pyx_n_u_nbroadcast};
    __pyx_mstate_global->__pyx_codeobj_tab[542] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_unsafe_eval, __pyx_mstate->__pyx_kp_b_iso88591_AS_avT_A_G5_e1AU_3at_K1EQRRUUVV, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[542])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[543] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[543])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state};
    __pyx_mstate_global->__pyx_codeobj_tab[544] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[544])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5224};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_s};
    __pyx_mstate_global->__pyx_codeobj_tab[545] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_reduce, __pyx_mstate->__pyx_kp_b_iso88591_A_vT_1_q_4_4_d_W_hd_D_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[545])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5232};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_inp, __pyx_mstate->__pyx_n_u_out, __pyx_mstate->__pyx_n_u_inp_offset, __pyx_mstate->__pyx_n_u_out_offset};
    __pyx_mstate_global->__pyx_codeobj_tab[546] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_unsafe_real, __pyx_mstate->__pyx_kp_b_iso88591_MM___d_q_A_3aq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[546])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5235};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_inp, __pyx_mstate->__pyx_n_u_out, __pyx_mstate->__pyx_n_u_nbroadcast};
    __pyx_mstate_global->__pyx_codeobj_tab[547] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_unsafe_eval, __pyx_mstate->__pyx_kp_b_iso88591_AS_avT_A_G5_e1AU_3at_K1EQRRUUVV, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[547])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5243};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[548] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_as_scipy_low_level_callable, __pyx_mstate->__pyx_kp_b_iso88591_A_ZwfIQ_4t1_aq_4_Rq_aq_AXQa_G7_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[548])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5254};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[549] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_as_ctypes, __pyx_mstate->__pyx_kp_b_iso88591_A_ZwfIQ_4t1_aq_AXQa_G1Kwa_RS_AXT, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[549])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5283};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_s};
    __pyx_mstate_global->__pyx_codeobj_tab[550] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_reduce, __pyx_mstate->__pyx_kp_b_iso88591_A_vT_1_q__DP_aab_hd_D_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[550])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5291};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_inp, __pyx_mstate->__pyx_n_u_out, __pyx_mstate->__pyx_n_u_inp_offset, __pyx_mstate->__pyx_n_u_out_offset};
    __pyx_mstate_global->__pyx_codeobj_tab[551] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_unsafe_real, __pyx_mstate->__pyx_kp_b_iso88591_KK_d_q_A_3aq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[551])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5294};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_inp, __pyx_mstate->__pyx_n_u_out, __pyx_mstate->__pyx_n_u_nbroadcast};
    __pyx_mstate_global->__pyx_codeobj_tab[552] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_unsafe_eval, __pyx_mstate->__pyx_kp_b_iso88591_AS_avT_A_G5_e1AU_3at_K1EQRRUUVV, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[552])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5314};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_s};
    __pyx_mstate_global->__pyx_codeobj_tab[553] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_reduce, __pyx_mstate->__pyx_kp_b_iso88591_A_vT_1_q_t_t_RVVccggh_hd_D_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[553])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5322};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_inp, __pyx_mstate->__pyx_n_u_out, __pyx_mstate->__pyx_n_u_inp_offset, __pyx_mstate->__pyx_n_u_out_offset};
    __pyx_mstate_global->__pyx_codeobj_tab[554] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_unsafe_real, __pyx_mstate->__pyx_kp_b_iso88591_WWiij_d_q_A_3aq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[554])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5325};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_inp, __pyx_mstate->__pyx_n_u_out, __pyx_mstate->__pyx_n_u_nbroadcast};
    __pyx_mstate_global->__pyx_codeobj_tab[555] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_unsafe_eval, __pyx_mstate->__pyx_kp_b_iso88591_AS_avT_A_G5_e1AU_3at_K1EQRRUUVV, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[555])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS), 5333};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_args};
    __pyx_mstate_global->__pyx_codeobj_tab[556] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_llvm_loading_func, __pyx_mstate->__pyx_kp_b_iso88591_QfF, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[556])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS), 5336};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_args};
    __pyx_mstate_global->__pyx_codeobj_tab[557] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_llvm_float_loading_func, __pyx_mstate->__pyx_kp_b_iso88591_9AV6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[557])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS), 5339};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_args};
    __pyx_mstate_global->__pyx_codeobj_tab[558] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_llvm_long_double_loading_func, __pyx_mstate->__pyx_kp_b_iso88591_a_4, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[558])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 6, 11, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS), 5342};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_args, __pyx_mstate->__pyx_n_u_real, __pyx_mstate->__pyx_n_u_backend, __pyx_mstate->__pyx_n_u_order, __pyx_mstate->__pyx_n_u_as_scipy, __pyx_mstate->__pyx_n_u_cse, __pyx_mstate->__pyx_n_u_dtype, __pyx_mstate->__pyx_n_u_exprs, __pyx_mstate->__pyx_n_u_kwargs, __pyx_mstate->__pyx_n_u_backend_default, __pyx_mstate->__pyx_n_u_ret};
    __pyx_mstate_global->__pyx_codeobj_tab[559] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_Lambdify, __pyx_mstate->__pyx_kp_b_iso88591_nA_xs_Ja_G1_xs_6_A_Ba_6_Ba_AWG5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[559])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 1, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS), 5421};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_args, __pyx_mstate->__pyx_n_u_order, __pyx_mstate->__pyx_n_u_exprs, __pyx_mstate->__pyx_n_u_kwargs};
    __pyx_mstate_global->__pyx_codeobj_tab[560] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_LambdifyCSE, __pyx_mstate->__pyx_kp_b_iso88591_a_E_LA_81G7_fF_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[560])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5428};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_expr, __pyx_mstate->__pyx_n_u_expr_2};
    __pyx_mstate_global->__pyx_codeobj_tab[561] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_ccode, __pyx_mstate->__pyx_kp_b_iso88591_waq_F_6_j_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[561])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS), 5433};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_v, __pyx_mstate->__pyx_n_u_vec, __pyx_mstate->__pyx_n_u_p, __pyx_mstate->__pyx_n_u_e, __pyx_mstate->__pyx_n_u_b, __pyx_mstate->__pyx_n_u_expr, __pyx_mstate->__pyx_n_u_rel};
    __pyx_mstate_global->__pyx_codeobj_tab[562] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_piecewise, __pyx_mstate->__pyx_kp_b_iso88591_gQ_G1A_G1A_1A_RRSSTTU_Qa_4z_1D, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[562])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 10, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5447};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_start, __pyx_mstate->__pyx_n_u_end, __pyx_mstate->__pyx_n_u_left_open, __pyx_mstate->__pyx_n_u_right_open, __pyx_mstate->__pyx_n_u_start_2, __pyx_mstate->__pyx_n_u_end_2, __pyx_mstate->__pyx_n_u_left_open_2, __pyx_mstate->__pyx_n_u_right_open_2, __pyx_mstate->__pyx_n_u_n1, __pyx_mstate->__pyx_n_u_n2};
    __pyx_mstate_global->__pyx_codeobj_tab[563] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_interval, __pyx_mstate->__pyx_kp_b_iso88591_z_A_z_q_Q_waq_a_q_33J_6QR_33J_4, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[563])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5461};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[564] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_emptyset, __pyx_mstate->__pyx_kp_b_iso88591_4q_9A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[564])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5465};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[565] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_universalset, __pyx_mstate->__pyx_kp_b_iso88591_4q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[565])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5469};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[566] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_reals, __pyx_mstate->__pyx_kp_b_iso88591_4q_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[566])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5473};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[567] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_rationals, __pyx_mstate->__pyx_kp_b_iso88591_4q_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[567])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5477};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[568] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_integers, __pyx_mstate->__pyx_kp_b_iso88591_4q_9A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[568])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS), 5481};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_args, __pyx_mstate->__pyx_n_u_s, __pyx_mstate->__pyx_n_u_e_2, __pyx_mstate->__pyx_n_u_e};
    __pyx_mstate_global->__pyx_codeobj_tab[569] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_finiteset, __pyx_mstate->__pyx_kp_b_iso88591_Q_WAQ_2Q_4q_Qa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[569])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5490};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_expr, __pyx_mstate->__pyx_n_u_sset, __pyx_mstate->__pyx_n_u_expr_2, __pyx_mstate->__pyx_n_u_sset_2, __pyx_mstate->__pyx_n_u_s};
    __pyx_mstate_global->__pyx_codeobj_tab[570] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_contains, __pyx_mstate->__pyx_kp_b_iso88591_waq_WAQ_C1E_4q_9AU_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[570])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5508};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_expr, __pyx_mstate->__pyx_n_u_expr_2, __pyx_mstate->__pyx_n_u_tbool};
    __pyx_mstate_global->__pyx_codeobj_tab[571] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_is_zero, __pyx_mstate->__pyx_kp_b_iso88591_waq_6_a_Qa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[571])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5514};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_expr, __pyx_mstate->__pyx_n_u_expr_2, __pyx_mstate->__pyx_n_u_tbool};
    __pyx_mstate_global->__pyx_codeobj_tab[572] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_is_positive, __pyx_mstate->__pyx_kp_b_iso88591_waq_avU_Qa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[572])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5520};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_expr, __pyx_mstate->__pyx_n_u_expr_2, __pyx_mstate->__pyx_n_u_tbool};
    __pyx_mstate_global->__pyx_codeobj_tab[573] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_is_negative, __pyx_mstate->__pyx_kp_b_iso88591_waq_avU_Qa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[573])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5526};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_expr, __pyx_mstate->__pyx_n_u_expr_2, __pyx_mstate->__pyx_n_u_tbool};
    __pyx_mstate_global->__pyx_codeobj_tab[574] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_is_nonpositive, __pyx_mstate->__pyx_kp_b_iso88591_waq_Q_Qa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[574])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5532};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_expr, __pyx_mstate->__pyx_n_u_expr_2, __pyx_mstate->__pyx_n_u_tbool};
    __pyx_mstate_global->__pyx_codeobj_tab[575] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_is_nonnegative, __pyx_mstate->__pyx_kp_b_iso88591_waq_Q_Qa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[575])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5538};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_expr, __pyx_mstate->__pyx_n_u_expr_2, __pyx_mstate->__pyx_n_u_tbool};
    __pyx_mstate_global->__pyx_codeobj_tab[576] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_is_real, __pyx_mstate->__pyx_kp_b_iso88591_waq_6_a_Qa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[576])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS), 5544};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_args, __pyx_mstate->__pyx_n_u_s, __pyx_mstate->__pyx_n_u_e_2, __pyx_mstate->__pyx_n_u_e};
    __pyx_mstate_global->__pyx_codeobj_tab[577] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_set_union, __pyx_mstate->__pyx_kp_b_iso88591_Q_WAQ_ar_4q_Qa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[577])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS), 5553};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_args, __pyx_mstate->__pyx_n_u_s, __pyx_mstate->__pyx_n_u_e_2, __pyx_mstate->__pyx_n_u_e};
    __pyx_mstate_global->__pyx_codeobj_tab[578] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_set_intersection, __pyx_mstate->__pyx_kp_b_iso88591_Q_WAQ_ar_4q_AQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[578])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5562};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_universe, __pyx_mstate->__pyx_n_u_container, __pyx_mstate->__pyx_n_u_universe_2, __pyx_mstate->__pyx_n_u_container_2, __pyx_mstate->__pyx_n_u_u, __pyx_mstate->__pyx_n_u_c};
    __pyx_mstate_global->__pyx_codeobj_tab[579] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_set_complement, __pyx_mstate->__pyx_kp_b_iso88591_C1IQ_C1Ja_4q_3a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[579])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5570};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_container, __pyx_mstate->__pyx_n_u_universe, __pyx_mstate->__pyx_n_u_container_2, __pyx_mstate->__pyx_n_u_universe_2, __pyx_mstate->__pyx_n_u_c, __pyx_mstate->__pyx_n_u_u};
    __pyx_mstate_global->__pyx_codeobj_tab[580] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_set_complement_helper, __pyx_mstate->__pyx_kp_b_iso88591_C1Ja_C1IQ_4q_A_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[580])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5578};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_sym, __pyx_mstate->__pyx_n_u_condition, __pyx_mstate->__pyx_n_u_sym_2, __pyx_mstate->__pyx_n_u_condition_2, __pyx_mstate->__pyx_n_u_c};
    __pyx_mstate_global->__pyx_codeobj_tab[581] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_conditionset, __pyx_mstate->__pyx_kp_b_iso88591_gQa_gQa_33K1JVW_4q_Zq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[581])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5585};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_sym, __pyx_mstate->__pyx_n_u_expr, __pyx_mstate->__pyx_n_u_base, __pyx_mstate->__pyx_n_u_sym_2, __pyx_mstate->__pyx_n_u_expr_2, __pyx_mstate->__pyx_n_u_base_2, __pyx_mstate->__pyx_n_u_b};
    __pyx_mstate_global->__pyx_codeobj_tab[582] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_imageset, __pyx_mstate->__pyx_kp_b_iso88591_gQa_waq_WAQ_C1E_4q_9AT_5_RS, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[582])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 8, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5600};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_f, __pyx_mstate->__pyx_n_u_sym, __pyx_mstate->__pyx_n_u_domain, __pyx_mstate->__pyx_n_u_f_2, __pyx_mstate->__pyx_n_u_sym_2, __pyx_mstate->__pyx_n_u_x, __pyx_mstate->__pyx_n_u_domain_2, __pyx_mstate->__pyx_n_u_d};
    __pyx_mstate_global->__pyx_codeobj_tab[583] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_solve, __pyx_mstate->__pyx_kp_b_iso88591_G1A_gQa_1F_22I_a_wc_t1_vQb_waq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[583])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 8, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5612};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_eqs, __pyx_mstate->__pyx_n_u_syms, __pyx_mstate->__pyx_n_u_eqs_2, __pyx_mstate->__pyx_n_u_syms_2, __pyx_mstate->__pyx_n_u_sym_2, __pyx_mstate->__pyx_n_u_B, __pyx_mstate->__pyx_n_u_sym, __pyx_mstate->__pyx_n_u_ret};
    __pyx_mstate_global->__pyx_codeobj_tab[584] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_linsolve, __pyx_mstate->__pyx_kp_b_iso88591_5Qa_q_G1A_q_Zq_uE_Ct5_l_1_IQfA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[584])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5631};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_exprs, __pyx_mstate->__pyx_n_u_vec, __pyx_mstate->__pyx_n_u_replacements, __pyx_mstate->__pyx_n_u_reduced_exprs, __pyx_mstate->__pyx_n_u_b, __pyx_mstate->__pyx_n_u_expr};
    __pyx_mstate_global->__pyx_codeobj_tab[585] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_cse, __pyx_mstate->__pyx_kp_b_iso88591_G1A_Qaq_q_A__Qa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[585])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5642};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_expr, __pyx_mstate->__pyx_n_u_mat_expr, __pyx_mstate->__pyx_n_u_basic_expr};
    __pyx_mstate_global->__pyx_codeobj_tab[586] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_latex, __pyx_mstate->__pyx_kp_b_iso88591_z_1_a_Fax___bbiijjk_WAQ_avZz, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[586])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5652};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_expr, __pyx_mstate->__pyx_n_u_basic_expr};
    __pyx_mstate_global->__pyx_codeobj_tab[587] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_unicode, __pyx_mstate->__pyx_kp_b_iso88591_HAV_Zwaq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[587])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS), 5667};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_exprs, __pyx_mstate->__pyx_n_u_vec};
    __pyx_mstate_global->__pyx_codeobj_tab[588] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_symengine_wrapper_pyx, __pyx_mstate->__pyx_n_u_count_ops, __pyx_mstate->__pyx_kp_b_iso88591_5_Jaq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[588])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_result};
    __pyx_mstate_global->__pyx_codeobj_tab[589] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_pyx_unpickle_Sieve, __pyx_mstate->__pyx_kp_b_iso88591_q_0_kQR_5_7_q_a_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[589])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_result};
    __pyx_mstate_global->__pyx_codeobj_tab[590] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tree_fragment, __pyx_mstate->__pyx_n_u_pyx_unpickle__Lambdify, __pyx_mstate->__pyx_kp_b_iso88591_q_0_kQR_9HAQ_7_1L_a_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[590])) goto bad;
  }
  Py_DECREF(tuple_dedup_map);
  return 0;
  bad:
  Py_DECREF(tuple_dedup_map);
  return -1;
}
/* #### Code section: init_globals ### */

static int __Pyx_InitGlobals(void) {
  /* PythonCompatibility.init */
  if (likely(__Pyx_init_co_variables() == 0)); else
  
  if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)

  /* AssertionsEnabled.init */
  if (likely(__Pyx_init_assertions_enabled() == 0)); else
  
  if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)

  /* CommonTypesMetaclass.init */
  if (likely(__pyx_CommonTypesMetaclass_init(__pyx_m) == 0)); else
  
  if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)

  /* CachedMethodType.init */
  #if CYTHON_COMPILING_IN_LIMITED_API
  {
      PyObject *typesModule=NULL;
      typesModule = PyImport_ImportModule("types");
      if (typesModule) {
          __pyx_mstate_global->__Pyx_CachedMethodType = PyObject_GetAttrString(typesModule, "MethodType");
          Py_DECREF(typesModule);
      }
  } // error handling follows
  #endif
  
  if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)

  /* CythonFunctionShared.init */
  if (likely(__pyx_CyFunction_init(__pyx_m) == 0)); else
  
  if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)

  /* Generator.init */
  if (likely(__pyx_Generator_init(__pyx_m) == 0)); else
  
  if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)

  return 0;
  __pyx_L1_error:;
  return -1;
}
/* #### Code section: cleanup_globals ### */
/* #### Code section: cleanup_module ### */
/* #### Code section: main_method ### */
/* #### Code section: utility_code_pragmas ### */
#ifdef _MSC_VER
#pragma warning( push )
/* Warning 4127: conditional expression is constant
 * Cython uses constant conditional expressions to allow in inline functions to be optimized at
 * compile-time, so this warning is not useful
 */
#pragma warning( disable : 4127 )
#endif



/* #### Code section: utility_code_def ### */

/* --- 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(modname);
    if (!m) goto end;
    p = PyObject_GetAttrString(m, "RefNannyAPI");
    if (!p) goto end;
    r = PyLong_AsVoidPtr(p);
end:
    Py_XDECREF(p);
    Py_XDECREF(m);
    return (__Pyx_RefNannyAPIStruct *)r;
}
#endif

/* PyErrExceptionMatches (used by PyObjectGetAttrStrNoError) */
#if CYTHON_FAST_THREAD_STATE
static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
    Py_ssize_t i, n;
    n = PyTuple_GET_SIZE(tuple);
    for (i=0; i<n; i++) {
        if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
    }
    for (i=0; i<n; i++) {
        if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
    }
    return 0;
}
static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
    int result;
    PyObject *exc_type;
#if PY_VERSION_HEX >= 0x030C00A6
    PyObject *current_exception = tstate->current_exception;
    if (unlikely(!current_exception)) return 0;
    exc_type = (PyObject*) Py_TYPE(current_exception);
    if (exc_type == err) return 1;
#else
    exc_type = tstate->curexc_type;
    if (exc_type == err) return 1;
    if (unlikely(!exc_type)) return 0;
#endif
    #if CYTHON_AVOID_BORROWED_REFS
    Py_INCREF(exc_type);
    #endif
    if (unlikely(PyTuple_Check(err))) {
        result = __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
    } else {
        result = __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
    }
    #if CYTHON_AVOID_BORROWED_REFS
    Py_DECREF(exc_type);
    #endif
    return result;
}
#endif

/* PyErrFetchRestore (used by PyObjectGetAttrStrNoError) */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
#if PY_VERSION_HEX >= 0x030C00A6
    PyObject *tmp_value;
    assert(type == NULL || (value != NULL && type == (PyObject*) Py_TYPE(value)));
    if (value) {
        #if CYTHON_COMPILING_IN_CPYTHON
        if (unlikely(((PyBaseExceptionObject*) value)->traceback != tb))
        #endif
            PyException_SetTraceback(value, tb);
    }
    tmp_value = tstate->current_exception;
    tstate->current_exception = value;
    Py_XDECREF(tmp_value);
    Py_XDECREF(type);
    Py_XDECREF(tb);
#else
    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);
#endif
}
static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
#if PY_VERSION_HEX >= 0x030C00A6
    PyObject* exc_value;
    exc_value = tstate->current_exception;
    tstate->current_exception = 0;
    *value = exc_value;
    *type = NULL;
    *tb = NULL;
    if (exc_value) {
        *type = (PyObject*) Py_TYPE(exc_value);
        Py_INCREF(*type);
        #if CYTHON_COMPILING_IN_CPYTHON
        *tb = ((PyBaseExceptionObject*) exc_value)->traceback;
        Py_XINCREF(*tb);
        #else
        *tb = PyException_GetTraceback(exc_value);
        #endif
    }
#else
    *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
}
#endif

/* PyObjectGetAttrStr (used by PyObjectGetAttrStrNoError) */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_getattro))
        return tp->tp_getattro(obj, attr_name);
    return PyObject_GetAttr(obj, attr_name);
}
#endif

/* PyObjectGetAttrStrNoError (used by GetBuiltinName) */
#if __PYX_LIMITED_VERSION_HEX < 0x030d0000
static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
        __Pyx_PyErr_Clear();
}
#endif
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) {
    PyObject *result;
#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
    (void) PyObject_GetOptionalAttr(obj, attr_name, &result);
    return result;
#else
#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) {
        return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1);
    }
#endif
    result = __Pyx_PyObject_GetAttrStr(obj, attr_name);
    if (unlikely(!result)) {
        __Pyx_PyObject_GetAttrStr_ClearAttributeError();
    }
    return result;
#endif
}

/* GetBuiltinName */
static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
    PyObject* result = __Pyx_PyObject_GetAttrStrNoError(__pyx_mstate_global->__pyx_b, name);
    if (unlikely(!result) && !PyErr_Occurred()) {
        PyErr_Format(PyExc_NameError,
            "name '%U' is not defined", name);
    }
    return result;
}

/* TupleAndListFromArray (used by fastcall) */
#if !CYTHON_COMPILING_IN_CPYTHON && CYTHON_METH_FASTCALL
static CYTHON_INLINE PyObject *
__Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n)
{
    PyObject *res;
    Py_ssize_t i;
    if (n <= 0) {
        return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_tuple);
    }
    res = PyTuple_New(n);
    if (unlikely(res == NULL)) return NULL;
    for (i = 0; i < n; i++) {
        Py_INCREF(src[i]);
        if (unlikely(__Pyx_PyTuple_SET_ITEM(res, i, src[i]) < (0))) {
            Py_DECREF(res);
            return NULL;
        }
    }
    return res;
}
#elif CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE void __Pyx_copy_object_array(PyObject *const *CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length) {
    PyObject *v;
    Py_ssize_t i;
    for (i = 0; i < length; i++) {
        v = dest[i] = src[i];
        Py_INCREF(v);
    }
}
static CYTHON_INLINE PyObject *
__Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n)
{
    PyObject *res;
    if (n <= 0) {
        return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_tuple);
    }
    res = PyTuple_New(n);
    if (unlikely(res == NULL)) return NULL;
    __Pyx_copy_object_array(src, ((PyTupleObject*)res)->ob_item, n);
    return res;
}
static CYTHON_INLINE PyObject *
__Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n)
{
    PyObject *res;
    if (n <= 0) {
        return PyList_New(0);
    }
    res = PyList_New(n);
    if (unlikely(res == NULL)) return NULL;
    __Pyx_copy_object_array(src, ((PyListObject*)res)->ob_item, n);
    return res;
}
#endif

/* BytesEquals (used by UnicodeEquals) */
static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL ||\
        !(CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS)
    return PyObject_RichCompareBool(s1, s2, equals);
#else
    if (s1 == s2) {
        return (equals == Py_EQ);
    } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
        const char *ps1, *ps2;
        Py_ssize_t length = PyBytes_GET_SIZE(s1);
        if (length != PyBytes_GET_SIZE(s2))
            return (equals == Py_NE);
        ps1 = PyBytes_AS_STRING(s1);
        ps2 = PyBytes_AS_STRING(s2);
        if (ps1[0] != ps2[0]) {
            return (equals == Py_NE);
        } else if (length == 1) {
            return (equals == Py_EQ);
        } else {
            int result;
#if CYTHON_USE_UNICODE_INTERNALS && (PY_VERSION_HEX < 0x030B0000)
            Py_hash_t hash1, hash2;
            hash1 = ((PyBytesObject*)s1)->ob_shash;
            hash2 = ((PyBytesObject*)s2)->ob_shash;
            if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
                return (equals == Py_NE);
            }
#endif
            result = memcmp(ps1, ps2, (size_t)length);
            return (equals == Py_EQ) ? (result == 0) : (result != 0);
        }
    } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
        return (equals == Py_NE);
    } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
        return (equals == Py_NE);
    } else {
        int result;
        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
        if (!py_result)
            return -1;
        result = __Pyx_PyObject_IsTrue(py_result);
        Py_DECREF(py_result);
        return result;
    }
#endif
}

/* UnicodeEquals (used by fastcall) */
static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL
    return PyObject_RichCompareBool(s1, s2, equals);
#else
    int s1_is_unicode, s2_is_unicode;
    if (s1 == s2) {
        goto return_eq;
    }
    s1_is_unicode = PyUnicode_CheckExact(s1);
    s2_is_unicode = PyUnicode_CheckExact(s2);
    if (s1_is_unicode & s2_is_unicode) {
        Py_ssize_t length, length2;
        int kind;
        void *data1, *data2;
        #if !CYTHON_COMPILING_IN_LIMITED_API
        if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
            return -1;
        #endif
        length = __Pyx_PyUnicode_GET_LENGTH(s1);
        #if !CYTHON_ASSUME_SAFE_SIZE
        if (unlikely(length < 0)) return -1;
        #endif
        length2 = __Pyx_PyUnicode_GET_LENGTH(s2);
        #if !CYTHON_ASSUME_SAFE_SIZE
        if (unlikely(length2 < 0)) return -1;
        #endif
        if (length != length2) {
            goto return_ne;
        }
#if CYTHON_USE_UNICODE_INTERNALS
        {
            Py_hash_t hash1, hash2;
            hash1 = ((PyASCIIObject*)s1)->hash;
            hash2 = ((PyASCIIObject*)s2)->hash;
            if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
                goto return_ne;
            }
        }
#endif
        kind = __Pyx_PyUnicode_KIND(s1);
        if (kind != __Pyx_PyUnicode_KIND(s2)) {
            goto return_ne;
        }
        data1 = __Pyx_PyUnicode_DATA(s1);
        data2 = __Pyx_PyUnicode_DATA(s2);
        if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
            goto return_ne;
        } else if (length == 1) {
            goto return_eq;
        } else {
            int result = memcmp(data1, data2, (size_t)(length * kind));
            return (equals == Py_EQ) ? (result == 0) : (result != 0);
        }
    } else if ((s1 == Py_None) & s2_is_unicode) {
        goto return_ne;
    } else if ((s2 == Py_None) & s1_is_unicode) {
        goto return_ne;
    } else {
        int result;
        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
        if (!py_result)
            return -1;
        result = __Pyx_PyObject_IsTrue(py_result);
        Py_DECREF(py_result);
        return result;
    }
return_eq:
    return (equals == Py_EQ);
return_ne:
    return (equals == Py_NE);
#endif
}

/* fastcall */
#if CYTHON_METH_FASTCALL
static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s)
{
    Py_ssize_t i, n = __Pyx_PyTuple_GET_SIZE(kwnames);
    #if !CYTHON_ASSUME_SAFE_SIZE
    if (unlikely(n == -1)) return NULL;
    #endif
    for (i = 0; i < n; i++)
    {
        PyObject *namei = __Pyx_PyTuple_GET_ITEM(kwnames, i);
        #if !CYTHON_ASSUME_SAFE_MACROS
        if (unlikely(!namei)) return NULL;
        #endif
        if (s == namei) return kwvalues[i];
    }
    for (i = 0; i < n; i++)
    {
        PyObject *namei = __Pyx_PyTuple_GET_ITEM(kwnames, i);
        #if !CYTHON_ASSUME_SAFE_MACROS
        if (unlikely(!namei)) return NULL;
        #endif
        int eq = __Pyx_PyUnicode_Equals(s, namei, Py_EQ);
        if (unlikely(eq != 0)) {
            if (unlikely(eq < 0)) return NULL;
            return kwvalues[i];
        }
    }
    return NULL;
}
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API
CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues) {
    Py_ssize_t i, nkwargs;
    PyObject *dict;
#if !CYTHON_ASSUME_SAFE_SIZE
    nkwargs = PyTuple_Size(kwnames);
    if (unlikely(nkwargs < 0)) return NULL;
#else
    nkwargs = PyTuple_GET_SIZE(kwnames);
#endif
    dict = PyDict_New();
    if (unlikely(!dict))
        return NULL;
    for (i=0; i<nkwargs; i++) {
#if !CYTHON_ASSUME_SAFE_MACROS
        PyObject *key = PyTuple_GetItem(kwnames, i);
        if (!key) goto bad;
#else
        PyObject *key = PyTuple_GET_ITEM(kwnames, i);
#endif
        if (unlikely(PyDict_SetItem(dict, key, kwvalues[i]) < 0))
            goto bad;
    }
    return dict;
bad:
    Py_DECREF(dict);
    return NULL;
}
#endif
#endif

/* PyObjectCall (used by PyObjectFastCall) */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    PyObject *result;
    ternaryfunc call = Py_TYPE(func)->tp_call;
    if (unlikely(!call))
        return PyObject_Call(func, arg, kw);
    if (unlikely(Py_EnterRecursiveCall(" 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 (used by PyObjectFastCall) */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
    PyObject *self, *result;
    PyCFunction cfunc;
    cfunc = __Pyx_CyOrPyCFunction_GET_FUNCTION(func);
    self = __Pyx_CyOrPyCFunction_GET_SELF(func);
    if (unlikely(Py_EnterRecursiveCall(" 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

/* PyObjectFastCall (used by PyObjectCallOneArg) */
#if PY_VERSION_HEX < 0x03090000 || CYTHON_COMPILING_IN_LIMITED_API
static PyObject* __Pyx_PyObject_FastCall_fallback(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs) {
    PyObject *argstuple;
    PyObject *result = 0;
    size_t i;
    argstuple = PyTuple_New((Py_ssize_t)nargs);
    if (unlikely(!argstuple)) return NULL;
    for (i = 0; i < nargs; i++) {
        Py_INCREF(args[i]);
        if (__Pyx_PyTuple_SET_ITEM(argstuple, (Py_ssize_t)i, args[i]) != (0)) goto bad;
    }
    result = __Pyx_PyObject_Call(func, argstuple, kwargs);
  bad:
    Py_DECREF(argstuple);
    return result;
}
#endif
#if CYTHON_VECTORCALL && !CYTHON_COMPILING_IN_LIMITED_API
  #if PY_VERSION_HEX < 0x03090000
    #define __Pyx_PyVectorcall_Function(callable) _PyVectorcall_Function(callable)
  #elif CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE vectorcallfunc __Pyx_PyVectorcall_Function(PyObject *callable) {
    PyTypeObject *tp = Py_TYPE(callable);
    #if defined(__Pyx_CyFunction_USED)
    if (__Pyx_CyFunction_CheckExact(callable)) {
        return __Pyx_CyFunction_func_vectorcall(callable);
    }
    #endif
    if (!PyType_HasFeature(tp, Py_TPFLAGS_HAVE_VECTORCALL)) {
        return NULL;
    }
    assert(PyCallable_Check(callable));
    Py_ssize_t offset = tp->tp_vectorcall_offset;
    assert(offset > 0);
    vectorcallfunc ptr;
    memcpy(&ptr, (char *) callable + offset, sizeof(ptr));
    return ptr;
}
  #else
    #define __Pyx_PyVectorcall_Function(callable) PyVectorcall_Function(callable)
  #endif
#endif
static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject *const *args, size_t _nargs, PyObject *kwargs) {
    Py_ssize_t nargs = __Pyx_PyVectorcall_NARGS(_nargs);
#if CYTHON_COMPILING_IN_CPYTHON
    if (nargs == 0 && kwargs == NULL) {
        if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_NOARGS))
            return __Pyx_PyObject_CallMethO(func, NULL);
    }
    else if (nargs == 1 && kwargs == NULL) {
        if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_O))
            return __Pyx_PyObject_CallMethO(func, args[0]);
    }
#endif
    if (kwargs == NULL) {
        #if CYTHON_VECTORCALL
          #if CYTHON_COMPILING_IN_LIMITED_API
            return PyObject_Vectorcall(func, args, _nargs, NULL);
          #else
            vectorcallfunc f = __Pyx_PyVectorcall_Function(func);
            if (f) {
                return f(func, args, _nargs, NULL);
            }
          #endif
        #endif
    }
    if (nargs == 0) {
        return __Pyx_PyObject_Call(func, __pyx_mstate_global->__pyx_empty_tuple, kwargs);
    }
    #if PY_VERSION_HEX >= 0x03090000 && !CYTHON_COMPILING_IN_LIMITED_API
    return PyObject_VectorcallDict(func, args, (size_t)nargs, kwargs);
    #else
    return __Pyx_PyObject_FastCall_fallback(func, args, (size_t)nargs, kwargs);
    #endif
}

/* PyObjectCallOneArg (used by CallUnboundCMethod0) */
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
    PyObject *args[2] = {NULL, arg};
    return __Pyx_PyObject_FastCall(func, args+1, 1 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
}

/* UnpackUnboundCMethod (used by CallUnboundCMethod0) */
#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030C0000
static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *args, PyObject *kwargs) {
    PyObject *result;
    PyObject *selfless_args = PyTuple_GetSlice(args, 1, PyTuple_Size(args));
    if (unlikely(!selfless_args)) return NULL;
    result = PyObject_Call(method, selfless_args, kwargs);
    Py_DECREF(selfless_args);
    return result;
}
#elif CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03090000
static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject **args, Py_ssize_t nargs, PyObject *kwnames) {
        return _PyObject_Vectorcall
            (method, args ? args+1 : NULL, nargs ? nargs-1 : 0, kwnames);
}
#else
static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) {
    return
#if PY_VERSION_HEX < 0x03090000
    _PyObject_Vectorcall
#else
    PyObject_Vectorcall
#endif
        (method, args ? args+1 : NULL, nargs ? (size_t) nargs-1 : 0, kwnames);
}
#endif
static PyMethodDef __Pyx_UnboundCMethod_Def = {
     "CythonUnboundCMethod",
     __PYX_REINTERPRET_FUNCION(PyCFunction, __Pyx_SelflessCall),
#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030C0000
     METH_VARARGS | METH_KEYWORDS,
#else
     METH_FASTCALL | METH_KEYWORDS,
#endif
     NULL
};
static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) {
    PyObject *method, *result=NULL;
    method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name);
    if (unlikely(!method))
        return -1;
    result = method;
#if CYTHON_COMPILING_IN_CPYTHON
    if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type)))
    {
        PyMethodDescrObject *descr = (PyMethodDescrObject*) method;
        target->func = descr->d_method->ml_meth;
        target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_STACKLESS);
    } else
#endif
#if CYTHON_COMPILING_IN_PYPY
#else
    if (PyCFunction_Check(method))
#endif
    {
        PyObject *self;
        int self_found;
#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY
        self = PyObject_GetAttrString(method, "__self__");
        if (!self) {
            PyErr_Clear();
        }
#else
        self = PyCFunction_GET_SELF(method);
#endif
        self_found = (self && self != Py_None);
#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY
        Py_XDECREF(self);
#endif
        if (self_found) {
            PyObject *unbound_method = PyCFunction_New(&__Pyx_UnboundCMethod_Def, method);
            if (unlikely(!unbound_method)) return -1;
            Py_DECREF(method);
            result = unbound_method;
        }
    }
#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    if (unlikely(target->method)) {
        Py_DECREF(result);
    } else
#endif
    target->method = result;
    return 0;
}

/* CallUnboundCMethod0 */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) {
    int was_initialized = __Pyx_CachedCFunction_GetAndSetInitializing(cfunc);
    if (likely(was_initialized == 2 && cfunc->func)) {
        if (likely(cfunc->flag == METH_NOARGS))
            return __Pyx_CallCFunction(cfunc, self, NULL);
        if (likely(cfunc->flag == METH_FASTCALL))
            return __Pyx_CallCFunctionFast(cfunc, self, NULL, 0);
        if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS))
            return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, NULL, 0, NULL);
        if (likely(cfunc->flag == (METH_VARARGS | METH_KEYWORDS)))
            return __Pyx_CallCFunctionWithKeywords(cfunc, self, __pyx_mstate_global->__pyx_empty_tuple, NULL);
        if (cfunc->flag == METH_VARARGS)
            return __Pyx_CallCFunction(cfunc, self, __pyx_mstate_global->__pyx_empty_tuple);
        return __Pyx__CallUnboundCMethod0(cfunc, self);
    }
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    else if (unlikely(was_initialized == 1)) {
        __Pyx_CachedCFunction tmp_cfunc = {
#ifndef __cplusplus
            0
#endif
        };
        tmp_cfunc.type = cfunc->type;
        tmp_cfunc.method_name = cfunc->method_name;
        return __Pyx__CallUnboundCMethod0(&tmp_cfunc, self);
    }
#endif
    PyObject *result = __Pyx__CallUnboundCMethod0(cfunc, self);
    __Pyx_CachedCFunction_SetFinishedInitializing(cfunc);
    return result;
}
#endif
static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) {
    PyObject *result;
    if (unlikely(!cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
    result = __Pyx_PyObject_CallOneArg(cfunc->method, self);
    return result;
}

/* py_dict_items (used by OwnedDictNext) */
static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d) {
    return __Pyx_CallUnboundCMethod0(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_items, d);
}

/* py_dict_values (used by OwnedDictNext) */
static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d) {
    return __Pyx_CallUnboundCMethod0(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_values, d);
}

/* OwnedDictNext (used by ParseKeywordsImpl) */
#if CYTHON_AVOID_BORROWED_REFS
static int __Pyx_PyDict_NextRef(PyObject *p, PyObject **ppos, PyObject **pkey, PyObject **pvalue) {
    PyObject *next = NULL;
    if (!*ppos) {
        if (pvalue) {
            PyObject *dictview = pkey ? __Pyx_PyDict_Items(p) : __Pyx_PyDict_Values(p);
            if (unlikely(!dictview)) goto bad;
            *ppos = PyObject_GetIter(dictview);
            Py_DECREF(dictview);
        } else {
            *ppos = PyObject_GetIter(p);
        }
        if (unlikely(!*ppos)) goto bad;
    }
    next = PyIter_Next(*ppos);
    if (!next) {
        if (PyErr_Occurred()) goto bad;
        return 0;
    }
    if (pkey && pvalue) {
        *pkey = __Pyx_PySequence_ITEM(next, 0);
        if (unlikely(*pkey)) goto bad;
        *pvalue = __Pyx_PySequence_ITEM(next, 1);
        if (unlikely(*pvalue)) goto bad;
        Py_DECREF(next);
    } else if (pkey) {
        *pkey = next;
    } else {
        assert(pvalue);
        *pvalue = next;
    }
    return 1;
  bad:
    Py_XDECREF(next);
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000
    PyErr_FormatUnraisable("Exception ignored in __Pyx_PyDict_NextRef");
#else
    PyErr_WriteUnraisable(__pyx_mstate_global->__pyx_n_u_Pyx_PyDict_NextRef);
#endif
    if (pkey) *pkey = NULL;
    if (pvalue) *pvalue = NULL;
    return 0;
}
#else // !CYTHON_AVOID_BORROWED_REFS
static int __Pyx_PyDict_NextRef(PyObject *p, Py_ssize_t *ppos, PyObject **pkey, PyObject **pvalue) {
    int result = PyDict_Next(p, ppos, pkey, pvalue);
    if (likely(result == 1)) {
        if (pkey) Py_INCREF(*pkey);
        if (pvalue) Py_INCREF(*pvalue);
    }
    return result;
}
#endif

/* RaiseDoubleKeywords (used by ParseKeywordsImpl) */
static void __Pyx_RaiseDoubleKeywordsError(
    const char* func_name,
    PyObject* kw_name)
{
    PyErr_Format(PyExc_TypeError,
        "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
}

/* CallUnboundCMethod2 */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2) {
    int was_initialized = __Pyx_CachedCFunction_GetAndSetInitializing(cfunc);
    if (likely(was_initialized == 2 && cfunc->func)) {
        PyObject *args[2] = {arg1, arg2};
        if (cfunc->flag == METH_FASTCALL) {
            return __Pyx_CallCFunctionFast(cfunc, self, args, 2);
        }
        if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS))
            return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, args, 2, NULL);
    }
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    else if (unlikely(was_initialized == 1)) {
        __Pyx_CachedCFunction tmp_cfunc = {
#ifndef __cplusplus
            0
#endif
        };
        tmp_cfunc.type = cfunc->type;
        tmp_cfunc.method_name = cfunc->method_name;
        return __Pyx__CallUnboundCMethod2(&tmp_cfunc, self, arg1, arg2);
    }
#endif
    PyObject *result = __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2);
    __Pyx_CachedCFunction_SetFinishedInitializing(cfunc);
    return result;
}
#endif
static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2){
    if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
#if CYTHON_COMPILING_IN_CPYTHON
    if (cfunc->func && (cfunc->flag & METH_VARARGS)) {
        PyObject *result = NULL;
        PyObject *args = PyTuple_New(2);
        if (unlikely(!args)) return NULL;
        Py_INCREF(arg1);
        PyTuple_SET_ITEM(args, 0, arg1);
        Py_INCREF(arg2);
        PyTuple_SET_ITEM(args, 1, arg2);
        if (cfunc->flag & METH_KEYWORDS)
            result = __Pyx_CallCFunctionWithKeywords(cfunc, self, args, NULL);
        else
            result = __Pyx_CallCFunction(cfunc, self, args);
        Py_DECREF(args);
        return result;
    }
#endif
    {
        PyObject *args[4] = {NULL, self, arg1, arg2};
        return __Pyx_PyObject_FastCall(cfunc->method, args+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
    }
}

/* ParseKeywordsImpl (used by ParseKeywords) */
static int __Pyx_ValidateDuplicatePosArgs(
    PyObject *kwds,
    PyObject ** const argnames[],
    PyObject ** const *first_kw_arg,
    const char* function_name)
{
    PyObject ** const *name = argnames;
    while (name != first_kw_arg) {
        PyObject *key = **name;
        int found = PyDict_Contains(kwds, key);
        if (unlikely(found)) {
            if (found == 1) __Pyx_RaiseDoubleKeywordsError(function_name, key);
            goto bad;
        }
        name++;
    }
    return 0;
bad:
    return -1;
}
#if CYTHON_USE_UNICODE_INTERNALS
static CYTHON_INLINE int __Pyx_UnicodeKeywordsEqual(PyObject *s1, PyObject *s2) {
    int kind;
    Py_ssize_t len = PyUnicode_GET_LENGTH(s1);
    if (len != PyUnicode_GET_LENGTH(s2)) return 0;
    kind = PyUnicode_KIND(s1);
    if (kind != PyUnicode_KIND(s2)) return 0;
    const void *data1 = PyUnicode_DATA(s1);
    const void *data2 = PyUnicode_DATA(s2);
    return (memcmp(data1, data2, (size_t) len * (size_t) kind) == 0);
}
#endif
static int __Pyx_MatchKeywordArg_str(
    PyObject *key,
    PyObject ** const argnames[],
    PyObject ** const *first_kw_arg,
    size_t *index_found,
    const char *function_name)
{
    PyObject ** const *name;
    #if CYTHON_USE_UNICODE_INTERNALS
    Py_hash_t key_hash = ((PyASCIIObject*)key)->hash;
    if (unlikely(key_hash == -1)) {
        key_hash = PyObject_Hash(key);
        if (unlikely(key_hash == -1))
            goto bad;
    }
    #endif
    name = first_kw_arg;
    while (*name) {
        PyObject *name_str = **name;
        #if CYTHON_USE_UNICODE_INTERNALS
        if (key_hash == ((PyASCIIObject*)name_str)->hash && __Pyx_UnicodeKeywordsEqual(name_str, key)) {
            *index_found = (size_t) (name - argnames);
            return 1;
        }
        #else
        #if CYTHON_ASSUME_SAFE_SIZE
        if (PyUnicode_GET_LENGTH(name_str) == PyUnicode_GET_LENGTH(key))
        #endif
        {
            int cmp = PyUnicode_Compare(name_str, key);
            if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
            if (cmp == 0) {
                *index_found = (size_t) (name - argnames);
                return 1;
            }
        }
        #endif
        name++;
    }
    name = argnames;
    while (name != first_kw_arg) {
        PyObject *name_str = **name;
        #if CYTHON_USE_UNICODE_INTERNALS
        if (unlikely(key_hash == ((PyASCIIObject*)name_str)->hash)) {
            if (__Pyx_UnicodeKeywordsEqual(name_str, key))
                goto arg_passed_twice;
        }
        #else
        #if CYTHON_ASSUME_SAFE_SIZE
        if (PyUnicode_GET_LENGTH(name_str) == PyUnicode_GET_LENGTH(key))
        #endif
        {
            if (unlikely(name_str == key)) goto arg_passed_twice;
            int cmp = PyUnicode_Compare(name_str, key);
            if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
            if (cmp == 0) goto arg_passed_twice;
        }
        #endif
        name++;
    }
    return 0;
arg_passed_twice:
    __Pyx_RaiseDoubleKeywordsError(function_name, key);
    goto bad;
bad:
    return -1;
}
static int __Pyx_MatchKeywordArg_nostr(
    PyObject *key,
    PyObject ** const argnames[],
    PyObject ** const *first_kw_arg,
    size_t *index_found,
    const char *function_name)
{
    PyObject ** const *name;
    if (unlikely(!PyUnicode_Check(key))) goto invalid_keyword_type;
    name = first_kw_arg;
    while (*name) {
        int cmp = PyObject_RichCompareBool(**name, key, Py_EQ);
        if (cmp == 1) {
            *index_found = (size_t) (name - argnames);
            return 1;
        }
        if (unlikely(cmp == -1)) goto bad;
        name++;
    }
    name = argnames;
    while (name != first_kw_arg) {
        int cmp = PyObject_RichCompareBool(**name, key, Py_EQ);
        if (unlikely(cmp != 0)) {
            if (cmp == 1) goto arg_passed_twice;
            else goto bad;
        }
        name++;
    }
    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;
bad:
    return -1;
}
static CYTHON_INLINE int __Pyx_MatchKeywordArg(
    PyObject *key,
    PyObject ** const argnames[],
    PyObject ** const *first_kw_arg,
    size_t *index_found,
    const char *function_name)
{
    return likely(PyUnicode_CheckExact(key)) ?
        __Pyx_MatchKeywordArg_str(key, argnames, first_kw_arg, index_found, function_name) :
        __Pyx_MatchKeywordArg_nostr(key, argnames, first_kw_arg, index_found, function_name);
}
static void __Pyx_RejectUnknownKeyword(
    PyObject *kwds,
    PyObject ** const argnames[],
    PyObject ** const *first_kw_arg,
    const char *function_name)
{
    #if CYTHON_AVOID_BORROWED_REFS
    PyObject *pos = NULL;
    #else
    Py_ssize_t pos = 0;
    #endif
    PyObject *key = NULL;
    __Pyx_BEGIN_CRITICAL_SECTION(kwds);
    while (
        #if CYTHON_AVOID_BORROWED_REFS
        __Pyx_PyDict_NextRef(kwds, &pos, &key, NULL)
        #else
        PyDict_Next(kwds, &pos, &key, NULL)
        #endif
    ) {
        PyObject** const *name = first_kw_arg;
        while (*name && (**name != key)) name++;
        if (!*name) {
            size_t index_found = 0;
            int cmp = __Pyx_MatchKeywordArg(key, argnames, first_kw_arg, &index_found, function_name);
            if (cmp != 1) {
                if (cmp == 0) {
                    PyErr_Format(PyExc_TypeError,
                        "%s() got an unexpected keyword argument '%U'",
                        function_name, key);
                }
                #if CYTHON_AVOID_BORROWED_REFS
                Py_DECREF(key);
                #endif
                break;
            }
        }
        #if CYTHON_AVOID_BORROWED_REFS
        Py_DECREF(key);
        #endif
    }
    __Pyx_END_CRITICAL_SECTION();
    #if CYTHON_AVOID_BORROWED_REFS
    Py_XDECREF(pos);
    #endif
    assert(PyErr_Occurred());
}
static int __Pyx_ParseKeywordDict(
    PyObject *kwds,
    PyObject ** const argnames[],
    PyObject *values[],
    Py_ssize_t num_pos_args,
    Py_ssize_t num_kwargs,
    const char* function_name,
    int ignore_unknown_kwargs)
{
    PyObject** const *name;
    PyObject** const *first_kw_arg = argnames + num_pos_args;
    Py_ssize_t extracted = 0;
#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments)
    if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return -1;
#endif
    name = first_kw_arg;
    while (*name && num_kwargs > extracted) {
        PyObject * key = **name;
        PyObject *value;
        int found = 0;
        #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
        found = PyDict_GetItemRef(kwds, key, &value);
        #else
        value = PyDict_GetItemWithError(kwds, key);
        if (value) {
            Py_INCREF(value);
            found = 1;
        } else {
            if (unlikely(PyErr_Occurred())) goto bad;
        }
        #endif
        if (found) {
            if (unlikely(found < 0)) goto bad;
            values[name-argnames] = value;
            extracted++;
        }
        name++;
    }
    if (num_kwargs > extracted) {
        if (ignore_unknown_kwargs) {
            if (unlikely(__Pyx_ValidateDuplicatePosArgs(kwds, argnames, first_kw_arg, function_name) == -1))
                goto bad;
        } else {
            __Pyx_RejectUnknownKeyword(kwds, argnames, first_kw_arg, function_name);
            goto bad;
        }
    }
    return 0;
bad:
    return -1;
}
static int __Pyx_ParseKeywordDictToDict(
    PyObject *kwds,
    PyObject ** const argnames[],
    PyObject *kwds2,
    PyObject *values[],
    Py_ssize_t num_pos_args,
    const char* function_name)
{
    PyObject** const *name;
    PyObject** const *first_kw_arg = argnames + num_pos_args;
    Py_ssize_t len;
#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments)
    if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return -1;
#endif
    if (PyDict_Update(kwds2, kwds) < 0) goto bad;
    name = first_kw_arg;
    while (*name) {
        PyObject *key = **name;
        PyObject *value;
#if !CYTHON_COMPILING_IN_LIMITED_API && (PY_VERSION_HEX >= 0x030d00A2 || defined(PyDict_Pop))
        int found = PyDict_Pop(kwds2, key, &value);
        if (found) {
            if (unlikely(found < 0)) goto bad;
            values[name-argnames] = value;
        }
#elif __PYX_LIMITED_VERSION_HEX >= 0x030d0000
        int found = PyDict_GetItemRef(kwds2, key, &value);
        if (found) {
            if (unlikely(found < 0)) goto bad;
            values[name-argnames] = value;
            if (unlikely(PyDict_DelItem(kwds2, key) < 0)) goto bad;
        }
#else
    #if CYTHON_COMPILING_IN_CPYTHON
        value = _PyDict_Pop(kwds2, key, kwds2);
    #else
        value = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_pop, kwds2, key, kwds2);
    #endif
        if (value == kwds2) {
            Py_DECREF(value);
        } else {
            if (unlikely(!value)) goto bad;
            values[name-argnames] = value;
        }
#endif
        name++;
    }
    len = PyDict_Size(kwds2);
    if (len > 0) {
        return __Pyx_ValidateDuplicatePosArgs(kwds, argnames, first_kw_arg, function_name);
    } else if (unlikely(len == -1)) {
        goto bad;
    }
    return 0;
bad:
    return -1;
}
static int __Pyx_ParseKeywordsTuple(
    PyObject *kwds,
    PyObject * const *kwvalues,
    PyObject ** const argnames[],
    PyObject *kwds2,
    PyObject *values[],
    Py_ssize_t num_pos_args,
    Py_ssize_t num_kwargs,
    const char* function_name,
    int ignore_unknown_kwargs)
{
    PyObject *key = NULL;
    PyObject** const * name;
    PyObject** const *first_kw_arg = argnames + num_pos_args;
    for (Py_ssize_t pos = 0; pos < num_kwargs; pos++) {
#if CYTHON_AVOID_BORROWED_REFS
        key = __Pyx_PySequence_ITEM(kwds, pos);
#else
        key = __Pyx_PyTuple_GET_ITEM(kwds, pos);
#endif
#if !CYTHON_ASSUME_SAFE_MACROS
        if (unlikely(!key)) goto bad;
#endif
        name = first_kw_arg;
        while (*name && (**name != key)) name++;
        if (*name) {
            PyObject *value = kwvalues[pos];
            values[name-argnames] = __Pyx_NewRef(value);
        } else {
            size_t index_found = 0;
            int cmp = __Pyx_MatchKeywordArg(key, argnames, first_kw_arg, &index_found, function_name);
            if (cmp == 1) {
                PyObject *value = kwvalues[pos];
                values[index_found] = __Pyx_NewRef(value);
            } else {
                if (unlikely(cmp == -1)) goto bad;
                if (kwds2) {
                    PyObject *value = kwvalues[pos];
                    if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
                } else if (!ignore_unknown_kwargs) {
                    goto invalid_keyword;
                }
            }
        }
        #if CYTHON_AVOID_BORROWED_REFS
        Py_DECREF(key);
        key = NULL;
        #endif
    }
    return 0;
invalid_keyword:
    PyErr_Format(PyExc_TypeError,
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    goto bad;
bad:
    #if CYTHON_AVOID_BORROWED_REFS
    Py_XDECREF(key);
    #endif
    return -1;
}

/* ParseKeywords */
static int __Pyx_ParseKeywords(
    PyObject *kwds,
    PyObject * const *kwvalues,
    PyObject ** const argnames[],
    PyObject *kwds2,
    PyObject *values[],
    Py_ssize_t num_pos_args,
    Py_ssize_t num_kwargs,
    const char* function_name,
    int ignore_unknown_kwargs)
{
    if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds)))
        return __Pyx_ParseKeywordsTuple(kwds, kwvalues, argnames, kwds2, values, num_pos_args, num_kwargs, function_name, ignore_unknown_kwargs);
    else if (kwds2)
        return __Pyx_ParseKeywordDictToDict(kwds, argnames, kwds2, values, num_pos_args, function_name);
    else
        return __Pyx_ParseKeywordDict(kwds, argnames, values, num_pos_args, num_kwargs, function_name, ignore_unknown_kwargs);
}

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

/* ArgTypeTestFunc (used by ArgTypeTest) */
static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact)
{
    __Pyx_TypeName type_name;
    __Pyx_TypeName obj_type_name;
    PyObject *extra_info = __pyx_mstate_global->__pyx_empty_unicode;
    int from_annotation_subclass = 0;
    if (unlikely(!type)) {
        PyErr_SetString(PyExc_SystemError, "Missing type object");
        return 0;
    }
    else if (!exact) {
        if (likely(__Pyx_TypeCheck(obj, type))) return 1;
    } else if (exact == 2) {
        if (__Pyx_TypeCheck(obj, type)) {
            from_annotation_subclass = 1;
            extra_info = __pyx_mstate_global->__pyx_kp_u_Note_that_Cython_is_deliberately;
        }
    }
    type_name = __Pyx_PyType_GetFullyQualifiedName(type);
    obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj));
    PyErr_Format(PyExc_TypeError,
        "Argument '%.200s' has incorrect type (expected " __Pyx_FMT_TYPENAME
        ", got " __Pyx_FMT_TYPENAME ")"
#if __PYX_LIMITED_VERSION_HEX < 0x030C0000
        "%s%U"
#endif
        , name, type_name, obj_type_name
#if __PYX_LIMITED_VERSION_HEX < 0x030C0000
        , (from_annotation_subclass ? ". " : ""), extra_info
#endif
        );
#if __PYX_LIMITED_VERSION_HEX >= 0x030C0000
    if (exact == 2 && from_annotation_subclass) {
        PyObject *res;
        PyObject *vargs[2];
        vargs[0] = PyErr_GetRaisedException();
        vargs[1] = extra_info;
        res = PyObject_VectorcallMethod(__pyx_mstate_global->__pyx_kp_u_add_note, vargs, 2, NULL);
        Py_XDECREF(res);
        PyErr_SetRaisedException(vargs[0]);
    }
#endif
    __Pyx_DECREF_TypeName(type_name);
    __Pyx_DECREF_TypeName(obj_type_name);
    return 0;
}

/* RaiseException */
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
    PyObject* owned_instance = NULL;
    if (tb == Py_None) {
        tb = 0;
    } else if (tb && !PyTraceBack_Check(tb)) {
        PyErr_SetString(PyExc_TypeError,
            "raise: arg 3 must be a traceback or None");
        goto bad;
    }
    if (value == Py_None)
        value = 0;
    if (PyExceptionInstance_Check(type)) {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto bad;
        }
        value = type;
        type = (PyObject*) Py_TYPE(value);
    } else if (PyExceptionClass_Check(type)) {
        PyObject *instance_class = NULL;
        if (value && PyExceptionInstance_Check(value)) {
            instance_class = (PyObject*) Py_TYPE(value);
            if (instance_class != type) {
                int is_subclass = PyObject_IsSubclass(instance_class, type);
                if (!is_subclass) {
                    instance_class = NULL;
                } else if (unlikely(is_subclass == -1)) {
                    goto bad;
                } else {
                    type = instance_class;
                }
            }
        }
        if (!instance_class) {
            PyObject *args;
            if (!value)
                args = PyTuple_New(0);
            else if (PyTuple_Check(value)) {
                Py_INCREF(value);
                args = value;
            } else
                args = PyTuple_Pack(1, value);
            if (!args)
                goto bad;
            owned_instance = PyObject_Call(type, args, NULL);
            Py_DECREF(args);
            if (!owned_instance)
                goto bad;
            value = owned_instance;
            if (!PyExceptionInstance_Check(value)) {
                PyErr_Format(PyExc_TypeError,
                             "calling %R should have returned an instance of "
                             "BaseException, not %R",
                             type, Py_TYPE(value));
                goto bad;
            }
        }
    } else {
        PyErr_SetString(PyExc_TypeError,
            "raise: exception class must be a subclass of BaseException");
        goto bad;
    }
    if (cause) {
        PyObject *fixed_cause;
        if (cause == Py_None) {
            fixed_cause = NULL;
        } else if (PyExceptionClass_Check(cause)) {
            fixed_cause = PyObject_CallObject(cause, NULL);
            if (fixed_cause == NULL)
                goto bad;
        } else if (PyExceptionInstance_Check(cause)) {
            fixed_cause = cause;
            Py_INCREF(fixed_cause);
        } else {
            PyErr_SetString(PyExc_TypeError,
                            "exception causes must derive from "
                            "BaseException");
            goto bad;
        }
        PyException_SetCause(value, fixed_cause);
    }
    PyErr_SetObject(type, value);
    if (tb) {
#if PY_VERSION_HEX >= 0x030C00A6
        PyException_SetTraceback(value, tb);
#elif CYTHON_FAST_THREAD_STATE
        PyThreadState *tstate = __Pyx_PyThreadState_Current;
        PyObject* tmp_tb = tstate->curexc_traceback;
        if (tb != tmp_tb) {
            Py_INCREF(tb);
            tstate->curexc_traceback = tb;
            Py_XDECREF(tmp_tb);
        }
#else
        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);
#endif
    }
bad:
    Py_XDECREF(owned_instance);
    return;
}

/* PyObjectFastCallMethod */
#if !CYTHON_VECTORCALL || PY_VERSION_HEX < 0x03090000
static PyObject *__Pyx_PyObject_FastCallMethod(PyObject *name, PyObject *const *args, size_t nargsf) {
    PyObject *result;
    PyObject *attr = PyObject_GetAttr(args[0], name);
    if (unlikely(!attr))
        return NULL;
    result = __Pyx_PyObject_FastCall(attr, args+1, nargsf - 1);
    Py_DECREF(attr);
    return result;
}
#endif

/* RaiseUnexpectedTypeError */
static int
__Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj)
{
    __Pyx_TypeName obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj));
    PyErr_Format(PyExc_TypeError, "Expected %s, got " __Pyx_FMT_TYPENAME,
                 expected, obj_type_name);
    __Pyx_DECREF_TypeName(obj_type_name);
    return 0;
}

/* CIntToDigits (used by CIntToPyUnicode) */
static const char DIGIT_PAIRS_10[2*10*10+1] = {
    "00010203040506070809"
    "10111213141516171819"
    "20212223242526272829"
    "30313233343536373839"
    "40414243444546474849"
    "50515253545556575859"
    "60616263646566676869"
    "70717273747576777879"
    "80818283848586878889"
    "90919293949596979899"
};
static const char DIGIT_PAIRS_8[2*8*8+1] = {
    "0001020304050607"
    "1011121314151617"
    "2021222324252627"
    "3031323334353637"
    "4041424344454647"
    "5051525354555657"
    "6061626364656667"
    "7071727374757677"
};
static const char DIGITS_HEX[2*16+1] = {
    "0123456789abcdef"
    "0123456789ABCDEF"
};

/* BuildPyUnicode (used by COrdinalToPyUnicode) */
static PyObject* __Pyx_PyUnicode_BuildFromAscii(Py_ssize_t ulength, const char* chars, int clength,
                                                int prepend_sign, char padding_char) {
    PyObject *uval;
    Py_ssize_t uoffset = ulength - clength;
#if CYTHON_USE_UNICODE_INTERNALS
    Py_ssize_t i;
    void *udata;
    uval = PyUnicode_New(ulength, 127);
    if (unlikely(!uval)) return NULL;
    udata = PyUnicode_DATA(uval);
    if (uoffset > 0) {
        i = 0;
        if (prepend_sign) {
            __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, 0, '-');
            i++;
        }
        for (; i < uoffset; i++) {
            __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, i, padding_char);
        }
    }
    for (i=0; i < clength; i++) {
        __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, uoffset+i, chars[i]);
    }
#else
    {
        PyObject *sign = NULL, *padding = NULL;
        uval = NULL;
        if (uoffset > 0) {
            prepend_sign = !!prepend_sign;
            if (uoffset > prepend_sign) {
                padding = PyUnicode_FromOrdinal(padding_char);
                if (likely(padding) && uoffset > prepend_sign + 1) {
                    PyObject *tmp = PySequence_Repeat(padding, uoffset - prepend_sign);
                    Py_DECREF(padding);
                    padding = tmp;
                }
                if (unlikely(!padding)) goto done_or_error;
            }
            if (prepend_sign) {
                sign = PyUnicode_FromOrdinal('-');
                if (unlikely(!sign)) goto done_or_error;
            }
        }
        uval = PyUnicode_DecodeASCII(chars, clength, NULL);
        if (likely(uval) && padding) {
            PyObject *tmp = PyUnicode_Concat(padding, uval);
            Py_DECREF(uval);
            uval = tmp;
        }
        if (likely(uval) && sign) {
            PyObject *tmp = PyUnicode_Concat(sign, uval);
            Py_DECREF(uval);
            uval = tmp;
        }
done_or_error:
        Py_XDECREF(padding);
        Py_XDECREF(sign);
    }
#endif
    return uval;
}

/* COrdinalToPyUnicode (used by CIntToPyUnicode) */
static CYTHON_INLINE int __Pyx_CheckUnicodeValue(int value) {
    return value <= 1114111;
}
static PyObject* __Pyx_PyUnicode_FromOrdinal_Padded(int value, Py_ssize_t ulength, char padding_char) {
    Py_ssize_t padding_length = ulength - 1;
    if (likely((padding_length <= 250) && (value < 0xD800 || value > 0xDFFF))) {
        char chars[256];
        if (value <= 255) {
            memset(chars, padding_char, (size_t) padding_length);
            chars[ulength-1] = (char) value;
            return PyUnicode_DecodeLatin1(chars, ulength, NULL);
        }
        char *cpos = chars + sizeof(chars);
        if (value < 0x800) {
            *--cpos = (char) (0x80 | (value & 0x3f));
            value >>= 6;
            *--cpos = (char) (0xc0 | (value & 0x1f));
        } else if (value < 0x10000) {
            *--cpos = (char) (0x80 | (value & 0x3f));
            value >>= 6;
            *--cpos = (char) (0x80 | (value & 0x3f));
            value >>= 6;
            *--cpos = (char) (0xe0 | (value & 0x0f));
        } else {
            *--cpos = (char) (0x80 | (value & 0x3f));
            value >>= 6;
            *--cpos = (char) (0x80 | (value & 0x3f));
            value >>= 6;
            *--cpos = (char) (0x80 | (value & 0x3f));
            value >>= 6;
            *--cpos = (char) (0xf0 | (value & 0x07));
        }
        cpos -= padding_length;
        memset(cpos, padding_char, (size_t) padding_length);
        return PyUnicode_DecodeUTF8(cpos, chars + sizeof(chars) - cpos, NULL);
    }
    if (value <= 127 && CYTHON_USE_UNICODE_INTERNALS) {
        const char chars[1] = {(char) value};
        return __Pyx_PyUnicode_BuildFromAscii(ulength, chars, 1, 0, padding_char);
    }
    {
        PyObject *uchar, *padding_uchar, *padding, *result;
        padding_uchar = PyUnicode_FromOrdinal(padding_char);
        if (unlikely(!padding_uchar)) return NULL;
        padding = PySequence_Repeat(padding_uchar, padding_length);
        Py_DECREF(padding_uchar);
        if (unlikely(!padding)) return NULL;
        uchar = PyUnicode_FromOrdinal(value);
        if (unlikely(!uchar)) {
            Py_DECREF(padding);
            return NULL;
        }
        result = PyUnicode_Concat(padding, uchar);
        Py_DECREF(padding);
        Py_DECREF(uchar);
        return result;
    }
}

/* CIntToPyUnicode */
static CYTHON_INLINE PyObject* __Pyx_uchar___Pyx_PyUnicode_From_int(int value, Py_ssize_t width, char padding_char) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const int neg_one = (int) -1, const_zero = (int) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (unlikely(!(is_unsigned || value == 0 || value > 0) ||
                    !(sizeof(value) <= 2 || value & ~ (int) 0x01fffff || __Pyx_CheckUnicodeValue((int) value)))) {
        PyErr_SetString(PyExc_OverflowError, "%c arg not in range(0x110000)");
        return NULL;
    }
    if (width <= 1) {
        return PyUnicode_FromOrdinal((int) value);
    }
    return __Pyx_PyUnicode_FromOrdinal_Padded((int) value, width, padding_char);
}
static CYTHON_INLINE PyObject* __Pyx____Pyx_PyUnicode_From_int(int value, Py_ssize_t width, char padding_char, char format_char) {
    char digits[sizeof(int)*3+2];
    char *dpos, *end = digits + sizeof(int)*3+2;
    const char *hex_digits = DIGITS_HEX;
    Py_ssize_t length, ulength;
    int prepend_sign, last_one_off;
    int remaining;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const int neg_one = (int) -1, const_zero = (int) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (format_char == 'X') {
        hex_digits += 16;
        format_char = 'x';
    }
    remaining = value;
    last_one_off = 0;
    dpos = end;
    do {
        int digit_pos;
        switch (format_char) {
        case 'o':
            digit_pos = abs((int)(remaining % (8*8)));
            remaining = (int) (remaining / (8*8));
            dpos -= 2;
            memcpy(dpos, DIGIT_PAIRS_8 + digit_pos * 2, 2);
            last_one_off = (digit_pos < 8);
            break;
        case 'd':
            digit_pos = abs((int)(remaining % (10*10)));
            remaining = (int) (remaining / (10*10));
            dpos -= 2;
            memcpy(dpos, DIGIT_PAIRS_10 + digit_pos * 2, 2);
            last_one_off = (digit_pos < 10);
            break;
        case 'x':
            *(--dpos) = hex_digits[abs((int)(remaining % 16))];
            remaining = (int) (remaining / 16);
            break;
        default:
            assert(0);
            break;
        }
    } while (unlikely(remaining != 0));
    assert(!last_one_off || *dpos == '0');
    dpos += last_one_off;
    length = end - dpos;
    ulength = length;
    prepend_sign = 0;
    if (!is_unsigned && value <= neg_one) {
        if (padding_char == ' ' || width <= length + 1) {
            *(--dpos) = '-';
            ++length;
        } else {
            prepend_sign = 1;
        }
        ++ulength;
    }
    if (width > ulength) {
        ulength = width;
    }
    if (ulength == 1) {
        return PyUnicode_FromOrdinal(*dpos);
    }
    return __Pyx_PyUnicode_BuildFromAscii(ulength, dpos, (int) length, prepend_sign, padding_char);
}

/* CIntToPyUnicode */
static CYTHON_INLINE PyObject* __Pyx_uchar___Pyx_PyUnicode_From_Py_ssize_t(Py_ssize_t value, Py_ssize_t width, char padding_char) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const Py_ssize_t neg_one = (Py_ssize_t) -1, const_zero = (Py_ssize_t) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (unlikely(!(is_unsigned || value == 0 || value > 0) ||
                    !(sizeof(value) <= 2 || value & ~ (Py_ssize_t) 0x01fffff || __Pyx_CheckUnicodeValue((int) value)))) {
        PyErr_SetString(PyExc_OverflowError, "%c arg not in range(0x110000)");
        return NULL;
    }
    if (width <= 1) {
        return PyUnicode_FromOrdinal((int) value);
    }
    return __Pyx_PyUnicode_FromOrdinal_Padded((int) value, width, padding_char);
}
static CYTHON_INLINE PyObject* __Pyx____Pyx_PyUnicode_From_Py_ssize_t(Py_ssize_t value, Py_ssize_t width, char padding_char, char format_char) {
    char digits[sizeof(Py_ssize_t)*3+2];
    char *dpos, *end = digits + sizeof(Py_ssize_t)*3+2;
    const char *hex_digits = DIGITS_HEX;
    Py_ssize_t length, ulength;
    int prepend_sign, last_one_off;
    Py_ssize_t remaining;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const Py_ssize_t neg_one = (Py_ssize_t) -1, const_zero = (Py_ssize_t) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (format_char == 'X') {
        hex_digits += 16;
        format_char = 'x';
    }
    remaining = value;
    last_one_off = 0;
    dpos = end;
    do {
        int digit_pos;
        switch (format_char) {
        case 'o':
            digit_pos = abs((int)(remaining % (8*8)));
            remaining = (Py_ssize_t) (remaining / (8*8));
            dpos -= 2;
            memcpy(dpos, DIGIT_PAIRS_8 + digit_pos * 2, 2);
            last_one_off = (digit_pos < 8);
            break;
        case 'd':
            digit_pos = abs((int)(remaining % (10*10)));
            remaining = (Py_ssize_t) (remaining / (10*10));
            dpos -= 2;
            memcpy(dpos, DIGIT_PAIRS_10 + digit_pos * 2, 2);
            last_one_off = (digit_pos < 10);
            break;
        case 'x':
            *(--dpos) = hex_digits[abs((int)(remaining % 16))];
            remaining = (Py_ssize_t) (remaining / 16);
            break;
        default:
            assert(0);
            break;
        }
    } while (unlikely(remaining != 0));
    assert(!last_one_off || *dpos == '0');
    dpos += last_one_off;
    length = end - dpos;
    ulength = length;
    prepend_sign = 0;
    if (!is_unsigned && value <= neg_one) {
        if (padding_char == ' ' || width <= length + 1) {
            *(--dpos) = '-';
            ++length;
        } else {
            prepend_sign = 1;
        }
        ++ulength;
    }
    if (width > ulength) {
        ulength = width;
    }
    if (ulength == 1) {
        return PyUnicode_FromOrdinal(*dpos);
    }
    return __Pyx_PyUnicode_BuildFromAscii(ulength, dpos, (int) length, prepend_sign, padding_char);
}

/* JoinPyUnicode */
static PyObject* __Pyx_PyUnicode_Join(PyObject** values, Py_ssize_t value_count, Py_ssize_t result_ulength,
                                      Py_UCS4 max_char) {
#if CYTHON_USE_UNICODE_INTERNALS && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    PyObject *result_uval;
    int result_ukind, kind_shift;
    Py_ssize_t i, char_pos;
    void *result_udata;
    if (max_char > 1114111) max_char = 1114111;
    result_uval = PyUnicode_New(result_ulength, max_char);
    if (unlikely(!result_uval)) return NULL;
    result_ukind = (max_char <= 255) ? PyUnicode_1BYTE_KIND : (max_char <= 65535) ? PyUnicode_2BYTE_KIND : PyUnicode_4BYTE_KIND;
    kind_shift = (result_ukind == PyUnicode_4BYTE_KIND) ? 2 : result_ukind - 1;
    result_udata = PyUnicode_DATA(result_uval);
    assert(kind_shift == 2 || kind_shift == 1 || kind_shift == 0);
    if (unlikely((PY_SSIZE_T_MAX >> kind_shift) - result_ulength < 0))
        goto overflow;
    char_pos = 0;
    for (i=0; i < value_count; i++) {
        int ukind;
        Py_ssize_t ulength;
        void *udata;
        PyObject *uval = values[i];
        #if !CYTHON_COMPILING_IN_LIMITED_API
        if (__Pyx_PyUnicode_READY(uval) == (-1))
            goto bad;
        #endif
        ulength = __Pyx_PyUnicode_GET_LENGTH(uval);
        #if !CYTHON_ASSUME_SAFE_SIZE
        if (unlikely(ulength < 0)) goto bad;
        #endif
        if (unlikely(!ulength))
            continue;
        if (unlikely((PY_SSIZE_T_MAX >> kind_shift) - ulength < char_pos))
            goto overflow;
        ukind = __Pyx_PyUnicode_KIND(uval);
        udata = __Pyx_PyUnicode_DATA(uval);
        if (ukind == result_ukind) {
            memcpy((char *)result_udata + (char_pos << kind_shift), udata, (size_t) (ulength << kind_shift));
        } else {
            #if PY_VERSION_HEX >= 0x030d0000
            if (unlikely(PyUnicode_CopyCharacters(result_uval, char_pos, uval, 0, ulength) < 0)) goto bad;
            #elif CYTHON_COMPILING_IN_CPYTHON || defined(_PyUnicode_FastCopyCharacters)
            _PyUnicode_FastCopyCharacters(result_uval, char_pos, uval, 0, ulength);
            #else
            Py_ssize_t j;
            for (j=0; j < ulength; j++) {
                Py_UCS4 uchar = __Pyx_PyUnicode_READ(ukind, udata, j);
                __Pyx_PyUnicode_WRITE(result_ukind, result_udata, char_pos+j, uchar);
            }
            #endif
        }
        char_pos += ulength;
    }
    return result_uval;
overflow:
    PyErr_SetString(PyExc_OverflowError, "join() result is too long for a Python string");
bad:
    Py_DECREF(result_uval);
    return NULL;
#else
    Py_ssize_t i;
    PyObject *result = NULL;
    PyObject *value_tuple = PyTuple_New(value_count);
    if (unlikely(!value_tuple)) return NULL;
    CYTHON_UNUSED_VAR(max_char);
    CYTHON_UNUSED_VAR(result_ulength);
    for (i=0; i<value_count; i++) {
        Py_INCREF(values[i]);
        if (__Pyx_PyTuple_SET_ITEM(value_tuple, i, values[i]) != (0)) goto bad;
    }
    result = PyUnicode_Join(__pyx_mstate_global->__pyx_empty_unicode, value_tuple);
bad:
    Py_DECREF(value_tuple);
    return result;
#endif
}

/* GetAttr */
static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) {
#if CYTHON_USE_TYPE_SLOTS
    if (likely(PyUnicode_Check(n)))
        return __Pyx_PyObject_GetAttrStr(o, n);
#endif
    return PyObject_GetAttr(o, n);
}

/* GetItemInt */
static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
    PyObject *r;
    if (unlikely(!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,
                                                              int wraparound, int boundscheck, int unsafe_shared) {
    CYTHON_MAYBE_UNUSED_VAR(unsafe_shared);
#if CYTHON_ASSUME_SAFE_SIZE
    Py_ssize_t wrapped_i = i;
    if (wraparound & unlikely(i < 0)) {
        wrapped_i += PyList_GET_SIZE(o);
    }
    if ((CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS)) {
        return __Pyx_PyList_GetItemRefFast(o, wrapped_i, unsafe_shared);
    } else
    if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) {
        return __Pyx_NewRef(PyList_GET_ITEM(o, wrapped_i));
    }
    return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i));
#else
    (void)wraparound;
    (void)boundscheck;
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
                                                              int wraparound, int boundscheck, int unsafe_shared) {
    CYTHON_MAYBE_UNUSED_VAR(unsafe_shared);
#if CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    Py_ssize_t wrapped_i = i;
    if (wraparound & unlikely(i < 0)) {
        wrapped_i += PyTuple_GET_SIZE(o);
    }
    if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) {
        return __Pyx_NewRef(PyTuple_GET_ITEM(o, wrapped_i));
    }
    return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i));
#else
    (void)wraparound;
    (void)boundscheck;
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
                                                     int wraparound, int boundscheck, int unsafe_shared) {
    CYTHON_MAYBE_UNUSED_VAR(unsafe_shared);
#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE
    if (is_list || PyList_CheckExact(o)) {
        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
        if ((CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS)) {
            return __Pyx_PyList_GetItemRefFast(o, n, unsafe_shared);
        } else if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) {
            return __Pyx_NewRef(PyList_GET_ITEM(o, n));
        }
    } else
    #if !CYTHON_AVOID_BORROWED_REFS
    if (PyTuple_CheckExact(o)) {
        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
        if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) {
            return __Pyx_NewRef(PyTuple_GET_ITEM(o, n));
        }
    } else
    #endif
#endif
#if CYTHON_USE_TYPE_SLOTS && !CYTHON_COMPILING_IN_PYPY
    {
        PyMappingMethods *mm = Py_TYPE(o)->tp_as_mapping;
        PySequenceMethods *sm = Py_TYPE(o)->tp_as_sequence;
        if (!is_list && mm && mm->mp_subscript) {
            PyObject *r, *key = PyLong_FromSsize_t(i);
            if (unlikely(!key)) return NULL;
            r = mm->mp_subscript(o, key);
            Py_DECREF(key);
            return r;
        }
        if (is_list || likely(sm && sm->sq_item)) {
            if (wraparound && unlikely(i < 0) && likely(sm->sq_length)) {
                Py_ssize_t l = sm->sq_length(o);
                if (likely(l >= 0)) {
                    i += l;
                } else {
                    if (!PyErr_ExceptionMatches(PyExc_OverflowError))
                        return NULL;
                    PyErr_Clear();
                }
            }
            return sm->sq_item(o, i);
        }
    }
#else
    if (is_list || !PyMapping_Check(o)) {
        return PySequence_GetItem(o, i);
    }
#endif
    (void)wraparound;
    (void)boundscheck;
    return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i));
}

/* ObjectGetItem */
#if CYTHON_USE_TYPE_SLOTS
static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject *index) {
    PyObject *runerr = NULL;
    Py_ssize_t key_value;
    key_value = __Pyx_PyIndex_AsSsize_t(index);
    if (likely(key_value != -1 || !(runerr = PyErr_Occurred()))) {
        return __Pyx_GetItemInt_Fast(obj, key_value, 0, 1, 1, 1);
    }
    if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) {
        __Pyx_TypeName index_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(index));
        PyErr_Clear();
        PyErr_Format(PyExc_IndexError,
            "cannot fit '" __Pyx_FMT_TYPENAME "' into an index-sized integer", index_type_name);
        __Pyx_DECREF_TypeName(index_type_name);
    }
    return NULL;
}
static PyObject *__Pyx_PyObject_GetItem_Slow(PyObject *obj, PyObject *key) {
    __Pyx_TypeName obj_type_name;
    if (likely(PyType_Check(obj))) {
        PyObject *meth = __Pyx_PyObject_GetAttrStrNoError(obj, __pyx_mstate_global->__pyx_n_u_class_getitem);
        if (!meth) {
            PyErr_Clear();
        } else {
            PyObject *result = __Pyx_PyObject_CallOneArg(meth, key);
            Py_DECREF(meth);
            return result;
        }
    }
    obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj));
    PyErr_Format(PyExc_TypeError,
        "'" __Pyx_FMT_TYPENAME "' object is not subscriptable", obj_type_name);
    __Pyx_DECREF_TypeName(obj_type_name);
    return NULL;
}
static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject *key) {
    PyTypeObject *tp = Py_TYPE(obj);
    PyMappingMethods *mm = tp->tp_as_mapping;
    PySequenceMethods *sm = tp->tp_as_sequence;
    if (likely(mm && mm->mp_subscript)) {
        return mm->mp_subscript(obj, key);
    }
    if (likely(sm && sm->sq_item)) {
        return __Pyx_PyObject_GetIndex(obj, key);
    }
    return __Pyx_PyObject_GetItem_Slow(obj, key);
}
#endif

/* RejectKeywords */
static void __Pyx_RejectKeywords(const char* function_name, PyObject *kwds) {
    PyObject *key = NULL;
    if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds))) {
        key = __Pyx_PySequence_ITEM(kwds, 0);
    } else {
#if CYTHON_AVOID_BORROWED_REFS
        PyObject *pos = NULL;
#else
        Py_ssize_t pos = 0;
#endif
#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments)
        if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return;
#endif
        __Pyx_PyDict_NextRef(kwds, &pos, &key, NULL);
#if CYTHON_AVOID_BORROWED_REFS
        Py_XDECREF(pos);
#endif
    }
    if (likely(key)) {
        PyErr_Format(PyExc_TypeError,
            "%s() got an unexpected keyword argument '%U'",
            function_name, key);
        Py_DECREF(key);
    }
}

/* DivInt[Py_ssize_t] */
static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t a, Py_ssize_t b, int b_is_constant) {
    Py_ssize_t q = a / b;
    Py_ssize_t r = a - q*b;
    Py_ssize_t adapt_python = (b_is_constant ?
        ((r != 0) & ((r < 0) ^ (b < 0))) :
        ((r != 0) & ((r ^ b) < 0))
    );
    return q - adapt_python;
}

/* GetAttr3 */
#if __PYX_LIMITED_VERSION_HEX < 0x030d0000
static PyObject *__Pyx_GetAttr3Default(PyObject *d) {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
        return NULL;
    __Pyx_PyErr_Clear();
    Py_INCREF(d);
    return d;
}
#endif
static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) {
    PyObject *r;
#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
    int res = PyObject_GetOptionalAttr(o, n, &r);
    return (res != 0) ? r : __Pyx_NewRef(d);
#else
  #if CYTHON_USE_TYPE_SLOTS
    if (likely(PyUnicode_Check(n))) {
        r = __Pyx_PyObject_GetAttrStrNoError(o, n);
        if (unlikely(!r) && likely(!PyErr_Occurred())) {
            r = __Pyx_NewRef(d);
        }
        return r;
    }
  #endif
    r = PyObject_GetAttr(o, n);
    return (likely(r)) ? r : __Pyx_GetAttr3Default(d);
#endif
}

/* PyDictVersioning (used by GetModuleGlobalName) */
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) {
    PyObject *dict = Py_TYPE(obj)->tp_dict;
    return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;
}
static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) {
    PyObject **dictptr = NULL;
    Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset;
    if (offset) {
#if CYTHON_COMPILING_IN_CPYTHON
        dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj);
#else
        dictptr = _PyObject_GetDictPtr(obj);
#endif
    }
    return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
}
static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) {
    PyObject *dict = Py_TYPE(obj)->tp_dict;
    if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))
        return 0;
    return obj_dict_version == __Pyx_get_object_dict_version(obj);
}
#endif

/* GetModuleGlobalName */
#if CYTHON_USE_DICT_VERSIONS
static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value)
#else
static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
#endif
{
    PyObject *result;
#if CYTHON_COMPILING_IN_LIMITED_API
    if (unlikely(!__pyx_m)) {
        if (!PyErr_Occurred())
            PyErr_SetNone(PyExc_NameError);
        return NULL;
    }
    result = PyObject_GetAttr(__pyx_m, name);
    if (likely(result)) {
        return result;
    }
    PyErr_Clear();
#elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
    if (unlikely(__Pyx_PyDict_GetItemRef(__pyx_mstate_global->__pyx_d, name, &result) == -1)) PyErr_Clear();
    __PYX_UPDATE_DICT_CACHE(__pyx_mstate_global->__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return result;
    }
#else
    result = _PyDict_GetItem_KnownHash(__pyx_mstate_global->__pyx_d, name, ((PyASCIIObject *) name)->hash);
    __PYX_UPDATE_DICT_CACHE(__pyx_mstate_global->__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return __Pyx_NewRef(result);
    }
    PyErr_Clear();
#endif
    return __Pyx_GetBuiltinName(name);
}

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

/* RaiseNoneIterError */
static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
}

/* ExtTypeTest */
static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
    __Pyx_TypeName obj_type_name;
    __Pyx_TypeName type_name;
    if (unlikely(!type)) {
        PyErr_SetString(PyExc_SystemError, "Missing type object");
        return 0;
    }
    if (likely(__Pyx_TypeCheck(obj, type)))
        return 1;
    obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj));
    type_name = __Pyx_PyType_GetFullyQualifiedName(type);
    PyErr_Format(PyExc_TypeError,
                 "Cannot convert " __Pyx_FMT_TYPENAME " to " __Pyx_FMT_TYPENAME,
                 obj_type_name, type_name);
    __Pyx_DECREF_TypeName(obj_type_name);
    __Pyx_DECREF_TypeName(type_name);
    return 0;
}

/* GetTopmostException (used by SaveResetException) */
#if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE
static _PyErr_StackItem *
__Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
{
    _PyErr_StackItem *exc_info = tstate->exc_info;
    while ((exc_info->exc_value == NULL || exc_info->exc_value == Py_None) &&
           exc_info->previous_item != NULL)
    {
        exc_info = exc_info->previous_item;
    }
    return exc_info;
}
#endif

/* SaveResetException */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
  #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4
    _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
    PyObject *exc_value = exc_info->exc_value;
    if (exc_value == NULL || exc_value == Py_None) {
        *value = NULL;
        *type = NULL;
        *tb = NULL;
    } else {
        *value = exc_value;
        Py_INCREF(*value);
        *type = (PyObject*) Py_TYPE(exc_value);
        Py_INCREF(*type);
        *tb = PyException_GetTraceback(exc_value);
    }
  #elif CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
    *type = exc_info->exc_type;
    *value = exc_info->exc_value;
    *tb = exc_info->exc_traceback;
    Py_XINCREF(*type);
    Py_XINCREF(*value);
    Py_XINCREF(*tb);
  #else
    *type = tstate->exc_type;
    *value = tstate->exc_value;
    *tb = tstate->exc_traceback;
    Py_XINCREF(*type);
    Py_XINCREF(*value);
    Py_XINCREF(*tb);
  #endif
}
static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
  #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4
    _PyErr_StackItem *exc_info = tstate->exc_info;
    PyObject *tmp_value = exc_info->exc_value;
    exc_info->exc_value = value;
    Py_XDECREF(tmp_value);
    Py_XDECREF(type);
    Py_XDECREF(tb);
  #else
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    #if CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = tstate->exc_info;
    tmp_type = exc_info->exc_type;
    tmp_value = exc_info->exc_value;
    tmp_tb = exc_info->exc_traceback;
    exc_info->exc_type = type;
    exc_info->exc_value = value;
    exc_info->exc_traceback = tb;
    #else
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = type;
    tstate->exc_value = value;
    tstate->exc_traceback = tb;
    #endif
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
  #endif
}
#endif

/* GetException */
#if CYTHON_FAST_THREAD_STATE
static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
#else
static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
#endif
{
    PyObject *local_type = NULL, *local_value, *local_tb = NULL;
#if CYTHON_FAST_THREAD_STATE
    PyObject *tmp_type, *tmp_value, *tmp_tb;
  #if PY_VERSION_HEX >= 0x030C0000
    local_value = tstate->current_exception;
    tstate->current_exception = 0;
  #else
    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;
  #endif
#elif __PYX_LIMITED_VERSION_HEX > 0x030C0000
    local_value = PyErr_GetRaisedException();
#else
    PyErr_Fetch(&local_type, &local_value, &local_tb);
#endif
#if __PYX_LIMITED_VERSION_HEX > 0x030C0000
    if (likely(local_value)) {
        local_type = (PyObject*) Py_TYPE(local_value);
        Py_INCREF(local_type);
        local_tb = PyException_GetTraceback(local_value);
    }
#else
    PyErr_NormalizeException(&local_type, &local_value, &local_tb);
#if CYTHON_FAST_THREAD_STATE
    if (unlikely(tstate->curexc_type))
#else
    if (unlikely(PyErr_Occurred()))
#endif
        goto bad;
    if (local_tb) {
        if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
            goto bad;
    }
#endif // __PYX_LIMITED_VERSION_HEX > 0x030C0000
    Py_XINCREF(local_tb);
    Py_XINCREF(local_type);
    Py_XINCREF(local_value);
    *type = local_type;
    *value = local_value;
    *tb = local_tb;
#if CYTHON_FAST_THREAD_STATE
    #if CYTHON_USE_EXC_INFO_STACK
    {
        _PyErr_StackItem *exc_info = tstate->exc_info;
      #if PY_VERSION_HEX >= 0x030B00a4
        tmp_value = exc_info->exc_value;
        exc_info->exc_value = local_value;
        tmp_type = NULL;
        tmp_tb = NULL;
        Py_XDECREF(local_type);
        Py_XDECREF(local_tb);
      #else
        tmp_type = exc_info->exc_type;
        tmp_value = exc_info->exc_value;
        tmp_tb = exc_info->exc_traceback;
        exc_info->exc_type = local_type;
        exc_info->exc_value = local_value;
        exc_info->exc_traceback = local_tb;
      #endif
    }
    #else
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = local_type;
    tstate->exc_value = local_value;
    tstate->exc_traceback = local_tb;
    #endif
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
#elif __PYX_LIMITED_VERSION_HEX >= 0x030b0000
    PyErr_SetHandledException(local_value);
    Py_XDECREF(local_value);
    Py_XDECREF(local_type);
    Py_XDECREF(local_tb);
#else
    PyErr_SetExcInfo(local_type, local_value, local_tb);
#endif
    return 0;
#if __PYX_LIMITED_VERSION_HEX <= 0x030C0000
bad:
    *type = 0;
    *value = 0;
    *tb = 0;
    Py_XDECREF(local_type);
    Py_XDECREF(local_value);
    Py_XDECREF(local_tb);
    return -1;
#endif
}

/* SwapException */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
  #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4
    _PyErr_StackItem *exc_info = tstate->exc_info;
    tmp_value = exc_info->exc_value;
    exc_info->exc_value = *value;
    if (tmp_value == NULL || tmp_value == Py_None) {
        Py_XDECREF(tmp_value);
        tmp_value = NULL;
        tmp_type = NULL;
        tmp_tb = NULL;
    } else {
        tmp_type = (PyObject*) Py_TYPE(tmp_value);
        Py_INCREF(tmp_type);
        #if CYTHON_COMPILING_IN_CPYTHON
        tmp_tb = ((PyBaseExceptionObject*) tmp_value)->traceback;
        Py_XINCREF(tmp_tb);
        #else
        tmp_tb = PyException_GetTraceback(tmp_value);
        #endif
    }
  #elif CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = tstate->exc_info;
    tmp_type = exc_info->exc_type;
    tmp_value = exc_info->exc_value;
    tmp_tb = exc_info->exc_traceback;
    exc_info->exc_type = *type;
    exc_info->exc_value = *value;
    exc_info->exc_traceback = *tb;
  #else
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = *type;
    tstate->exc_value = *value;
    tstate->exc_traceback = *tb;
  #endif
    *type = tmp_type;
    *value = tmp_value;
    *tb = tmp_tb;
}
#else
static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
    PyErr_SetExcInfo(*type, *value, *tb);
    *type = tmp_type;
    *value = tmp_value;
    *tb = tmp_tb;
}
#endif

/* HasAttr (used by ImportImpl) */
#if __PYX_LIMITED_VERSION_HEX < 0x030d0000
static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) {
    PyObject *r;
    if (unlikely(!PyUnicode_Check(n))) {
        PyErr_SetString(PyExc_TypeError,
                        "hasattr(): attribute name must be string");
        return -1;
    }
    r = __Pyx_PyObject_GetAttrStrNoError(o, n);
    if (!r) {
        return (unlikely(PyErr_Occurred())) ? -1 : 0;
    } else {
        Py_DECREF(r);
        return 1;
    }
}
#endif

/* ImportImpl (used by Import) */
static int __Pyx__Import_GetModule(PyObject *qualname, PyObject **module) {
    PyObject *imported_module = PyImport_GetModule(qualname);
    if (unlikely(!imported_module)) {
        *module = NULL;
        if (PyErr_Occurred()) {
            return -1;
        }
        return 0;
    }
    *module = imported_module;
    return 1;
}
static int __Pyx__Import_Lookup(PyObject *qualname, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject **module) {
    PyObject *imported_module;
    PyObject *top_level_package_name;
    Py_ssize_t i;
    int status, module_found;
    Py_ssize_t dot_index;
    module_found = __Pyx__Import_GetModule(qualname, &imported_module);
    if (unlikely(!module_found || module_found == -1)) {
        *module = NULL;
        return module_found;
    }
    if (imported_names) {
        for (i = 0; i < len_imported_names; i++) {
            PyObject *imported_name = imported_names[i];
#if __PYX_LIMITED_VERSION_HEX < 0x030d0000
            int has_imported_attribute = PyObject_HasAttr(imported_module, imported_name);
#else
            int has_imported_attribute = PyObject_HasAttrWithError(imported_module, imported_name);
            if (unlikely(has_imported_attribute == -1)) goto error;
#endif
            if (!has_imported_attribute) {
                goto not_found;
            }
        }
        *module = imported_module;
        return 1;
    }
    dot_index = PyUnicode_FindChar(qualname, '.', 0, PY_SSIZE_T_MAX, 1);
    if (dot_index == -1) {
        *module = imported_module;
        return 1;
    }
    if (unlikely(dot_index == -2)) goto error;
    top_level_package_name = PyUnicode_Substring(qualname, 0, dot_index);
    if (unlikely(!top_level_package_name)) goto error;
    Py_DECREF(imported_module);
    status = __Pyx__Import_GetModule(top_level_package_name, module);
    Py_DECREF(top_level_package_name);
    return status;
error:
    Py_DECREF(imported_module);
    *module = NULL;
    return -1;
not_found:
    Py_DECREF(imported_module);
    *module = NULL;
    return 0;
}
static PyObject *__Pyx__Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, PyObject *moddict, int level) {
    PyObject *module = 0;
    PyObject *empty_dict = 0;
    PyObject *from_list = 0;
    int module_found;
    if (!qualname) {
        qualname = name;
    }
    module_found = __Pyx__Import_Lookup(qualname, imported_names, len_imported_names, &module);
    if (likely(module_found == 1)) {
        return module;
    } else if (unlikely(module_found == -1)) {
        return NULL;
    }
    empty_dict = PyDict_New();
    if (unlikely(!empty_dict))
        goto bad;
    if (imported_names) {
#if CYTHON_COMPILING_IN_CPYTHON
        from_list = __Pyx_PyList_FromArray(imported_names, len_imported_names);
        if (unlikely(!from_list))
            goto bad;
#else
        from_list = PyList_New(len_imported_names);
        if (unlikely(!from_list)) goto bad;
        for (Py_ssize_t i=0; i<len_imported_names; ++i) {
            if (PyList_SetItem(from_list, i, __Pyx_NewRef(imported_names[i])) < 0) goto bad;
        }
#endif
    }
    if (level == -1) {
        const char* package_sep = strchr(__Pyx_MODULE_NAME, '.');
        if (package_sep != (0)) {
            module = PyImport_ImportModuleLevelObject(
                name, moddict, empty_dict, from_list, 1);
            if (unlikely(!module)) {
                if (unlikely(!PyErr_ExceptionMatches(PyExc_ImportError)))
                    goto bad;
                PyErr_Clear();
            }
        }
        level = 0;
    }
    if (!module) {
        module = PyImport_ImportModuleLevelObject(
            name, moddict, empty_dict, from_list, level);
    }
bad:
    Py_XDECREF(from_list);
    Py_XDECREF(empty_dict);
    return module;
}

/* Import */
static PyObject *__Pyx_Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, int level) {
    return __Pyx__Import(name, imported_names, len_imported_names, qualname, __pyx_mstate_global->__pyx_d, level);
}

/* FastTypeChecks */
#if CYTHON_COMPILING_IN_CPYTHON
static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
    while (a) {
        a = __Pyx_PyType_GetSlot(a, tp_base, PyTypeObject*);
        if (a == b)
            return 1;
    }
    return b == &PyBaseObject_Type;
}
static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
    PyObject *mro;
    if (a == b) return 1;
    mro = a->tp_mro;
    if (likely(mro)) {
        Py_ssize_t i, n;
        n = PyTuple_GET_SIZE(mro);
        for (i = 0; i < n; i++) {
            if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
                return 1;
        }
        return 0;
    }
    return __Pyx_InBases(a, b);
}
static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b) {
    PyObject *mro;
    if (cls == a || cls == b) return 1;
    mro = cls->tp_mro;
    if (likely(mro)) {
        Py_ssize_t i, n;
        n = PyTuple_GET_SIZE(mro);
        for (i = 0; i < n; i++) {
            PyObject *base = PyTuple_GET_ITEM(mro, i);
            if (base == (PyObject *)a || base == (PyObject *)b)
                return 1;
        }
        return 0;
    }
    return __Pyx_InBases(cls, a) || __Pyx_InBases(cls, b);
}
static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
    if (exc_type1) {
        return __Pyx_IsAnySubtype2((PyTypeObject*)err, (PyTypeObject*)exc_type1, (PyTypeObject*)exc_type2);
    } else {
        return __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
    }
}
static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
    Py_ssize_t i, n;
    assert(PyExceptionClass_Check(exc_type));
    n = PyTuple_GET_SIZE(tuple);
    for (i=0; i<n; i++) {
        if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
    }
    for (i=0; i<n; i++) {
        PyObject *t = PyTuple_GET_ITEM(tuple, i);
        if (likely(PyExceptionClass_Check(t))) {
            if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
        } else {
        }
    }
    return 0;
}
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
    if (likely(err == exc_type)) return 1;
    if (likely(PyExceptionClass_Check(err))) {
        if (likely(PyExceptionClass_Check(exc_type))) {
            return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
        } else if (likely(PyTuple_Check(exc_type))) {
            return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
        } else {
        }
    }
    return PyErr_GivenExceptionMatches(err, exc_type);
}
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
    assert(PyExceptionClass_Check(exc_type1));
    assert(PyExceptionClass_Check(exc_type2));
    if (likely(err == exc_type1 || err == exc_type2)) return 1;
    if (likely(PyExceptionClass_Check(err))) {
        return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
    }
    return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
}
#endif

/* PySequenceMultiply */
#if CYTHON_USE_TYPE_SLOTS
static PyObject* __Pyx_PySequence_Multiply_Generic(PyObject *seq, Py_ssize_t mul) {
    PyObject *result, *pymul = PyLong_FromSsize_t(mul);
    if (unlikely(!pymul))
        return NULL;
    result = PyNumber_Multiply(seq, pymul);
    Py_DECREF(pymul);
    return result;
}
static CYTHON_INLINE PyObject* __Pyx_PySequence_Multiply(PyObject *seq, Py_ssize_t mul) {
    PyTypeObject *type = Py_TYPE(seq);
    if (likely(type->tp_as_sequence && type->tp_as_sequence->sq_repeat)) {
        return type->tp_as_sequence->sq_repeat(seq, mul);
    } else {
        return __Pyx_PySequence_Multiply_Generic(seq, mul);
    }
}
#endif

/* PyObjectFormatAndDecref */
static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatSimpleAndDecref(PyObject* s, PyObject* f) {
    if (unlikely(!s)) return NULL;
    if (likely(PyUnicode_CheckExact(s))) return s;
    return __Pyx_PyObject_FormatAndDecref(s, f);
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatAndDecref(PyObject* s, PyObject* f) {
    PyObject *result;
    if (unlikely(!s)) return NULL;
    result = PyObject_Format(s, f);
    Py_DECREF(s);
    return result;
}

/* PyObjectFormat */
#if CYTHON_USE_UNICODE_WRITER
static PyObject* __Pyx_PyObject_Format(PyObject* obj, PyObject* format_spec) {
    int ret;
    _PyUnicodeWriter writer;
    if (likely(PyFloat_CheckExact(obj))) {
        _PyUnicodeWriter_Init(&writer);
        ret = _PyFloat_FormatAdvancedWriter(
            &writer,
            obj,
            format_spec, 0, PyUnicode_GET_LENGTH(format_spec));
    } else if (likely(PyLong_CheckExact(obj))) {
        _PyUnicodeWriter_Init(&writer);
        ret = _PyLong_FormatAdvancedWriter(
            &writer,
            obj,
            format_spec, 0, PyUnicode_GET_LENGTH(format_spec));
    } else {
        return PyObject_Format(obj, format_spec);
    }
    if (unlikely(ret == -1)) {
        _PyUnicodeWriter_Dealloc(&writer);
        return NULL;
    }
    return _PyUnicodeWriter_Finish(&writer);
}
#endif

/* SetItemInt */
static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) {
    int r;
    if (unlikely(!j)) return -1;
    r = PyObject_SetItem(o, j, v);
    Py_DECREF(j);
    return r;
}
static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int is_list,
                                               int wraparound, int boundscheck, int unsafe_shared) {
    CYTHON_MAYBE_UNUSED_VAR(unsafe_shared);
#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE && !CYTHON_AVOID_BORROWED_REFS
    if (is_list || PyList_CheckExact(o)) {
        Py_ssize_t n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o));
        if ((CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS && !__Pyx_IS_UNIQUELY_REFERENCED(o, unsafe_shared))) {
            Py_INCREF(v);
            return PyList_SetItem(o, n, v);
        } else if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o)))) {
            PyObject* old;
            Py_INCREF(v);
            old = PyList_GET_ITEM(o, n);
            PyList_SET_ITEM(o, n, v);
            Py_DECREF(old);
            return 0;
        }
    } else
#endif
#if CYTHON_USE_TYPE_SLOTS && !CYTHON_COMPILING_IN_PYPY
    {
        PyMappingMethods *mm = Py_TYPE(o)->tp_as_mapping;
        PySequenceMethods *sm = Py_TYPE(o)->tp_as_sequence;
        if (!is_list && mm && mm->mp_ass_subscript) {
            int r;
            PyObject *key = PyLong_FromSsize_t(i);
            if (unlikely(!key)) return -1;
            r = mm->mp_ass_subscript(o, key, v);
            Py_DECREF(key);
            return r;
        }
        if (is_list || likely(sm && sm->sq_ass_item)) {
            if (wraparound && unlikely(i < 0) && likely(sm->sq_length)) {
                Py_ssize_t l = sm->sq_length(o);
                if (likely(l >= 0)) {
                    i += l;
                } else {
                    if (!PyErr_ExceptionMatches(PyExc_OverflowError))
                        return -1;
                    PyErr_Clear();
                }
            }
            return sm->sq_ass_item(o, i, v);
        }
    }
#else
    if (is_list || !PyMapping_Check(o)) {
        return PySequence_SetItem(o, i, v);
    }
#endif
    (void)wraparound;
    (void)boundscheck;
    return __Pyx_SetItemInt_Generic(o, PyLong_FromSsize_t(i), v);
}

/* RaiseUnboundLocalError */
static void __Pyx_RaiseUnboundLocalError(const char *varname) {
    PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname);
}

/* DivInt[long] */
static CYTHON_INLINE long __Pyx_div_long(long a, long b, int b_is_constant) {
    long q = a / b;
    long r = a - q*b;
    long adapt_python = (b_is_constant ?
        ((r != 0) & ((r < 0) ^ (b < 0))) :
        ((r != 0) & ((r ^ b) < 0))
    );
    return q - adapt_python;
}

/* ImportFrom */
static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
    PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
    if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
        const char* module_name_str = 0;
        PyObject* module_name = 0;
        PyObject* module_dot = 0;
        PyObject* full_name = 0;
        PyErr_Clear();
        module_name_str = PyModule_GetName(module);
        if (unlikely(!module_name_str)) { goto modbad; }
        module_name = PyUnicode_FromString(module_name_str);
        if (unlikely(!module_name)) { goto modbad; }
        module_dot = PyUnicode_Concat(module_name, __pyx_mstate_global->__pyx_kp_u__2);
        if (unlikely(!module_dot)) { goto modbad; }
        full_name = PyUnicode_Concat(module_dot, name);
        if (unlikely(!full_name)) { goto modbad; }
        #if (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM  < 0x07030400) ||\
                CYTHON_COMPILING_IN_GRAAL
        {
            PyObject *modules = PyImport_GetModuleDict();
            if (unlikely(!modules))
                goto modbad;
            value = PyObject_GetItem(modules, full_name);
        }
        #else
        value = PyImport_GetModule(full_name);
        #endif
      modbad:
        Py_XDECREF(full_name);
        Py_XDECREF(module_dot);
        Py_XDECREF(module_name);
    }
    if (unlikely(!value)) {
        PyErr_Format(PyExc_ImportError, "cannot import name %S", name);
    }
    return value;
}

/* IterFinish */
static CYTHON_INLINE int __Pyx_IterFinish(void) {
    PyObject* exc_type;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    exc_type = __Pyx_PyErr_CurrentExceptionType();
    if (unlikely(exc_type)) {
        if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))
            return -1;
        __Pyx_PyErr_Clear();
        return 0;
    }
    return 0;
}

/* UnpackItemEndCheck */
static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
    if (unlikely(retval)) {
        Py_DECREF(retval);
        __Pyx_RaiseTooManyValuesError(expected);
        return -1;
    }
    return __Pyx_IterFinish();
}

/* pybytes_as_double (used by pynumber_float) */
static double __Pyx_SlowPyString_AsDouble(PyObject *obj) {
    PyObject *float_value = PyFloat_FromString(obj);
    if (likely(float_value)) {
        double value = __Pyx_PyFloat_AS_DOUBLE(float_value);
        Py_DECREF(float_value);
        return value;
    }
    return (double)-1;
}
static const char* __Pyx__PyBytes_AsDouble_Copy(const char* start, char* buffer, Py_ssize_t length) {
    int last_was_punctuation = 1;
    int parse_error_found = 0;
    Py_ssize_t i;
    for (i=0; i < length; i++) {
        char chr = start[i];
        int is_punctuation = (chr == '_') | (chr == '.') | (chr == 'e') | (chr == 'E');
        *buffer = chr;
        buffer += (chr != '_');
        parse_error_found |= last_was_punctuation & is_punctuation;
        last_was_punctuation = is_punctuation;
    }
    parse_error_found |= last_was_punctuation;
    *buffer = '\0';
    return unlikely(parse_error_found) ? NULL : buffer;
}
static double __Pyx__PyBytes_AsDouble_inf_nan(const char* start, Py_ssize_t length) {
    int matches = 1;
    char sign = start[0];
    int is_signed = (sign == '+') | (sign == '-');
    start += is_signed;
    length -= is_signed;
    switch (start[0]) {
        #ifdef Py_NAN
        case 'n':
        case 'N':
            if (unlikely(length != 3)) goto parse_failure;
            matches &= (start[1] == 'a' || start[1] == 'A');
            matches &= (start[2] == 'n' || start[2] == 'N');
            if (unlikely(!matches)) goto parse_failure;
            return (sign == '-') ? -Py_NAN : Py_NAN;
        #endif
        case 'i':
        case 'I':
            if (unlikely(length < 3)) goto parse_failure;
            matches &= (start[1] == 'n' || start[1] == 'N');
            matches &= (start[2] == 'f' || start[2] == 'F');
            if (likely(length == 3 && matches))
                return (sign == '-') ? -Py_HUGE_VAL : Py_HUGE_VAL;
            if (unlikely(length != 8)) goto parse_failure;
            matches &= (start[3] == 'i' || start[3] == 'I');
            matches &= (start[4] == 'n' || start[4] == 'N');
            matches &= (start[5] == 'i' || start[5] == 'I');
            matches &= (start[6] == 't' || start[6] == 'T');
            matches &= (start[7] == 'y' || start[7] == 'Y');
            if (unlikely(!matches)) goto parse_failure;
            return (sign == '-') ? -Py_HUGE_VAL : Py_HUGE_VAL;
        case '.': case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9':
            break;
        default:
            goto parse_failure;
    }
    return 0.0;
parse_failure:
    return -1.0;
}
static CYTHON_INLINE int __Pyx__PyBytes_AsDouble_IsSpace(char ch) {
    return (ch == 0x20) | !((ch < 0x9) | (ch > 0xd));
}
CYTHON_UNUSED static double __Pyx__PyBytes_AsDouble(PyObject *obj, const char* start, Py_ssize_t length) {
    double value;
    Py_ssize_t i, digits;
    const char *last = start + length;
    char *end;
    while (__Pyx__PyBytes_AsDouble_IsSpace(*start))
        start++;
    while (start < last - 1 && __Pyx__PyBytes_AsDouble_IsSpace(last[-1]))
        last--;
    length = last - start;
    if (unlikely(length <= 0)) goto fallback;
    value = __Pyx__PyBytes_AsDouble_inf_nan(start, length);
    if (unlikely(value == -1.0)) goto fallback;
    if (value != 0.0) return value;
    digits = 0;
    for (i=0; i < length; digits += start[i++] != '_');
    if (likely(digits == length)) {
        value = PyOS_string_to_double(start, &end, NULL);
    } else if (digits < 40) {
        char number[40];
        last = __Pyx__PyBytes_AsDouble_Copy(start, number, length);
        if (unlikely(!last)) goto fallback;
        value = PyOS_string_to_double(number, &end, NULL);
    } else {
        char *number = (char*) PyMem_Malloc((digits + 1) * sizeof(char));
        if (unlikely(!number)) goto fallback;
        last = __Pyx__PyBytes_AsDouble_Copy(start, number, length);
        if (unlikely(!last)) {
            PyMem_Free(number);
            goto fallback;
        }
        value = PyOS_string_to_double(number, &end, NULL);
        PyMem_Free(number);
    }
    if (likely(end == last) || (value == (double)-1 && PyErr_Occurred())) {
        return value;
    }
fallback:
    return __Pyx_SlowPyString_AsDouble(obj);
}

/* pynumber_float */
static CYTHON_INLINE PyObject* __Pyx__PyNumber_Float(PyObject* obj) {
    double val;
    if (PyLong_CheckExact(obj)) {
#if CYTHON_USE_PYLONG_INTERNALS
        if (likely(__Pyx_PyLong_IsCompact(obj))) {
            val = (double) __Pyx_PyLong_CompactValue(obj);
            goto no_error;
        }
#endif
        val = PyLong_AsDouble(obj);
    } else if (PyUnicode_CheckExact(obj)) {
        val = __Pyx_PyUnicode_AsDouble(obj);
    } else if (PyBytes_CheckExact(obj)) {
        val = __Pyx_PyBytes_AsDouble(obj);
    } else if (PyByteArray_CheckExact(obj)) {
        val = __Pyx_PyByteArray_AsDouble(obj);
    } else {
        return PyNumber_Float(obj);
    }
    if (unlikely(val == -1 && PyErr_Occurred())) {
        return NULL;
    }
#if CYTHON_USE_PYLONG_INTERNALS
no_error:
#endif
    return PyFloat_FromDouble(val);
}

/* py_abs */
#if CYTHON_USE_PYLONG_INTERNALS
static PyObject *__Pyx_PyLong_AbsNeg(PyObject *n) {
#if PY_VERSION_HEX >= 0x030C00A7
    if (likely(__Pyx_PyLong_IsCompact(n))) {
        return PyLong_FromSize_t(__Pyx_PyLong_CompactValueUnsigned(n));
    }
#else
    if (likely(Py_SIZE(n) == -1)) {
        return PyLong_FromUnsignedLong(__Pyx_PyLong_Digits(n)[0]);
    }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
    {
        PyObject *copy = _PyLong_Copy((PyLongObject*)n);
        if (likely(copy)) {
            #if PY_VERSION_HEX >= 0x030C00A7
            ((PyLongObject*)copy)->long_value.lv_tag ^= ((PyLongObject*)copy)->long_value.lv_tag & _PyLong_SIGN_MASK;
            #else
            __Pyx_SET_SIZE(copy, -Py_SIZE(copy));
            #endif
        }
        return copy;
    }
#else
    return PyNumber_Negative(n);
#endif
}
#endif

/* PyObjectCallNoArg (used by PyObjectCallMethod0) */
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
    PyObject *arg[2] = {NULL, NULL};
    return __Pyx_PyObject_FastCall(func, arg + 1, 0 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
}

/* PyObjectGetMethod (used by PyObjectCallMethod0) */
#if !(CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000)))
static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) {
    PyObject *attr;
#if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP
    __Pyx_TypeName type_name;
    PyTypeObject *tp = Py_TYPE(obj);
    PyObject *descr;
    descrgetfunc f = NULL;
    PyObject **dictptr, *dict;
    int meth_found = 0;
    assert (*method == NULL);
    if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) {
        attr = __Pyx_PyObject_GetAttrStr(obj, name);
        goto try_unpack;
    }
    if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) {
        return 0;
    }
    descr = _PyType_Lookup(tp, name);
    if (likely(descr != NULL)) {
        Py_INCREF(descr);
#if defined(Py_TPFLAGS_METHOD_DESCRIPTOR) && Py_TPFLAGS_METHOD_DESCRIPTOR
        if (__Pyx_PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_METHOD_DESCRIPTOR))
#else
        #ifdef __Pyx_CyFunction_USED
        if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr)))
        #else
        if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type)))
        #endif
#endif
        {
            meth_found = 1;
        } else {
            f = Py_TYPE(descr)->tp_descr_get;
            if (f != NULL && PyDescr_IsData(descr)) {
                attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
                Py_DECREF(descr);
                goto try_unpack;
            }
        }
    }
    dictptr = _PyObject_GetDictPtr(obj);
    if (dictptr != NULL && (dict = *dictptr) != NULL) {
        Py_INCREF(dict);
        attr = __Pyx_PyDict_GetItemStr(dict, name);
        if (attr != NULL) {
            Py_INCREF(attr);
            Py_DECREF(dict);
            Py_XDECREF(descr);
            goto try_unpack;
        }
        Py_DECREF(dict);
    }
    if (meth_found) {
        *method = descr;
        return 1;
    }
    if (f != NULL) {
        attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
        Py_DECREF(descr);
        goto try_unpack;
    }
    if (likely(descr != NULL)) {
        *method = descr;
        return 0;
    }
    type_name = __Pyx_PyType_GetFullyQualifiedName(tp);
    PyErr_Format(PyExc_AttributeError,
                 "'" __Pyx_FMT_TYPENAME "' object has no attribute '%U'",
                 type_name, name);
    __Pyx_DECREF_TypeName(type_name);
    return 0;
#else
    attr = __Pyx_PyObject_GetAttrStr(obj, name);
    goto try_unpack;
#endif
try_unpack:
#if CYTHON_UNPACK_METHODS
    if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) {
        PyObject *function = PyMethod_GET_FUNCTION(attr);
        Py_INCREF(function);
        Py_DECREF(attr);
        *method = function;
        return 1;
    }
#endif
    *method = attr;
    return 0;
}
#endif

/* PyObjectCallMethod0 (used by dict_iter) */
static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) {
#if CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000))
    PyObject *args[1] = {obj};
    (void) __Pyx_PyObject_CallOneArg;
    (void) __Pyx_PyObject_CallNoArg;
    return PyObject_VectorcallMethod(method_name, args, 1 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL);
#else
    PyObject *method = NULL, *result = NULL;
    int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
    if (likely(is_method)) {
        result = __Pyx_PyObject_CallOneArg(method, obj);
        Py_DECREF(method);
        return result;
    }
    if (unlikely(!method)) goto bad;
    result = __Pyx_PyObject_CallNoArg(method);
    Py_DECREF(method);
bad:
    return result;
#endif
}

/* UnpackTupleError (used by UnpackTuple2) */
static void __Pyx_UnpackTupleError(PyObject *t, Py_ssize_t index) {
    if (t == Py_None) {
      __Pyx_RaiseNoneNotIterableError();
    } else {
      Py_ssize_t size = __Pyx_PyTuple_GET_SIZE(t);
 #if !CYTHON_ASSUME_SAFE_SIZE
      if (unlikely(size < 0)) return;
 #endif
      if (size < index) {
        __Pyx_RaiseNeedMoreValuesError(size);
      } else {
        __Pyx_RaiseTooManyValuesError(index);
      }
    }
}

/* UnpackTuple2 (used by dict_iter) */
static CYTHON_INLINE int __Pyx_unpack_tuple2(
        PyObject* tuple, PyObject** value1, PyObject** value2, int is_tuple, int has_known_size, int decref_tuple) {
    if (likely(is_tuple || PyTuple_Check(tuple))) {
        Py_ssize_t size;
        if (has_known_size) {
            return __Pyx_unpack_tuple2_exact(tuple, value1, value2, decref_tuple);
        }
        size = __Pyx_PyTuple_GET_SIZE(tuple);
        if (likely(size == 2)) {
            return __Pyx_unpack_tuple2_exact(tuple, value1, value2, decref_tuple);
        }
        if (size >= 0) {
            __Pyx_UnpackTupleError(tuple, 2);
        }
        return -1;
    } else {
        return __Pyx_unpack_tuple2_generic(tuple, value1, value2, has_known_size, decref_tuple);
    }
}
static CYTHON_INLINE int __Pyx_unpack_tuple2_exact(
        PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2, int decref_tuple) {
    PyObject *value1 = NULL, *value2 = NULL;
#if CYTHON_AVOID_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS
    value1 = __Pyx_PySequence_ITEM(tuple, 0);  if (unlikely(!value1)) goto bad;
    value2 = __Pyx_PySequence_ITEM(tuple, 1);  if (unlikely(!value2)) goto bad;
#else
    value1 = PyTuple_GET_ITEM(tuple, 0);  Py_INCREF(value1);
    value2 = PyTuple_GET_ITEM(tuple, 1);  Py_INCREF(value2);
#endif
    if (decref_tuple) {
        Py_DECREF(tuple);
    }
    *pvalue1 = value1;
    *pvalue2 = value2;
    return 0;
#if CYTHON_AVOID_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS
bad:
    Py_XDECREF(value1);
    Py_XDECREF(value2);
    if (decref_tuple) { Py_XDECREF(tuple); }
    return -1;
#endif
}
static int __Pyx_unpack_tuple2_generic(PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2,
                                       int has_known_size, int decref_tuple) {
    Py_ssize_t index;
    PyObject *value1 = NULL, *value2 = NULL, *iter = NULL;
    iternextfunc iternext;
    iter = PyObject_GetIter(tuple);
    if (unlikely(!iter)) goto bad;
    if (decref_tuple) { Py_DECREF(tuple); tuple = NULL; }
    iternext = __Pyx_PyObject_GetIterNextFunc(iter);
    value1 = iternext(iter); if (unlikely(!value1)) { index = 0; goto unpacking_failed; }
    value2 = iternext(iter); if (unlikely(!value2)) { index = 1; goto unpacking_failed; }
    if (!has_known_size && unlikely(__Pyx_IternextUnpackEndCheck(iternext(iter), 2))) goto bad;
    Py_DECREF(iter);
    *pvalue1 = value1;
    *pvalue2 = value2;
    return 0;
unpacking_failed:
    if (!has_known_size && __Pyx_IterFinish() == 0)
        __Pyx_RaiseNeedMoreValuesError(index);
bad:
    Py_XDECREF(iter);
    Py_XDECREF(value1);
    Py_XDECREF(value2);
    if (decref_tuple) { Py_XDECREF(tuple); }
    return -1;
}

/* dict_iter */
#if CYTHON_AVOID_BORROWED_REFS
#include <string.h>
#endif
static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* iterable, int is_dict, PyObject* method_name,
                                                   Py_ssize_t* p_orig_length, int* p_source_is_dict) {
    is_dict = is_dict || likely(PyDict_CheckExact(iterable));
    *p_source_is_dict = is_dict;
    if (is_dict) {
#if !CYTHON_AVOID_BORROWED_REFS
        *p_orig_length = PyDict_Size(iterable);
        Py_INCREF(iterable);
        return iterable;
#else
        static PyObject *py_items = NULL, *py_keys = NULL, *py_values = NULL;
        PyObject **pp = NULL;
        if (method_name) {
            const char *name = PyUnicode_AsUTF8(method_name);
            if (strcmp(name, "iteritems") == 0) pp = &py_items;
            else if (strcmp(name, "iterkeys") == 0) pp = &py_keys;
            else if (strcmp(name, "itervalues") == 0) pp = &py_values;
            if (pp) {
                if (!*pp) {
                    *pp = PyUnicode_FromString(name + 4);
                    if (!*pp)
                        return NULL;
                }
                method_name = *pp;
            }
        }
#endif
    }
    *p_orig_length = 0;
    if (method_name) {
        PyObject* iter;
        iterable = __Pyx_PyObject_CallMethod0(iterable, method_name);
        if (!iterable)
            return NULL;
#if !CYTHON_AVOID_BORROWED_REFS
        if (PyTuple_CheckExact(iterable) || PyList_CheckExact(iterable))
            return iterable;
#endif
        iter = PyObject_GetIter(iterable);
        Py_DECREF(iterable);
        return iter;
    }
    return PyObject_GetIter(iterable);
}
#if !CYTHON_AVOID_BORROWED_REFS
static CYTHON_INLINE int __Pyx_dict_iter_next_source_is_dict(
        PyObject* iter_obj, CYTHON_NCP_UNUSED Py_ssize_t orig_length, CYTHON_NCP_UNUSED Py_ssize_t* ppos,
        PyObject** pkey, PyObject** pvalue, PyObject** pitem) {
    PyObject *key, *value;
    if (unlikely(orig_length != PyDict_Size(iter_obj))) {
        PyErr_SetString(PyExc_RuntimeError, "dictionary changed size during iteration");
        return -1;
    }
    if (unlikely(!PyDict_Next(iter_obj, ppos, &key, &value))) {
        return 0;
    }
    if (pitem) {
        PyObject* tuple = PyTuple_New(2);
        if (unlikely(!tuple)) {
            return -1;
        }
        Py_INCREF(key);
        Py_INCREF(value);
        #if CYTHON_ASSUME_SAFE_MACROS
        PyTuple_SET_ITEM(tuple, 0, key);
        PyTuple_SET_ITEM(tuple, 1, value);
        #else
        if (unlikely(PyTuple_SetItem(tuple, 0, key) < 0)) {
            Py_DECREF(value);
            Py_DECREF(tuple);
            return -1;
        }
        if (unlikely(PyTuple_SetItem(tuple, 1, value) < 0)) {
            Py_DECREF(tuple);
            return -1;
        }
        #endif
        *pitem = tuple;
    } else {
        if (pkey) {
            Py_INCREF(key);
            *pkey = key;
        }
        if (pvalue) {
            Py_INCREF(value);
            *pvalue = value;
        }
    }
    return 1;
}
#endif
static CYTHON_INLINE int __Pyx_dict_iter_next(
        PyObject* iter_obj, CYTHON_NCP_UNUSED Py_ssize_t orig_length, CYTHON_NCP_UNUSED Py_ssize_t* ppos,
        PyObject** pkey, PyObject** pvalue, PyObject** pitem, int source_is_dict) {
    PyObject* next_item;
#if !CYTHON_AVOID_BORROWED_REFS
    if (source_is_dict) {
        int result;
#if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API
        Py_BEGIN_CRITICAL_SECTION(iter_obj);
#endif
        result = __Pyx_dict_iter_next_source_is_dict(iter_obj, orig_length, ppos, pkey, pvalue, pitem);
#if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API
        Py_END_CRITICAL_SECTION();
#endif
        return result;
    } else if (PyTuple_CheckExact(iter_obj)) {
        Py_ssize_t pos = *ppos;
        Py_ssize_t tuple_size = __Pyx_PyTuple_GET_SIZE(iter_obj);
        #if !CYTHON_ASSUME_SAFE_SIZE
        if (unlikely(tuple_size < 0)) return -1;
        #endif
        if (unlikely(pos >= tuple_size)) return 0;
        *ppos = pos + 1;
        #if CYTHON_ASSUME_SAFE_MACROS
        next_item = PyTuple_GET_ITEM(iter_obj, pos);
        #else
        next_item = PyTuple_GetItem(iter_obj, pos);
        if (unlikely(!next_item)) return -1;
        #endif
        Py_INCREF(next_item);
    } else if (PyList_CheckExact(iter_obj)) {
        Py_ssize_t pos = *ppos;
        Py_ssize_t list_size = __Pyx_PyList_GET_SIZE(iter_obj);
        #if !CYTHON_ASSUME_SAFE_SIZE
        if (unlikely(list_size < 0)) return -1;
        #endif
        if (unlikely(pos >= list_size)) return 0;
        *ppos = pos + 1;
        next_item = __Pyx_PyList_GetItemRef(iter_obj, pos);
        if (unlikely(!next_item)) return -1;
    } else
#endif
    {
        next_item = PyIter_Next(iter_obj);
        if (unlikely(!next_item)) {
            return __Pyx_IterFinish();
        }
    }
    if (pitem) {
        *pitem = next_item;
    } else if (pkey && pvalue) {
        if (__Pyx_unpack_tuple2(next_item, pkey, pvalue, source_is_dict, source_is_dict, 1))
            return -1;
    } else if (pkey) {
        *pkey = next_item;
    } else {
        *pvalue = next_item;
    }
    return 1;
}

/* UnicodeConcatInPlace */
# if CYTHON_COMPILING_IN_CPYTHON
static int
__Pyx_unicode_modifiable(PyObject *unicode, int unsafe_shared)
{
    if (!__Pyx_IS_UNIQUELY_REFERENCED(unicode, unsafe_shared))
        return 0;
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX > 0x030F0000
    if (PyUnstable_Unicode_GET_CACHED_HASH(unicode) != -1)
        return 0;
#endif
    if (!PyUnicode_CheckExact(unicode))
        return 0;
    if (PyUnicode_CHECK_INTERNED(unicode))
        return 0;
    return 1;
}
static CYTHON_INLINE PyObject *__Pyx_PyUnicode_ConcatInPlaceImpl(PyObject **p_left, PyObject *right, int unsafe_shared
        #if CYTHON_REFNANNY
        , void* __pyx_refnanny
        #endif
    ) {
    PyObject *left = *p_left;
    Py_ssize_t left_len, right_len, new_len;
    if (unlikely(__Pyx_PyUnicode_READY(left) == -1))
        return NULL;
    if (unlikely(__Pyx_PyUnicode_READY(right) == -1))
        return NULL;
    left_len = PyUnicode_GET_LENGTH(left);
    if (left_len == 0) {
        Py_INCREF(right);
        return right;
    }
    right_len = PyUnicode_GET_LENGTH(right);
    if (right_len == 0) {
        Py_INCREF(left);
        return left;
    }
    if (unlikely(left_len > PY_SSIZE_T_MAX - right_len)) {
        PyErr_SetString(PyExc_OverflowError,
                        "strings are too large to concat");
        return NULL;
    }
    new_len = left_len + right_len;
    if (__Pyx_unicode_modifiable(left, unsafe_shared)
            && PyUnicode_CheckExact(right)
            && PyUnicode_KIND(right) <= PyUnicode_KIND(left)
            && !(PyUnicode_IS_ASCII(left) && !PyUnicode_IS_ASCII(right))) {
        int ret;
        __Pyx_GIVEREF(*p_left);
        ret = PyUnicode_Resize(p_left, new_len);
        __Pyx_GOTREF(*p_left);
        if (unlikely(ret != 0))
            return NULL;
        #if PY_VERSION_HEX >= 0x030d0000
        if (unlikely(PyUnicode_CopyCharacters(*p_left, left_len, right, 0, right_len) < 0)) return NULL;
        #else
        _PyUnicode_FastCopyCharacters(*p_left, left_len, right, 0, right_len);
        #endif
        __Pyx_INCREF(*p_left);
        __Pyx_GIVEREF(*p_left);
        return *p_left;
    } else {
        return __Pyx_PyUnicode_Concat(left, right);
    }
  }
#endif

/* decode_c_bytes (used by decode_cpp_string) */
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;
    if (unlikely(stop <= start))
        return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_unicode);
    length = stop - start;
    cstring += start;
    if (decode_func) {
        return decode_func(cstring, length, errors);
    } else {
        return PyUnicode_Decode(cstring, length, encoding, errors);
    }
}

/* WriteUnraisableException */
static void __Pyx_WriteUnraisable(const char *name, int clineno,
                                  int lineno, const char *filename,
                                  int full_traceback, int nogil) {
    PyObject *old_exc, *old_val, *old_tb;
    PyObject *ctx;
    __Pyx_PyThreadState_declare
    PyGILState_STATE state;
    if (nogil)
        state = PyGILState_Ensure();
    else state = (PyGILState_STATE)0;
    CYTHON_UNUSED_VAR(clineno);
    CYTHON_UNUSED_VAR(lineno);
    CYTHON_UNUSED_VAR(filename);
    CYTHON_MAYBE_UNUSED_VAR(nogil);
    __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(0);
    }
    ctx = PyUnicode_FromString(name);
    __Pyx_ErrRestore(old_exc, old_val, old_tb);
    if (!ctx) {
        PyErr_WriteUnraisable(Py_None);
    } else {
        PyErr_WriteUnraisable(ctx);
        Py_DECREF(ctx);
    }
    if (nogil)
        PyGILState_Release(state);
}

/* pop */
static CYTHON_INLINE PyObject* __Pyx__PyObject_Pop(PyObject* L) {
    if (__Pyx_IS_TYPE(L, &PySet_Type)) {
        return PySet_Pop(L);
    }
    return __Pyx_PyObject_CallMethod0(L, __pyx_mstate_global->__pyx_n_u_pop);
}
#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE
static CYTHON_INLINE PyObject* __Pyx_PyList_Pop(PyObject* L) {
    if (likely(PyList_GET_SIZE(L) > (((PyListObject*)L)->allocated >> 1))) {
        __Pyx_SET_SIZE(L, Py_SIZE(L) - 1);
        return PyList_GET_ITEM(L, PyList_GET_SIZE(L));
    }
    return __Pyx_CallUnboundCMethod0(&__pyx_mstate_global->__pyx_umethod_PyList_Type_pop, L);
}
#endif

/* PyObjectCall2Args (used by CallUnboundCMethod1) */
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) {
    PyObject *args[3] = {NULL, arg1, arg2};
    return __Pyx_PyObject_FastCall(function, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
}

/* CallUnboundCMethod1 */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg) {
    int was_initialized =  __Pyx_CachedCFunction_GetAndSetInitializing(cfunc);
    if (likely(was_initialized == 2 && cfunc->func)) {
        int flag = cfunc->flag;
        if (flag == METH_O) {
            return __Pyx_CallCFunction(cfunc, self, arg);
        } else if (flag == METH_FASTCALL) {
            return __Pyx_CallCFunctionFast(cfunc, self, &arg, 1);
        } else if (flag == (METH_FASTCALL | METH_KEYWORDS)) {
            return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, &arg, 1, NULL);
        }
    }
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    else if (unlikely(was_initialized == 1)) {
        __Pyx_CachedCFunction tmp_cfunc = {
#ifndef __cplusplus
            0
#endif
        };
        tmp_cfunc.type = cfunc->type;
        tmp_cfunc.method_name = cfunc->method_name;
        return __Pyx__CallUnboundCMethod1(&tmp_cfunc, self, arg);
    }
#endif
    PyObject* result = __Pyx__CallUnboundCMethod1(cfunc, self, arg);
    __Pyx_CachedCFunction_SetFinishedInitializing(cfunc);
    return result;
}
#endif
static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg){
    PyObject *result = NULL;
    if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
#if CYTHON_COMPILING_IN_CPYTHON
    if (cfunc->func && (cfunc->flag & METH_VARARGS)) {
        PyObject *args = PyTuple_New(1);
        if (unlikely(!args)) return NULL;
        Py_INCREF(arg);
        PyTuple_SET_ITEM(args, 0, arg);
        if (cfunc->flag & METH_KEYWORDS)
            result = __Pyx_CallCFunctionWithKeywords(cfunc, self, args, NULL);
        else
            result = __Pyx_CallCFunction(cfunc, self, args);
        Py_DECREF(args);
    } else
#endif
    {
        result = __Pyx_PyObject_Call2Args(cfunc->method, self, arg);
    }
    return result;
}

/* KeywordStringCheck */
static int __Pyx_CheckKeywordStrings(
    const char* function_name,
    PyObject *kw)
{
#if CYTHON_COMPILING_IN_PYPY && !defined(PyArg_ValidateKeywordArguments)
    CYTHON_UNUSED_VAR(function_name);
    CYTHON_UNUSED_VAR(kw);
    return 0;
#else
    if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kw))) {
#if PY_VERSION_HEX >= 0x03090000
        CYTHON_UNUSED_VAR(function_name);
#else
        Py_ssize_t kwsize;
        #if CYTHON_ASSUME_SAFE_SIZE
        kwsize = PyTuple_GET_SIZE(kw);
        #else
        kwsize = PyTuple_Size(kw);
        if (unlikely(kwsize < 0)) return -1;
        #endif
        for (Py_ssize_t pos = 0; pos < kwsize; pos++) {
            PyObject* key = NULL;
            #if CYTHON_ASSUME_SAFE_MACROS
            key = PyTuple_GET_ITEM(kw, pos);
            #else
            key = PyTuple_GetItem(kw, pos);
            if (unlikely(!key)) return -1;
            #endif
            if (unlikely(!PyUnicode_Check(key))) {
                PyErr_Format(PyExc_TypeError,
                    "%.200s() keywords must be strings", function_name);
                return -1;
            }
        }
#endif
    } else {
        if (unlikely(!PyArg_ValidateKeywordArguments(kw))) return -1;
    }
    return 0;
#endif
}

/* PyObjectVectorCallKwBuilder (used by PyObjectVectorCallMethodKwBuilder) */
#if CYTHON_VECTORCALL
static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) {
    (void)__Pyx_PyObject_FastCallDict;
    Py_INCREF(key);
    if (__Pyx_PyTuple_SET_ITEM(builder, n, key) != (0)) return -1;
    args[n] = value;
    return 0;
}
CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) {
    (void)__Pyx_VectorcallBuilder_AddArgStr;
    if (unlikely(!PyUnicode_Check(key))) {
        PyErr_SetString(PyExc_TypeError, "keywords must be strings");
        return -1;
    }
    return __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n);
}
static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n) {
    PyObject *pyKey = PyUnicode_FromString(key);
    if (!pyKey) return -1;
    return __Pyx_VectorcallBuilder_AddArg(pyKey, value, builder, args, n);
}
#else // CYTHON_VECTORCALL
CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, CYTHON_UNUSED PyObject **args, CYTHON_UNUSED int n) {
    if (unlikely(!PyUnicode_Check(key))) {
        PyErr_SetString(PyExc_TypeError, "keywords must be strings");
        return -1;
    }
    return PyDict_SetItem(builder, key, value);
}
#endif

/* PyObjectVectorCallMethodKwBuilder */
#if !CYTHON_VECTORCALL || PY_VERSION_HEX < 0x03090000
static PyObject *__Pyx_Object_VectorcallMethod_CallFromBuilder(PyObject *name, PyObject *const *args, size_t nargsf, PyObject *kwnames) {
    PyObject *result;
    PyObject *obj = PyObject_GetAttr(args[0], name);
    if (unlikely(!obj))
        return NULL;
    result = __Pyx_Object_Vectorcall_CallFromBuilder(obj, args+1, nargsf-1, kwnames);
    Py_DECREF(obj);
    return result;
}
#endif

/* PyLongCompare */
static CYTHON_INLINE int __Pyx_PyLong_BoolNeObjC(PyObject *op1, PyObject *op2, long intval, long inplace) {
    CYTHON_MAYBE_UNUSED_VAR(intval);
    CYTHON_UNUSED_VAR(inplace);
    if (op1 == op2) {
        return 0;
    }
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        int unequal;
        unsigned long uintval;
        Py_ssize_t size = __Pyx_PyLong_DigitCount(op1);
        const digit* digits = __Pyx_PyLong_Digits(op1);
        if (intval == 0) {
            return (__Pyx_PyLong_IsZero(op1) != 1);
        } else if (intval < 0) {
            if (__Pyx_PyLong_IsNonNeg(op1))
                return 1;
            intval = -intval;
        } else {
            if (__Pyx_PyLong_IsNeg(op1))
                return 1;
        }
        uintval = (unsigned long) intval;
#if PyLong_SHIFT * 4 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 4)) {
            unequal = (size != 5) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[4] != ((uintval >> (4 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 3 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 3)) {
            unequal = (size != 4) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 2 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 2)) {
            unequal = (size != 3) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 1 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 1)) {
            unequal = (size != 2) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
            unequal = (size != 1) || (((unsigned long) digits[0]) != (uintval & (unsigned long) PyLong_MASK));
        return (unequal != 0);
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
        double a = __Pyx_PyFloat_AS_DOUBLE(op1);
        return ((double)a != (double)b);
    }
    return __Pyx_PyObject_IsTrueAndDecref(
        PyObject_RichCompare(op1, op2, Py_NE));
}

/* py_dict_pop */
static CYTHON_INLINE PyObject *__Pyx_PyDict_Pop(PyObject *d, PyObject *key, PyObject *default_value) {
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d00A2 || defined(PyDict_Pop)
    PyObject *value;
    if (PyDict_Pop(d, key, &value) == 0) {
        if (default_value) {
            Py_INCREF(default_value);
        } else {
            PyErr_SetObject(PyExc_KeyError, key);
        }
        value = default_value;
    }
    return value;
#elif CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000
    return _PyDict_Pop(d, key, default_value);
#else
    if (default_value) {
        return __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_pop, d, key, default_value);
    } else {
        return __Pyx_CallUnboundCMethod1(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_pop, d, key);
    }
#endif
}

/* PyUnicode_Substring */
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_Substring(
            PyObject* text, Py_ssize_t start, Py_ssize_t stop) {
    Py_ssize_t length;
    #if !CYTHON_COMPILING_IN_LIMITED_API
    if (unlikely(__Pyx_PyUnicode_READY(text) == -1)) return NULL;
    #endif
    length = __Pyx_PyUnicode_GET_LENGTH(text);
    #if !CYTHON_ASSUME_SAFE_SIZE
    if (unlikely(length < 0)) return NULL;
    #endif
    if (start < 0) {
        start += length;
        if (start < 0)
            start = 0;
    }
    if (stop < 0)
        stop += length;
    else if (stop > length)
        stop = length;
    if (stop <= start)
        return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_unicode);
    if (start == 0 && stop == length)
        return __Pyx_NewRef(text);
#if CYTHON_COMPILING_IN_LIMITED_API
    return PyUnicode_Substring(text, start, stop);
#else
    return PyUnicode_FromKindAndData(PyUnicode_KIND(text),
        PyUnicode_1BYTE_DATA(text) + start*PyUnicode_KIND(text), stop-start);
#endif
}

/* PyLongBinop */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_Fallback___Pyx_PyLong_AddObjC(PyObject *op1, PyObject *op2, int inplace) {
    return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
}
#if CYTHON_USE_PYLONG_INTERNALS
static PyObject* __Pyx_Unpacked___Pyx_PyLong_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) {
    CYTHON_MAYBE_UNUSED_VAR(inplace);
    CYTHON_UNUSED_VAR(zerodivision_check);
    const long b = intval;
    long a;
    const PY_LONG_LONG llb = intval;
    PY_LONG_LONG lla;
    if (unlikely(__Pyx_PyLong_IsZero(op1))) {
        return __Pyx_NewRef(op2);
    }
    const int is_positive = __Pyx_PyLong_IsPos(op1);
    const digit* digits = __Pyx_PyLong_Digits(op1);
    const Py_ssize_t size = __Pyx_PyLong_DigitCount(op1);
    if (likely(size == 1)) {
        a = (long) digits[0];
        if (!is_positive) a *= -1;
    } else {
        switch (size) {
            case 2:
                if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                    a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                    if (!is_positive) a *= -1;
                    goto calculate_long;
                } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                    lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                    if (!is_positive) lla *= -1;
                    goto calculate_long_long;
                }
                break;
            case 3:
                if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                    a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                    if (!is_positive) a *= -1;
                    goto calculate_long;
                } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                    lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                    if (!is_positive) lla *= -1;
                    goto calculate_long_long;
                }
                break;
            case 4:
                if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                    a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                    if (!is_positive) a *= -1;
                    goto calculate_long;
                } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                    lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                    if (!is_positive) lla *= -1;
                    goto calculate_long_long;
                }
                break;
        }
        return PyLong_Type.tp_as_number->nb_add(op1, op2);
    }
    calculate_long:
        {
            long x;
            x = a + b;
            return PyLong_FromLong(x);
        }
    calculate_long_long:
        {
            PY_LONG_LONG llx;
            llx = lla + llb;
            return PyLong_FromLongLong(llx);
        }
    
}
#endif
static PyObject* __Pyx_Float___Pyx_PyLong_AddObjC(PyObject *float_val, long intval, int zerodivision_check) {
    CYTHON_UNUSED_VAR(zerodivision_check);
    const long b = intval;
    double a = __Pyx_PyFloat_AS_DOUBLE(float_val);
        double result;
        
        result = ((double)a) + (double)b;
        return PyFloat_FromDouble(result);
}
static CYTHON_INLINE PyObject* __Pyx_PyLong_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) {
    CYTHON_MAYBE_UNUSED_VAR(intval);
    CYTHON_UNUSED_VAR(zerodivision_check);
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        return __Pyx_Unpacked___Pyx_PyLong_AddObjC(op1, op2, intval, inplace, zerodivision_check);
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        return __Pyx_Float___Pyx_PyLong_AddObjC(op1, intval, zerodivision_check);
    }
    return __Pyx_Fallback___Pyx_PyLong_AddObjC(op1, op2, inplace);
}
#endif

/* pybuiltin_invalid (used by pyint_simplify) */
static void __Pyx_PyBuiltin_Invalid(PyObject *obj, const char *type_name, const char *argname) {
    __Pyx_TypeName obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj));
    if (argname) {
        PyErr_Format(PyExc_TypeError,
            "Argument '%.200s' has incorrect type (expected %.200s, got " __Pyx_FMT_TYPENAME ")",
            argname, type_name, obj_type_name
        );
    } else {
        PyErr_Format(PyExc_TypeError,
            "Expected %.200s, got " __Pyx_FMT_TYPENAME,
            type_name, obj_type_name
        );
    }
    __Pyx_DECREF_TypeName(obj_type_name);
}

/* pyint_simplify */
static CYTHON_INLINE int __Pyx_PyInt_FromNumber(PyObject **number_var, const char *argname, int accept_none) {
    PyObject *number = *number_var;
    if (likely((accept_none && number == Py_None) || PyLong_CheckExact(number))) {
        return 0;
    }
    PyObject *int_object;
    if (likely(PyNumber_Check(number))) {
        int_object = PyNumber_Long(number);
        if (unlikely(!int_object)) goto bad;
    } else {
        __Pyx_PyBuiltin_Invalid(number, "int", argname);
        goto bad;
    }
    *number_var = int_object;
    Py_DECREF(number);
    return 0;
bad:
    *number_var = NULL;
    Py_DECREF(number);
    return -1;
}

/* PyLongBinop */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_Fallback___Pyx_PyLong_SubtractObjC(PyObject *op1, PyObject *op2, int inplace) {
    return (inplace ? PyNumber_InPlaceSubtract : PyNumber_Subtract)(op1, op2);
}
#if CYTHON_USE_PYLONG_INTERNALS
static PyObject* __Pyx_Unpacked___Pyx_PyLong_SubtractObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) {
    CYTHON_MAYBE_UNUSED_VAR(inplace);
    CYTHON_UNUSED_VAR(zerodivision_check);
    const long b = intval;
    long a;
    const PY_LONG_LONG llb = intval;
    PY_LONG_LONG lla;
    if (unlikely(__Pyx_PyLong_IsZero(op1))) {
        return PyLong_FromLong(-intval);
    }
    const int is_positive = __Pyx_PyLong_IsPos(op1);
    const digit* digits = __Pyx_PyLong_Digits(op1);
    const Py_ssize_t size = __Pyx_PyLong_DigitCount(op1);
    if (likely(size == 1)) {
        a = (long) digits[0];
        if (!is_positive) a *= -1;
    } else {
        switch (size) {
            case 2:
                if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                    a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                    if (!is_positive) a *= -1;
                    goto calculate_long;
                } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                    lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                    if (!is_positive) lla *= -1;
                    goto calculate_long_long;
                }
                break;
            case 3:
                if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                    a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                    if (!is_positive) a *= -1;
                    goto calculate_long;
                } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                    lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                    if (!is_positive) lla *= -1;
                    goto calculate_long_long;
                }
                break;
            case 4:
                if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                    a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                    if (!is_positive) a *= -1;
                    goto calculate_long;
                } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                    lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                    if (!is_positive) lla *= -1;
                    goto calculate_long_long;
                }
                break;
        }
        return PyLong_Type.tp_as_number->nb_subtract(op1, op2);
    }
    calculate_long:
        {
            long x;
            x = a - b;
            return PyLong_FromLong(x);
        }
    calculate_long_long:
        {
            PY_LONG_LONG llx;
            llx = lla - llb;
            return PyLong_FromLongLong(llx);
        }
    
}
#endif
static PyObject* __Pyx_Float___Pyx_PyLong_SubtractObjC(PyObject *float_val, long intval, int zerodivision_check) {
    CYTHON_UNUSED_VAR(zerodivision_check);
    const long b = intval;
    double a = __Pyx_PyFloat_AS_DOUBLE(float_val);
        double result;
        
        result = ((double)a) - (double)b;
        return PyFloat_FromDouble(result);
}
static CYTHON_INLINE PyObject* __Pyx_PyLong_SubtractObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) {
    CYTHON_MAYBE_UNUSED_VAR(intval);
    CYTHON_UNUSED_VAR(zerodivision_check);
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        return __Pyx_Unpacked___Pyx_PyLong_SubtractObjC(op1, op2, intval, inplace, zerodivision_check);
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        return __Pyx_Float___Pyx_PyLong_SubtractObjC(op1, intval, zerodivision_check);
    }
    return __Pyx_Fallback___Pyx_PyLong_SubtractObjC(op1, op2, inplace);
}
#endif

/* PyLongCompare */
static CYTHON_INLINE int __Pyx_PyLong_BoolEqObjC(PyObject *op1, PyObject *op2, long intval, long inplace) {
    CYTHON_MAYBE_UNUSED_VAR(intval);
    CYTHON_UNUSED_VAR(inplace);
    if (op1 == op2) {
        return 1;
    }
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        int unequal;
        unsigned long uintval;
        Py_ssize_t size = __Pyx_PyLong_DigitCount(op1);
        const digit* digits = __Pyx_PyLong_Digits(op1);
        if (intval == 0) {
            return (__Pyx_PyLong_IsZero(op1) == 1);
        } else if (intval < 0) {
            if (__Pyx_PyLong_IsNonNeg(op1))
                return 0;
            intval = -intval;
        } else {
            if (__Pyx_PyLong_IsNeg(op1))
                return 0;
        }
        uintval = (unsigned long) intval;
#if PyLong_SHIFT * 4 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 4)) {
            unequal = (size != 5) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[4] != ((uintval >> (4 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 3 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 3)) {
            unequal = (size != 4) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 2 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 2)) {
            unequal = (size != 3) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 1 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 1)) {
            unequal = (size != 2) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
            unequal = (size != 1) || (((unsigned long) digits[0]) != (uintval & (unsigned long) PyLong_MASK));
        return (unequal == 0);
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
        double a = __Pyx_PyFloat_AS_DOUBLE(op1);
        return ((double)a == (double)b);
    }
    return __Pyx_PyObject_IsTrueAndDecref(
        PyObject_RichCompare(op1, op2, Py_EQ));
}

/* SliceTupleAndList */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE void __Pyx_crop_slice(Py_ssize_t* _start, Py_ssize_t* _stop, Py_ssize_t* _length) {
    Py_ssize_t start = *_start, stop = *_stop, length = *_length;
    if (start < 0) {
        start += length;
        if (start < 0)
            start = 0;
    }
    if (stop < 0)
        stop += length;
    else if (stop > length)
        stop = length;
    *_length = stop - start;
    *_start = start;
    *_stop = stop;
}
static CYTHON_INLINE PyObject* __Pyx_PyTuple_GetSlice(
            PyObject* src, Py_ssize_t start, Py_ssize_t stop) {
    Py_ssize_t length = PyTuple_GET_SIZE(src);
    __Pyx_crop_slice(&start, &stop, &length);
    return __Pyx_PyTuple_FromArray(((PyTupleObject*)src)->ob_item + start, length);
}
static CYTHON_INLINE PyObject* __Pyx_PyList_GetSlice_locked(
            PyObject* src, Py_ssize_t start, Py_ssize_t stop) {
    Py_ssize_t length = PyList_GET_SIZE(src);
    __Pyx_crop_slice(&start, &stop, &length);
    if (length <= 0) {
        return PyList_New(0);
    }
    return __Pyx_PyList_FromArray(((PyListObject*)src)->ob_item + start, length);
}
static CYTHON_INLINE PyObject* __Pyx_PyList_GetSlice(
            PyObject* src, Py_ssize_t start, Py_ssize_t stop) {
    PyObject *result;
    __Pyx_BEGIN_CRITICAL_SECTION(src);
    result = __Pyx_PyList_GetSlice_locked(src, start, stop);
    __Pyx_END_CRITICAL_SECTION();
    return result;
}
#endif // CYTHON_COMPILING_IN_CPYTHON

/* PyObjectSetAttrStr */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) {
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_setattro))
        return tp->tp_setattro(obj, attr_name, value);
    return PyObject_SetAttr(obj, attr_name, value);
}
#endif

/* SliceObject */
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(PyObject* obj,
        Py_ssize_t cstart, Py_ssize_t cstop,
        PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice,
        int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) {
    __Pyx_TypeName obj_type_name;
#if CYTHON_USE_TYPE_SLOTS
    PyMappingMethods* mp = Py_TYPE(obj)->tp_as_mapping;
    if (likely(mp && mp->mp_subscript))
#endif
    {
        PyObject* result;
        PyObject *py_slice, *py_start, *py_stop;
        if (_py_slice) {
            py_slice = *_py_slice;
        } else {
            PyObject* owned_start = NULL;
            PyObject* owned_stop = NULL;
            if (_py_start) {
                py_start = *_py_start;
            } else {
                if (has_cstart) {
                    owned_start = py_start = PyLong_FromSsize_t(cstart);
                    if (unlikely(!py_start)) goto bad;
                } else
                    py_start = Py_None;
            }
            if (_py_stop) {
                py_stop = *_py_stop;
            } else {
                if (has_cstop) {
                    owned_stop = py_stop = PyLong_FromSsize_t(cstop);
                    if (unlikely(!py_stop)) {
                        Py_XDECREF(owned_start);
                        goto bad;
                    }
                } else
                    py_stop = Py_None;
            }
            py_slice = PySlice_New(py_start, py_stop, Py_None);
            Py_XDECREF(owned_start);
            Py_XDECREF(owned_stop);
            if (unlikely(!py_slice)) goto bad;
        }
#if CYTHON_USE_TYPE_SLOTS
        result = mp->mp_subscript(obj, py_slice);
#else
        result = PyObject_GetItem(obj, py_slice);
#endif
        if (!_py_slice) {
            Py_DECREF(py_slice);
        }
        return result;
    }
    obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj));
    PyErr_Format(PyExc_TypeError,
        "'" __Pyx_FMT_TYPENAME "' object is unsliceable", obj_type_name);
    __Pyx_DECREF_TypeName(obj_type_name);
bad:
    return NULL;
}

/* RaiseClosureNameError */
static void __Pyx_RaiseClosureNameError(const char *varname) {
    PyErr_Format(PyExc_NameError, "free variable '%s' referenced before assignment in enclosing scope", varname);
}

/* dict_setdefault (used by FetchCommonType) */
static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value) {
    PyObject* value;
#if __PYX_LIMITED_VERSION_HEX >= 0x030F0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4)
    PyDict_SetDefaultRef(d, key, default_value, &value);
#elif CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX >= 0x030C0000
    PyObject *args[] = {d, key, default_value};
    value = PyObject_VectorcallMethod(__pyx_mstate_global->__pyx_n_u_setdefault, args, 3 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL);
#elif CYTHON_COMPILING_IN_LIMITED_API
    value = PyObject_CallMethodObjArgs(d, __pyx_mstate_global->__pyx_n_u_setdefault, key, default_value, NULL);
#else
    value = PyDict_SetDefault(d, key, default_value);
    if (unlikely(!value)) return NULL;
    Py_INCREF(value);
#endif
    return value;
}

/* LimitedApiGetTypeDict (used by SetItemOnTypeDict) */
#if CYTHON_COMPILING_IN_LIMITED_API
static Py_ssize_t __Pyx_GetTypeDictOffset(void) {
    PyObject *tp_dictoffset_o;
    Py_ssize_t tp_dictoffset;
    tp_dictoffset_o = PyObject_GetAttrString((PyObject*)(&PyType_Type), "__dictoffset__");
    if (unlikely(!tp_dictoffset_o)) return -1;
    tp_dictoffset = PyLong_AsSsize_t(tp_dictoffset_o);
    Py_DECREF(tp_dictoffset_o);
    if (unlikely(tp_dictoffset == 0)) {
        PyErr_SetString(
            PyExc_TypeError,
            "'type' doesn't have a dictoffset");
        return -1;
    } else if (unlikely(tp_dictoffset < 0)) {
        PyErr_SetString(
            PyExc_TypeError,
            "'type' has an unexpected negative dictoffset. "
            "Please report this as Cython bug");
        return -1;
    }
    return tp_dictoffset;
}
static PyObject *__Pyx_GetTypeDict(PyTypeObject *tp) {
    static Py_ssize_t tp_dictoffset = 0;
    if (unlikely(tp_dictoffset == 0)) {
        tp_dictoffset = __Pyx_GetTypeDictOffset();
        if (unlikely(tp_dictoffset == -1 && PyErr_Occurred())) {
            tp_dictoffset = 0; // try again next time?
            return NULL;
        }
    }
    return *(PyObject**)((char*)tp + tp_dictoffset);
}
#endif

/* SetItemOnTypeDict (used by FixUpExtensionType) */
static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *v) {
    int result;
    PyObject *tp_dict;
#if CYTHON_COMPILING_IN_LIMITED_API
    tp_dict = __Pyx_GetTypeDict(tp);
    if (unlikely(!tp_dict)) return -1;
#else
    tp_dict = tp->tp_dict;
#endif
    result = PyDict_SetItem(tp_dict, k, v);
    if (likely(!result)) {
        PyType_Modified(tp);
        if (unlikely(PyObject_HasAttr(v, __pyx_mstate_global->__pyx_n_u_set_name))) {
            PyObject *setNameResult = PyObject_CallMethodObjArgs(v, __pyx_mstate_global->__pyx_n_u_set_name,  (PyObject *) tp, k, NULL);
            if (!setNameResult) return -1;
            Py_DECREF(setNameResult);
        }
    }
    return result;
}

/* FixUpExtensionType (used by FetchCommonType) */
static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type) {
#if __PYX_LIMITED_VERSION_HEX > 0x030900B1
    CYTHON_UNUSED_VAR(spec);
    CYTHON_UNUSED_VAR(type);
    CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict);
#else
    const PyType_Slot *slot = spec->slots;
    int changed = 0;
#if !CYTHON_COMPILING_IN_LIMITED_API
    while (slot && slot->slot && slot->slot != Py_tp_members)
        slot++;
    if (slot && slot->slot == Py_tp_members) {
#if !CYTHON_COMPILING_IN_CPYTHON
        const
#endif  // !CYTHON_COMPILING_IN_CPYTHON)
            PyMemberDef *memb = (PyMemberDef*) slot->pfunc;
        while (memb && memb->name) {
            if (memb->name[0] == '_' && memb->name[1] == '_') {
                if (strcmp(memb->name, "__weaklistoffset__") == 0) {
                    assert(memb->type == T_PYSSIZET);
                    assert(memb->flags == READONLY);
                    type->tp_weaklistoffset = memb->offset;
                    changed = 1;
                }
                else if (strcmp(memb->name, "__dictoffset__") == 0) {
                    assert(memb->type == T_PYSSIZET);
                    assert(memb->flags == READONLY);
                    type->tp_dictoffset = memb->offset;
                    changed = 1;
                }
#if CYTHON_METH_FASTCALL
                else if (strcmp(memb->name, "__vectorcalloffset__") == 0) {
                    assert(memb->type == T_PYSSIZET);
                    assert(memb->flags == READONLY);
                    type->tp_vectorcall_offset = memb->offset;
                    changed = 1;
                }
#endif  // CYTHON_METH_FASTCALL
#if !CYTHON_COMPILING_IN_PYPY
                else if (strcmp(memb->name, "__module__") == 0) {
                    PyObject *descr;
                    assert(memb->type == T_OBJECT);
                    assert(memb->flags == 0 || memb->flags == READONLY);
                    descr = PyDescr_NewMember(type, memb);
                    if (unlikely(!descr))
                        return -1;
                    int set_item_result = PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr);
                    Py_DECREF(descr);
                    if (unlikely(set_item_result < 0)) {
                        return -1;
                    }
                    changed = 1;
                }
#endif  // !CYTHON_COMPILING_IN_PYPY
            }
            memb++;
        }
    }
#endif  // !CYTHON_COMPILING_IN_LIMITED_API
#if !CYTHON_COMPILING_IN_PYPY
    slot = spec->slots;
    while (slot && slot->slot && slot->slot != Py_tp_getset)
        slot++;
    if (slot && slot->slot == Py_tp_getset) {
        PyGetSetDef *getset = (PyGetSetDef*) slot->pfunc;
        while (getset && getset->name) {
            if (getset->name[0] == '_' && getset->name[1] == '_' && strcmp(getset->name, "__module__") == 0) {
                PyObject *descr = PyDescr_NewGetSet(type, getset);
                if (unlikely(!descr))
                    return -1;
                #if CYTHON_COMPILING_IN_LIMITED_API
                PyObject *pyname = PyUnicode_FromString(getset->name);
                if (unlikely(!pyname)) {
                    Py_DECREF(descr);
                    return -1;
                }
                int set_item_result = __Pyx_SetItemOnTypeDict(type, pyname, descr);
                Py_DECREF(pyname);
                #else
                CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict);
                int set_item_result = PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr);
                #endif
                Py_DECREF(descr);
                if (unlikely(set_item_result < 0)) {
                    return -1;
                }
                changed = 1;
            }
            ++getset;
        }
    }
#else
    CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict);
#endif  // !CYTHON_COMPILING_IN_PYPY
    if (changed)
        PyType_Modified(type);
#endif  // PY_VERSION_HEX > 0x030900B1
    return 0;
}

/* AddModuleRef (used by FetchSharedCythonModule) */
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
  static PyObject *__Pyx_PyImport_AddModuleObjectRef(PyObject *name) {
      PyObject *module_dict = PyImport_GetModuleDict();
      PyObject *m;
      if (PyMapping_GetOptionalItem(module_dict, name, &m) < 0) {
          return NULL;
      }
      if (m != NULL && PyModule_Check(m)) {
          return m;
      }
      Py_XDECREF(m);
      m = PyModule_NewObject(name);
      if (m == NULL)
          return NULL;
      if (PyDict_CheckExact(module_dict)) {
          PyObject *new_m;
          (void)PyDict_SetDefaultRef(module_dict, name, m, &new_m);
          Py_DECREF(m);
          return new_m;
      } else {
           if (PyObject_SetItem(module_dict, name, m) != 0) {
                Py_DECREF(m);
                return NULL;
            }
            return m;
      }
  }
  static PyObject *__Pyx_PyImport_AddModuleRef(const char *name) {
      PyObject *py_name = PyUnicode_FromString(name);
      if (!py_name) return NULL;
      PyObject *module = __Pyx_PyImport_AddModuleObjectRef(py_name);
      Py_DECREF(py_name);
      return module;
  }
#elif __PYX_LIMITED_VERSION_HEX >= 0x030d0000
  #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name)
#else
  static PyObject *__Pyx_PyImport_AddModuleRef(const char *name) {
      PyObject *module = PyImport_AddModule(name);
      Py_XINCREF(module);
      return module;
  }
#endif

/* FetchSharedCythonModule (used by FetchCommonType) */
static PyObject *__Pyx_FetchSharedCythonABIModule(void) {
    return __Pyx_PyImport_AddModuleRef(__PYX_ABI_MODULE_NAME);
}

/* FetchCommonType (used by CommonTypesMetaclass) */
#if __PYX_LIMITED_VERSION_HEX < 0x030C0000
static PyObject* __Pyx_PyType_FromMetaclass(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) {
    PyObject *result = __Pyx_PyType_FromModuleAndSpec(module, spec, bases);
    if (result && metaclass) {
        PyObject *old_tp = (PyObject*)Py_TYPE(result);
    Py_INCREF((PyObject*)metaclass);
#if __PYX_LIMITED_VERSION_HEX >= 0x03090000
        Py_SET_TYPE(result, metaclass);
#else
        result->ob_type = metaclass;
#endif
        Py_DECREF(old_tp);
    }
    return result;
}
#else
#define __Pyx_PyType_FromMetaclass(me, mo, s, b) PyType_FromMetaclass(me, mo, s, b)
#endif
static int __Pyx_VerifyCachedType(PyObject *cached_type,
                               const char *name,
                               Py_ssize_t expected_basicsize) {
    Py_ssize_t basicsize;
    if (!PyType_Check(cached_type)) {
        PyErr_Format(PyExc_TypeError,
            "Shared Cython type %.200s is not a type object", name);
        return -1;
    }
    if (expected_basicsize == 0) {
        return 0; // size is inherited, nothing useful to check
    }
#if CYTHON_COMPILING_IN_LIMITED_API
    PyObject *py_basicsize;
    py_basicsize = PyObject_GetAttrString(cached_type, "__basicsize__");
    if (unlikely(!py_basicsize)) return -1;
    basicsize = PyLong_AsSsize_t(py_basicsize);
    Py_DECREF(py_basicsize);
    py_basicsize = NULL;
    if (unlikely(basicsize == (Py_ssize_t)-1) && PyErr_Occurred()) return -1;
#else
    basicsize = ((PyTypeObject*) cached_type)->tp_basicsize;
#endif
    if (basicsize != expected_basicsize) {
        PyErr_Format(PyExc_TypeError,
            "Shared Cython type %.200s has the wrong size, try recompiling",
            name);
        return -1;
    }
    return 0;
}
static PyTypeObject *__Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) {
    PyObject *abi_module = NULL, *cached_type = NULL, *abi_module_dict, *new_cached_type, *py_object_name;
    int get_item_ref_result;
    const char* object_name = strrchr(spec->name, '.');
    object_name = object_name ? object_name+1 : spec->name;
    py_object_name = PyUnicode_FromString(object_name);
    if (!py_object_name) return NULL;
    abi_module = __Pyx_FetchSharedCythonABIModule();
    if (!abi_module) goto done;
    abi_module_dict = PyModule_GetDict(abi_module);
    if (!abi_module_dict) goto done;
    get_item_ref_result = __Pyx_PyDict_GetItemRef(abi_module_dict, py_object_name, &cached_type);
    if (get_item_ref_result == 1) {
        if (__Pyx_VerifyCachedType(
              cached_type,
              object_name,
              spec->basicsize) < 0) {
            goto bad;
        }
        goto done;
    } else if (unlikely(get_item_ref_result == -1)) {
        goto bad;
    }
    cached_type = __Pyx_PyType_FromMetaclass(
        metaclass,
        CYTHON_USE_MODULE_STATE ? module : abi_module,
        spec, bases);
    if (unlikely(!cached_type)) goto bad;
    if (unlikely(__Pyx_fix_up_extension_type_from_spec(spec, (PyTypeObject *) cached_type) < 0)) goto bad;
    new_cached_type = __Pyx_PyDict_SetDefault(abi_module_dict, py_object_name, cached_type);
    if (unlikely(new_cached_type != cached_type)) {
        if (unlikely(!new_cached_type)) goto bad;
        Py_DECREF(cached_type);
        cached_type = new_cached_type;
        if (__Pyx_VerifyCachedType(
                cached_type,
                object_name,
                spec->basicsize) < 0) {
            goto bad;
        }
        goto done;
    } else {
        Py_DECREF(new_cached_type);
    }
done:
    Py_XDECREF(abi_module);
    Py_DECREF(py_object_name);
    assert(cached_type == NULL || PyType_Check(cached_type));
    return (PyTypeObject *) cached_type;
bad:
    Py_XDECREF(cached_type);
    cached_type = NULL;
    goto done;
}

/* CommonTypesMetaclass (used by CythonFunctionShared) */
static PyObject* __pyx_CommonTypesMetaclass_get_module(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED void* context) {
    return PyUnicode_FromString(__PYX_ABI_MODULE_NAME);
}
#if __PYX_LIMITED_VERSION_HEX < 0x030A0000
static PyObject* __pyx_CommonTypesMetaclass_call(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED PyObject *args, CYTHON_UNUSED PyObject *kwds) {
    PyErr_SetString(PyExc_TypeError, "Cannot instantiate Cython internal types");
    return NULL;
}
static int __pyx_CommonTypesMetaclass_setattr(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED PyObject *attr, CYTHON_UNUSED PyObject *value) {
    PyErr_SetString(PyExc_TypeError, "Cython internal types are immutable");
    return -1;
}
#endif
static PyGetSetDef __pyx_CommonTypesMetaclass_getset[] = {
    {"__module__", __pyx_CommonTypesMetaclass_get_module, NULL, NULL, NULL},
    {0, 0, 0, 0, 0}
};
static PyType_Slot __pyx_CommonTypesMetaclass_slots[] = {
    {Py_tp_getset, (void *)__pyx_CommonTypesMetaclass_getset},
    #if __PYX_LIMITED_VERSION_HEX < 0x030A0000
    {Py_tp_call, (void*)__pyx_CommonTypesMetaclass_call},
    {Py_tp_new, (void*)__pyx_CommonTypesMetaclass_call},
    {Py_tp_setattro, (void*)__pyx_CommonTypesMetaclass_setattr},
    #endif
    {0, 0}
};
static PyType_Spec __pyx_CommonTypesMetaclass_spec = {
    __PYX_TYPE_MODULE_PREFIX "_common_types_metatype",
    0,
    0,
    Py_TPFLAGS_IMMUTABLETYPE |
    Py_TPFLAGS_DISALLOW_INSTANTIATION |
    Py_TPFLAGS_DEFAULT,
    __pyx_CommonTypesMetaclass_slots
};
static int __pyx_CommonTypesMetaclass_init(PyObject *module) {
    __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module);
    PyObject *bases = PyTuple_Pack(1, &PyType_Type);
    if (unlikely(!bases)) {
        return -1;
    }
    mstate->__pyx_CommonTypesMetaclassType = __Pyx_FetchCommonTypeFromSpec(NULL, module, &__pyx_CommonTypesMetaclass_spec, bases);
    Py_DECREF(bases);
    if (unlikely(mstate->__pyx_CommonTypesMetaclassType == NULL)) {
        return -1;
    }
    return 0;
}

/* CallTypeTraverse (used by CythonFunctionShared) */
#if !CYTHON_USE_TYPE_SPECS || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x03090000)
#else
static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visit, void *arg) {
    #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x03090000
    if (__Pyx_get_runtime_version() < 0x03090000) return 0;
    #endif
    if (!always_call) {
        PyTypeObject *base = __Pyx_PyObject_GetSlot(o, tp_base, PyTypeObject*);
        unsigned long flags = PyType_GetFlags(base);
        if (flags & Py_TPFLAGS_HEAPTYPE) {
            return 0;
        }
    }
    Py_VISIT((PyObject*)Py_TYPE(o));
    return 0;
}
#endif

/* PyMethodNew (used by CythonFunctionShared) */
#if CYTHON_COMPILING_IN_LIMITED_API
static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) {
    PyObject *result;
    CYTHON_UNUSED_VAR(typ);
    if (!self)
        return __Pyx_NewRef(func);
    #if __PYX_LIMITED_VERSION_HEX >= 0x030C0000
    {
        PyObject *args[] = {func, self};
        result = PyObject_Vectorcall(__pyx_mstate_global->__Pyx_CachedMethodType, args, 2, NULL);
    }
    #else
    result = PyObject_CallFunctionObjArgs(__pyx_mstate_global->__Pyx_CachedMethodType, func, self, NULL);
    #endif
    return result;
}
#else
static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) {
    CYTHON_UNUSED_VAR(typ);
    if (!self)
        return __Pyx_NewRef(func);
    return PyMethod_New(func, self);
}
#endif

/* PyVectorcallFastCallDict (used by CythonFunctionShared) */
#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL
static PyObject *__Pyx_PyVectorcall_FastCallDict_kw(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw)
{
    PyObject *res = NULL;
    PyObject *kwnames;
    PyObject **newargs;
    PyObject **kwvalues;
    Py_ssize_t i;
    #if CYTHON_AVOID_BORROWED_REFS
    PyObject *pos;
    #else
    Py_ssize_t pos;
    #endif
    size_t j;
    PyObject *key, *value;
    unsigned long keys_are_strings;
    #if !CYTHON_ASSUME_SAFE_SIZE
    Py_ssize_t nkw = PyDict_Size(kw);
    if (unlikely(nkw == -1)) return NULL;
    #else
    Py_ssize_t nkw = PyDict_GET_SIZE(kw);
    #endif
    newargs = (PyObject **)PyMem_Malloc((nargs + (size_t)nkw) * sizeof(args[0]));
    if (unlikely(newargs == NULL)) {
        PyErr_NoMemory();
        return NULL;
    }
    for (j = 0; j < nargs; j++) newargs[j] = args[j];
    kwnames = PyTuple_New(nkw);
    if (unlikely(kwnames == NULL)) {
        PyMem_Free(newargs);
        return NULL;
    }
    kwvalues = newargs + nargs;
    pos = 0;
    i = 0;
    keys_are_strings = Py_TPFLAGS_UNICODE_SUBCLASS;
    while (__Pyx_PyDict_NextRef(kw, &pos, &key, &value)) {
        keys_are_strings &=
        #if CYTHON_COMPILING_IN_LIMITED_API
            PyType_GetFlags(Py_TYPE(key));
        #else
            Py_TYPE(key)->tp_flags;
        #endif
        #if !CYTHON_ASSUME_SAFE_MACROS
        if (unlikely(PyTuple_SetItem(kwnames, i, key) < 0)) goto cleanup;
        #else
        PyTuple_SET_ITEM(kwnames, i, key);
        #endif
        kwvalues[i] = value;
        i++;
    }
    if (unlikely(!keys_are_strings)) {
        PyErr_SetString(PyExc_TypeError, "keywords must be strings");
        goto cleanup;
    }
    res = vc(func, newargs, nargs, kwnames);
cleanup:
    #if CYTHON_AVOID_BORROWED_REFS
    Py_DECREF(pos);
    #endif
    Py_DECREF(kwnames);
    for (i = 0; i < nkw; i++)
        Py_DECREF(kwvalues[i]);
    PyMem_Free(newargs);
    return res;
}
static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw)
{
    Py_ssize_t kw_size =
        likely(kw == NULL) ?
        0 :
#if !CYTHON_ASSUME_SAFE_SIZE
        PyDict_Size(kw);
#else
        PyDict_GET_SIZE(kw);
#endif
    if (kw_size == 0) {
        return vc(func, args, nargs, NULL);
    }
#if !CYTHON_ASSUME_SAFE_SIZE
    else if (unlikely(kw_size == -1)) {
        return NULL;
    }
#endif
    return __Pyx_PyVectorcall_FastCallDict_kw(func, vc, args, nargs, kw);
}
#endif

/* CythonFunctionShared (used by CythonFunction) */
#if CYTHON_COMPILING_IN_LIMITED_API
static CYTHON_INLINE int __Pyx__IsSameCyOrCFunctionNoMethod(PyObject *func, void (*cfunc)(void)) {
    if (__Pyx_CyFunction_Check(func)) {
        return PyCFunction_GetFunction(((__pyx_CyFunctionObject*)func)->func) == (PyCFunction) cfunc;
    } else if (PyCFunction_Check(func)) {
        return PyCFunction_GetFunction(func) == (PyCFunction) cfunc;
    }
    return 0;
}
static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)) {
    if ((PyObject*)Py_TYPE(func) == __pyx_mstate_global->__Pyx_CachedMethodType) {
        int result;
        PyObject *newFunc = PyObject_GetAttr(func, __pyx_mstate_global->__pyx_n_u_func_2);
        if (unlikely(!newFunc)) {
            PyErr_Clear(); // It's only an optimization, so don't throw an error
            return 0;
        }
        result = __Pyx__IsSameCyOrCFunctionNoMethod(newFunc, cfunc);
        Py_DECREF(newFunc);
        return result;
    }
    return __Pyx__IsSameCyOrCFunctionNoMethod(func, cfunc);
}
#else
static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)) {
    if (PyMethod_Check(func)) {
        func = PyMethod_GET_FUNCTION(func);
    }
    return __Pyx_CyOrPyCFunction_Check(func) && __Pyx_CyOrPyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc;
}
#endif
static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj) {
#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
    __Pyx_Py_XDECREF_SET(
        __Pyx_CyFunction_GetClassObj(f),
            ((classobj) ? __Pyx_NewRef(classobj) : NULL));
#else
    __Pyx_Py_XDECREF_SET(
        ((PyCMethodObject *) (f))->mm_class,
        (PyTypeObject*)((classobj) ? __Pyx_NewRef(classobj) : NULL));
#endif
}
static PyObject *
__Pyx_CyFunction_get_doc_locked(__pyx_CyFunctionObject *op)
{
    if (unlikely(op->func_doc == NULL)) {
#if CYTHON_COMPILING_IN_LIMITED_API
        op->func_doc = PyObject_GetAttrString(op->func, "__doc__");
        if (unlikely(!op->func_doc)) return NULL;
#else
        if (((PyCFunctionObject*)op)->m_ml->ml_doc) {
            op->func_doc = PyUnicode_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc);
            if (unlikely(op->func_doc == NULL))
                return NULL;
        } else {
            Py_INCREF(Py_None);
            return Py_None;
        }
#endif
    }
    Py_INCREF(op->func_doc);
    return op->func_doc;
}
static PyObject *
__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, void *closure) {
    PyObject *result;
    CYTHON_UNUSED_VAR(closure);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    result = __Pyx_CyFunction_get_doc_locked(op);
    __Pyx_END_CRITICAL_SECTION();
    return result;
}
static int
__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, void *context)
{
    CYTHON_UNUSED_VAR(context);
    if (value == NULL) {
        value = Py_None;
    }
    Py_INCREF(value);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    __Pyx_Py_XDECREF_SET(op->func_doc, value);
    __Pyx_END_CRITICAL_SECTION();
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_name_locked(__pyx_CyFunctionObject *op)
{
    if (unlikely(op->func_name == NULL)) {
#if CYTHON_COMPILING_IN_LIMITED_API
        op->func_name = PyObject_GetAttrString(op->func, "__name__");
#else
        op->func_name = PyUnicode_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name);
#endif
        if (unlikely(op->func_name == NULL))
            return NULL;
    }
    Py_INCREF(op->func_name);
    return op->func_name;
}
static PyObject *
__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, void *context)
{
    PyObject *result = NULL;
    CYTHON_UNUSED_VAR(context);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    result = __Pyx_CyFunction_get_name_locked(op);
    __Pyx_END_CRITICAL_SECTION();
    return result;
}
static int
__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, void *context)
{
    CYTHON_UNUSED_VAR(context);
    if (unlikely(value == NULL || !PyUnicode_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
                        "__name__ must be set to a string object");
        return -1;
    }
    Py_INCREF(value);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    __Pyx_Py_XDECREF_SET(op->func_name, value);
    __Pyx_END_CRITICAL_SECTION();
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, void *context)
{
    CYTHON_UNUSED_VAR(context);
    PyObject *result;
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    Py_INCREF(op->func_qualname);
    result = op->func_qualname;
    __Pyx_END_CRITICAL_SECTION();
    return result;
}
static int
__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, void *context)
{
    CYTHON_UNUSED_VAR(context);
    if (unlikely(value == NULL || !PyUnicode_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
                        "__qualname__ must be set to a string object");
        return -1;
    }
    Py_INCREF(value);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    __Pyx_Py_XDECREF_SET(op->func_qualname, value);
    __Pyx_END_CRITICAL_SECTION();
    return 0;
}
#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
static PyObject *
__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, void *context)
{
    CYTHON_UNUSED_VAR(context);
    if (unlikely(op->func_dict == NULL)) {
        op->func_dict = PyDict_New();
        if (unlikely(op->func_dict == NULL))
            return NULL;
    }
    Py_INCREF(op->func_dict);
    return op->func_dict;
}
#endif
static PyObject *
__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, void *context)
{
    CYTHON_UNUSED_VAR(context);
    Py_INCREF(op->func_globals);
    return op->func_globals;
}
static PyObject *
__Pyx_CyFunction_get_closure(__pyx_CyFunctionObject *op, void *context)
{
    CYTHON_UNUSED_VAR(op);
    CYTHON_UNUSED_VAR(context);
    Py_INCREF(Py_None);
    return Py_None;
}
static PyObject *
__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, void *context)
{
    PyObject* result = (op->func_code) ? op->func_code : Py_None;
    CYTHON_UNUSED_VAR(context);
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) {
    int result = 0;
    PyObject *res = op->defaults_getter((PyObject *) op);
    if (unlikely(!res))
        return -1;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    op->defaults_tuple = PyTuple_GET_ITEM(res, 0);
    Py_INCREF(op->defaults_tuple);
    op->defaults_kwdict = PyTuple_GET_ITEM(res, 1);
    Py_INCREF(op->defaults_kwdict);
    #else
    op->defaults_tuple = __Pyx_PySequence_ITEM(res, 0);
    if (unlikely(!op->defaults_tuple)) result = -1;
    else {
        op->defaults_kwdict = __Pyx_PySequence_ITEM(res, 1);
        if (unlikely(!op->defaults_kwdict)) result = -1;
    }
    #endif
    Py_DECREF(res);
    return result;
}
static int
__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
    CYTHON_UNUSED_VAR(context);
    if (!value) {
        value = Py_None;
    } else if (unlikely(value != Py_None && !PyTuple_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
                        "__defaults__ must be set to a tuple object");
        return -1;
    }
    PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__defaults__ will not "
                 "currently affect the values used in function calls", 1);
    Py_INCREF(value);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    __Pyx_Py_XDECREF_SET(op->defaults_tuple, value);
    __Pyx_END_CRITICAL_SECTION();
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_defaults_locked(__pyx_CyFunctionObject *op) {
    PyObject* result = op->defaults_tuple;
    if (unlikely(!result)) {
        if (op->defaults_getter) {
            if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL;
            result = op->defaults_tuple;
        } else {
            result = Py_None;
        }
    }
    Py_INCREF(result);
    return result;
}
static PyObject *
__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, void *context) {
    PyObject* result = NULL;
    CYTHON_UNUSED_VAR(context);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    result = __Pyx_CyFunction_get_defaults_locked(op);
    __Pyx_END_CRITICAL_SECTION();
    return result;
}
static int
__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
    CYTHON_UNUSED_VAR(context);
    if (!value) {
        value = Py_None;
    } else if (unlikely(value != Py_None && !PyDict_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
                        "__kwdefaults__ must be set to a dict object");
        return -1;
    }
    PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__kwdefaults__ will not "
                 "currently affect the values used in function calls", 1);
    Py_INCREF(value);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    __Pyx_Py_XDECREF_SET(op->defaults_kwdict, value);
    __Pyx_END_CRITICAL_SECTION();
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_kwdefaults_locked(__pyx_CyFunctionObject *op) {
    PyObject* result = op->defaults_kwdict;
    if (unlikely(!result)) {
        if (op->defaults_getter) {
            if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL;
            result = op->defaults_kwdict;
        } else {
            result = Py_None;
        }
    }
    Py_INCREF(result);
    return result;
}
static PyObject *
__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, void *context) {
    PyObject* result;
    CYTHON_UNUSED_VAR(context);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    result = __Pyx_CyFunction_get_kwdefaults_locked(op);
    __Pyx_END_CRITICAL_SECTION();
    return result;
}
static int
__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
    CYTHON_UNUSED_VAR(context);
    if (!value || value == Py_None) {
        value = NULL;
    } else if (unlikely(!PyDict_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
                        "__annotations__ must be set to a dict object");
        return -1;
    }
    Py_XINCREF(value);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    __Pyx_Py_XDECREF_SET(op->func_annotations, value);
    __Pyx_END_CRITICAL_SECTION();
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_annotations_locked(__pyx_CyFunctionObject *op) {
    PyObject* result = op->func_annotations;
    if (unlikely(!result)) {
        result = PyDict_New();
        if (unlikely(!result)) return NULL;
        op->func_annotations = result;
    }
    Py_INCREF(result);
    return result;
}
static PyObject *
__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, void *context) {
    PyObject *result;
    CYTHON_UNUSED_VAR(context);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    result = __Pyx_CyFunction_get_annotations_locked(op);
    __Pyx_END_CRITICAL_SECTION();
    return result;
}
static PyObject *
__Pyx_CyFunction_get_is_coroutine_value(__pyx_CyFunctionObject *op) {
    int is_coroutine = op->flags & __Pyx_CYFUNCTION_COROUTINE;
    if (is_coroutine) {
        PyObject *is_coroutine_value, *module, *fromlist, *marker = __pyx_mstate_global->__pyx_n_u_is_coroutine;
        fromlist = PyList_New(1);
        if (unlikely(!fromlist)) return NULL;
        Py_INCREF(marker);
#if CYTHON_ASSUME_SAFE_MACROS
        PyList_SET_ITEM(fromlist, 0, marker);
#else
        if (unlikely(PyList_SetItem(fromlist, 0, marker) < 0)) {
            Py_DECREF(fromlist);
            return NULL;
        }
#endif
        module = PyImport_ImportModuleLevelObject(__pyx_mstate_global->__pyx_n_u_asyncio_coroutines, NULL, NULL, fromlist, 0);
        Py_DECREF(fromlist);
        if (unlikely(!module)) goto ignore;
        is_coroutine_value = __Pyx_PyObject_GetAttrStr(module, marker);
        Py_DECREF(module);
        if (likely(is_coroutine_value)) {
            return is_coroutine_value;
        }
ignore:
        PyErr_Clear();
    }
    return __Pyx_PyBool_FromLong(is_coroutine);
}
static PyObject *
__Pyx_CyFunction_get_is_coroutine(__pyx_CyFunctionObject *op, void *context) {
    PyObject *result;
    CYTHON_UNUSED_VAR(context);
    if (op->func_is_coroutine) {
        return __Pyx_NewRef(op->func_is_coroutine);
    }
    result = __Pyx_CyFunction_get_is_coroutine_value(op);
    if (unlikely(!result))
        return NULL;
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    if (op->func_is_coroutine) {
        Py_DECREF(result);
        result = __Pyx_NewRef(op->func_is_coroutine);
    } else {
        op->func_is_coroutine = __Pyx_NewRef(result);
    }
    __Pyx_END_CRITICAL_SECTION();
    return result;
}
static void __Pyx_CyFunction_raise_argument_count_error(__pyx_CyFunctionObject *func, const char* message, Py_ssize_t size) {
#if CYTHON_COMPILING_IN_LIMITED_API
    PyObject *py_name = __Pyx_CyFunction_get_name(func, NULL);
    if (!py_name) return;
    PyErr_Format(PyExc_TypeError,
        "%.200S() %s (%" CYTHON_FORMAT_SSIZE_T "d given)",
        py_name, message, size);
    Py_DECREF(py_name);
#else
    const char* name = ((PyCFunctionObject*)func)->m_ml->ml_name;
    PyErr_Format(PyExc_TypeError,
        "%.200s() %s (%" CYTHON_FORMAT_SSIZE_T "d given)",
        name, message, size);
#endif
}
static void __Pyx_CyFunction_raise_type_error(__pyx_CyFunctionObject *func, const char* message) {
#if CYTHON_COMPILING_IN_LIMITED_API
    PyObject *py_name = __Pyx_CyFunction_get_name(func, NULL);
    if (!py_name) return;
    PyErr_Format(PyExc_TypeError,
        "%.200S() %s",
        py_name, message);
    Py_DECREF(py_name);
#else
    const char* name = ((PyCFunctionObject*)func)->m_ml->ml_name;
    PyErr_Format(PyExc_TypeError,
        "%.200s() %s",
        name, message);
#endif
}
#if CYTHON_COMPILING_IN_LIMITED_API
static PyObject *
__Pyx_CyFunction_get_module(__pyx_CyFunctionObject *op, void *context) {
    CYTHON_UNUSED_VAR(context);
    return PyObject_GetAttrString(op->func, "__module__");
}
static int
__Pyx_CyFunction_set_module(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
    CYTHON_UNUSED_VAR(context);
    return PyObject_SetAttrString(op->func, "__module__", value);
}
#endif
static PyGetSetDef __pyx_CyFunction_getsets[] = {
    {"func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {"__doc__",  (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {"func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {"__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {"__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0},
#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
    {"func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)PyObject_GenericSetDict, 0, 0},
    {"__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)PyObject_GenericSetDict, 0, 0},
#else
    {"func_dict", (getter)PyObject_GenericGetDict, (setter)PyObject_GenericSetDict, 0, 0},
    {"__dict__", (getter)PyObject_GenericGetDict, (setter)PyObject_GenericSetDict, 0, 0},
#endif
    {"func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {"__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {"func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {"__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {"func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {"__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {"func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
    {"__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
    {"__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
    {"__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
    {"_is_coroutine", (getter)__Pyx_CyFunction_get_is_coroutine, 0, 0, 0},
#if CYTHON_COMPILING_IN_LIMITED_API
    {"__module__", (getter)__Pyx_CyFunction_get_module, (setter)__Pyx_CyFunction_set_module, 0, 0},
#endif
    {0, 0, 0, 0, 0}
};
static PyMemberDef __pyx_CyFunction_members[] = {
#if !CYTHON_COMPILING_IN_LIMITED_API
    {"__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), 0, 0},
#endif
#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
    {"__dictoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_dict), READONLY, 0},
#endif
#if CYTHON_METH_FASTCALL
#if CYTHON_COMPILING_IN_LIMITED_API
    {"__vectorcalloffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_vectorcall), READONLY, 0},
#else
    {"__vectorcalloffset__", T_PYSSIZET, offsetof(PyCFunctionObject, vectorcall), READONLY, 0},
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
    {"__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_weakreflist), READONLY, 0},
#else
    {"__weaklistoffset__", T_PYSSIZET, offsetof(PyCFunctionObject, m_weakreflist), READONLY, 0},
#endif
#endif
    {0, 0, 0,  0, 0}
};
static PyObject *
__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, PyObject *args)
{
    PyObject *result = NULL;
    CYTHON_UNUSED_VAR(args);
    __Pyx_BEGIN_CRITICAL_SECTION(m);
    Py_INCREF(m->func_qualname);
    result = m->func_qualname;
    __Pyx_END_CRITICAL_SECTION();
    return result;
}
static PyMethodDef __pyx_CyFunction_methods[] = {
    {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0},
    {0, 0, 0, 0}
};
#if CYTHON_COMPILING_IN_LIMITED_API
#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist)
#else
#define __Pyx_CyFunction_weakreflist(cyfunc) (((PyCFunctionObject*)cyfunc)->m_weakreflist)
#endif
static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname,
                                       PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
#if !CYTHON_COMPILING_IN_LIMITED_API
    PyCFunctionObject *cf = (PyCFunctionObject*) op;
#endif
    if (unlikely(op == NULL))
        return NULL;
#if CYTHON_COMPILING_IN_LIMITED_API
    op->func = PyCFunction_NewEx(ml, (PyObject*)op, module);
    if (unlikely(!op->func)) return NULL;
#endif
    op->flags = flags;
    __Pyx_CyFunction_weakreflist(op) = NULL;
#if !CYTHON_COMPILING_IN_LIMITED_API
    cf->m_ml = ml;
    cf->m_self = (PyObject *) op;
#endif
    Py_XINCREF(closure);
    op->func_closure = closure;
#if !CYTHON_COMPILING_IN_LIMITED_API
    Py_XINCREF(module);
    cf->m_module = module;
#endif
#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
    op->func_dict = NULL;
#endif
    op->func_name = NULL;
    Py_INCREF(qualname);
    op->func_qualname = qualname;
    op->func_doc = NULL;
#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
    op->func_classobj = NULL;
#else
    ((PyCMethodObject*)op)->mm_class = NULL;
#endif
    op->func_globals = globals;
    Py_INCREF(op->func_globals);
    Py_XINCREF(code);
    op->func_code = code;
    op->defaults = NULL;
    op->defaults_tuple = NULL;
    op->defaults_kwdict = NULL;
    op->defaults_getter = NULL;
    op->func_annotations = NULL;
    op->func_is_coroutine = NULL;
#if CYTHON_METH_FASTCALL
    switch (ml->ml_flags & (METH_VARARGS | METH_FASTCALL | METH_NOARGS | METH_O | METH_KEYWORDS | METH_METHOD)) {
    case METH_NOARGS:
        __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_NOARGS;
        break;
    case METH_O:
        __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_O;
        break;
    case METH_METHOD | METH_FASTCALL | METH_KEYWORDS:
        __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD;
        break;
    case METH_FASTCALL | METH_KEYWORDS:
        __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS;
        break;
    case METH_VARARGS | METH_KEYWORDS:
        __Pyx_CyFunction_func_vectorcall(op) = NULL;
        break;
    default:
        PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction");
        Py_DECREF(op);
        return NULL;
    }
#endif
    return (PyObject *) op;
}
static int
__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m)
{
    Py_CLEAR(m->func_closure);
#if CYTHON_COMPILING_IN_LIMITED_API
    Py_CLEAR(m->func);
#else
    Py_CLEAR(((PyCFunctionObject*)m)->m_module);
#endif
#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
    Py_CLEAR(m->func_dict);
#elif PY_VERSION_HEX < 0x030d0000
    _PyObject_ClearManagedDict((PyObject*)m);
#else
    PyObject_ClearManagedDict((PyObject*)m);
#endif
    Py_CLEAR(m->func_name);
    Py_CLEAR(m->func_qualname);
    Py_CLEAR(m->func_doc);
    Py_CLEAR(m->func_globals);
    Py_CLEAR(m->func_code);
#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
    Py_CLEAR(__Pyx_CyFunction_GetClassObj(m));
#else
    {
        PyObject *cls = (PyObject*) ((PyCMethodObject *) (m))->mm_class;
        ((PyCMethodObject *) (m))->mm_class = NULL;
        Py_XDECREF(cls);
    }
#endif
    Py_CLEAR(m->defaults_tuple);
    Py_CLEAR(m->defaults_kwdict);
    Py_CLEAR(m->func_annotations);
    Py_CLEAR(m->func_is_coroutine);
    Py_CLEAR(m->defaults);
    return 0;
}
static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m)
{
    if (__Pyx_CyFunction_weakreflist(m) != NULL)
        PyObject_ClearWeakRefs((PyObject *) m);
    __Pyx_CyFunction_clear(m);
    __Pyx_PyHeapTypeObject_GC_Del(m);
}
static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m)
{
    PyObject_GC_UnTrack(m);
    __Pyx__CyFunction_dealloc(m);
}
static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg)
{
    {
        int e = __Pyx_call_type_traverse((PyObject*)m, 1, visit, arg);
        if (e) return e;
    }
    Py_VISIT(m->func_closure);
#if CYTHON_COMPILING_IN_LIMITED_API
    Py_VISIT(m->func);
#else
    Py_VISIT(((PyCFunctionObject*)m)->m_module);
#endif
#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
    Py_VISIT(m->func_dict);
#else
    {
        int e =
#if PY_VERSION_HEX < 0x030d0000
            _PyObject_VisitManagedDict
#else
            PyObject_VisitManagedDict
#endif
                ((PyObject*)m, visit, arg);
        if (e != 0) return e;
    }
#endif
    __Pyx_VISIT_CONST(m->func_name);
    __Pyx_VISIT_CONST(m->func_qualname);
    Py_VISIT(m->func_doc);
    Py_VISIT(m->func_globals);
    __Pyx_VISIT_CONST(m->func_code);
    Py_VISIT(__Pyx_CyFunction_GetClassObj(m));
    Py_VISIT(m->defaults_tuple);
    Py_VISIT(m->defaults_kwdict);
    Py_VISIT(m->func_annotations);
    Py_VISIT(m->func_is_coroutine);
    Py_VISIT(m->defaults);
    return 0;
}
static PyObject*
__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
{
    PyObject *repr;
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    repr = PyUnicode_FromFormat("<cyfunction %U at %p>",
                                op->func_qualname, (void *)op);
    __Pyx_END_CRITICAL_SECTION();
    return repr;
}
static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) {
#if CYTHON_COMPILING_IN_LIMITED_API
    PyObject *f = ((__pyx_CyFunctionObject*)func)->func;
    PyCFunction meth;
    int flags;
    meth = PyCFunction_GetFunction(f);
    if (unlikely(!meth)) return NULL;
    flags = PyCFunction_GetFlags(f);
    if (unlikely(flags < 0)) return NULL;
#else
    PyCFunctionObject* f = (PyCFunctionObject*)func;
    PyCFunction meth = f->m_ml->ml_meth;
    int flags = f->m_ml->ml_flags;
#endif
    Py_ssize_t size;
    switch (flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) {
    case METH_VARARGS:
        if (likely(kw == NULL || PyDict_Size(kw) == 0))
            return (*meth)(self, arg);
        break;
    case METH_VARARGS | METH_KEYWORDS:
        return (*(PyCFunctionWithKeywords)(void(*)(void))meth)(self, arg, kw);
    case METH_NOARGS:
        if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
#if CYTHON_ASSUME_SAFE_SIZE
            size = PyTuple_GET_SIZE(arg);
#else
            size = PyTuple_Size(arg);
            if (unlikely(size < 0)) return NULL;
#endif
            if (likely(size == 0))
                return (*meth)(self, NULL);
            __Pyx_CyFunction_raise_argument_count_error(
                (__pyx_CyFunctionObject*)func,
                "takes no arguments", size);
            return NULL;
        }
        break;
    case METH_O:
        if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
#if CYTHON_ASSUME_SAFE_SIZE
            size = PyTuple_GET_SIZE(arg);
#else
            size = PyTuple_Size(arg);
            if (unlikely(size < 0)) return NULL;
#endif
            if (likely(size == 1)) {
                PyObject *result, *arg0;
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                arg0 = PyTuple_GET_ITEM(arg, 0);
                #else
                arg0 = __Pyx_PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL;
                #endif
                result = (*meth)(self, arg0);
                #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
                Py_DECREF(arg0);
                #endif
                return result;
            }
            __Pyx_CyFunction_raise_argument_count_error(
                (__pyx_CyFunctionObject*)func,
                "takes exactly one argument", size);
            return NULL;
        }
        break;
    default:
        PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction");
        return NULL;
    }
    __Pyx_CyFunction_raise_type_error(
        (__pyx_CyFunctionObject*)func, "takes no keyword arguments");
    return NULL;
}
static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    PyObject *self, *result;
#if CYTHON_COMPILING_IN_LIMITED_API
    self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)func)->func);
    if (unlikely(!self) && PyErr_Occurred()) return NULL;
#else
    self = ((PyCFunctionObject*)func)->m_self;
#endif
    result = __Pyx_CyFunction_CallMethod(func, self, arg, kw);
    return result;
}
static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) {
    PyObject *result;
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func;
#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL
     __pyx_vectorcallfunc vc = __Pyx_CyFunction_func_vectorcall(cyfunc);
    if (vc) {
#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE
        return __Pyx_PyVectorcall_FastCallDict(func, vc, &PyTuple_GET_ITEM(args, 0), (size_t)PyTuple_GET_SIZE(args), kw);
#else
        (void) &__Pyx_PyVectorcall_FastCallDict;
        return PyVectorcall_Call(func, args, kw);
#endif
    }
#endif
    if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
        Py_ssize_t argc;
        PyObject *new_args;
        PyObject *self;
#if CYTHON_ASSUME_SAFE_SIZE
        argc = PyTuple_GET_SIZE(args);
#else
        argc = PyTuple_Size(args);
        if (unlikely(argc < 0)) return NULL;
#endif
        new_args = PyTuple_GetSlice(args, 1, argc);
        if (unlikely(!new_args))
            return NULL;
        self = PyTuple_GetItem(args, 0);
        if (unlikely(!self)) {
            Py_DECREF(new_args);
            PyErr_Format(PyExc_TypeError,
                         "unbound method %.200S() needs an argument",
                         cyfunc->func_qualname);
            return NULL;
        }
        result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw);
        Py_DECREF(new_args);
    } else {
        result = __Pyx_CyFunction_Call(func, args, kw);
    }
    return result;
}
#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL
static CYTHON_INLINE int __Pyx_CyFunction_Vectorcall_CheckArgs(__pyx_CyFunctionObject *cyfunc, Py_ssize_t nargs, PyObject *kwnames)
{
    int ret = 0;
    if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
        if (unlikely(nargs < 1)) {
            __Pyx_CyFunction_raise_type_error(
                cyfunc, "needs an argument");
            return -1;
        }
        ret = 1;
    }
    if (unlikely(kwnames) && unlikely(__Pyx_PyTuple_GET_SIZE(kwnames))) {
        __Pyx_CyFunction_raise_type_error(
            cyfunc, "takes no keyword arguments");
        return -1;
    }
    return ret;
}
static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
{
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
    Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
    PyObject *self;
#if CYTHON_COMPILING_IN_LIMITED_API
    PyCFunction meth = PyCFunction_GetFunction(cyfunc->func);
    if (unlikely(!meth)) return NULL;
#else
    PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth;
#endif
    switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) {
    case 1:
        self = args[0];
        args += 1;
        nargs -= 1;
        break;
    case 0:
#if CYTHON_COMPILING_IN_LIMITED_API
        self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func);
        if (unlikely(!self) && PyErr_Occurred()) return NULL;
#else
        self = ((PyCFunctionObject*)cyfunc)->m_self;
#endif
        break;
    default:
        return NULL;
    }
    if (unlikely(nargs != 0)) {
        __Pyx_CyFunction_raise_argument_count_error(
            cyfunc, "takes no arguments", nargs);
        return NULL;
    }
    return meth(self, NULL);
}
static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
{
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
    Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
    PyObject *self;
#if CYTHON_COMPILING_IN_LIMITED_API
    PyCFunction meth = PyCFunction_GetFunction(cyfunc->func);
    if (unlikely(!meth)) return NULL;
#else
    PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth;
#endif
    switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) {
    case 1:
        self = args[0];
        args += 1;
        nargs -= 1;
        break;
    case 0:
#if CYTHON_COMPILING_IN_LIMITED_API
        self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func);
        if (unlikely(!self) && PyErr_Occurred()) return NULL;
#else
        self = ((PyCFunctionObject*)cyfunc)->m_self;
#endif
        break;
    default:
        return NULL;
    }
    if (unlikely(nargs != 1)) {
        __Pyx_CyFunction_raise_argument_count_error(
            cyfunc, "takes exactly one argument", nargs);
        return NULL;
    }
    return meth(self, args[0]);
}
static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
{
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
    Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
    PyObject *self;
#if CYTHON_COMPILING_IN_LIMITED_API
    PyCFunction meth = PyCFunction_GetFunction(cyfunc->func);
    if (unlikely(!meth)) return NULL;
#else
    PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth;
#endif
    switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) {
    case 1:
        self = args[0];
        args += 1;
        nargs -= 1;
        break;
    case 0:
#if CYTHON_COMPILING_IN_LIMITED_API
        self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func);
        if (unlikely(!self) && PyErr_Occurred()) return NULL;
#else
        self = ((PyCFunctionObject*)cyfunc)->m_self;
#endif
        break;
    default:
        return NULL;
    }
    return ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))meth)(self, args, nargs, kwnames);
}
static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
{
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
    PyTypeObject *cls = (PyTypeObject *) __Pyx_CyFunction_GetClassObj(cyfunc);
    Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
    PyObject *self;
#if CYTHON_COMPILING_IN_LIMITED_API
    PyCFunction meth = PyCFunction_GetFunction(cyfunc->func);
    if (unlikely(!meth)) return NULL;
#else
    PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth;
#endif
    switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) {
    case 1:
        self = args[0];
        args += 1;
        nargs -= 1;
        break;
    case 0:
#if CYTHON_COMPILING_IN_LIMITED_API
        self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func);
        if (unlikely(!self) && PyErr_Occurred()) return NULL;
#else
        self = ((PyCFunctionObject*)cyfunc)->m_self;
#endif
        break;
    default:
        return NULL;
    }
    #if PY_VERSION_HEX < 0x030e00A6
    size_t nargs_value = (size_t) nargs;
    #else
    Py_ssize_t nargs_value = nargs;
    #endif
    return ((__Pyx_PyCMethod)(void(*)(void))meth)(self, cls, args, nargs_value, kwnames);
}
#endif
static PyType_Slot __pyx_CyFunctionType_slots[] = {
    {Py_tp_dealloc, (void *)__Pyx_CyFunction_dealloc},
    {Py_tp_repr, (void *)__Pyx_CyFunction_repr},
    {Py_tp_call, (void *)__Pyx_CyFunction_CallAsMethod},
    {Py_tp_traverse, (void *)__Pyx_CyFunction_traverse},
    {Py_tp_clear, (void *)__Pyx_CyFunction_clear},
    {Py_tp_methods, (void *)__pyx_CyFunction_methods},
    {Py_tp_members, (void *)__pyx_CyFunction_members},
    {Py_tp_getset, (void *)__pyx_CyFunction_getsets},
    {Py_tp_descr_get, (void *)__Pyx_PyMethod_New},
    {0, 0},
};
static PyType_Spec __pyx_CyFunctionType_spec = {
    __PYX_TYPE_MODULE_PREFIX "cython_function_or_method",
    sizeof(__pyx_CyFunctionObject),
    0,
#ifdef Py_TPFLAGS_METHOD_DESCRIPTOR
    Py_TPFLAGS_METHOD_DESCRIPTOR |
#endif
#if CYTHON_METH_FASTCALL
#if defined(Py_TPFLAGS_HAVE_VECTORCALL)
    Py_TPFLAGS_HAVE_VECTORCALL |
#elif defined(_Py_TPFLAGS_HAVE_VECTORCALL)
    _Py_TPFLAGS_HAVE_VECTORCALL |
#endif
#endif // CYTHON_METH_FASTCALL
#if PY_VERSION_HEX >= 0x030C0000 && !CYTHON_COMPILING_IN_LIMITED_API
    Py_TPFLAGS_MANAGED_DICT |
#endif
    Py_TPFLAGS_IMMUTABLETYPE | Py_TPFLAGS_DISALLOW_INSTANTIATION |
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE,
    __pyx_CyFunctionType_slots
};
static int __pyx_CyFunction_init(PyObject *module) {
    __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module);
    mstate->__pyx_CyFunctionType = __Pyx_FetchCommonTypeFromSpec(
        mstate->__pyx_CommonTypesMetaclassType, module, &__pyx_CyFunctionType_spec, NULL);
    if (unlikely(mstate->__pyx_CyFunctionType == NULL)) {
        return -1;
    }
    return 0;
}
static CYTHON_INLINE PyObject *__Pyx_CyFunction_InitDefaults(PyObject *func, PyTypeObject *defaults_type) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults = PyObject_CallObject((PyObject*)defaults_type, NULL); // _PyObject_New(defaults_type);
    if (unlikely(!m->defaults))
        return NULL;
    return m->defaults;
}
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults_tuple = tuple;
    Py_INCREF(tuple);
}
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults_kwdict = dict;
    Py_INCREF(dict);
}
static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->func_annotations = dict;
    Py_INCREF(dict);
}

/* CythonFunction */
static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname,
                                      PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
    PyObject *op = __Pyx_CyFunction_Init(
        PyObject_GC_New(__pyx_CyFunctionObject, __pyx_mstate_global->__pyx_CyFunctionType),
        ml, flags, qualname, closure, module, globals, code
    );
    if (likely(op)) {
        PyObject_GC_Track(op);
    }
    return op;
}

/* BufferIndexError */
static void __Pyx_RaiseBufferIndexError(int axis) {
  PyErr_Format(PyExc_IndexError,
     "Out of bounds on buffer access (axis %d)", axis);
}

/* DictGetItem */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) {
    PyObject *value;
    if (unlikely(__Pyx_PyDict_GetItemRef(d, key, &value) == 0)) { // no value, no error
        if (unlikely(PyTuple_Check(key))) {
            PyObject* args = PyTuple_Pack(1, key);
            if (likely(args)) {
                PyErr_SetObject(PyExc_KeyError, args);
                Py_DECREF(args);
            }
        } else {
            PyErr_SetObject(PyExc_KeyError, key);
        }
    }
    return value;
}
#endif

/* pep479 */
static void __Pyx_Generator_Replace_StopIteration(int in_async_gen) {
    PyObject *exc, *val, *tb, *cur_exc, *new_exc;
    __Pyx_PyThreadState_declare
    int is_async_stopiteration = 0;
    CYTHON_MAYBE_UNUSED_VAR(in_async_gen);
    __Pyx_PyThreadState_assign
    cur_exc = __Pyx_PyErr_CurrentExceptionType();
    if (likely(!__Pyx_PyErr_GivenExceptionMatches(cur_exc, PyExc_StopIteration))) {
        if (in_async_gen && unlikely(__Pyx_PyErr_GivenExceptionMatches(cur_exc, PyExc_StopAsyncIteration))) {
            is_async_stopiteration = 1;
        } else {
            return;
        }
    }
    __Pyx_GetException(&exc, &val, &tb);
    Py_XDECREF(exc);
    Py_XDECREF(tb);
    new_exc = PyObject_CallFunction(PyExc_RuntimeError, "s",
        is_async_stopiteration ? "async generator raised StopAsyncIteration" :
        in_async_gen ? "async generator raised StopIteration" :
        "generator raised StopIteration");
    if (!new_exc) {
        Py_XDECREF(val);
        return;
    }
    PyException_SetCause(new_exc, val); // steals ref to val
    PyErr_SetObject(PyExc_RuntimeError, new_exc);
    Py_DECREF(new_exc);
}

/* CIntToPyUnicode */
static CYTHON_INLINE PyObject* __Pyx_uchar___Pyx_PyUnicode_From_size_t(size_t value, Py_ssize_t width, char padding_char) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const size_t neg_one = (size_t) -1, const_zero = (size_t) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (unlikely(!(is_unsigned || value == 0 || value > 0) ||
                    !(sizeof(value) <= 2 || value & ~ (size_t) 0x01fffff || __Pyx_CheckUnicodeValue((int) value)))) {
        PyErr_SetString(PyExc_OverflowError, "%c arg not in range(0x110000)");
        return NULL;
    }
    if (width <= 1) {
        return PyUnicode_FromOrdinal((int) value);
    }
    return __Pyx_PyUnicode_FromOrdinal_Padded((int) value, width, padding_char);
}
static CYTHON_INLINE PyObject* __Pyx____Pyx_PyUnicode_From_size_t(size_t value, Py_ssize_t width, char padding_char, char format_char) {
    char digits[sizeof(size_t)*3+2];
    char *dpos, *end = digits + sizeof(size_t)*3+2;
    const char *hex_digits = DIGITS_HEX;
    Py_ssize_t length, ulength;
    int prepend_sign, last_one_off;
    size_t remaining;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const size_t neg_one = (size_t) -1, const_zero = (size_t) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (format_char == 'X') {
        hex_digits += 16;
        format_char = 'x';
    }
    remaining = value;
    last_one_off = 0;
    dpos = end;
    do {
        int digit_pos;
        switch (format_char) {
        case 'o':
            digit_pos = abs((int)(remaining % (8*8)));
            remaining = (size_t) (remaining / (8*8));
            dpos -= 2;
            memcpy(dpos, DIGIT_PAIRS_8 + digit_pos * 2, 2);
            last_one_off = (digit_pos < 8);
            break;
        case 'd':
            digit_pos = abs((int)(remaining % (10*10)));
            remaining = (size_t) (remaining / (10*10));
            dpos -= 2;
            memcpy(dpos, DIGIT_PAIRS_10 + digit_pos * 2, 2);
            last_one_off = (digit_pos < 10);
            break;
        case 'x':
            *(--dpos) = hex_digits[abs((int)(remaining % 16))];
            remaining = (size_t) (remaining / 16);
            break;
        default:
            assert(0);
            break;
        }
    } while (unlikely(remaining != 0));
    assert(!last_one_off || *dpos == '0');
    dpos += last_one_off;
    length = end - dpos;
    ulength = length;
    prepend_sign = 0;
    if (!is_unsigned && value <= neg_one) {
        if (padding_char == ' ' || width <= length + 1) {
            *(--dpos) = '-';
            ++length;
        } else {
            prepend_sign = 1;
        }
        ++ulength;
    }
    if (width > ulength) {
        ulength = width;
    }
    if (ulength == 1) {
        return PyUnicode_FromOrdinal(*dpos);
    }
    return __Pyx_PyUnicode_BuildFromAscii(ulength, dpos, (int) length, prepend_sign, padding_char);
}

/* Py3UpdateBases */
static PyObject*
__Pyx_PEP560_update_bases(PyObject *bases)
{
    Py_ssize_t i, j, size_bases;
    PyObject *base = NULL, *meth, *new_base, *result, *new_bases = NULL;
#if CYTHON_ASSUME_SAFE_SIZE
    size_bases = PyTuple_GET_SIZE(bases);
#else
    size_bases = PyTuple_Size(bases);
    if (size_bases < 0) return NULL;
#endif
    for (i = 0; i < size_bases; i++) {
#if CYTHON_AVOID_BORROWED_REFS
        Py_CLEAR(base);
#endif
#if CYTHON_ASSUME_SAFE_MACROS
        base = PyTuple_GET_ITEM(bases, i);
#else
        base = PyTuple_GetItem(bases, i);
        if (!base) goto error;
#endif
#if CYTHON_AVOID_BORROWED_REFS
        Py_INCREF(base);
#endif
        if (PyType_Check(base)) {
            if (new_bases) {
                if (PyList_Append(new_bases, base) < 0) {
                    goto error;
                }
            }
            continue;
        }
        meth = __Pyx_PyObject_GetAttrStrNoError(base, __pyx_mstate_global->__pyx_n_u_mro_entries);
        if (!meth && PyErr_Occurred()) {
            goto error;
        }
        if (!meth) {
            if (new_bases) {
                if (PyList_Append(new_bases, base) < 0) {
                    goto error;
                }
            }
            continue;
        }
        new_base = __Pyx_PyObject_CallOneArg(meth, bases);
        Py_DECREF(meth);
        if (!new_base) {
            goto error;
        }
        if (!PyTuple_Check(new_base)) {
            PyErr_SetString(PyExc_TypeError,
                            "__mro_entries__ must return a tuple");
            Py_DECREF(new_base);
            goto error;
        }
        if (!new_bases) {
            if (!(new_bases = PyList_New(i))) {
                goto error;
            }
            for (j = 0; j < i; j++) {
                PyObject *base_from_list;
#if CYTHON_ASSUME_SAFE_MACROS
                base_from_list = PyTuple_GET_ITEM(bases, j);
                PyList_SET_ITEM(new_bases, j, base_from_list);
                Py_INCREF(base_from_list);
#else
                base_from_list = PyTuple_GetItem(bases, j);
                if (!base_from_list) goto error;
                Py_INCREF(base_from_list);
                if (PyList_SetItem(new_bases, j, base_from_list) < 0) goto error;
#endif
            }
        }
#if CYTHON_ASSUME_SAFE_SIZE
        j = PyList_GET_SIZE(new_bases);
#else
        j = PyList_Size(new_bases);
        if (j < 0) goto error;
#endif
        if (PyList_SetSlice(new_bases, j, j, new_base) < 0) {
            goto error;
        }
        Py_DECREF(new_base);
    }
    if (!new_bases) {
        Py_INCREF(bases);
        return bases;
    }
    result = PyList_AsTuple(new_bases);
    Py_DECREF(new_bases);
#if CYTHON_AVOID_BORROWED_REFS
    Py_XDECREF(base);
#endif
    return result;
error:
    Py_XDECREF(new_bases);
#if CYTHON_AVOID_BORROWED_REFS
    Py_XDECREF(base);
#endif
    return NULL;
}

/* CalculateMetaclass */
static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) {
    Py_ssize_t i, nbases;
#if CYTHON_ASSUME_SAFE_SIZE
    nbases = PyTuple_GET_SIZE(bases);
#else
    nbases = PyTuple_Size(bases);
    if (nbases < 0) return NULL;
#endif
    for (i=0; i < nbases; i++) {
        PyTypeObject *tmptype;
#if CYTHON_ASSUME_SAFE_MACROS
        PyObject *tmp = PyTuple_GET_ITEM(bases, i);
#else
        PyObject *tmp = PyTuple_GetItem(bases, i);
        if (!tmp) return NULL;
#endif
        tmptype = Py_TYPE(tmp);
        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) {
        metaclass = &PyType_Type;
    }
    Py_INCREF((PyObject*) metaclass);
    return (PyObject*) metaclass;
}

/* SetNewInClass */
static int __Pyx_SetNewInClass(PyObject *ns, PyObject *name, PyObject *value) {
#ifdef __Pyx_CyFunction_USED
    int ret;
    if (__Pyx_CyFunction_Check(value)) {
        PyObject *staticnew;
#if !CYTHON_COMPILING_IN_LIMITED_API
        staticnew = PyStaticMethod_New(value);
#else
        PyObject *builtins, *staticmethod_str, *staticmethod;
        builtins = PyEval_GetBuiltins(); // borrowed
        if (!builtins) return -1;
        staticmethod_str = PyUnicode_FromStringAndSize("staticmethod", 12);
        if (!staticmethod_str) return -1;
        staticmethod = PyObject_GetItem(builtins, staticmethod_str);
        Py_DECREF(staticmethod_str);
        if (!staticmethod) return -1;
        staticnew = PyObject_CallFunctionObjArgs(staticmethod, value, NULL);
        Py_DECREF(staticmethod);
#endif
        if (unlikely(!staticnew)) return -1;
        ret = __Pyx_SetNameInClass(ns, name, staticnew);
        Py_DECREF(staticnew);
        return ret;
    }
#endif
    return __Pyx_SetNameInClass(ns, name, value);
}

/* PyObjectLookupSpecial (used by Py3ClassCreate) */
#if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error) {
    PyObject *res;
    PyTypeObject *tp = Py_TYPE(obj);
    res = _PyType_Lookup(tp, attr_name);
    if (likely(res)) {
        descrgetfunc f = Py_TYPE(res)->tp_descr_get;
        if (!f) {
            Py_INCREF(res);
        } else {
            res = f(res, obj, (PyObject *)tp);
        }
    } else if (with_error) {
        PyErr_SetObject(PyExc_AttributeError, attr_name);
    }
    return res;
}
#endif

/* 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_GetAttrStrNoError(metaclass, __pyx_mstate_global->__pyx_n_u_prepare);
        if (prep) {
            PyObject *pargs[3] = {NULL, name, bases};
            ns = __Pyx_PyObject_FastCallDict(prep, pargs+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, mkw);
            Py_DECREF(prep);
        } else {
            if (unlikely(PyErr_Occurred()))
                return NULL;
            ns = PyDict_New();
        }
    } else {
        ns = PyDict_New();
    }
    if (unlikely(!ns))
        return NULL;
    if (unlikely(PyObject_SetItem(ns, __pyx_mstate_global->__pyx_n_u_module_2, modname) < 0)) goto bad;
    if (unlikely(PyObject_SetItem(ns, __pyx_mstate_global->__pyx_n_u_qualname, qualname) < 0)) goto bad;
    if (unlikely(doc && PyObject_SetItem(ns, __pyx_mstate_global->__pyx_n_u_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;
    PyObject *owned_metaclass = NULL;
    PyObject *margs[4] = {NULL, name, bases, dict};
    if (allow_py2_metaclass) {
        owned_metaclass = PyObject_GetItem(dict, __pyx_mstate_global->__pyx_n_u_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;
    }
    result = __Pyx_PyObject_FastCallDict(metaclass, margs+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, mkw);
    Py_XDECREF(owned_metaclass);
    return result;
}

/* MergeKeywords */
static int __Pyx_MergeKeywords_dict(PyObject *kwdict, PyObject *source_dict) {
    Py_ssize_t len1, len2;
    len2 = PyDict_Size(source_dict);
    if (unlikely(len2 == -1)) return -1;
    if (len2 == 0) {
        return 0;
    }
    len1 = PyDict_Size(kwdict);
    if (unlikely(len1 == -1)) return -1;
    if (len1 > 0) {
        PyObject *key, *smaller_dict, *larger_dict;
        #if CYTHON_AVOID_BORROWED_REFS
        PyObject *ppos = NULL;
        #else
        Py_ssize_t ppos = 0;
        #endif
        int duplicates_found = 0;
        if (len1 <= len2) {
            smaller_dict = kwdict;
            larger_dict = source_dict;
        } else {
            smaller_dict = source_dict;
            larger_dict = kwdict;
        }
        __Pyx_BEGIN_CRITICAL_SECTION(smaller_dict);
        while (
            #if CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
            __Pyx_PyDict_NextRef(smaller_dict, &ppos, &key, NULL)
            #else
            PyDict_Next(smaller_dict, &ppos, &key, NULL)
            #endif
        ) {
            if (unlikely(PyDict_Contains(larger_dict, key))) {
                __Pyx_RaiseDoubleKeywordsError("function", key);
                #if CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
                Py_DECREF(key);
                #endif
                duplicates_found = 1;
                break;
            };
            #if CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
            Py_DECREF(key);
            #endif
        }
        __Pyx_END_CRITICAL_SECTION();
        #if CYTHON_AVOID_BORROWED_REFS
        Py_XDECREF(ppos);
        #endif
        if (unlikely(duplicates_found))
            return -1;
    }
    return PyDict_Update(kwdict, source_dict);
}
static int __Pyx_MergeKeywords_any(PyObject *kwdict, PyObject *source_mapping) {
    PyObject *iter, *key = NULL, *value = NULL;
    int source_is_dict, result;
    Py_ssize_t orig_length, ppos = 0;
    iter = __Pyx_dict_iterator(source_mapping, 0, __pyx_mstate_global->__pyx_n_u_items, &orig_length, &source_is_dict);
    if (unlikely(!iter)) {
        PyObject *args;
        if (unlikely(!PyErr_ExceptionMatches(PyExc_AttributeError))) goto bad;
        PyErr_Clear();
        args = PyTuple_Pack(1, source_mapping);
        if (likely(args)) {
            PyObject *fallback = PyObject_Call((PyObject*)&PyDict_Type, args, NULL);
            Py_DECREF(args);
            if (likely(fallback)) {
                result = __Pyx_MergeKeywords_dict(kwdict, fallback);
                Py_DECREF(fallback);
                return result;
            }
        }
        goto bad;
    }
    while (1) {
        result = __Pyx_dict_iter_next(iter, orig_length, &ppos, &key, &value, NULL, source_is_dict);
        if (unlikely(result < 0)) goto bad;
        if (!result) break;
    #if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API
        {
            int inserted = PyDict_SetDefaultRef(kwdict, key, value, NULL);
            if (unlikely(inserted != 0)) {
                if (inserted == 1) __Pyx_RaiseDoubleKeywordsError("function", key);
                result = -1;
            }
        }
    #else
        if (unlikely(PyDict_Contains(kwdict, key))) {
            __Pyx_RaiseDoubleKeywordsError("function", key);
            result = -1;
        } else {
            result = PyDict_SetItem(kwdict, key, value);
        }
    #endif
        Py_DECREF(key);
        Py_DECREF(value);
        if (unlikely(result < 0)) goto bad;
    }
    Py_XDECREF(iter);
    return 0;
bad:
    Py_XDECREF(iter);
    return -1;
}
static CYTHON_INLINE int __Pyx_MergeKeywords(PyObject *kwdict, PyObject *source_mapping) {
    assert(PyDict_Check(kwdict));
    if (likely(PyDict_Check(source_mapping))) {
        return __Pyx_MergeKeywords_dict(kwdict, source_mapping);
    } else {
        return __Pyx_MergeKeywords_any(kwdict, source_mapping);
    }
}

/* AllocateExtensionType */
static PyObject *__Pyx_AllocateExtensionType(PyTypeObject *t, int is_final) {
    if (is_final || likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) {
        allocfunc alloc_func = __Pyx_PyType_GetSlot(t, tp_alloc, allocfunc);
        return alloc_func(t, 0);
    } else {
        newfunc tp_new = __Pyx_PyType_TryGetSlot(&PyBaseObject_Type, tp_new, newfunc);
    #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
        if (!tp_new) {
            PyObject *new_str = PyUnicode_FromString("__new__");
            if (likely(new_str)) {
                PyObject *o = PyObject_CallMethodObjArgs((PyObject *)&PyBaseObject_Type, new_str, t, NULL);
                Py_DECREF(new_str);
                return o;
            } else
                return NULL;
        } else
    #endif
        return tp_new(t, __pyx_mstate_global->__pyx_empty_tuple, 0);
    }
}

/* FunctionExport */
static int __Pyx_ExportFunction(PyObject *api_dict, const char *name, void (*f)(void), const char *sig) {
    PyObject *cobj;
    union {
        void (*fp)(void);
        void *p;
    } tmp;
    tmp.fp = f;
    cobj = PyCapsule_New(tmp.p, sig, 0);
    if (!cobj)
        goto bad;
    if (PyDict_SetItemString(api_dict, name, cobj) < 0)
        goto bad;
    Py_DECREF(cobj);
    return 0;
bad:
    Py_XDECREF(cobj);
    return -1;
}

/* GetApiDict */
static PyObject *__Pyx_ApiExport_GetApiDict(void) {
    PyObject *d;
    if (__Pyx_PyDict_GetItemRef(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_capi, &d) == -1)
        return NULL;
    if (!d) {
        d = PyDict_New();
        if (!d)
            goto bad;
        if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_pyx_capi, d) < 0)
            goto bad;
    }
    return d;
bad:
    Py_XDECREF(d);
    return NULL;
}

/* ValidateBasesTuple (used by PyType_Ready) */
#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS
static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases) {
    Py_ssize_t i, n;
#if CYTHON_ASSUME_SAFE_SIZE
    n = PyTuple_GET_SIZE(bases);
#else
    n = PyTuple_Size(bases);
    if (unlikely(n < 0)) return -1;
#endif
    for (i = 1; i < n; i++)
    {
        PyTypeObject *b;
#if CYTHON_AVOID_BORROWED_REFS
        PyObject *b0 = PySequence_GetItem(bases, i);
        if (!b0) return -1;
#elif CYTHON_ASSUME_SAFE_MACROS
        PyObject *b0 = PyTuple_GET_ITEM(bases, i);
#else
        PyObject *b0 = PyTuple_GetItem(bases, i);
        if (!b0) return -1;
#endif
        b = (PyTypeObject*) b0;
        if (!__Pyx_PyType_HasFeature(b, Py_TPFLAGS_HEAPTYPE))
        {
            __Pyx_TypeName b_name = __Pyx_PyType_GetFullyQualifiedName(b);
            PyErr_Format(PyExc_TypeError,
                "base class '" __Pyx_FMT_TYPENAME "' is not a heap type", b_name);
            __Pyx_DECREF_TypeName(b_name);
#if CYTHON_AVOID_BORROWED_REFS
            Py_DECREF(b0);
#endif
            return -1;
        }
        if (dictoffset == 0)
        {
            Py_ssize_t b_dictoffset = 0;
#if CYTHON_USE_TYPE_SLOTS
            b_dictoffset = b->tp_dictoffset;
#else
            PyObject *py_b_dictoffset = PyObject_GetAttrString((PyObject*)b, "__dictoffset__");
            if (!py_b_dictoffset) goto dictoffset_return;
            b_dictoffset = PyLong_AsSsize_t(py_b_dictoffset);
            Py_DECREF(py_b_dictoffset);
            if (b_dictoffset == -1 && PyErr_Occurred()) goto dictoffset_return;
#endif
            if (b_dictoffset) {
                {
                    __Pyx_TypeName b_name = __Pyx_PyType_GetFullyQualifiedName(b);
                    PyErr_Format(PyExc_TypeError,
                        "extension type '%.200s' has no __dict__ slot, "
                        "but base type '" __Pyx_FMT_TYPENAME "' has: "
                        "either add 'cdef dict __dict__' to the extension type "
                        "or add '__slots__ = [...]' to the base type",
                        type_name, b_name);
                    __Pyx_DECREF_TypeName(b_name);
                }
#if !CYTHON_USE_TYPE_SLOTS
              dictoffset_return:
#endif
#if CYTHON_AVOID_BORROWED_REFS
                Py_DECREF(b0);
#endif
                return -1;
            }
        }
#if CYTHON_AVOID_BORROWED_REFS
        Py_DECREF(b0);
#endif
    }
    return 0;
}
#endif

/* PyType_Ready */
CYTHON_UNUSED static int __Pyx_PyType_HasMultipleInheritance(PyTypeObject *t) {
    while (t) {
        PyObject *bases = __Pyx_PyType_GetSlot(t, tp_bases, PyObject*);
        if (bases) {
            return 1;
        }
        t = __Pyx_PyType_GetSlot(t, tp_base, PyTypeObject*);
    }
    return 0;
}
static int __Pyx_PyType_Ready(PyTypeObject *t) {
#if CYTHON_USE_TYPE_SPECS || !CYTHON_COMPILING_IN_CPYTHON || defined(PYSTON_MAJOR_VERSION)
    (void)__Pyx_PyObject_CallMethod0;
#if CYTHON_USE_TYPE_SPECS
    (void)__Pyx_validate_bases_tuple;
#endif
    return PyType_Ready(t);
#else
    int r;
    if (!__Pyx_PyType_HasMultipleInheritance(t)) {
        return PyType_Ready(t);
    }
    PyObject *bases = __Pyx_PyType_GetSlot(t, tp_bases, PyObject*);
    if (bases && unlikely(__Pyx_validate_bases_tuple(t->tp_name, t->tp_dictoffset, bases) == -1))
        return -1;
#if !defined(PYSTON_MAJOR_VERSION)
    {
        int gc_was_enabled;
    #if PY_VERSION_HEX >= 0x030A00b1
        gc_was_enabled = PyGC_Disable();
        (void)__Pyx_PyObject_CallMethod0;
    #else
        PyObject *ret, *py_status;
        PyObject *gc = NULL;
        #if (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM+0 >= 0x07030400) &&\
                !CYTHON_COMPILING_IN_GRAAL
        gc = PyImport_GetModule(__pyx_mstate_global->__pyx_kp_u_gc);
        #endif
        if (unlikely(!gc)) gc = PyImport_Import(__pyx_mstate_global->__pyx_kp_u_gc);
        if (unlikely(!gc)) return -1;
        py_status = __Pyx_PyObject_CallMethod0(gc, __pyx_mstate_global->__pyx_kp_u_isenabled);
        if (unlikely(!py_status)) {
            Py_DECREF(gc);
            return -1;
        }
        gc_was_enabled = __Pyx_PyObject_IsTrue(py_status);
        Py_DECREF(py_status);
        if (gc_was_enabled > 0) {
            ret = __Pyx_PyObject_CallMethod0(gc, __pyx_mstate_global->__pyx_kp_u_disable);
            if (unlikely(!ret)) {
                Py_DECREF(gc);
                return -1;
            }
            Py_DECREF(ret);
        } else if (unlikely(gc_was_enabled == -1)) {
            Py_DECREF(gc);
            return -1;
        }
    #endif
        t->tp_flags |= Py_TPFLAGS_HEAPTYPE;
#if PY_VERSION_HEX >= 0x030A0000
        t->tp_flags |= Py_TPFLAGS_IMMUTABLETYPE;
#endif
#else
        (void)__Pyx_PyObject_CallMethod0;
#endif
    r = PyType_Ready(t);
#if !defined(PYSTON_MAJOR_VERSION)
        t->tp_flags &= ~Py_TPFLAGS_HEAPTYPE;
    #if PY_VERSION_HEX >= 0x030A00b1
        if (gc_was_enabled)
            PyGC_Enable();
    #else
        if (gc_was_enabled) {
            PyObject *tp, *v, *tb;
            PyErr_Fetch(&tp, &v, &tb);
            ret = __Pyx_PyObject_CallMethod0(gc, __pyx_mstate_global->__pyx_kp_u_enable);
            if (likely(ret || r == -1)) {
                Py_XDECREF(ret);
                PyErr_Restore(tp, v, tb);
            } else {
                Py_XDECREF(tp);
                Py_XDECREF(v);
                Py_XDECREF(tb);
                r = -1;
            }
        }
        Py_DECREF(gc);
    #endif
    }
#endif
    return r;
#endif
}

/* DelItemOnTypeDict (used by SetupReduce) */
static int __Pyx__DelItemOnTypeDict(PyTypeObject *tp, PyObject *k) {
    int result;
    PyObject *tp_dict;
#if CYTHON_COMPILING_IN_LIMITED_API
    tp_dict = __Pyx_GetTypeDict(tp);
    if (unlikely(!tp_dict)) return -1;
#else
    tp_dict = tp->tp_dict;
#endif
    result = PyDict_DelItem(tp_dict, k);
    if (likely(!result)) PyType_Modified(tp);
    return result;
}

/* SetupReduce */
static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) {
  int ret;
  PyObject *name_attr;
  name_attr = __Pyx_PyObject_GetAttrStrNoError(meth, __pyx_mstate_global->__pyx_n_u_name_2);
  if (likely(name_attr)) {
      ret = PyObject_RichCompareBool(name_attr, name, Py_EQ);
  } else {
      ret = -1;
  }
  if (unlikely(ret < 0)) {
      PyErr_Clear();
      ret = 0;
  }
  Py_XDECREF(name_attr);
  return ret;
}
static int __Pyx_setup_reduce(PyObject* type_obj) {
    int ret = 0;
    PyObject *object_reduce = NULL;
    PyObject *object_getstate = NULL;
    PyObject *object_reduce_ex = NULL;
    PyObject *reduce = NULL;
    PyObject *reduce_ex = NULL;
    PyObject *reduce_cython = NULL;
    PyObject *setstate = NULL;
    PyObject *setstate_cython = NULL;
    PyObject *getstate = NULL;
#if CYTHON_USE_PYTYPE_LOOKUP
    getstate = _PyType_Lookup((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_getstate);
#else
    getstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_getstate);
    if (!getstate && PyErr_Occurred()) {
        goto __PYX_BAD;
    }
#endif
    if (getstate) {
#if CYTHON_USE_PYTYPE_LOOKUP
        object_getstate = _PyType_Lookup(&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_getstate);
#else
        object_getstate = __Pyx_PyObject_GetAttrStrNoError((PyObject*)&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_getstate);
        if (!object_getstate && PyErr_Occurred()) {
            goto __PYX_BAD;
        }
#endif
        if (object_getstate != getstate) {
            goto __PYX_GOOD;
        }
    }
#if CYTHON_USE_PYTYPE_LOOKUP
    object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
#else
    object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
#endif
    reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_mstate_global->__pyx_n_u_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD;
    if (reduce_ex == object_reduce_ex) {
#if CYTHON_USE_PYTYPE_LOOKUP
        object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce); if (!object_reduce) goto __PYX_BAD;
#else
        object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce); if (!object_reduce) goto __PYX_BAD;
#endif
        reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_mstate_global->__pyx_n_u_reduce); if (unlikely(!reduce)) goto __PYX_BAD;
        if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_mstate_global->__pyx_n_u_reduce_cython)) {
            reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_reduce_cython);
            if (likely(reduce_cython)) {
                ret = __Pyx_SetItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
                ret = __Pyx_DelItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
            } else if (reduce == object_reduce || PyErr_Occurred()) {
                goto __PYX_BAD;
            }
            setstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_setstate);
            if (!setstate) PyErr_Clear();
            if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_mstate_global->__pyx_n_u_setstate_cython)) {
                setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_setstate_cython);
                if (likely(setstate_cython)) {
                    ret = __Pyx_SetItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
                    ret = __Pyx_DelItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
                } else if (!setstate || PyErr_Occurred()) {
                    goto __PYX_BAD;
                }
            }
            PyType_Modified((PyTypeObject*)type_obj);
        }
    }
    goto __PYX_GOOD;
__PYX_BAD:
    if (!PyErr_Occurred()) {
        __Pyx_TypeName type_obj_name =
            __Pyx_PyType_GetFullyQualifiedName((PyTypeObject*)type_obj);
        PyErr_Format(PyExc_RuntimeError,
            "Unable to initialize pickling for " __Pyx_FMT_TYPENAME, type_obj_name);
        __Pyx_DECREF_TypeName(type_obj_name);
    }
    ret = -1;
__PYX_GOOD:
#if !CYTHON_USE_PYTYPE_LOOKUP
    Py_XDECREF(object_reduce);
    Py_XDECREF(object_reduce_ex);
    Py_XDECREF(object_getstate);
    Py_XDECREF(getstate);
#endif
    Py_XDECREF(reduce);
    Py_XDECREF(reduce_ex);
    Py_XDECREF(reduce_cython);
    Py_XDECREF(setstate);
    Py_XDECREF(setstate_cython);
    return ret;
}

/* SetVTable */
static int __Pyx_SetVtable(PyTypeObject *type, void *vtable) {
    PyObject *ob = PyCapsule_New(vtable, 0, 0);
    if (unlikely(!ob))
        goto bad;
#if CYTHON_COMPILING_IN_LIMITED_API
    if (unlikely(PyObject_SetAttr((PyObject *) type, __pyx_mstate_global->__pyx_n_u_pyx_vtable, ob) < 0))
#else
    if (unlikely(PyDict_SetItem(type->tp_dict, __pyx_mstate_global->__pyx_n_u_pyx_vtable, ob) < 0))
#endif
        goto bad;
    Py_DECREF(ob);
    return 0;
bad:
    Py_XDECREF(ob);
    return -1;
}

/* GetVTable (used by MergeVTables) */
static void* __Pyx_GetVtable(PyTypeObject *type) {
    void* ptr;
#if CYTHON_COMPILING_IN_LIMITED_API
    PyObject *ob = PyObject_GetAttr((PyObject *)type, __pyx_mstate_global->__pyx_n_u_pyx_vtable);
#else
    PyObject *ob = PyObject_GetItem(type->tp_dict, __pyx_mstate_global->__pyx_n_u_pyx_vtable);
#endif
    if (!ob)
        goto bad;
    ptr = PyCapsule_GetPointer(ob, 0);
    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;
}

/* MergeVTables */
static int __Pyx_MergeVtables(PyTypeObject *type) {
    int i=0;
    Py_ssize_t size;
    void** base_vtables;
    __Pyx_TypeName tp_base_name = NULL;
    __Pyx_TypeName base_name = NULL;
    void* unknown = (void*)-1;
    PyObject* bases = __Pyx_PyType_GetSlot(type, tp_bases, PyObject*);
    int base_depth = 0;
    {
        PyTypeObject* base = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*);
        while (base) {
            base_depth += 1;
            base = __Pyx_PyType_GetSlot(base, tp_base, PyTypeObject*);
        }
    }
    base_vtables = (void**) PyMem_Malloc(sizeof(void*) * (size_t)(base_depth + 1));
    base_vtables[0] = unknown;
#if CYTHON_COMPILING_IN_LIMITED_API
    size = PyTuple_Size(bases);
    if (size < 0) goto other_failure;
#else
    size = PyTuple_GET_SIZE(bases);
#endif
    for (i = 1; i < size; i++) {
        PyObject *basei;
        void* base_vtable;
#if CYTHON_AVOID_BORROWED_REFS
        basei = PySequence_GetItem(bases, i);
        if (unlikely(!basei)) goto other_failure;
#elif !CYTHON_ASSUME_SAFE_MACROS
        basei = PyTuple_GetItem(bases, i);
        if (unlikely(!basei)) goto other_failure;
#else
        basei = PyTuple_GET_ITEM(bases, i);
#endif
        base_vtable = __Pyx_GetVtable((PyTypeObject*)basei);
#if CYTHON_AVOID_BORROWED_REFS
        Py_DECREF(basei);
#endif
        if (base_vtable != NULL) {
            int j;
            PyTypeObject* base = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*);
            for (j = 0; j < base_depth; j++) {
                if (base_vtables[j] == unknown) {
                    base_vtables[j] = __Pyx_GetVtable(base);
                    base_vtables[j + 1] = unknown;
                }
                if (base_vtables[j] == base_vtable) {
                    break;
                } else if (base_vtables[j] == NULL) {
                    goto bad;
                }
                base = __Pyx_PyType_GetSlot(base, tp_base, PyTypeObject*);
            }
        }
    }
    PyErr_Clear();
    PyMem_Free(base_vtables);
    return 0;
bad:
    {
        PyTypeObject* basei = NULL;
        PyTypeObject* tp_base = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*);
        tp_base_name = __Pyx_PyType_GetFullyQualifiedName(tp_base);
#if CYTHON_AVOID_BORROWED_REFS
        basei = (PyTypeObject*)PySequence_GetItem(bases, i);
        if (unlikely(!basei)) goto really_bad;
#elif !CYTHON_ASSUME_SAFE_MACROS
        basei = (PyTypeObject*)PyTuple_GetItem(bases, i);
        if (unlikely(!basei)) goto really_bad;
#else
        basei = (PyTypeObject*)PyTuple_GET_ITEM(bases, i);
#endif
        base_name = __Pyx_PyType_GetFullyQualifiedName(basei);
#if CYTHON_AVOID_BORROWED_REFS
        Py_DECREF(basei);
#endif
    }
    PyErr_Format(PyExc_TypeError,
        "multiple bases have vtable conflict: '" __Pyx_FMT_TYPENAME "' and '" __Pyx_FMT_TYPENAME "'", tp_base_name, base_name);
#if CYTHON_AVOID_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS
really_bad: // bad has failed!
#endif
    __Pyx_DECREF_TypeName(tp_base_name);
    __Pyx_DECREF_TypeName(base_name);
#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_AVOID_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS
other_failure:
#endif
    PyMem_Free(base_vtables);
    return -1;
}

/* TypeImport */
#ifndef __PYX_HAVE_RT_ImportType_3_2_5
#define __PYX_HAVE_RT_ImportType_3_2_5
static PyTypeObject *__Pyx_ImportType_3_2_5(PyObject *module, const char *module_name, const char *class_name,
    size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_2_5 check_size)
{
    PyObject *result = 0;
    Py_ssize_t basicsize;
    Py_ssize_t itemsize;
#if defined(Py_LIMITED_API) || (defined(CYTHON_COMPILING_IN_LIMITED_API) && CYTHON_COMPILING_IN_LIMITED_API)
    PyObject *py_basicsize;
    PyObject *py_itemsize;
#endif
    result = PyObject_GetAttrString(module, class_name);
    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;
    }
#if !( defined(Py_LIMITED_API) || (defined(CYTHON_COMPILING_IN_LIMITED_API) && CYTHON_COMPILING_IN_LIMITED_API) )
    basicsize = ((PyTypeObject *)result)->tp_basicsize;
    itemsize = ((PyTypeObject *)result)->tp_itemsize;
#else
    if (size == 0) {
        return (PyTypeObject *)result;
    }
    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;
    py_itemsize = PyObject_GetAttrString(result, "__itemsize__");
    if (!py_itemsize)
        goto bad;
    itemsize = PyLong_AsSsize_t(py_itemsize);
    Py_DECREF(py_itemsize);
    py_itemsize = 0;
    if (itemsize == (Py_ssize_t)-1 && PyErr_Occurred())
        goto bad;
#endif
    if (itemsize) {
        if (size % alignment) {
            alignment = size % alignment;
        }
        if (itemsize < (Py_ssize_t)alignment)
            itemsize = (Py_ssize_t)alignment;
    }
    if ((size_t)(basicsize + itemsize) < size) {
        PyErr_Format(PyExc_ValueError,
            "%.200s.%.200s size changed, may indicate binary incompatibility. "
            "Expected %zd from C header, got %zd from PyObject",
            module_name, class_name, size, basicsize+itemsize);
        goto bad;
    }
    if (check_size == __Pyx_ImportType_CheckSize_Error_3_2_5 &&
            ((size_t)basicsize > size || (size_t)(basicsize + itemsize) < size)) {
        PyErr_Format(PyExc_ValueError,
            "%.200s.%.200s size changed, may indicate binary incompatibility. "
            "Expected %zd from C header, got %zd-%zd from PyObject",
            module_name, class_name, size, basicsize, basicsize+itemsize);
        goto bad;
    }
    else if (check_size == __Pyx_ImportType_CheckSize_Warn_3_2_5 && (size_t)basicsize > size) {
        if (PyErr_WarnFormat(NULL, 0,
                "%.200s.%.200s size changed, may indicate binary incompatibility. "
                "Expected %zd from C header, got %zd from PyObject",
                module_name, class_name, size, basicsize) < 0) {
            goto bad;
        }
    }
    return (PyTypeObject *)result;
bad:
    Py_XDECREF(result);
    return NULL;
}
#endif

/* GetNameInClass */
static PyObject *__Pyx__GetNameInClass(PyObject *nmspace, PyObject *name) {
    PyObject *result;
    PyObject *dict;
    assert(PyType_Check(nmspace));
#if CYTHON_USE_TYPE_SLOTS
    dict = ((PyTypeObject*)nmspace)->tp_dict;
    Py_XINCREF(dict);
#else
    dict = PyObject_GetAttr(nmspace, __pyx_mstate_global->__pyx_n_u_dict);
#endif
    if (likely(dict)) {
        result = PyObject_GetItem(dict, name);
        Py_DECREF(dict);
        if (result) {
            return result;
        }
    }
    PyErr_Clear();
    __Pyx_GetModuleGlobalNameUncached(result, name);
    return result;
}

/* ListPack */
static PyObject *__Pyx_PyList_Pack(Py_ssize_t n, ...) {
    va_list va;
    PyObject *l = PyList_New(n);
    va_start(va, n);
    if (unlikely(!l)) goto end;
    for (Py_ssize_t i=0; i<n; ++i) {
        PyObject *arg = va_arg(va, PyObject*);
        Py_INCREF(arg);
        if (__Pyx_PyList_SET_ITEM(l, i, arg) != (0)) {
            Py_CLEAR(l);
            goto end;
        }
    }
    end:
    va_end(va);
    return l;
}

/* ClassMethod */
static PyObject* __Pyx_Method_ClassMethod(PyObject *method) {
#if CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM <= 0x05080000
    if (PyObject_TypeCheck(method, &PyWrapperDescr_Type)) {
        return PyClassMethod_New(method);
    }
#else
#if CYTHON_COMPILING_IN_PYPY
    if (PyMethodDescr_Check(method))
#else
    if (__Pyx_TypeCheck(method, &PyMethodDescr_Type))
#endif
    {
#if CYTHON_COMPILING_IN_LIMITED_API
        return PyErr_Format(
            PyExc_SystemError,
            "Cython cannot yet handle classmethod on a MethodDescriptorType (%S) in limited API mode. "
            "This is most likely a classmethod in a cdef class method with binding=False. "
            "Try setting 'binding' to True.",
            method);
#elif CYTHON_COMPILING_IN_GRAAL && defined(GRAALPY_VERSION_NUM) && GRAALPY_VERSION_NUM > 0x19000000
        PyTypeObject *d_type = GraalPyDescrObject_GetType(method);
        return PyDescr_NewClassMethod(d_type, GraalPyMethodDescrObject_GetMethod(method));
#elif CYTHON_COMPILING_IN_GRAAL
        PyTypeObject *d_type = PyDescrObject_GetType(method);
        return PyDescr_NewClassMethod(d_type, PyMethodDescrObject_GetMethod(method));
#else
        PyMethodDescrObject *descr = (PyMethodDescrObject *)method;
        PyTypeObject *d_type = descr->d_common.d_type;
        return PyDescr_NewClassMethod(d_type, descr->d_method);
#endif
    }
#endif
#if !CYTHON_COMPILING_IN_LIMITED_API
    else if (PyMethod_Check(method)) {
        return PyClassMethod_New(PyMethod_GET_FUNCTION(method));
    }
    else {
        return PyClassMethod_New(method);
    }
#else
    {
        PyObject *func=NULL;
        PyObject *builtins, *classmethod, *classmethod_str, *result=NULL;
        if (__Pyx_TypeCheck(method, __pyx_mstate_global->__Pyx_CachedMethodType)) {
            func = PyObject_GetAttrString(method, "__func__");
            if (!func) goto bad;
        } else {
            func = method;
            Py_INCREF(func);
        }
        builtins = PyEval_GetBuiltins(); // borrowed
        if (unlikely(!builtins)) goto bad;
        classmethod_str = PyUnicode_FromString("classmethod");
        if (unlikely(!classmethod_str)) goto bad;
        classmethod = PyObject_GetItem(builtins, classmethod_str);
        Py_DECREF(classmethod_str);
        if (unlikely(!classmethod)) goto bad;
        result = PyObject_CallFunctionObjArgs(classmethod, func, NULL);
        Py_DECREF(classmethod);
        bad:
        Py_XDECREF(func);
        return result;
    }
#endif
}

/* CLineInTraceback (used by AddTraceback) */
#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME
#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
#define __Pyx_PyProbablyModule_GetDict(o) __Pyx_XNewRef(PyModule_GetDict(o))
#elif !CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
#define __Pyx_PyProbablyModule_GetDict(o) PyObject_GenericGetDict(o, NULL);
#else
PyObject* __Pyx_PyProbablyModule_GetDict(PyObject *o) {
    PyObject **dict_ptr = _PyObject_GetDictPtr(o);
    return dict_ptr ? __Pyx_XNewRef(*dict_ptr) : NULL;
}
#endif
static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) {
    PyObject *use_cline = NULL;
    PyObject *ptype, *pvalue, *ptraceback;
    PyObject *cython_runtime_dict;
    CYTHON_MAYBE_UNUSED_VAR(tstate);
    if (unlikely(!__pyx_mstate_global->__pyx_cython_runtime)) {
        return c_line;
    }
    __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
    cython_runtime_dict = __Pyx_PyProbablyModule_GetDict(__pyx_mstate_global->__pyx_cython_runtime);
    if (likely(cython_runtime_dict)) {
        __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
            use_cline, cython_runtime_dict,
            __Pyx_PyDict_SetDefault(cython_runtime_dict, __pyx_mstate_global->__pyx_n_u_cline_in_traceback, Py_False))
    }
    if (use_cline == NULL || use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
        c_line = 0;
    }
    Py_XDECREF(use_cline);
    Py_XDECREF(cython_runtime_dict);
    __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
    return c_line;
}
#endif

/* CodeObjectCache (used by AddTraceback) */
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 __Pyx_CachedCodeObjectType *__pyx__find_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line) {
    __Pyx_CachedCodeObjectType* code_object;
    int pos;
    if (unlikely(!code_line) || unlikely(!code_cache->entries)) {
        return NULL;
    }
    pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line);
    if (unlikely(pos >= code_cache->count) || unlikely(code_cache->entries[pos].code_line != code_line)) {
        return NULL;
    }
    code_object = code_cache->entries[pos].code_object;
    Py_INCREF(code_object);
    return code_object;
}
static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line) {
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS
    (void)__pyx__find_code_object;
    return NULL; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just miss.
#else
    struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache;
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    __pyx_nonatomic_int_type old_count = __pyx_atomic_incr_acq_rel(&code_cache->accessor_count);
    if (old_count < 0) {
        __pyx_atomic_decr_acq_rel(&code_cache->accessor_count);
        return NULL;
    }
#endif
    __Pyx_CachedCodeObjectType *result = __pyx__find_code_object(code_cache, code_line);
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    __pyx_atomic_decr_acq_rel(&code_cache->accessor_count);
#endif
    return result;
#endif
}
static void __pyx__insert_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line, __Pyx_CachedCodeObjectType* code_object)
{
    int pos, i;
    __Pyx_CodeObjectCacheEntry* entries = code_cache->entries;
    if (unlikely(!code_line)) {
        return;
    }
    if (unlikely(!entries)) {
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
        if (likely(entries)) {
            code_cache->entries = entries;
            code_cache->max_count = 64;
            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(code_cache->entries, code_cache->count, code_line);
    if ((pos < code_cache->count) && unlikely(code_cache->entries[pos].code_line == code_line)) {
        __Pyx_CachedCodeObjectType* tmp = entries[pos].code_object;
        entries[pos].code_object = code_object;
        Py_INCREF(code_object);
        Py_DECREF(tmp);
        return;
    }
    if (code_cache->count == code_cache->max_count) {
        int new_max = code_cache->max_count + 64;
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
            code_cache->entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry));
        if (unlikely(!entries)) {
            return;
        }
        code_cache->entries = entries;
        code_cache->max_count = new_max;
    }
    for (i=code_cache->count; i>pos; i--) {
        entries[i] = entries[i-1];
    }
    entries[pos].code_line = code_line;
    entries[pos].code_object = code_object;
    code_cache->count++;
    Py_INCREF(code_object);
}
static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object) {
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS
    (void)__pyx__insert_code_object;
    return; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just fail.
#else
    struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache;
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    __pyx_nonatomic_int_type expected = 0;
    if (!__pyx_atomic_int_cmp_exchange(&code_cache->accessor_count, &expected, INT_MIN)) {
        return;
    }
#endif
    __pyx__insert_code_object(code_cache, code_line, code_object);
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    __pyx_atomic_sub(&code_cache->accessor_count, INT_MIN);
#endif
#endif
}

/* AddTraceback */
#include "compile.h"
#include "frameobject.h"
#include "traceback.h"
#if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API && !defined(PYPY_VERSION)
  #ifndef Py_BUILD_CORE
    #define Py_BUILD_CORE 1
  #endif
  #include "internal/pycore_frame.h"
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
static PyObject *__Pyx_PyCode_Replace_For_AddTraceback(PyObject *code, PyObject *scratch_dict,
                                                       PyObject *firstlineno, PyObject *name) {
    PyObject *replace = NULL;
    if (unlikely(PyDict_SetItemString(scratch_dict, "co_firstlineno", firstlineno))) return NULL;
    if (unlikely(PyDict_SetItemString(scratch_dict, "co_name", name))) return NULL;
    replace = PyObject_GetAttrString(code, "replace");
    if (likely(replace)) {
        PyObject *result = PyObject_Call(replace, __pyx_mstate_global->__pyx_empty_tuple, scratch_dict);
        Py_DECREF(replace);
        return result;
    }
    PyErr_Clear();
    return NULL;
}
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename) {
    PyObject *code_object = NULL, *py_py_line = NULL, *py_funcname = NULL, *dict = NULL;
    PyObject *replace = NULL, *getframe = NULL, *frame = NULL;
    PyObject *exc_type, *exc_value, *exc_traceback;
    int success = 0;
    if (c_line) {
        c_line = __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line);
    }
    PyErr_Fetch(&exc_type, &exc_value, &exc_traceback);
    code_object = __pyx_find_code_object(c_line ? -c_line : py_line);
    if (!code_object) {
        code_object = Py_CompileString("_getframe()", filename, Py_eval_input);
        if (unlikely(!code_object)) goto bad;
        py_py_line = PyLong_FromLong(py_line);
        if (unlikely(!py_py_line)) goto bad;
        if (c_line) {
            py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        } else {
            py_funcname = PyUnicode_FromString(funcname);
        }
        if (unlikely(!py_funcname)) goto bad;
        dict = PyDict_New();
        if (unlikely(!dict)) goto bad;
        {
            PyObject *old_code_object = code_object;
            code_object = __Pyx_PyCode_Replace_For_AddTraceback(code_object, dict, py_py_line, py_funcname);
            Py_DECREF(old_code_object);
        }
        if (unlikely(!code_object)) goto bad;
        __pyx_insert_code_object(c_line ? -c_line : py_line, code_object);
    } else {
        dict = PyDict_New();
    }
    getframe = PySys_GetObject("_getframe");
    if (unlikely(!getframe)) goto bad;
    if (unlikely(PyDict_SetItemString(dict, "_getframe", getframe))) goto bad;
    frame = PyEval_EvalCode(code_object, dict, dict);
    if (unlikely(!frame) || frame == Py_None) goto bad;
    success = 1;
  bad:
    PyErr_Restore(exc_type, exc_value, exc_traceback);
    Py_XDECREF(code_object);
    Py_XDECREF(py_py_line);
    Py_XDECREF(py_funcname);
    Py_XDECREF(dict);
    Py_XDECREF(replace);
    if (success) {
        PyTraceBack_Here(
            (struct _frame*)frame);
    }
    Py_XDECREF(frame);
}
#else
static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
            const char *funcname, int c_line,
            int py_line, const char *filename) {
    PyCodeObject *py_code = NULL;
    PyObject *py_funcname = NULL;
    if (c_line) {
        py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        if (!py_funcname) goto bad;
        funcname = PyUnicode_AsUTF8(py_funcname);
        if (!funcname) goto bad;
    }
    py_code = PyCode_NewEmpty(filename, funcname, py_line);
    Py_XDECREF(py_funcname);
    return py_code;
bad:
    Py_XDECREF(py_funcname);
    return NULL;
}
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename) {
    PyCodeObject *py_code = 0;
    PyFrameObject *py_frame = 0;
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    PyObject *ptype, *pvalue, *ptraceback;
    if (c_line) {
        c_line = __Pyx_CLineForTraceback(tstate, c_line);
    }
    py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
    if (!py_code) {
        __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
        py_code = __Pyx_CreateCodeObjectForTraceback(
            funcname, c_line, py_line, filename);
        if (!py_code) {
            /* If the code object creation fails, then we should clear the
               fetched exception references and propagate the new exception */
            Py_XDECREF(ptype);
            Py_XDECREF(pvalue);
            Py_XDECREF(ptraceback);
            goto bad;
        }
        __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
        __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
    }
    py_frame = PyFrame_New(
        tstate,            /*PyThreadState *tstate,*/
        py_code,           /*PyCodeObject *code,*/
        __pyx_mstate_global->__pyx_d,    /*PyObject *globals,*/
        0                  /*PyObject *locals*/
    );
    if (!py_frame) goto bad;
    __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
    PyTraceBack_Here(py_frame);
bad:
    Py_XDECREF(py_code);
    Py_XDECREF(py_frame);
}
#endif

/* MemviewRefcount */
#include <stdio.h>
#ifndef _Py_NO_RETURN
#define _Py_NO_RETURN
#endif
_Py_NO_RETURN
static void __pyx_fatalerror(const char *fmt, ...) {
    va_list vargs;
    char msg[200];
#if PY_VERSION_HEX >= 0x030A0000 || defined(HAVE_STDARG_PROTOTYPES)
    va_start(vargs, fmt);
#else
    va_start(vargs);
#endif
    vsnprintf(msg, 200, fmt, vargs);
    va_end(vargs);
    Py_FatalError(msg);
}
static CYTHON_INLINE int
__pyx_add_acquisition_count_locked(__pyx_atomic_int_type *acquisition_count,
                                   PyThread_type_lock lock)
{
    int result;
    PyThread_acquire_lock(lock, 1);
    result = (*acquisition_count)++;
    PyThread_release_lock(lock);
    return result;
}
static CYTHON_INLINE int
__pyx_sub_acquisition_count_locked(__pyx_atomic_int_type *acquisition_count,
                                   PyThread_type_lock lock)
{
    int result;
    PyThread_acquire_lock(lock, 1);
    result = (*acquisition_count)--;
    PyThread_release_lock(lock);
    return result;
}
static CYTHON_INLINE void
__Pyx_INC_MEMVIEW(__Pyx_memviewslice *memslice, int have_gil, int lineno)
{
    __pyx_nonatomic_int_type old_acquisition_count;
    struct __pyx_memoryview_obj *memview = memslice->memview;
    if (unlikely(!memview || (PyObject *) memview == Py_None)) {
        return;
    }
    old_acquisition_count = __pyx_add_acquisition_count(memview);
    if (unlikely(old_acquisition_count <= 0)) {
        if (likely(old_acquisition_count == 0)) {
            if (have_gil) {
                Py_INCREF((PyObject *) memview);
            } else {
                PyGILState_STATE _gilstate = PyGILState_Ensure();
                Py_INCREF((PyObject *) memview);
                PyGILState_Release(_gilstate);
            }
        } else {
            __pyx_fatalerror("Acquisition count is %d (line %d)",
                             old_acquisition_count+1, lineno);
        }
    }
}
static CYTHON_INLINE void __Pyx_XCLEAR_MEMVIEW(__Pyx_memviewslice *memslice,
                                             int have_gil, int lineno) {
    __pyx_nonatomic_int_type old_acquisition_count;
    struct __pyx_memoryview_obj *memview = memslice->memview;
    if (unlikely(!memview || (PyObject *) memview == Py_None)) {
        memslice->memview = NULL;
        return;
    }
    old_acquisition_count = __pyx_sub_acquisition_count(memview);
    memslice->data = NULL;
    if (likely(old_acquisition_count > 1)) {
        memslice->memview = NULL;
    } else if (likely(old_acquisition_count == 1)) {
        if (have_gil) {
            Py_CLEAR(memslice->memview);
        } else {
            PyGILState_STATE _gilstate = PyGILState_Ensure();
            Py_CLEAR(memslice->memview);
            PyGILState_Release(_gilstate);
        }
    } else {
        __pyx_fatalerror("Acquisition count is %d (line %d)",
                         old_acquisition_count-1, lineno);
    }
}

/* MemviewSliceIsContig */
static int
__pyx_memviewslice_is_contig(const __Pyx_memviewslice mvs, char order, int ndim)
{
    int i, index, step, start;
    Py_ssize_t itemsize = mvs.memview->view.itemsize;
    if (order == 'F') {
        step = 1;
        start = 0;
    } else {
        step = -1;
        start = ndim - 1;
    }
    for (i = 0; i < ndim; i++) {
        index = start + step * i;
        if (mvs.suboffsets[index] >= 0 || mvs.strides[index] != itemsize)
            return 0;
        itemsize *= mvs.shape[index];
    }
    return 1;
}

/* OverlappingSlices */
static void
__pyx_get_array_memory_extents(__Pyx_memviewslice *slice,
                               void **out_start, void **out_end,
                               int ndim, size_t itemsize)
{
    char *start, *end;
    int i;
    start = end = slice->data;
    for (i = 0; i < ndim; i++) {
        Py_ssize_t stride = slice->strides[i];
        Py_ssize_t extent = slice->shape[i];
        if (extent == 0) {
            *out_start = *out_end = start;
            return;
        } else {
            if (stride > 0)
                end += stride * (extent - 1);
            else
                start += stride * (extent - 1);
        }
    }
    *out_start = start;
    *out_end = end + itemsize;
}
static int
__pyx_slices_overlap(__Pyx_memviewslice *slice1,
                     __Pyx_memviewslice *slice2,
                     int ndim, size_t itemsize)
{
    void *start1, *end1, *start2, *end2;
    __pyx_get_array_memory_extents(slice1, &start1, &end1, ndim, itemsize);
    __pyx_get_array_memory_extents(slice2, &start2, &end2, ndim, itemsize);
    return (start1 < end2) && (start2 < end1);
}

/* MemviewSliceInit */
static int
__Pyx_init_memviewslice(struct __pyx_memoryview_obj *memview,
                        int ndim,
                        __Pyx_memviewslice *memviewslice,
                        int memview_is_new_reference)
{
    __Pyx_RefNannyDeclarations
    int i, retval=-1;
    Py_buffer *buf = &memview->view;
    __Pyx_RefNannySetupContext("init_memviewslice", 0);
    if (unlikely(memviewslice->memview || memviewslice->data)) {
        PyErr_SetString(PyExc_ValueError,
            "memviewslice is already initialized!");
        goto fail;
    }
    if (buf->strides) {
        for (i = 0; i < ndim; i++) {
            memviewslice->strides[i] = buf->strides[i];
        }
    } else {
        Py_ssize_t stride = buf->itemsize;
        for (i = ndim - 1; i >= 0; i--) {
            memviewslice->strides[i] = stride;
            stride *= buf->shape[i];
        }
    }
    for (i = 0; i < ndim; i++) {
        memviewslice->shape[i]   = buf->shape[i];
        if (buf->suboffsets) {
            memviewslice->suboffsets[i] = buf->suboffsets[i];
        } else {
            memviewslice->suboffsets[i] = -1;
        }
    }
    memviewslice->memview = memview;
    memviewslice->data = (char *)buf->buf;
    if (__pyx_add_acquisition_count(memview) == 0 && !memview_is_new_reference) {
        Py_INCREF((PyObject*)memview);
    }
    retval = 0;
    goto no_fail;
fail:
    memviewslice->memview = 0;
    memviewslice->data = 0;
    retval = -1;
no_fail:
    __Pyx_RefNannyFinishContext();
    return retval;
}

/* SliceMemoryviewSlice */
static void __pyx_memoryview_slice_memviewslice_err_dim(PyObject *error, const char* msg, int dim) {
    PyGILState_STATE gilstate = PyGILState_Ensure();
    PyErr_Format(error, msg, dim);
    PyGILState_Release(gilstate);
}
static CYTHON_INLINE int __pyx_memoryview_slice_memviewslice(
        __Pyx_memviewslice *dst,
        Py_ssize_t shape, Py_ssize_t stride, Py_ssize_t suboffset,
        int dim, int new_ndim, int *suboffset_dim,
        Py_ssize_t start, Py_ssize_t stop, Py_ssize_t step,
        int have_start, int have_stop, int have_step,
        int is_slice) {
    if (!is_slice) {
        if (start < 0) {
            start += shape;
        }
        if (unlikely(!(0 <= start && start < shape))) {
            __pyx_memoryview_slice_memviewslice_err_dim(PyExc_IndexError, "Index out of bounds (axis %d)", dim);
            return -1;
        }
    } else {
        int negative_step;
        if (have_step) {
            negative_step = step < 0;
            if (unlikely(step == 0)) {
                __pyx_memoryview_slice_memviewslice_err_dim(PyExc_ValueError, "Step may not be zero (axis %d)", dim);
                return -1;
            }
        } else {
            negative_step = 0;
            step = 1;
        }
        if (have_start) {
            if (start < 0) {
                start += shape;
                if (start < 0) {
                    start = 0;
                }
            } else if (start >= shape) {
                start = negative_step ? (shape - 1) : shape;
            }
        } else {
            start = negative_step ? (shape - 1) : 0;
        }
        if (have_stop) {
            if (stop < 0) {
                stop += shape;
                if (stop < 0) {
                    stop = 0;
                }
            } else if (stop > shape) {
                stop = shape;
            }
        } else {
            stop = negative_step ? -1 : shape;
        }
        Py_ssize_t new_shape = (stop - start) / step;
        if ((stop - start) - step * new_shape) {
            ++new_shape;
        }
        if (new_shape < 0) {
            new_shape = 0;
        }
        dst->strides[new_ndim] = stride * step;
        dst->shape[new_ndim] = new_shape;
        dst->suboffsets[new_ndim] = suboffset;
    }
    if (suboffset_dim[0] < 0) {
        dst->data += start * stride;
    } else {
        dst->suboffsets[suboffset_dim[0]] += start * stride;
    }
    if (suboffset >= 0) {
        if (!is_slice) {
            if (likely(new_ndim == 0)) {
                dst->data = ((char **)(dst->data))[0] + suboffset;
            } else {
                __pyx_memoryview_slice_memviewslice_err_dim(
                    PyExc_IndexError,
                    "All dimensions preceding dimension %d must be indexed and not sliced",
                    dim);
                return -1;
            }
        } else {
            suboffset_dim[0] = new_ndim;
        }
    }
    return 0;
}

/* Declarations */
#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
  #ifdef __cplusplus
    static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
      return ::std::complex< double >(x, y);
    }
  #else
    static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
      return x + y*(__pyx_t_double_complex)_Complex_I;
    }
  #endif
#else
    static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
      __pyx_t_double_complex z;
      z.real = x;
      z.imag = y;
      return z;
    }
#endif

/* Arithmetic */
#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
#else
    static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
       return (a.real == b.real) && (a.imag == b.imag);
    }
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
        __pyx_t_double_complex z;
        z.real = a.real + b.real;
        z.imag = a.imag + b.imag;
        return z;
    }
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
        __pyx_t_double_complex z;
        z.real = a.real - b.real;
        z.imag = a.imag - b.imag;
        return z;
    }
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
        __pyx_t_double_complex z;
        z.real = a.real * b.real - a.imag * b.imag;
        z.imag = a.real * b.imag + a.imag * b.real;
        return z;
    }
    #if 1
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
        if (b.imag == 0) {
            return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real);
        } else if (fabs(b.real) >= fabs(b.imag)) {
            if (b.real == 0 && b.imag == 0) {
                return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.imag);
            } else {
                double r = b.imag / b.real;
                double s = (double)(1.0) / (b.real + b.imag * r);
                return __pyx_t_double_complex_from_parts(
                    (a.real + a.imag * r) * s, (a.imag - a.real * r) * s);
            }
        } else {
            double r = b.real / b.imag;
            double s = (double)(1.0) / (b.imag + b.real * r);
            return __pyx_t_double_complex_from_parts(
                (a.real * r + a.imag) * s, (a.imag * r - a.real) * s);
        }
    }
    #else
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
        if (b.imag == 0) {
            return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real);
        } else {
            double denom = b.real * b.real + b.imag * b.imag;
            return __pyx_t_double_complex_from_parts(
                (a.real * b.real + a.imag * b.imag) / denom,
                (a.imag * b.real - a.real * b.imag) / denom);
        }
    }
    #endif
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex a) {
        __pyx_t_double_complex z;
        z.real = -a.real;
        z.imag = -a.imag;
        return z;
    }
    static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex a) {
       return (a.real == 0) && (a.imag == 0);
    }
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex a) {
        __pyx_t_double_complex z;
        z.real =  a.real;
        z.imag = -a.imag;
        return z;
    }
    #if 1
        static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex z) {
          #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
            return sqrt(z.real*z.real + z.imag*z.imag);
          #else
            return hypot(z.real, z.imag);
          #endif
        }
        static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
            __pyx_t_double_complex z;
            double r, lnr, theta, z_r, z_theta;
            if (b.imag == 0 && b.real == (int)b.real) {
                if (b.real < 0) {
                    double denom = a.real * a.real + a.imag * a.imag;
                    a.real = a.real / denom;
                    a.imag = -a.imag / denom;
                    b.real = -b.real;
                }
                switch ((int)b.real) {
                    case 0:
                        z.real = 1;
                        z.imag = 0;
                        return z;
                    case 1:
                        return a;
                    case 2:
                        return __Pyx_c_prod_double(a, a);
                    case 3:
                        z = __Pyx_c_prod_double(a, a);
                        return __Pyx_c_prod_double(z, a);
                    case 4:
                        z = __Pyx_c_prod_double(a, a);
                        return __Pyx_c_prod_double(z, z);
                }
            }
            if (a.imag == 0) {
                if (a.real == 0) {
                    return a;
                } else if ((b.imag == 0) && (a.real >= 0)) {
                    z.real = pow(a.real, b.real);
                    z.imag = 0;
                    return z;
                } else if (a.real > 0) {
                    r = a.real;
                    theta = 0;
                } else {
                    r = -a.real;
                    theta = atan2(0.0, -1.0);
                }
            } else {
                r = __Pyx_c_abs_double(a);
                theta = atan2(a.imag, a.real);
            }
            lnr = log(r);
            z_r = exp(lnr * b.real - theta * b.imag);
            z_theta = theta * b.real + lnr * b.imag;
            z.real = z_r * cos(z_theta);
            z.imag = z_r * sin(z_theta);
            return z;
        }
    #endif
#endif

/* CheckUnpickleChecksum */
static void __Pyx_RaiseUnpickleChecksumError(long checksum, long checksum1, long checksum2, long checksum3, const char *members) {
    PyObject *pickle_module = PyImport_ImportModule("pickle");
    if (unlikely(!pickle_module)) return;
    PyObject *pickle_error = PyObject_GetAttrString(pickle_module, "PickleError");
    Py_DECREF(pickle_module);
    if (unlikely(!pickle_error)) return;
    if (checksum2 == checksum1) {
        PyErr_Format(pickle_error, "Incompatible checksums (0x%x vs (0x%x) = (%s))",
            checksum, checksum1, members);
    } else if (checksum3 == checksum2) {
        PyErr_Format(pickle_error, "Incompatible checksums (0x%x vs (0x%x, 0x%x) = (%s))",
            checksum, checksum1, checksum2, members);
    } else {
        PyErr_Format(pickle_error, "Incompatible checksums (0x%x vs (0x%x, 0x%x, 0x%x) = (%s))",
            checksum, checksum1, checksum2, checksum3, members);
    }
    Py_DECREF(pickle_error);
}
static int __Pyx_CheckUnpickleChecksum(long checksum, long checksum1, long checksum2, long checksum3, const char *members) {
    int found = 0;
    found |= checksum1 == checksum;
    found |= checksum2 == checksum;
    found |= checksum3 == checksum;
    if (likely(found))
        return 0;
    __Pyx_RaiseUnpickleChecksumError(checksum, checksum1, checksum2, checksum3, members);
    return -1;
}

/* 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;\
    }

/* IsLittleEndian (used by BufferFormatCheck) */
static CYTHON_INLINE int __Pyx_Is_Little_Endian(void)
{
  union {
    uint32_t u32;
    uint8_t u8[4];
  } S;
  S.u32 = 0x01020304;
  return S.u8[0] == 4;
}

/* BufferFormatCheck (used by MemviewSliceValidateAndInit) */
static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx,
                              __Pyx_BufFmt_StackElem* stack,
                              const __Pyx_TypeInfo* type) {
  stack[0].field = &ctx->root;
  stack[0].parent_offset = 0;
  ctx->root.type = type;
  ctx->root.name = "buffer dtype";
  ctx->root.offset = 0;
  ctx->head = stack;
  ctx->head->field = &ctx->root;
  ctx->fmt_offset = 0;
  ctx->head->parent_offset = 0;
  ctx->new_packmode = '@';
  ctx->enc_packmode = '@';
  ctx->new_count = 1;
  ctx->enc_count = 0;
  ctx->enc_type = 0;
  ctx->is_complex = 0;
  ctx->is_valid_array = 0;
  ctx->struct_alignment = 0;
  while (type->typegroup == 'S') {
    ++ctx->head;
    ctx->head->field = type->fields;
    ctx->head->parent_offset = 0;
    type = type->fields->type;
  }
}
static int __Pyx_BufFmt_ParseNumber(const char** ts) {
    int count;
    const char* t = *ts;
    if (*t < '0' || *t > '9') {
      return -1;
    } else {
        count = *t++ - '0';
        while (*t >= '0' && *t <= '9') {
            count *= 10;
            count += *t++ - '0';
        }
    }
    *ts = t;
    return count;
}
static int __Pyx_BufFmt_ExpectNumber(const char **ts) {
    int number = __Pyx_BufFmt_ParseNumber(ts);
    if (number == -1)
        PyErr_Format(PyExc_ValueError,\
                     "Does not understand character buffer dtype format string ('%c')", **ts);
    return number;
}
static void __Pyx_BufFmt_RaiseUnexpectedChar(char ch) {
  PyErr_Format(PyExc_ValueError,
               "Unexpected format string character: '%c'", ch);
}
static const char* __Pyx_BufFmt_DescribeTypeChar(char ch, int is_complex) {
  switch (ch) {
    case '?': return "'bool'";
    case 'c': return "'char'";
    case 'b': return "'signed char'";
    case 'B': return "'unsigned char'";
    case 'h': return "'short'";
    case 'H': return "'unsigned short'";
    case 'i': return "'int'";
    case 'I': return "'unsigned int'";
    case 'l': return "'long'";
    case 'L': return "'unsigned long'";
    case 'q': return "'long long'";
    case 'Q': return "'unsigned long long'";
    case 'f': return (is_complex ? "'complex float'" : "'float'");
    case 'd': return (is_complex ? "'complex double'" : "'double'");
    case 'g': return (is_complex ? "'complex long double'" : "'long double'");
    case 'T': return "a struct";
    case 'O': return "Python object";
    case 'P': return "a pointer";
    case 's': case 'p': return "a string";
    case 0: return "end";
    default: return "unparsable format string";
  }
}
static size_t __Pyx_BufFmt_TypeCharToStandardSize(char ch, int is_complex) {
  switch (ch) {
    case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
    case 'h': case 'H': return 2;
    case 'i': case 'I': case 'l': case 'L': return 4;
    case 'q': case 'Q': return 8;
    case 'f': return (is_complex ? 8 : 4);
    case 'd': return (is_complex ? 16 : 8);
    case 'g': {
      PyErr_SetString(PyExc_ValueError, "Python does not define a standard format string size for long double ('g')..");
      return 0;
    }
    case 'O': case 'P': return sizeof(void*);
    default:
      __Pyx_BufFmt_RaiseUnexpectedChar(ch);
      return 0;
    }
}
static size_t __Pyx_BufFmt_TypeCharToNativeSize(char ch, int is_complex) {
  switch (ch) {
    case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
    case 'h': case 'H': return sizeof(short);
    case 'i': case 'I': return sizeof(int);
    case 'l': case 'L': return sizeof(long);
    case 'q': case 'Q': return sizeof(PY_LONG_LONG);
    case 'f': return sizeof(float) * (is_complex ? 2 : 1);
    case 'd': return sizeof(double) * (is_complex ? 2 : 1);
    case 'g': return sizeof(long double) * (is_complex ? 2 : 1);
    case 'O': case 'P': return sizeof(void*);
    default: {
      __Pyx_BufFmt_RaiseUnexpectedChar(ch);
      return 0;
    }
  }
}
typedef struct { char c; short x; } __Pyx_st_short;
typedef struct { char c; int x; } __Pyx_st_int;
typedef struct { char c; long x; } __Pyx_st_long;
typedef struct { char c; float x; } __Pyx_st_float;
typedef struct { char c; double x; } __Pyx_st_double;
typedef struct { char c; long double x; } __Pyx_st_longdouble;
typedef struct { char c; void *x; } __Pyx_st_void_p;
typedef struct { char c; PY_LONG_LONG x; } __Pyx_st_longlong;
static size_t __Pyx_BufFmt_TypeCharToAlignment(char ch, int is_complex) {
  CYTHON_UNUSED_VAR(is_complex);
  switch (ch) {
    case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
    case 'h': case 'H': return sizeof(__Pyx_st_short) - sizeof(short);
    case 'i': case 'I': return sizeof(__Pyx_st_int) - sizeof(int);
    case 'l': case 'L': return sizeof(__Pyx_st_long) - sizeof(long);
    case 'q': case 'Q': return sizeof(__Pyx_st_longlong) - sizeof(PY_LONG_LONG);
    case 'f': return sizeof(__Pyx_st_float) - sizeof(float);
    case 'd': return sizeof(__Pyx_st_double) - sizeof(double);
    case 'g': return sizeof(__Pyx_st_longdouble) - sizeof(long double);
    case 'P': case 'O': return sizeof(__Pyx_st_void_p) - sizeof(void*);
    default:
      __Pyx_BufFmt_RaiseUnexpectedChar(ch);
      return 0;
    }
}
/* These are for computing the padding at the end of the struct to align
   on the first member of the struct. This will probably the same as above,
   but we don't have any guarantees.
 */
typedef struct { short x; char c; } __Pyx_pad_short;
typedef struct { int x; char c; } __Pyx_pad_int;
typedef struct { long x; char c; } __Pyx_pad_long;
typedef struct { float x; char c; } __Pyx_pad_float;
typedef struct { double x; char c; } __Pyx_pad_double;
typedef struct { long double x; char c; } __Pyx_pad_longdouble;
typedef struct { void *x; char c; } __Pyx_pad_void_p;
typedef struct { PY_LONG_LONG x; char c; } __Pyx_pad_longlong;
static size_t __Pyx_BufFmt_TypeCharToPadding(char ch, int is_complex) {
  CYTHON_UNUSED_VAR(is_complex);
  switch (ch) {
    case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
    case 'h': case 'H': return sizeof(__Pyx_pad_short) - sizeof(short);
    case 'i': case 'I': return sizeof(__Pyx_pad_int) - sizeof(int);
    case 'l': case 'L': return sizeof(__Pyx_pad_long) - sizeof(long);
    case 'q': case 'Q': return sizeof(__Pyx_pad_longlong) - sizeof(PY_LONG_LONG);
    case 'f': return sizeof(__Pyx_pad_float) - sizeof(float);
    case 'd': return sizeof(__Pyx_pad_double) - sizeof(double);
    case 'g': return sizeof(__Pyx_pad_longdouble) - sizeof(long double);
    case 'P': case 'O': return sizeof(__Pyx_pad_void_p) - sizeof(void*);
    default:
      __Pyx_BufFmt_RaiseUnexpectedChar(ch);
      return 0;
    }
}
static char __Pyx_BufFmt_TypeCharToGroup(char ch, int is_complex) {
  switch (ch) {
    case 'c':
        return 'H';
    case 'b': case 'h': case 'i':
    case 'l': case 'q': case 's': case 'p':
        return 'I';
    case '?': case 'B': case 'H': case 'I': case 'L': case 'Q':
        return 'U';
    case 'f': case 'd': case 'g':
        return (is_complex ? 'C' : 'R');
    case 'O':
        return 'O';
    case 'P':
        return 'P';
    default: {
      __Pyx_BufFmt_RaiseUnexpectedChar(ch);
      return 0;
    }
  }
}
static void __Pyx_BufFmt_RaiseExpected(__Pyx_BufFmt_Context* ctx) {
  if (ctx->head == NULL || ctx->head->field == &ctx->root) {
    const char* expected;
    const char* quote;
    if (ctx->head == NULL) {
      expected = "end";
      quote = "";
    } else {
      expected = ctx->head->field->type->name;
      quote = "'";
    }
    PyErr_Format(PyExc_ValueError,
                 "Buffer dtype mismatch, expected %s%s%s but got %s",
                 quote, expected, quote,
                 __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex));
  } else {
    const __Pyx_StructField* field = ctx->head->field;
    const __Pyx_StructField* parent = (ctx->head - 1)->field;
    PyErr_Format(PyExc_ValueError,
                 "Buffer dtype mismatch, expected '%s' but got %s in '%s.%s'",
                 field->type->name, __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex),
                 parent->type->name, field->name);
  }
}
static int __Pyx_BufFmt_ProcessTypeChunk(__Pyx_BufFmt_Context* ctx) {
  char group;
  size_t size, offset, arraysize = 1;
  if (ctx->enc_type == 0) return 0;
  if (ctx->head->field->type->arraysize[0]) {
    int i, ndim = 0;
    if (ctx->enc_type == 's' || ctx->enc_type == 'p') {
        ctx->is_valid_array = ctx->head->field->type->ndim == 1;
        ndim = 1;
        if (ctx->enc_count != ctx->head->field->type->arraysize[0]) {
            PyErr_Format(PyExc_ValueError,
                         "Expected a dimension of size %zu, got %zu",
                         ctx->head->field->type->arraysize[0], ctx->enc_count);
            return -1;
        }
    }
    if (!ctx->is_valid_array) {
      PyErr_Format(PyExc_ValueError, "Expected %d dimensions, got %d",
                   ctx->head->field->type->ndim, ndim);
      return -1;
    }
    for (i = 0; i < ctx->head->field->type->ndim; i++) {
      arraysize *= ctx->head->field->type->arraysize[i];
    }
    ctx->is_valid_array = 0;
    ctx->enc_count = 1;
  }
  group = __Pyx_BufFmt_TypeCharToGroup(ctx->enc_type, ctx->is_complex);
  do {
    const __Pyx_StructField* field = ctx->head->field;
    const __Pyx_TypeInfo* type = field->type;
    if (ctx->enc_packmode == '@' || ctx->enc_packmode == '^') {
      size = __Pyx_BufFmt_TypeCharToNativeSize(ctx->enc_type, ctx->is_complex);
    } else {
      size = __Pyx_BufFmt_TypeCharToStandardSize(ctx->enc_type, ctx->is_complex);
    }
    if (ctx->enc_packmode == '@') {
      size_t align_at = __Pyx_BufFmt_TypeCharToAlignment(ctx->enc_type, ctx->is_complex);
      size_t align_mod_offset;
      if (align_at == 0) return -1;
      align_mod_offset = ctx->fmt_offset % align_at;
      if (align_mod_offset > 0) ctx->fmt_offset += align_at - align_mod_offset;
      if (ctx->struct_alignment == 0)
          ctx->struct_alignment = __Pyx_BufFmt_TypeCharToPadding(ctx->enc_type,
                                                                 ctx->is_complex);
    }
    if (type->size != size || type->typegroup != group) {
      if (type->typegroup == 'C' && type->fields != NULL) {
        size_t parent_offset = ctx->head->parent_offset + field->offset;
        ++ctx->head;
        ctx->head->field = type->fields;
        ctx->head->parent_offset = parent_offset;
        continue;
      }
      if ((type->typegroup == 'H' || group == 'H') && type->size == size) {
      } else {
          __Pyx_BufFmt_RaiseExpected(ctx);
          return -1;
      }
    }
    offset = ctx->head->parent_offset + field->offset;
    if (ctx->fmt_offset != offset) {
      PyErr_Format(PyExc_ValueError,
                   "Buffer dtype mismatch; next field is at offset %" CYTHON_FORMAT_SSIZE_T "d but %" CYTHON_FORMAT_SSIZE_T "d expected",
                   (Py_ssize_t)ctx->fmt_offset, (Py_ssize_t)offset);
      return -1;
    }
    ctx->fmt_offset += size;
    if (arraysize)
      ctx->fmt_offset += (arraysize - 1) * size;
    --ctx->enc_count;
    while (1) {
      if (field == &ctx->root) {
        ctx->head = NULL;
        if (ctx->enc_count != 0) {
          __Pyx_BufFmt_RaiseExpected(ctx);
          return -1;
        }
        break;
      }
      ctx->head->field = ++field;
      if (field->type == NULL) {
        --ctx->head;
        field = ctx->head->field;
        continue;
      } else if (field->type->typegroup == 'S') {
        size_t parent_offset = ctx->head->parent_offset + field->offset;
        if (field->type->fields->type == NULL) continue;
        field = field->type->fields;
        ++ctx->head;
        ctx->head->field = field;
        ctx->head->parent_offset = parent_offset;
        break;
      } else {
        break;
      }
    }
  } while (ctx->enc_count);
  ctx->enc_type = 0;
  ctx->is_complex = 0;
  return 0;
}
static int
__pyx_buffmt_parse_array(__Pyx_BufFmt_Context* ctx, const char** tsp)
{
    const char *ts = *tsp;
    int i = 0, number, ndim;
    ++ts;
    if (ctx->new_count != 1) {
        PyErr_SetString(PyExc_ValueError,
                        "Cannot handle repeated arrays in format string");
        return -1;
    }
    if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return -1;
    ndim = ctx->head->field->type->ndim;
    while (*ts && *ts != ')') {
        switch (*ts) {
            case ' ': case '\f': case '\r': case '\n': case '\t': case '\v':  continue;
            default:  break;
        }
        number = __Pyx_BufFmt_ExpectNumber(&ts);
        if (number == -1) return -1;
        if (i < ndim && (size_t) number != ctx->head->field->type->arraysize[i]) {
            PyErr_Format(PyExc_ValueError,
                        "Expected a dimension of size %zu, got %d",
                        ctx->head->field->type->arraysize[i], number);
            return -1;
        }
        if (*ts != ',' && *ts != ')') {
            PyErr_Format(PyExc_ValueError,
                                "Expected a comma in format string, got '%c'", *ts);
            return -1;
        }
        if (*ts == ',') ts++;
        i++;
    }
    if (i != ndim) {
        PyErr_Format(PyExc_ValueError, "Expected %d dimension(s), got %d",
                            ctx->head->field->type->ndim, i);
        return -1;
    }
    if (!*ts) {
        PyErr_SetString(PyExc_ValueError,
                        "Unexpected end of format string, expected ')'");
        return -1;
    }
    ctx->is_valid_array = 1;
    ctx->new_count = 1;
    *tsp = ++ts;
    return 0;
}
static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts) {
  int got_Z = 0;
  while (1) {
    switch(*ts) {
      case 0:
        if (ctx->enc_type != 0 && ctx->head == NULL) {
          __Pyx_BufFmt_RaiseExpected(ctx);
          return NULL;
        }
        if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
        if (ctx->head != NULL) {
          __Pyx_BufFmt_RaiseExpected(ctx);
          return NULL;
        }
        return ts;
      case ' ':
      case '\r':
      case '\n':
        ++ts;
        break;
      case '<':
        if (!__Pyx_Is_Little_Endian()) {
          PyErr_SetString(PyExc_ValueError, "Little-endian buffer not supported on big-endian compiler");
          return NULL;
        }
        ctx->new_packmode = '=';
        ++ts;
        break;
      case '>':
      case '!':
        if (__Pyx_Is_Little_Endian()) {
          PyErr_SetString(PyExc_ValueError, "Big-endian buffer not supported on little-endian compiler");
          return NULL;
        }
        ctx->new_packmode = '=';
        ++ts;
        break;
      case '=':
      case '@':
      case '^':
        ctx->new_packmode = *ts++;
        break;
      case 'T':
        {
          const char* ts_after_sub;
          size_t i, struct_count = ctx->new_count;
          size_t struct_alignment = ctx->struct_alignment;
          ctx->new_count = 1;
          ++ts;
          if (*ts != '{') {
            PyErr_SetString(PyExc_ValueError, "Buffer acquisition: Expected '{' after 'T'");
            return NULL;
          }
          if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
          ctx->enc_type = 0;
          ctx->enc_count = 0;
          ctx->struct_alignment = 0;
          ++ts;
          ts_after_sub = ts;
          for (i = 0; i != struct_count; ++i) {
            ts_after_sub = __Pyx_BufFmt_CheckString(ctx, ts);
            if (!ts_after_sub) return NULL;
          }
          ts = ts_after_sub;
          if (struct_alignment) ctx->struct_alignment = struct_alignment;
        }
        break;
      case '}':
        {
          size_t alignment = ctx->struct_alignment;
          ++ts;
          if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
          ctx->enc_type = 0;
          if (alignment && ctx->fmt_offset % alignment) {
            ctx->fmt_offset += alignment - (ctx->fmt_offset % alignment);
          }
        }
        return ts;
      case 'x':
        if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
        ctx->fmt_offset += ctx->new_count;
        ctx->new_count = 1;
        ctx->enc_count = 0;
        ctx->enc_type = 0;
        ctx->enc_packmode = ctx->new_packmode;
        ++ts;
        break;
      case 'Z':
        got_Z = 1;
        ++ts;
        if (*ts != 'f' && *ts != 'd' && *ts != 'g') {
          __Pyx_BufFmt_RaiseUnexpectedChar('Z');
          return NULL;
        }
        CYTHON_FALLTHROUGH;
      case '?': case 'c': case 'b': case 'B': case 'h': case 'H': case 'i': case 'I':
      case 'l': case 'L': case 'q': case 'Q':
      case 'f': case 'd': case 'g':
      case 'O': case 'p':
        if ((ctx->enc_type == *ts) && (got_Z == ctx->is_complex) &&
            (ctx->enc_packmode == ctx->new_packmode) && (!ctx->is_valid_array)) {
          ctx->enc_count += ctx->new_count;
          ctx->new_count = 1;
          got_Z = 0;
          ++ts;
          break;
        }
        CYTHON_FALLTHROUGH;
      case 's':
        if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
        ctx->enc_count = ctx->new_count;
        ctx->enc_packmode = ctx->new_packmode;
        ctx->enc_type = *ts;
        ctx->is_complex = got_Z;
        ++ts;
        ctx->new_count = 1;
        got_Z = 0;
        break;
      case ':':
        ++ts;
        while(*ts != ':') ++ts;
        ++ts;
        break;
      case '(':
        if (__pyx_buffmt_parse_array(ctx, &ts) < 0) return NULL;
        break;
      default:
        {
          int number = __Pyx_BufFmt_ExpectNumber(&ts);
          if (number == -1) return NULL;
          ctx->new_count = (size_t)number;
        }
    }
  }
}

/* TypeInfoCompare (used by MemviewSliceValidateAndInit) */
  static int
  __pyx_typeinfo_cmp(const __Pyx_TypeInfo *a, const __Pyx_TypeInfo *b)
  {
      int i;
      if (!a || !b)
          return 0;
      if (a == b)
          return 1;
      if (a->size != b->size || a->typegroup != b->typegroup ||
              a->is_unsigned != b->is_unsigned || a->ndim != b->ndim) {
          if (a->typegroup == 'H' || b->typegroup == 'H') {
              return a->size == b->size;
          } else {
              return 0;
          }
      }
      if (a->ndim) {
          for (i = 0; i < a->ndim; i++)
              if (a->arraysize[i] != b->arraysize[i])
                  return 0;
      }
      if (a->typegroup == 'S') {
          if (a->flags != b->flags)
              return 0;
          if (a->fields || b->fields) {
              if (!(a->fields && b->fields))
                  return 0;
              for (i = 0; a->fields[i].type && b->fields[i].type; i++) {
                  const __Pyx_StructField *field_a = a->fields + i;
                  const __Pyx_StructField *field_b = b->fields + i;
                  if (field_a->offset != field_b->offset ||
                      !__pyx_typeinfo_cmp(field_a->type, field_b->type))
                      return 0;
              }
              return !a->fields[i].type && !b->fields[i].type;
          }
      }
      return 1;
  }
  
/* MemviewSliceValidateAndInit (used by ObjectToMemviewSlice) */
  static int
  __pyx_check_strides(Py_buffer *buf, int dim, int ndim, int spec)
  {
      if (buf->shape[dim] <= 1)
          return 1;
      if (buf->strides) {
          if (spec & __Pyx_MEMVIEW_CONTIG) {
              if (spec & (__Pyx_MEMVIEW_PTR|__Pyx_MEMVIEW_FULL)) {
                  if (unlikely(buf->strides[dim] != sizeof(void *))) {
                      PyErr_Format(PyExc_ValueError,
                                   "Buffer is not indirectly contiguous "
                                   "in dimension %d.", dim);
                      goto fail;
                  }
              } else if (unlikely(buf->strides[dim] != buf->itemsize)) {
                  PyErr_SetString(PyExc_ValueError,
                                  "Buffer and memoryview are not contiguous "
                                  "in the same dimension.");
                  goto fail;
              }
          }
          if (spec & __Pyx_MEMVIEW_FOLLOW) {
              Py_ssize_t stride = buf->strides[dim];
              if (stride < 0)
                  stride = -stride;
              if (unlikely(stride < buf->itemsize)) {
                  PyErr_SetString(PyExc_ValueError,
                                  "Buffer and memoryview are not contiguous "
                                  "in the same dimension.");
                  goto fail;
              }
          }
      } else {
          if (unlikely(spec & __Pyx_MEMVIEW_CONTIG && dim != ndim - 1)) {
              PyErr_Format(PyExc_ValueError,
                           "C-contiguous buffer is not contiguous in "
                           "dimension %d", dim);
              goto fail;
          } else if (unlikely(spec & (__Pyx_MEMVIEW_PTR))) {
              PyErr_Format(PyExc_ValueError,
                           "C-contiguous buffer is not indirect in "
                           "dimension %d", dim);
              goto fail;
          } else if (unlikely(buf->suboffsets)) {
              PyErr_SetString(PyExc_ValueError,
                              "Buffer exposes suboffsets but no strides");
              goto fail;
          }
      }
      return 1;
  fail:
      return 0;
  }
  static int
  __pyx_check_suboffsets(Py_buffer *buf, int dim, int ndim, int spec)
  {
      CYTHON_UNUSED_VAR(ndim);
      if (spec & __Pyx_MEMVIEW_DIRECT) {
          if (unlikely(buf->suboffsets && buf->suboffsets[dim] >= 0)) {
              PyErr_Format(PyExc_ValueError,
                           "Buffer not compatible with direct access "
                           "in dimension %d.", dim);
              goto fail;
          }
      }
      if (spec & __Pyx_MEMVIEW_PTR) {
          if (unlikely(!buf->suboffsets || (buf->suboffsets[dim] < 0))) {
              PyErr_Format(PyExc_ValueError,
                           "Buffer is not indirectly accessible "
                           "in dimension %d.", dim);
              goto fail;
          }
      }
      return 1;
  fail:
      return 0;
  }
  static int
  __pyx_verify_contig(Py_buffer *buf, int ndim, int c_or_f_flag)
  {
      int i;
      if (c_or_f_flag & __Pyx_IS_F_CONTIG) {
          Py_ssize_t stride = 1;
          for (i = 0; i < ndim; i++) {
              if (unlikely(stride * buf->itemsize != buf->strides[i]  &&  buf->shape[i] > 1)) {
                  PyErr_SetString(PyExc_ValueError,
                      "Buffer not fortran contiguous.");
                  goto fail;
              }
              stride = stride * buf->shape[i];
          }
      } else if (c_or_f_flag & __Pyx_IS_C_CONTIG) {
          Py_ssize_t stride = 1;
          for (i = ndim - 1; i >- 1; i--) {
              if (unlikely(stride * buf->itemsize != buf->strides[i]  &&  buf->shape[i] > 1)) {
                  PyErr_SetString(PyExc_ValueError,
                      "Buffer not C contiguous.");
                  goto fail;
              }
              stride = stride * buf->shape[i];
          }
      }
      return 1;
  fail:
      return 0;
  }
  static int __Pyx_ValidateAndInit_memviewslice(
                  int *axes_specs,
                  int c_or_f_flag,
                  int buf_flags,
                  int ndim,
                  const __Pyx_TypeInfo *dtype,
                  __Pyx_BufFmt_StackElem stack[],
                  __Pyx_memviewslice *memviewslice,
                  PyObject *original_obj)
  {
      struct __pyx_memoryview_obj *memview, *new_memview;
      __Pyx_RefNannyDeclarations
      Py_buffer *buf;
      int i, spec = 0, retval = -1;
      __Pyx_BufFmt_Context ctx;
      int from_memoryview = __pyx_memoryview_check(original_obj);
      __Pyx_RefNannySetupContext("ValidateAndInit_memviewslice", 0);
      if (from_memoryview && __pyx_typeinfo_cmp(dtype, ((struct __pyx_memoryview_obj *)
                                                              original_obj)->typeinfo)) {
          memview = (struct __pyx_memoryview_obj *) original_obj;
          new_memview = NULL;
      } else {
          memview = (struct __pyx_memoryview_obj *) __pyx_memoryview_new(
                                              original_obj, buf_flags, 0, dtype);
          new_memview = memview;
          if (unlikely(!memview))
              goto fail;
      }
      buf = &memview->view;
      if (unlikely(buf->ndim != ndim)) {
          PyErr_Format(PyExc_ValueError,
                  "Buffer has wrong number of dimensions (expected %d, got %d)",
                  ndim, buf->ndim);
          goto fail;
      }
      if (new_memview) {
          __Pyx_BufFmt_Init(&ctx, stack, dtype);
          if (unlikely(!__Pyx_BufFmt_CheckString(&ctx, buf->format))) goto fail;
      }
      if (unlikely((unsigned) buf->itemsize != dtype->size)) {
          PyErr_Format(PyExc_ValueError,
                       "Item size of buffer (%" CYTHON_FORMAT_SSIZE_T "u byte%s) "
                       "does not match size of '%s' (%" CYTHON_FORMAT_SSIZE_T "u byte%s)",
                       buf->itemsize,
                       (buf->itemsize > 1) ? "s" : "",
                       dtype->name,
                       dtype->size,
                       (dtype->size > 1) ? "s" : "");
          goto fail;
      }
      if (buf->len > 0) {
          for (i = 0; i < ndim; i++) {
              spec = axes_specs[i];
              if (unlikely(!__pyx_check_strides(buf, i, ndim, spec)))
                  goto fail;
              if (unlikely(!__pyx_check_suboffsets(buf, i, ndim, spec)))
                  goto fail;
          }
          if (unlikely(buf->strides && !__pyx_verify_contig(buf, ndim, c_or_f_flag)))
              goto fail;
      }
      if (unlikely(__Pyx_init_memviewslice(memview, ndim, memviewslice,
                                           new_memview != NULL) == -1)) {
          goto fail;
      }
      retval = 0;
      goto no_fail;
  fail:
      Py_XDECREF((PyObject*)new_memview);
      retval = -1;
  no_fail:
      __Pyx_RefNannyFinishContext();
      return retval;
  }
  
/* ObjectToMemviewSlice */
  static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_double(PyObject *obj, int writable_flag) {
      __Pyx_memviewslice result = __Pyx_MEMSLICE_INIT;
      __Pyx_BufFmt_StackElem stack[1];
      int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_CONTIG) };
      int retcode;
      if (obj == Py_None) {
          result.memview = (struct __pyx_memoryview_obj *) Py_None;
          return result;
      }
      retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, __Pyx_IS_C_CONTIG,
                                                   (PyBUF_C_CONTIGUOUS | PyBUF_FORMAT) | writable_flag, 1,
                                                   &__Pyx_TypeInfo_double, stack,
                                                   &result, obj);
      if (unlikely(retcode == -1))
          goto __pyx_fail;
      return result;
  __pyx_fail:
      result.memview = NULL;
      result.data = NULL;
      return result;
  }
  
/* ObjectToMemviewSlice */
  static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc___pyx_t_double_complex(PyObject *obj, int writable_flag) {
      __Pyx_memviewslice result = __Pyx_MEMSLICE_INIT;
      __Pyx_BufFmt_StackElem stack[1];
      int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_CONTIG) };
      int retcode;
      if (obj == Py_None) {
          result.memview = (struct __pyx_memoryview_obj *) Py_None;
          return result;
      }
      retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, __Pyx_IS_C_CONTIG,
                                                   (PyBUF_C_CONTIGUOUS | PyBUF_FORMAT) | writable_flag, 1,
                                                   &__Pyx_TypeInfo___pyx_t_double_complex, stack,
                                                   &result, obj);
      if (unlikely(retcode == -1))
          goto __pyx_fail;
      return result;
  __pyx_fail:
      result.memview = NULL;
      result.data = NULL;
      return result;
  }
  
/* ObjectToMemviewSlice */
  static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_float(PyObject *obj, int writable_flag) {
      __Pyx_memviewslice result = __Pyx_MEMSLICE_INIT;
      __Pyx_BufFmt_StackElem stack[1];
      int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_CONTIG) };
      int retcode;
      if (obj == Py_None) {
          result.memview = (struct __pyx_memoryview_obj *) Py_None;
          return result;
      }
      retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, __Pyx_IS_C_CONTIG,
                                                   (PyBUF_C_CONTIGUOUS | PyBUF_FORMAT) | writable_flag, 1,
                                                   &__Pyx_TypeInfo_float, stack,
                                                   &result, obj);
      if (unlikely(retcode == -1))
          goto __pyx_fail;
      return result;
  __pyx_fail:
      result.memview = NULL;
      result.data = NULL;
      return result;
  }
  
/* ObjectToMemviewSlice */
  static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_long__double(PyObject *obj, int writable_flag) {
      __Pyx_memviewslice result = __Pyx_MEMSLICE_INIT;
      __Pyx_BufFmt_StackElem stack[1];
      int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_CONTIG) };
      int retcode;
      if (obj == Py_None) {
          result.memview = (struct __pyx_memoryview_obj *) Py_None;
          return result;
      }
      retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, __Pyx_IS_C_CONTIG,
                                                   (PyBUF_C_CONTIGUOUS | PyBUF_FORMAT) | writable_flag, 1,
                                                   &__Pyx_TypeInfo_long__double, stack,
                                                   &result, obj);
      if (unlikely(retcode == -1))
          goto __pyx_fail;
      return result;
  __pyx_fail:
      result.memview = NULL;
      result.data = NULL;
      return result;
  }
  
/* FromPy */
  static __pyx_t_double_complex __Pyx_PyComplex_As___pyx_t_double_complex(PyObject* o) {
  #if CYTHON_COMPILING_IN_LIMITED_API
      double real=-1.0, imag=-1.0;
      real = PyComplex_RealAsDouble(o);
      if (unlikely(real == -1.0 && PyErr_Occurred())) goto end;
      imag = PyComplex_ImagAsDouble(o);
    end:
      return __pyx_t_double_complex_from_parts(
          (double)real, (double)imag
      );
  #else
      Py_complex cval;
  #if !CYTHON_COMPILING_IN_PYPY && !CYTHON_COMPILING_IN_GRAAL
      if (PyComplex_CheckExact(o))
          cval = ((PyComplexObject *)o)->cval;
      else
  #endif
          cval = PyComplex_AsCComplex(o);
      return __pyx_t_double_complex_from_parts(
                 (double)cval.real,
                 (double)cval.imag);
  #endif
  }
  
/* MemviewDtypeToObject */
  static CYTHON_INLINE PyObject *__pyx_memview_get_double(const char *itemp) {
      return (PyObject *) PyFloat_FromDouble(*(double const *) itemp);
  }
  static CYTHON_INLINE int __pyx_memview_set_double(char *itemp, PyObject *obj) {
      double value = __Pyx_PyFloat_AsDouble(obj);
      if (unlikely((value == (double)-1) && PyErr_Occurred()))
          return 0;
      *(double *) itemp = value;
      return 1;
  }
  
/* MemviewDtypeToObject */
  static CYTHON_INLINE PyObject *__pyx_memview_get___pyx_t_double_complex(const char *itemp) {
      return (PyObject *) __pyx_PyComplex_FromComplex(*(__pyx_t_double_complex const *) itemp);
  }
  static CYTHON_INLINE int __pyx_memview_set___pyx_t_double_complex(char *itemp, PyObject *obj) {
      __pyx_t_double_complex value = __Pyx_PyComplex_As___pyx_t_double_complex(obj);
      if (unlikely(PyErr_Occurred()))
          return 0;
      *(__pyx_t_double_complex *) itemp = value;
      return 1;
  }
  
/* ToPyCTupleUtility */
  static PyObject* __pyx_convert__to_py___pyx_ctuple_long(__pyx_ctuple_long value) {
      PyObject* items[1] = { 0 };
      PyObject* result = NULL;
          items[0] = __Pyx_PyLong_From_long(value.f0);
          if (unlikely(!items[0])) goto bad;
      result = PyTuple_New(1);
      if (unlikely(!result)) goto bad;
      for (Py_ssize_t i=0; i<1; ++i) {
          PyObject *item = items[i];
          items[i] = NULL;
          #if !CYTHON_ASSUME_SAFE_MACROS
          if (unlikely(PyTuple_SetItem(result, i, item) < 0)) goto bad;
          #else
          PyTuple_SET_ITEM(result, i, item);
          #endif
      }
      return result;
  bad:
      Py_XDECREF(result);
      for (Py_ssize_t i=0; i >= 0; --i) {
          Py_XDECREF(items[i]);
      }
      return NULL;
  }
  
/* MemviewDtypeToObject */
  static CYTHON_INLINE PyObject *__pyx_memview_get_float(const char *itemp) {
      return (PyObject *) PyFloat_FromDouble(*(float const *) itemp);
  }
  static CYTHON_INLINE int __pyx_memview_set_float(char *itemp, PyObject *obj) {
      float value = __Pyx_PyFloat_AsFloat(obj);
      if (unlikely((value == (float)-1) && PyErr_Occurred()))
          return 0;
      *(float *) itemp = value;
      return 1;
  }
  
/* MemviewDtypeToObject */
  static CYTHON_INLINE PyObject *__pyx_memview_get_long__double(const char *itemp) {
      return (PyObject *) PyFloat_FromDouble(*(long double const *) itemp);
  }
  static CYTHON_INLINE int __pyx_memview_set_long__double(char *itemp, PyObject *obj) {
      long double value = __Pyx_PyFloat_AsDouble(obj);
      if (unlikely((value == (long double)-1) && PyErr_Occurred()))
          return 0;
      *(long double *) itemp = value;
      return 1;
  }
  
/* MemviewSliceCopy */
  static __Pyx_memviewslice
  __pyx_memoryview_copy_new_contig(const __Pyx_memviewslice *from_mvs,
                                   const char *mode, int ndim,
                                   size_t sizeof_dtype, int contig_flag,
                                   int dtype_is_object)
  {
      __Pyx_RefNannyDeclarations
      int i;
      __Pyx_memviewslice new_mvs = __Pyx_MEMSLICE_INIT;
      struct __pyx_memoryview_obj *from_memview = from_mvs->memview;
      Py_buffer *buf = &from_memview->view;
      PyObject *shape_tuple = NULL;
      struct __pyx_array_obj *array_obj = NULL;
      struct __pyx_memoryview_obj *memview_obj = NULL;
      __Pyx_RefNannySetupContext("__pyx_memoryview_copy_new_contig", 0);
      for (i = 0; i < ndim; i++) {
          if (unlikely(from_mvs->suboffsets[i] >= 0)) {
              PyErr_Format(PyExc_ValueError, "Cannot copy memoryview slice with "
                                             "indirect dimensions (axis %d)", i);
              goto fail;
          }
      }
      shape_tuple = PyTuple_New(ndim);
      if (unlikely(!shape_tuple)) {
          goto fail;
      }
      __Pyx_GOTREF(shape_tuple);
      for(i = 0; i < ndim; i++) {
          PyObject *temp_int = PyLong_FromSsize_t(from_mvs->shape[i]);
          if(unlikely(!temp_int)) {
              goto fail;
          } else {
  #if CYTHON_ASSUME_SAFE_MACROS
              PyTuple_SET_ITEM(shape_tuple, i, temp_int);
  #else
              if (PyTuple_SetItem(shape_tuple, i, temp_int) < 0) {
                  goto fail;
              }
  #endif
          }
      }
      array_obj = __pyx_array_new(shape_tuple, sizeof_dtype, buf->format, mode, NULL);
      if (unlikely(!array_obj)) {
          goto fail;
      }
      __Pyx_GOTREF(array_obj);
      memview_obj = (struct __pyx_memoryview_obj *) __pyx_memoryview_new(
                                      (PyObject *) array_obj, contig_flag,
                                      dtype_is_object,
                                      from_mvs->memview->typeinfo);
      if (unlikely(!memview_obj))
          goto fail;
      if (unlikely(__Pyx_init_memviewslice(memview_obj, ndim, &new_mvs, 1) < 0))
          goto fail;
      if (unlikely(__pyx_memoryview_copy_contents(*from_mvs, new_mvs, ndim, ndim,
                                                  dtype_is_object) < 0))
          goto fail;
      goto no_fail;
  fail:
      __Pyx_XDECREF((PyObject *) new_mvs.memview);
      new_mvs.memview = NULL;
      new_mvs.data = NULL;
  no_fail:
      __Pyx_XDECREF(shape_tuple);
      __Pyx_XDECREF((PyObject *) array_obj);
      __Pyx_RefNannyFinishContext();
      return new_mvs;
  }
  
/* CIntToPy */
  static CYTHON_INLINE PyObject* __Pyx_PyLong_From_int(int value) {
  #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
  #pragma GCC diagnostic push
  #pragma GCC diagnostic ignored "-Wconversion"
  #endif
      const int neg_one = (int) -1, const_zero = (int) 0;
  #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
  #pragma GCC diagnostic pop
  #endif
      const int is_unsigned = neg_one > const_zero;
      if (is_unsigned) {
          if (sizeof(int) < sizeof(long)) {
              return PyLong_FromLong((long) value);
          } else if (sizeof(int) <= sizeof(unsigned long)) {
              return PyLong_FromUnsignedLong((unsigned long) value);
  #if !CYTHON_COMPILING_IN_PYPY
          } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
              return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
  #endif
          }
      } else {
          if (sizeof(int) <= sizeof(long)) {
              return PyLong_FromLong((long) value);
          } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
              return PyLong_FromLongLong((PY_LONG_LONG) value);
          }
      }
      {
          unsigned char *bytes = (unsigned char *)&value;
  #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
          if (is_unsigned) {
              return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
          } else {
              return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
          }
  #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
          int one = 1; int little = (int)*(unsigned char *)&one;
          return _PyLong_FromByteArray(bytes, sizeof(int),
                                       little, !is_unsigned);
  #else
          int one = 1; int little = (int)*(unsigned char *)&one;
          PyObject *from_bytes, *result = NULL, *kwds = NULL;
          PyObject *py_bytes = NULL, *order_str = NULL;
          from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
          if (!from_bytes) return NULL;
          py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(int));
          if (!py_bytes) goto limited_bad;
          order_str = PyUnicode_FromString(little ? "little" : "big");
          if (!order_str) goto limited_bad;
          {
              PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
              if (!is_unsigned) {
                  kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                  if (!kwds) goto limited_bad;
                  if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
              }
              result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
          }
          limited_bad:
          Py_XDECREF(kwds);
          Py_XDECREF(order_str);
          Py_XDECREF(py_bytes);
          Py_XDECREF(from_bytes);
          return result;
  #endif
      }
  }
  
/* CIntFromPy */
  static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *x) {
  #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
  #pragma GCC diagnostic push
  #pragma GCC diagnostic ignored "-Wconversion"
  #endif
      const int neg_one = (int) -1, const_zero = (int) 0;
  #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
  #pragma GCC diagnostic pop
  #endif
      const int is_unsigned = neg_one > const_zero;
      if (unlikely(!PyLong_Check(x))) {
          int val;
          PyObject *tmp = __Pyx_PyNumber_Long(x);
          if (!tmp) return (int) -1;
          val = __Pyx_PyLong_As_int(tmp);
          Py_DECREF(tmp);
          return val;
      }
      if (is_unsigned) {
  #if CYTHON_USE_PYLONG_INTERNALS
          if (unlikely(__Pyx_PyLong_IsNeg(x))) {
              goto raise_neg_overflow;
          } else if (__Pyx_PyLong_IsCompact(x)) {
              __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
          } else {
              const digit* digits = __Pyx_PyLong_Digits(x);
              assert(__Pyx_PyLong_DigitCount(x) > 1);
              switch (__Pyx_PyLong_DigitCount(x)) {
                  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 && PY_VERSION_HEX < 0x030C00A7
          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
          if (__Pyx_PyLong_IsCompact(x)) {
              __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
          } else {
              const digit* digits = __Pyx_PyLong_Digits(x);
              assert(__Pyx_PyLong_DigitCount(x) > 1);
              switch (__Pyx_PyLong_SignedDigitCount(x)) {
                  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))
          }
      }
      {
          int val;
          int ret = -1;
  #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
          Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
              x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
          if (unlikely(bytes_copied == -1)) {
          } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
              goto raise_overflow;
          } else {
              ret = 0;
          }
  #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
          int one = 1; int is_little = (int)*(unsigned char *)&one;
          unsigned char *bytes = (unsigned char *)&val;
          ret = _PyLong_AsByteArray((PyLongObject *)x,
                                      bytes, sizeof(val),
                                      is_little, !is_unsigned);
  #else
          PyObject *v;
          PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
          int bits, remaining_bits, is_negative = 0;
          int chunk_size = (sizeof(long) < 8) ? 30 : 62;
          if (likely(PyLong_CheckExact(x))) {
              v = __Pyx_NewRef(x);
          } else {
              v = PyNumber_Long(x);
              if (unlikely(!v)) return (int) -1;
              assert(PyLong_CheckExact(v));
          }
          {
              int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
              if (unlikely(result < 0)) {
                  Py_DECREF(v);
                  return (int) -1;
              }
              is_negative = result == 1;
          }
          if (is_unsigned && unlikely(is_negative)) {
              Py_DECREF(v);
              goto raise_neg_overflow;
          } else if (is_negative) {
              stepval = PyNumber_Invert(v);
              Py_DECREF(v);
              if (unlikely(!stepval))
                  return (int) -1;
          } else {
              stepval = v;
          }
          v = NULL;
          val = (int) 0;
          mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
          shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
          for (bits = 0; bits < (int) sizeof(int) * 8 - chunk_size; bits += chunk_size) {
              PyObject *tmp, *digit;
              long idigit;
              digit = PyNumber_And(stepval, mask);
              if (unlikely(!digit)) goto done;
              idigit = PyLong_AsLong(digit);
              Py_DECREF(digit);
              if (unlikely(idigit < 0)) goto done;
              val |= ((int) idigit) << bits;
              tmp = PyNumber_Rshift(stepval, shift);
              if (unlikely(!tmp)) goto done;
              Py_DECREF(stepval); stepval = tmp;
          }
          Py_DECREF(shift); shift = NULL;
          Py_DECREF(mask); mask = NULL;
          {
              long idigit = PyLong_AsLong(stepval);
              if (unlikely(idigit < 0)) goto done;
              remaining_bits = ((int) sizeof(int) * 8) - bits - (is_unsigned ? 0 : 1);
              if (unlikely(idigit >= (1L << remaining_bits)))
                  goto raise_overflow;
              val |= ((int) idigit) << bits;
          }
          if (!is_unsigned) {
              if (unlikely(val & (((int) 1) << (sizeof(int) * 8 - 1))))
                  goto raise_overflow;
              if (is_negative)
                  val = ~val;
          }
          ret = 0;
      done:
          Py_XDECREF(shift);
          Py_XDECREF(mask);
          Py_XDECREF(stepval);
  #endif
          if (unlikely(ret))
              return (int) -1;
          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 size_t __Pyx_PyLong_As_size_t(PyObject *x) {
  #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
  #pragma GCC diagnostic push
  #pragma GCC diagnostic ignored "-Wconversion"
  #endif
      const size_t neg_one = (size_t) -1, const_zero = (size_t) 0;
  #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
  #pragma GCC diagnostic pop
  #endif
      const int is_unsigned = neg_one > const_zero;
      if (unlikely(!PyLong_Check(x))) {
          size_t val;
          PyObject *tmp = __Pyx_PyNumber_Long(x);
          if (!tmp) return (size_t) -1;
          val = __Pyx_PyLong_As_size_t(tmp);
          Py_DECREF(tmp);
          return val;
      }
      if (is_unsigned) {
  #if CYTHON_USE_PYLONG_INTERNALS
          if (unlikely(__Pyx_PyLong_IsNeg(x))) {
              goto raise_neg_overflow;
          } else if (__Pyx_PyLong_IsCompact(x)) {
              __PYX_VERIFY_RETURN_INT(size_t, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
          } else {
              const digit* digits = __Pyx_PyLong_Digits(x);
              assert(__Pyx_PyLong_DigitCount(x) > 1);
              switch (__Pyx_PyLong_DigitCount(x)) {
                  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 && PY_VERSION_HEX < 0x030C00A7
          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
          if (__Pyx_PyLong_IsCompact(x)) {
              __PYX_VERIFY_RETURN_INT(size_t, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
          } else {
              const digit* digits = __Pyx_PyLong_Digits(x);
              assert(__Pyx_PyLong_DigitCount(x) > 1);
              switch (__Pyx_PyLong_SignedDigitCount(x)) {
                  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))
          }
      }
      {
          size_t val;
          int ret = -1;
  #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
          Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
              x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
          if (unlikely(bytes_copied == -1)) {
          } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
              goto raise_overflow;
          } else {
              ret = 0;
          }
  #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
          int one = 1; int is_little = (int)*(unsigned char *)&one;
          unsigned char *bytes = (unsigned char *)&val;
          ret = _PyLong_AsByteArray((PyLongObject *)x,
                                      bytes, sizeof(val),
                                      is_little, !is_unsigned);
  #else
          PyObject *v;
          PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
          int bits, remaining_bits, is_negative = 0;
          int chunk_size = (sizeof(long) < 8) ? 30 : 62;
          if (likely(PyLong_CheckExact(x))) {
              v = __Pyx_NewRef(x);
          } else {
              v = PyNumber_Long(x);
              if (unlikely(!v)) return (size_t) -1;
              assert(PyLong_CheckExact(v));
          }
          {
              int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
              if (unlikely(result < 0)) {
                  Py_DECREF(v);
                  return (size_t) -1;
              }
              is_negative = result == 1;
          }
          if (is_unsigned && unlikely(is_negative)) {
              Py_DECREF(v);
              goto raise_neg_overflow;
          } else if (is_negative) {
              stepval = PyNumber_Invert(v);
              Py_DECREF(v);
              if (unlikely(!stepval))
                  return (size_t) -1;
          } else {
              stepval = v;
          }
          v = NULL;
          val = (size_t) 0;
          mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
          shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
          for (bits = 0; bits < (int) sizeof(size_t) * 8 - chunk_size; bits += chunk_size) {
              PyObject *tmp, *digit;
              long idigit;
              digit = PyNumber_And(stepval, mask);
              if (unlikely(!digit)) goto done;
              idigit = PyLong_AsLong(digit);
              Py_DECREF(digit);
              if (unlikely(idigit < 0)) goto done;
              val |= ((size_t) idigit) << bits;
              tmp = PyNumber_Rshift(stepval, shift);
              if (unlikely(!tmp)) goto done;
              Py_DECREF(stepval); stepval = tmp;
          }
          Py_DECREF(shift); shift = NULL;
          Py_DECREF(mask); mask = NULL;
          {
              long idigit = PyLong_AsLong(stepval);
              if (unlikely(idigit < 0)) goto done;
              remaining_bits = ((int) sizeof(size_t) * 8) - bits - (is_unsigned ? 0 : 1);
              if (unlikely(idigit >= (1L << remaining_bits)))
                  goto raise_overflow;
              val |= ((size_t) idigit) << bits;
          }
          if (!is_unsigned) {
              if (unlikely(val & (((size_t) 1) << (sizeof(size_t) * 8 - 1))))
                  goto raise_overflow;
              if (is_negative)
                  val = ~val;
          }
          ret = 0;
      done:
          Py_XDECREF(shift);
          Py_XDECREF(mask);
          Py_XDECREF(stepval);
  #endif
          if (unlikely(ret))
              return (size_t) -1;
          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 unsigned long __Pyx_PyLong_As_unsigned_long(PyObject *x) {
  #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
  #pragma GCC diagnostic push
  #pragma GCC diagnostic ignored "-Wconversion"
  #endif
      const unsigned long neg_one = (unsigned long) -1, const_zero = (unsigned long) 0;
  #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
  #pragma GCC diagnostic pop
  #endif
      const int is_unsigned = neg_one > const_zero;
      if (unlikely(!PyLong_Check(x))) {
          unsigned long val;
          PyObject *tmp = __Pyx_PyNumber_Long(x);
          if (!tmp) return (unsigned long) -1;
          val = __Pyx_PyLong_As_unsigned_long(tmp);
          Py_DECREF(tmp);
          return val;
      }
      if (is_unsigned) {
  #if CYTHON_USE_PYLONG_INTERNALS
          if (unlikely(__Pyx_PyLong_IsNeg(x))) {
              goto raise_neg_overflow;
          } else if (__Pyx_PyLong_IsCompact(x)) {
              __PYX_VERIFY_RETURN_INT(unsigned long, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
          } else {
              const digit* digits = __Pyx_PyLong_Digits(x);
              assert(__Pyx_PyLong_DigitCount(x) > 1);
              switch (__Pyx_PyLong_DigitCount(x)) {
                  case 2:
                      if ((8 * sizeof(unsigned long) > 1 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(unsigned long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                          } else if ((8 * sizeof(unsigned long) >= 2 * PyLong_SHIFT)) {
                              return (unsigned long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                          }
                      }
                      break;
                  case 3:
                      if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(unsigned long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                          } else if ((8 * sizeof(unsigned long) >= 3 * PyLong_SHIFT)) {
                              return (unsigned long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                          }
                      }
                      break;
                  case 4:
                      if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(unsigned 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(unsigned long) >= 4 * PyLong_SHIFT)) {
                              return (unsigned long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                          }
                      }
                      break;
              }
          }
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
          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 (unsigned long) -1;
              if (unlikely(result == 1))
                  goto raise_neg_overflow;
          }
  #endif
          if ((sizeof(unsigned long) <= sizeof(unsigned long))) {
              __PYX_VERIFY_RETURN_INT_EXC(unsigned long, unsigned long, PyLong_AsUnsignedLong(x))
          } else if ((sizeof(unsigned long) <= sizeof(unsigned PY_LONG_LONG))) {
              __PYX_VERIFY_RETURN_INT_EXC(unsigned long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
          }
      } else {
  #if CYTHON_USE_PYLONG_INTERNALS
          if (__Pyx_PyLong_IsCompact(x)) {
              __PYX_VERIFY_RETURN_INT(unsigned long, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
          } else {
              const digit* digits = __Pyx_PyLong_Digits(x);
              assert(__Pyx_PyLong_DigitCount(x) > 1);
              switch (__Pyx_PyLong_SignedDigitCount(x)) {
                  case -2:
                      if ((8 * sizeof(unsigned long) - 1 > 1 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(unsigned long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                          } else if ((8 * sizeof(unsigned long) - 1 > 2 * PyLong_SHIFT)) {
                              return (unsigned long) (((unsigned long)-1)*(((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])));
                          }
                      }
                      break;
                  case 2:
                      if ((8 * sizeof(unsigned long) > 1 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(unsigned long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                          } else if ((8 * sizeof(unsigned long) - 1 > 2 * PyLong_SHIFT)) {
                              return (unsigned long) ((((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])));
                          }
                      }
                      break;
                  case -3:
                      if ((8 * sizeof(unsigned long) - 1 > 2 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(unsigned long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                          } else if ((8 * sizeof(unsigned long) - 1 > 3 * PyLong_SHIFT)) {
                              return (unsigned long) (((unsigned long)-1)*(((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])));
                          }
                      }
                      break;
                  case 3:
                      if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(unsigned long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                          } else if ((8 * sizeof(unsigned long) - 1 > 3 * PyLong_SHIFT)) {
                              return (unsigned long) ((((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])));
                          }
                      }
                      break;
                  case -4:
                      if ((8 * sizeof(unsigned long) - 1 > 3 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(unsigned 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(unsigned long) - 1 > 4 * PyLong_SHIFT)) {
                              return (unsigned long) (((unsigned long)-1)*(((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])));
                          }
                      }
                      break;
                  case 4:
                      if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(unsigned 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(unsigned long) - 1 > 4 * PyLong_SHIFT)) {
                              return (unsigned long) ((((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])));
                          }
                      }
                      break;
              }
          }
  #endif
          if ((sizeof(unsigned long) <= sizeof(long))) {
              __PYX_VERIFY_RETURN_INT_EXC(unsigned long, long, PyLong_AsLong(x))
          } else if ((sizeof(unsigned long) <= sizeof(PY_LONG_LONG))) {
              __PYX_VERIFY_RETURN_INT_EXC(unsigned long, PY_LONG_LONG, PyLong_AsLongLong(x))
          }
      }
      {
          unsigned long val;
          int ret = -1;
  #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
          Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
              x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
          if (unlikely(bytes_copied == -1)) {
          } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
              goto raise_overflow;
          } else {
              ret = 0;
          }
  #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
          int one = 1; int is_little = (int)*(unsigned char *)&one;
          unsigned char *bytes = (unsigned char *)&val;
          ret = _PyLong_AsByteArray((PyLongObject *)x,
                                      bytes, sizeof(val),
                                      is_little, !is_unsigned);
  #else
          PyObject *v;
          PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
          int bits, remaining_bits, is_negative = 0;
          int chunk_size = (sizeof(long) < 8) ? 30 : 62;
          if (likely(PyLong_CheckExact(x))) {
              v = __Pyx_NewRef(x);
          } else {
              v = PyNumber_Long(x);
              if (unlikely(!v)) return (unsigned long) -1;
              assert(PyLong_CheckExact(v));
          }
          {
              int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
              if (unlikely(result < 0)) {
                  Py_DECREF(v);
                  return (unsigned long) -1;
              }
              is_negative = result == 1;
          }
          if (is_unsigned && unlikely(is_negative)) {
              Py_DECREF(v);
              goto raise_neg_overflow;
          } else if (is_negative) {
              stepval = PyNumber_Invert(v);
              Py_DECREF(v);
              if (unlikely(!stepval))
                  return (unsigned long) -1;
          } else {
              stepval = v;
          }
          v = NULL;
          val = (unsigned long) 0;
          mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
          shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
          for (bits = 0; bits < (int) sizeof(unsigned long) * 8 - chunk_size; bits += chunk_size) {
              PyObject *tmp, *digit;
              long idigit;
              digit = PyNumber_And(stepval, mask);
              if (unlikely(!digit)) goto done;
              idigit = PyLong_AsLong(digit);
              Py_DECREF(digit);
              if (unlikely(idigit < 0)) goto done;
              val |= ((unsigned long) idigit) << bits;
              tmp = PyNumber_Rshift(stepval, shift);
              if (unlikely(!tmp)) goto done;
              Py_DECREF(stepval); stepval = tmp;
          }
          Py_DECREF(shift); shift = NULL;
          Py_DECREF(mask); mask = NULL;
          {
              long idigit = PyLong_AsLong(stepval);
              if (unlikely(idigit < 0)) goto done;
              remaining_bits = ((int) sizeof(unsigned long) * 8) - bits - (is_unsigned ? 0 : 1);
              if (unlikely(idigit >= (1L << remaining_bits)))
                  goto raise_overflow;
              val |= ((unsigned long) idigit) << bits;
          }
          if (!is_unsigned) {
              if (unlikely(val & (((unsigned long) 1) << (sizeof(unsigned long) * 8 - 1))))
                  goto raise_overflow;
              if (is_negative)
                  val = ~val;
          }
          ret = 0;
      done:
          Py_XDECREF(shift);
          Py_XDECREF(mask);
          Py_XDECREF(stepval);
  #endif
          if (unlikely(ret))
              return (unsigned long) -1;
          return val;
      }
  raise_overflow:
      PyErr_SetString(PyExc_OverflowError,
          "value too large to convert to unsigned long");
      return (unsigned long) -1;
  raise_neg_overflow:
      PyErr_SetString(PyExc_OverflowError,
          "can't convert negative value to unsigned long");
      return (unsigned long) -1;
  }
  
/* CIntFromPy */
  static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *x) {
  #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
  #pragma GCC diagnostic push
  #pragma GCC diagnostic ignored "-Wconversion"
  #endif
      const long neg_one = (long) -1, const_zero = (long) 0;
  #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
  #pragma GCC diagnostic pop
  #endif
      const int is_unsigned = neg_one > const_zero;
      if (unlikely(!PyLong_Check(x))) {
          long val;
          PyObject *tmp = __Pyx_PyNumber_Long(x);
          if (!tmp) return (long) -1;
          val = __Pyx_PyLong_As_long(tmp);
          Py_DECREF(tmp);
          return val;
      }
      if (is_unsigned) {
  #if CYTHON_USE_PYLONG_INTERNALS
          if (unlikely(__Pyx_PyLong_IsNeg(x))) {
              goto raise_neg_overflow;
          } else if (__Pyx_PyLong_IsCompact(x)) {
              __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
          } else {
              const digit* digits = __Pyx_PyLong_Digits(x);
              assert(__Pyx_PyLong_DigitCount(x) > 1);
              switch (__Pyx_PyLong_DigitCount(x)) {
                  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 && PY_VERSION_HEX < 0x030C00A7
          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
          if (__Pyx_PyLong_IsCompact(x)) {
              __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
          } else {
              const digit* digits = __Pyx_PyLong_Digits(x);
              assert(__Pyx_PyLong_DigitCount(x) > 1);
              switch (__Pyx_PyLong_SignedDigitCount(x)) {
                  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))
          }
      }
      {
          long val;
          int ret = -1;
  #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
          Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
              x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
          if (unlikely(bytes_copied == -1)) {
          } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
              goto raise_overflow;
          } else {
              ret = 0;
          }
  #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
          int one = 1; int is_little = (int)*(unsigned char *)&one;
          unsigned char *bytes = (unsigned char *)&val;
          ret = _PyLong_AsByteArray((PyLongObject *)x,
                                      bytes, sizeof(val),
                                      is_little, !is_unsigned);
  #else
          PyObject *v;
          PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
          int bits, remaining_bits, is_negative = 0;
          int chunk_size = (sizeof(long) < 8) ? 30 : 62;
          if (likely(PyLong_CheckExact(x))) {
              v = __Pyx_NewRef(x);
          } else {
              v = PyNumber_Long(x);
              if (unlikely(!v)) return (long) -1;
              assert(PyLong_CheckExact(v));
          }
          {
              int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
              if (unlikely(result < 0)) {
                  Py_DECREF(v);
                  return (long) -1;
              }
              is_negative = result == 1;
          }
          if (is_unsigned && unlikely(is_negative)) {
              Py_DECREF(v);
              goto raise_neg_overflow;
          } else if (is_negative) {
              stepval = PyNumber_Invert(v);
              Py_DECREF(v);
              if (unlikely(!stepval))
                  return (long) -1;
          } else {
              stepval = v;
          }
          v = NULL;
          val = (long) 0;
          mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
          shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
          for (bits = 0; bits < (int) sizeof(long) * 8 - chunk_size; bits += chunk_size) {
              PyObject *tmp, *digit;
              long idigit;
              digit = PyNumber_And(stepval, mask);
              if (unlikely(!digit)) goto done;
              idigit = PyLong_AsLong(digit);
              Py_DECREF(digit);
              if (unlikely(idigit < 0)) goto done;
              val |= ((long) idigit) << bits;
              tmp = PyNumber_Rshift(stepval, shift);
              if (unlikely(!tmp)) goto done;
              Py_DECREF(stepval); stepval = tmp;
          }
          Py_DECREF(shift); shift = NULL;
          Py_DECREF(mask); mask = NULL;
          {
              long idigit = PyLong_AsLong(stepval);
              if (unlikely(idigit < 0)) goto done;
              remaining_bits = ((int) sizeof(long) * 8) - bits - (is_unsigned ? 0 : 1);
              if (unlikely(idigit >= (1L << remaining_bits)))
                  goto raise_overflow;
              val |= ((long) idigit) << bits;
          }
          if (!is_unsigned) {
              if (unlikely(val & (((long) 1) << (sizeof(long) * 8 - 1))))
                  goto raise_overflow;
              if (is_negative)
                  val = ~val;
          }
          ret = 0;
      done:
          Py_XDECREF(shift);
          Py_XDECREF(mask);
          Py_XDECREF(stepval);
  #endif
          if (unlikely(ret))
              return (long) -1;
          return val;
      }
  raise_overflow:
      PyErr_SetString(PyExc_OverflowError,
          "value too large to convert to long");
      return (long) -1;
  raise_neg_overflow:
      PyErr_SetString(PyExc_OverflowError,
          "can't convert negative value to long");
      return (long) -1;
  }
  
/* CIntFromPy */
  static CYTHON_INLINE unsigned int __Pyx_PyLong_As_unsigned_int(PyObject *x) {
  #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
  #pragma GCC diagnostic push
  #pragma GCC diagnostic ignored "-Wconversion"
  #endif
      const unsigned int neg_one = (unsigned int) -1, const_zero = (unsigned int) 0;
  #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
  #pragma GCC diagnostic pop
  #endif
      const int is_unsigned = neg_one > const_zero;
      if (unlikely(!PyLong_Check(x))) {
          unsigned int val;
          PyObject *tmp = __Pyx_PyNumber_Long(x);
          if (!tmp) return (unsigned int) -1;
          val = __Pyx_PyLong_As_unsigned_int(tmp);
          Py_DECREF(tmp);
          return val;
      }
      if (is_unsigned) {
  #if CYTHON_USE_PYLONG_INTERNALS
          if (unlikely(__Pyx_PyLong_IsNeg(x))) {
              goto raise_neg_overflow;
          } else if (__Pyx_PyLong_IsCompact(x)) {
              __PYX_VERIFY_RETURN_INT(unsigned int, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
          } else {
              const digit* digits = __Pyx_PyLong_Digits(x);
              assert(__Pyx_PyLong_DigitCount(x) > 1);
              switch (__Pyx_PyLong_DigitCount(x)) {
                  case 2:
                      if ((8 * sizeof(unsigned int) > 1 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                          } else if ((8 * sizeof(unsigned int) >= 2 * PyLong_SHIFT)) {
                              return (unsigned int) (((((unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0]));
                          }
                      }
                      break;
                  case 3:
                      if ((8 * sizeof(unsigned int) > 2 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                          } else if ((8 * sizeof(unsigned int) >= 3 * PyLong_SHIFT)) {
                              return (unsigned int) (((((((unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0]));
                          }
                      }
                      break;
                  case 4:
                      if ((8 * sizeof(unsigned int) > 3 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(unsigned 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(unsigned int) >= 4 * PyLong_SHIFT)) {
                              return (unsigned int) (((((((((unsigned int)digits[3]) << PyLong_SHIFT) | (unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0]));
                          }
                      }
                      break;
              }
          }
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
          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 (unsigned int) -1;
              if (unlikely(result == 1))
                  goto raise_neg_overflow;
          }
  #endif
          if ((sizeof(unsigned int) <= sizeof(unsigned long))) {
              __PYX_VERIFY_RETURN_INT_EXC(unsigned int, unsigned long, PyLong_AsUnsignedLong(x))
          } else if ((sizeof(unsigned int) <= sizeof(unsigned PY_LONG_LONG))) {
              __PYX_VERIFY_RETURN_INT_EXC(unsigned int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
          }
      } else {
  #if CYTHON_USE_PYLONG_INTERNALS
          if (__Pyx_PyLong_IsCompact(x)) {
              __PYX_VERIFY_RETURN_INT(unsigned int, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
          } else {
              const digit* digits = __Pyx_PyLong_Digits(x);
              assert(__Pyx_PyLong_DigitCount(x) > 1);
              switch (__Pyx_PyLong_SignedDigitCount(x)) {
                  case -2:
                      if ((8 * sizeof(unsigned int) - 1 > 1 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(unsigned int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                          } else if ((8 * sizeof(unsigned int) - 1 > 2 * PyLong_SHIFT)) {
                              return (unsigned int) (((unsigned int)-1)*(((((unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])));
                          }
                      }
                      break;
                  case 2:
                      if ((8 * sizeof(unsigned int) > 1 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                          } else if ((8 * sizeof(unsigned int) - 1 > 2 * PyLong_SHIFT)) {
                              return (unsigned int) ((((((unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])));
                          }
                      }
                      break;
                  case -3:
                      if ((8 * sizeof(unsigned int) - 1 > 2 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(unsigned int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                          } else if ((8 * sizeof(unsigned int) - 1 > 3 * PyLong_SHIFT)) {
                              return (unsigned int) (((unsigned int)-1)*(((((((unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])));
                          }
                      }
                      break;
                  case 3:
                      if ((8 * sizeof(unsigned int) > 2 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                          } else if ((8 * sizeof(unsigned int) - 1 > 3 * PyLong_SHIFT)) {
                              return (unsigned int) ((((((((unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])));
                          }
                      }
                      break;
                  case -4:
                      if ((8 * sizeof(unsigned int) - 1 > 3 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(unsigned 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(unsigned int) - 1 > 4 * PyLong_SHIFT)) {
                              return (unsigned int) (((unsigned int)-1)*(((((((((unsigned int)digits[3]) << PyLong_SHIFT) | (unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])));
                          }
                      }
                      break;
                  case 4:
                      if ((8 * sizeof(unsigned int) > 3 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(unsigned 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(unsigned int) - 1 > 4 * PyLong_SHIFT)) {
                              return (unsigned int) ((((((((((unsigned int)digits[3]) << PyLong_SHIFT) | (unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])));
                          }
                      }
                      break;
              }
          }
  #endif
          if ((sizeof(unsigned int) <= sizeof(long))) {
              __PYX_VERIFY_RETURN_INT_EXC(unsigned int, long, PyLong_AsLong(x))
          } else if ((sizeof(unsigned int) <= sizeof(PY_LONG_LONG))) {
              __PYX_VERIFY_RETURN_INT_EXC(unsigned int, PY_LONG_LONG, PyLong_AsLongLong(x))
          }
      }
      {
          unsigned int val;
          int ret = -1;
  #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
          Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
              x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
          if (unlikely(bytes_copied == -1)) {
          } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
              goto raise_overflow;
          } else {
              ret = 0;
          }
  #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
          int one = 1; int is_little = (int)*(unsigned char *)&one;
          unsigned char *bytes = (unsigned char *)&val;
          ret = _PyLong_AsByteArray((PyLongObject *)x,
                                      bytes, sizeof(val),
                                      is_little, !is_unsigned);
  #else
          PyObject *v;
          PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
          int bits, remaining_bits, is_negative = 0;
          int chunk_size = (sizeof(long) < 8) ? 30 : 62;
          if (likely(PyLong_CheckExact(x))) {
              v = __Pyx_NewRef(x);
          } else {
              v = PyNumber_Long(x);
              if (unlikely(!v)) return (unsigned int) -1;
              assert(PyLong_CheckExact(v));
          }
          {
              int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
              if (unlikely(result < 0)) {
                  Py_DECREF(v);
                  return (unsigned int) -1;
              }
              is_negative = result == 1;
          }
          if (is_unsigned && unlikely(is_negative)) {
              Py_DECREF(v);
              goto raise_neg_overflow;
          } else if (is_negative) {
              stepval = PyNumber_Invert(v);
              Py_DECREF(v);
              if (unlikely(!stepval))
                  return (unsigned int) -1;
          } else {
              stepval = v;
          }
          v = NULL;
          val = (unsigned int) 0;
          mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
          shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
          for (bits = 0; bits < (int) sizeof(unsigned int) * 8 - chunk_size; bits += chunk_size) {
              PyObject *tmp, *digit;
              long idigit;
              digit = PyNumber_And(stepval, mask);
              if (unlikely(!digit)) goto done;
              idigit = PyLong_AsLong(digit);
              Py_DECREF(digit);
              if (unlikely(idigit < 0)) goto done;
              val |= ((unsigned int) idigit) << bits;
              tmp = PyNumber_Rshift(stepval, shift);
              if (unlikely(!tmp)) goto done;
              Py_DECREF(stepval); stepval = tmp;
          }
          Py_DECREF(shift); shift = NULL;
          Py_DECREF(mask); mask = NULL;
          {
              long idigit = PyLong_AsLong(stepval);
              if (unlikely(idigit < 0)) goto done;
              remaining_bits = ((int) sizeof(unsigned int) * 8) - bits - (is_unsigned ? 0 : 1);
              if (unlikely(idigit >= (1L << remaining_bits)))
                  goto raise_overflow;
              val |= ((unsigned int) idigit) << bits;
          }
          if (!is_unsigned) {
              if (unlikely(val & (((unsigned int) 1) << (sizeof(unsigned int) * 8 - 1))))
                  goto raise_overflow;
              if (is_negative)
                  val = ~val;
          }
          ret = 0;
      done:
          Py_XDECREF(shift);
          Py_XDECREF(mask);
          Py_XDECREF(stepval);
  #endif
          if (unlikely(ret))
              return (unsigned int) -1;
          return val;
      }
  raise_overflow:
      PyErr_SetString(PyExc_OverflowError,
          "value too large to convert to unsigned int");
      return (unsigned int) -1;
  raise_neg_overflow:
      PyErr_SetString(PyExc_OverflowError,
          "can't convert negative value to unsigned int");
      return (unsigned int) -1;
  }
  
/* CIntToPy */
  static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value) {
  #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
  #pragma GCC diagnostic push
  #pragma GCC diagnostic ignored "-Wconversion"
  #endif
      const long neg_one = (long) -1, const_zero = (long) 0;
  #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
  #pragma GCC diagnostic pop
  #endif
      const int is_unsigned = neg_one > const_zero;
      if (is_unsigned) {
          if (sizeof(long) < sizeof(long)) {
              return PyLong_FromLong((long) value);
          } else if (sizeof(long) <= sizeof(unsigned long)) {
              return PyLong_FromUnsignedLong((unsigned long) value);
  #if !CYTHON_COMPILING_IN_PYPY
          } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
              return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
  #endif
          }
      } else {
          if (sizeof(long) <= sizeof(long)) {
              return PyLong_FromLong((long) value);
          } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
              return PyLong_FromLongLong((PY_LONG_LONG) value);
          }
      }
      {
          unsigned char *bytes = (unsigned char *)&value;
  #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
          if (is_unsigned) {
              return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
          } else {
              return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
          }
  #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
          int one = 1; int little = (int)*(unsigned char *)&one;
          return _PyLong_FromByteArray(bytes, sizeof(long),
                                       little, !is_unsigned);
  #else
          int one = 1; int little = (int)*(unsigned char *)&one;
          PyObject *from_bytes, *result = NULL, *kwds = NULL;
          PyObject *py_bytes = NULL, *order_str = NULL;
          from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
          if (!from_bytes) return NULL;
          py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(long));
          if (!py_bytes) goto limited_bad;
          order_str = PyUnicode_FromString(little ? "little" : "big");
          if (!order_str) goto limited_bad;
          {
              PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
              if (!is_unsigned) {
                  kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                  if (!kwds) goto limited_bad;
                  if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
              }
              result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
          }
          limited_bad:
          Py_XDECREF(kwds);
          Py_XDECREF(order_str);
          Py_XDECREF(py_bytes);
          Py_XDECREF(from_bytes);
          return result;
  #endif
      }
  }
  
/* CIntToPy */
  static CYTHON_INLINE PyObject* __Pyx_PyLong_From_unsigned_int(unsigned int value) {
  #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
  #pragma GCC diagnostic push
  #pragma GCC diagnostic ignored "-Wconversion"
  #endif
      const unsigned int neg_one = (unsigned int) -1, const_zero = (unsigned int) 0;
  #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
  #pragma GCC diagnostic pop
  #endif
      const int is_unsigned = neg_one > const_zero;
      if (is_unsigned) {
          if (sizeof(unsigned int) < sizeof(long)) {
              return PyLong_FromLong((long) value);
          } else if (sizeof(unsigned int) <= sizeof(unsigned long)) {
              return PyLong_FromUnsignedLong((unsigned long) value);
  #if !CYTHON_COMPILING_IN_PYPY
          } else if (sizeof(unsigned int) <= sizeof(unsigned PY_LONG_LONG)) {
              return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
  #endif
          }
      } else {
          if (sizeof(unsigned int) <= sizeof(long)) {
              return PyLong_FromLong((long) value);
          } else if (sizeof(unsigned int) <= sizeof(PY_LONG_LONG)) {
              return PyLong_FromLongLong((PY_LONG_LONG) value);
          }
      }
      {
          unsigned char *bytes = (unsigned char *)&value;
  #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
          if (is_unsigned) {
              return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
          } else {
              return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
          }
  #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
          int one = 1; int little = (int)*(unsigned char *)&one;
          return _PyLong_FromByteArray(bytes, sizeof(unsigned int),
                                       little, !is_unsigned);
  #else
          int one = 1; int little = (int)*(unsigned char *)&one;
          PyObject *from_bytes, *result = NULL, *kwds = NULL;
          PyObject *py_bytes = NULL, *order_str = NULL;
          from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
          if (!from_bytes) return NULL;
          py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(unsigned int));
          if (!py_bytes) goto limited_bad;
          order_str = PyUnicode_FromString(little ? "little" : "big");
          if (!order_str) goto limited_bad;
          {
              PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
              if (!is_unsigned) {
                  kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                  if (!kwds) goto limited_bad;
                  if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
              }
              result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
          }
          limited_bad:
          Py_XDECREF(kwds);
          Py_XDECREF(order_str);
          Py_XDECREF(py_bytes);
          Py_XDECREF(from_bytes);
          return result;
  #endif
      }
  }
  
/* CIntToPy */
  static CYTHON_INLINE PyObject* __Pyx_PyLong_From_unsigned_long(unsigned long value) {
  #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
  #pragma GCC diagnostic push
  #pragma GCC diagnostic ignored "-Wconversion"
  #endif
      const unsigned long neg_one = (unsigned long) -1, const_zero = (unsigned long) 0;
  #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
  #pragma GCC diagnostic pop
  #endif
      const int is_unsigned = neg_one > const_zero;
      if (is_unsigned) {
          if (sizeof(unsigned long) < sizeof(long)) {
              return PyLong_FromLong((long) value);
          } else if (sizeof(unsigned long) <= sizeof(unsigned long)) {
              return PyLong_FromUnsignedLong((unsigned long) value);
  #if !CYTHON_COMPILING_IN_PYPY
          } else if (sizeof(unsigned long) <= sizeof(unsigned PY_LONG_LONG)) {
              return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
  #endif
          }
      } else {
          if (sizeof(unsigned long) <= sizeof(long)) {
              return PyLong_FromLong((long) value);
          } else if (sizeof(unsigned long) <= sizeof(PY_LONG_LONG)) {
              return PyLong_FromLongLong((PY_LONG_LONG) value);
          }
      }
      {
          unsigned char *bytes = (unsigned char *)&value;
  #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
          if (is_unsigned) {
              return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
          } else {
              return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
          }
  #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
          int one = 1; int little = (int)*(unsigned char *)&one;
          return _PyLong_FromByteArray(bytes, sizeof(unsigned long),
                                       little, !is_unsigned);
  #else
          int one = 1; int little = (int)*(unsigned char *)&one;
          PyObject *from_bytes, *result = NULL, *kwds = NULL;
          PyObject *py_bytes = NULL, *order_str = NULL;
          from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
          if (!from_bytes) return NULL;
          py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(unsigned long));
          if (!py_bytes) goto limited_bad;
          order_str = PyUnicode_FromString(little ? "little" : "big");
          if (!order_str) goto limited_bad;
          {
              PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
              if (!is_unsigned) {
                  kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                  if (!kwds) goto limited_bad;
                  if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
              }
              result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
          }
          limited_bad:
          Py_XDECREF(kwds);
          Py_XDECREF(order_str);
          Py_XDECREF(py_bytes);
          Py_XDECREF(from_bytes);
          return result;
  #endif
      }
  }
  
/* CIntToPy */
  static CYTHON_INLINE PyObject* __Pyx_PyLong_From_mpfr_prec_t(mpfr_prec_t value) {
  #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
  #pragma GCC diagnostic push
  #pragma GCC diagnostic ignored "-Wconversion"
  #endif
      const mpfr_prec_t neg_one = (mpfr_prec_t) -1, const_zero = (mpfr_prec_t) 0;
  #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
  #pragma GCC diagnostic pop
  #endif
      const int is_unsigned = neg_one > const_zero;
      if (is_unsigned) {
          if (sizeof(mpfr_prec_t) < sizeof(long)) {
              return PyLong_FromLong((long) value);
          } else if (sizeof(mpfr_prec_t) <= sizeof(unsigned long)) {
              return PyLong_FromUnsignedLong((unsigned long) value);
  #if !CYTHON_COMPILING_IN_PYPY
          } else if (sizeof(mpfr_prec_t) <= sizeof(unsigned PY_LONG_LONG)) {
              return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
  #endif
          }
      } else {
          if (sizeof(mpfr_prec_t) <= sizeof(long)) {
              return PyLong_FromLong((long) value);
          } else if (sizeof(mpfr_prec_t) <= sizeof(PY_LONG_LONG)) {
              return PyLong_FromLongLong((PY_LONG_LONG) value);
          }
      }
      {
          unsigned char *bytes = (unsigned char *)&value;
  #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
          if (is_unsigned) {
              return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
          } else {
              return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
          }
  #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
          int one = 1; int little = (int)*(unsigned char *)&one;
          return _PyLong_FromByteArray(bytes, sizeof(mpfr_prec_t),
                                       little, !is_unsigned);
  #else
          int one = 1; int little = (int)*(unsigned char *)&one;
          PyObject *from_bytes, *result = NULL, *kwds = NULL;
          PyObject *py_bytes = NULL, *order_str = NULL;
          from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
          if (!from_bytes) return NULL;
          py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(mpfr_prec_t));
          if (!py_bytes) goto limited_bad;
          order_str = PyUnicode_FromString(little ? "little" : "big");
          if (!order_str) goto limited_bad;
          {
              PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
              if (!is_unsigned) {
                  kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                  if (!kwds) goto limited_bad;
                  if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
              }
              result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
          }
          limited_bad:
          Py_XDECREF(kwds);
          Py_XDECREF(order_str);
          Py_XDECREF(py_bytes);
          Py_XDECREF(from_bytes);
          return result;
  #endif
      }
  }
  
/* PyObjectCallMethod1 */
  #if !(CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000)))
  static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) {
      PyObject *result = __Pyx_PyObject_CallOneArg(method, arg);
      Py_DECREF(method);
      return result;
  }
  #endif
  static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) {
  #if CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000))
      PyObject *args[2] = {obj, arg};
      (void) __Pyx_PyObject_CallOneArg;
      (void) __Pyx_PyObject_Call2Args;
      return PyObject_VectorcallMethod(method_name, args, 2 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL);
  #else
      PyObject *method = NULL, *result;
      int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
      if (likely(is_method)) {
          result = __Pyx_PyObject_Call2Args(method, obj, arg);
          Py_DECREF(method);
          return result;
      }
      if (unlikely(!method)) return NULL;
      return __Pyx__PyObject_CallMethod1(method, arg);
  #endif
  }
  
/* UpdateUnpickledDict */
  static int __Pyx__UpdateUnpickledDict(PyObject *obj, PyObject *state, Py_ssize_t index) {
      PyObject *state_dict = __Pyx_PySequence_ITEM(state, index);
      if (unlikely(!state_dict)) {
          return -1;
      }
      int non_empty = PyObject_IsTrue(state_dict);
      if (non_empty == 0) {
          Py_DECREF(state_dict);
          return 0;
      } else if (unlikely(non_empty == -1)) {
          return -1;
      }
      PyObject *dict;
      #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
      dict = PyObject_GetAttrString(obj, "__dict__");
      #else
      dict = PyObject_GenericGetDict(obj, NULL);
      #endif
      if (unlikely(!dict)) {
          Py_DECREF(state_dict);
          return -1;
      }
      int result;
      if (likely(PyDict_CheckExact(dict))) {
          result = PyDict_Update(dict, state_dict);
      } else {
          PyObject *obj_result = __Pyx_PyObject_CallMethod1(dict, __pyx_mstate_global->__pyx_n_u_update, state_dict);
          if (likely(obj_result)) {
              Py_DECREF(obj_result);
              result = 0;
          } else {
              result = -1;
          }
      }
      Py_DECREF(state_dict);
      Py_DECREF(dict);
      return result;
  }
  static int __Pyx_UpdateUnpickledDict(PyObject *obj, PyObject *state, Py_ssize_t index) {
      Py_ssize_t state_size = __Pyx_PyTuple_GET_SIZE(state);
      #if !CYTHON_ASSUME_SAFE_SIZE
      if (unlikely(state_size == -1)) return -1;
      #endif
      if (state_size <= index) {
          return 0;
      }
      return __Pyx__UpdateUnpickledDict(obj, state, index);
  }
  
/* CIntFromPy */
  static CYTHON_INLINE char __Pyx_PyLong_As_char(PyObject *x) {
  #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
  #pragma GCC diagnostic push
  #pragma GCC diagnostic ignored "-Wconversion"
  #endif
      const char neg_one = (char) -1, const_zero = (char) 0;
  #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
  #pragma GCC diagnostic pop
  #endif
      const int is_unsigned = neg_one > const_zero;
      if (unlikely(!PyLong_Check(x))) {
          char val;
          PyObject *tmp = __Pyx_PyNumber_Long(x);
          if (!tmp) return (char) -1;
          val = __Pyx_PyLong_As_char(tmp);
          Py_DECREF(tmp);
          return val;
      }
      if (is_unsigned) {
  #if CYTHON_USE_PYLONG_INTERNALS
          if (unlikely(__Pyx_PyLong_IsNeg(x))) {
              goto raise_neg_overflow;
          } else if (__Pyx_PyLong_IsCompact(x)) {
              __PYX_VERIFY_RETURN_INT(char, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
          } else {
              const digit* digits = __Pyx_PyLong_Digits(x);
              assert(__Pyx_PyLong_DigitCount(x) > 1);
              switch (__Pyx_PyLong_DigitCount(x)) {
                  case 2:
                      if ((8 * sizeof(char) > 1 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                          } else if ((8 * sizeof(char) >= 2 * PyLong_SHIFT)) {
                              return (char) (((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
                          }
                      }
                      break;
                  case 3:
                      if ((8 * sizeof(char) > 2 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                          } else if ((8 * sizeof(char) >= 3 * PyLong_SHIFT)) {
                              return (char) (((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
                          }
                      }
                      break;
                  case 4:
                      if ((8 * sizeof(char) > 3 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(char, 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(char) >= 4 * PyLong_SHIFT)) {
                              return (char) (((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
                          }
                      }
                      break;
              }
          }
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
          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 (char) -1;
              if (unlikely(result == 1))
                  goto raise_neg_overflow;
          }
  #endif
          if ((sizeof(char) <= sizeof(unsigned long))) {
              __PYX_VERIFY_RETURN_INT_EXC(char, unsigned long, PyLong_AsUnsignedLong(x))
          } else if ((sizeof(char) <= sizeof(unsigned PY_LONG_LONG))) {
              __PYX_VERIFY_RETURN_INT_EXC(char, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
          }
      } else {
  #if CYTHON_USE_PYLONG_INTERNALS
          if (__Pyx_PyLong_IsCompact(x)) {
              __PYX_VERIFY_RETURN_INT(char, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
          } else {
              const digit* digits = __Pyx_PyLong_Digits(x);
              assert(__Pyx_PyLong_DigitCount(x) > 1);
              switch (__Pyx_PyLong_SignedDigitCount(x)) {
                  case -2:
                      if ((8 * sizeof(char) - 1 > 1 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                          } else if ((8 * sizeof(char) - 1 > 2 * PyLong_SHIFT)) {
                              return (char) (((char)-1)*(((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
                          }
                      }
                      break;
                  case 2:
                      if ((8 * sizeof(char) > 1 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                          } else if ((8 * sizeof(char) - 1 > 2 * PyLong_SHIFT)) {
                              return (char) ((((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
                          }
                      }
                      break;
                  case -3:
                      if ((8 * sizeof(char) - 1 > 2 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                          } else if ((8 * sizeof(char) - 1 > 3 * PyLong_SHIFT)) {
                              return (char) (((char)-1)*(((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
                          }
                      }
                      break;
                  case 3:
                      if ((8 * sizeof(char) > 2 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                          } else if ((8 * sizeof(char) - 1 > 3 * PyLong_SHIFT)) {
                              return (char) ((((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
                          }
                      }
                      break;
                  case -4:
                      if ((8 * sizeof(char) - 1 > 3 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(char, 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(char) - 1 > 4 * PyLong_SHIFT)) {
                              return (char) (((char)-1)*(((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
                          }
                      }
                      break;
                  case 4:
                      if ((8 * sizeof(char) > 3 * PyLong_SHIFT)) {
                          if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                              __PYX_VERIFY_RETURN_INT(char, 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(char) - 1 > 4 * PyLong_SHIFT)) {
                              return (char) ((((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
                          }
                      }
                      break;
              }
          }
  #endif
          if ((sizeof(char) <= sizeof(long))) {
              __PYX_VERIFY_RETURN_INT_EXC(char, long, PyLong_AsLong(x))
          } else if ((sizeof(char) <= sizeof(PY_LONG_LONG))) {
              __PYX_VERIFY_RETURN_INT_EXC(char, PY_LONG_LONG, PyLong_AsLongLong(x))
          }
      }
      {
          char val;
          int ret = -1;
  #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
          Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
              x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
          if (unlikely(bytes_copied == -1)) {
          } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
              goto raise_overflow;
          } else {
              ret = 0;
          }
  #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
          int one = 1; int is_little = (int)*(unsigned char *)&one;
          unsigned char *bytes = (unsigned char *)&val;
          ret = _PyLong_AsByteArray((PyLongObject *)x,
                                      bytes, sizeof(val),
                                      is_little, !is_unsigned);
  #else
          PyObject *v;
          PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
          int bits, remaining_bits, is_negative = 0;
          int chunk_size = (sizeof(long) < 8) ? 30 : 62;
          if (likely(PyLong_CheckExact(x))) {
              v = __Pyx_NewRef(x);
          } else {
              v = PyNumber_Long(x);
              if (unlikely(!v)) return (char) -1;
              assert(PyLong_CheckExact(v));
          }
          {
              int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
              if (unlikely(result < 0)) {
                  Py_DECREF(v);
                  return (char) -1;
              }
              is_negative = result == 1;
          }
          if (is_unsigned && unlikely(is_negative)) {
              Py_DECREF(v);
              goto raise_neg_overflow;
          } else if (is_negative) {
              stepval = PyNumber_Invert(v);
              Py_DECREF(v);
              if (unlikely(!stepval))
                  return (char) -1;
          } else {
              stepval = v;
          }
          v = NULL;
          val = (char) 0;
          mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
          shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
          for (bits = 0; bits < (int) sizeof(char) * 8 - chunk_size; bits += chunk_size) {
              PyObject *tmp, *digit;
              long idigit;
              digit = PyNumber_And(stepval, mask);
              if (unlikely(!digit)) goto done;
              idigit = PyLong_AsLong(digit);
              Py_DECREF(digit);
              if (unlikely(idigit < 0)) goto done;
              val |= ((char) idigit) << bits;
              tmp = PyNumber_Rshift(stepval, shift);
              if (unlikely(!tmp)) goto done;
              Py_DECREF(stepval); stepval = tmp;
          }
          Py_DECREF(shift); shift = NULL;
          Py_DECREF(mask); mask = NULL;
          {
              long idigit = PyLong_AsLong(stepval);
              if (unlikely(idigit < 0)) goto done;
              remaining_bits = ((int) sizeof(char) * 8) - bits - (is_unsigned ? 0 : 1);
              if (unlikely(idigit >= (1L << remaining_bits)))
                  goto raise_overflow;
              val |= ((char) idigit) << bits;
          }
          if (!is_unsigned) {
              if (unlikely(val & (((char) 1) << (sizeof(char) * 8 - 1))))
                  goto raise_overflow;
              if (is_negative)
                  val = ~val;
          }
          ret = 0;
      done:
          Py_XDECREF(shift);
          Py_XDECREF(mask);
          Py_XDECREF(stepval);
  #endif
          if (unlikely(ret))
              return (char) -1;
          return val;
      }
  raise_overflow:
      PyErr_SetString(PyExc_OverflowError,
          "value too large to convert to char");
      return (char) -1;
  raise_neg_overflow:
      PyErr_SetString(PyExc_OverflowError,
          "can't convert negative value to char");
      return (char) -1;
  }
  
/* FormatTypeName */
  #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000
  static __Pyx_TypeName
  __Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp)
  {
      PyObject *module = NULL, *name = NULL, *result = NULL;
      #if __PYX_LIMITED_VERSION_HEX < 0x030b0000
      name = __Pyx_PyObject_GetAttrStr((PyObject *)tp,
                                                 __pyx_mstate_global->__pyx_n_u_qualname);
      #else
      name = PyType_GetQualName(tp);
      #endif
      if (unlikely(name == NULL) || unlikely(!PyUnicode_Check(name))) goto bad;
      module = __Pyx_PyObject_GetAttrStr((PyObject *)tp,
                                                 __pyx_mstate_global->__pyx_n_u_module_2);
      if (unlikely(module == NULL) || unlikely(!PyUnicode_Check(module))) goto bad;
      if (PyUnicode_CompareWithASCIIString(module, "builtins") == 0) {
          result = name;
          name = NULL;
          goto done;
      }
      result = PyUnicode_FromFormat("%U.%U", module, name);
      if (unlikely(result == NULL)) goto bad;
    done:
      Py_XDECREF(name);
      Py_XDECREF(module);
      return result;
    bad:
      PyErr_Clear();
      if (name) {
          result = name;
          name = NULL;
      } else {
          result = __Pyx_NewRef(__pyx_mstate_global->__pyx_kp_u__14);
      }
      goto done;
  }
  #endif
  
/* GetRuntimeVersion */
  #if __PYX_LIMITED_VERSION_HEX < 0x030b0000
  void __Pyx_init_runtime_version(void) {
      if (__Pyx_cached_runtime_version == 0) {
          const char* rt_version = Py_GetVersion();
          unsigned long version = 0;
          unsigned long factor = 0x01000000UL;
          unsigned int digit = 0;
          int i = 0;
          while (factor) {
              while ('0' <= rt_version[i] && rt_version[i] <= '9') {
                  digit = digit * 10 + (unsigned int) (rt_version[i] - '0');
                  ++i;
              }
              version += factor * digit;
              if (rt_version[i] != '.')
                  break;
              digit = 0;
              factor >>= 8;
              ++i;
          }
          __Pyx_cached_runtime_version = version;
      }
  }
  #endif
  static unsigned long __Pyx_get_runtime_version(void) {
  #if __PYX_LIMITED_VERSION_HEX >= 0x030b0000
      return Py_Version & ~0xFFUL;
  #else
      return __Pyx_cached_runtime_version;
  #endif
  }
  
/* IterNextPlain (used by CoroutineBase) */
  #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
  static PyObject *__Pyx_GetBuiltinNext_LimitedAPI(void) {
      if (unlikely(!__pyx_mstate_global->__Pyx_GetBuiltinNext_LimitedAPI_cache))
          __pyx_mstate_global->__Pyx_GetBuiltinNext_LimitedAPI_cache = __Pyx_GetBuiltinName(__pyx_mstate_global->__pyx_n_u_next_2);
      return __pyx_mstate_global->__Pyx_GetBuiltinNext_LimitedAPI_cache;
  }
  #endif
  static CYTHON_INLINE PyObject *__Pyx_PyIter_Next_Plain(PyObject *iterator) {
  #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
      PyObject *result;
      PyObject *next = __Pyx_GetBuiltinNext_LimitedAPI();
      if (unlikely(!next)) return NULL;
      result = PyObject_CallFunctionObjArgs(next, iterator, NULL);
      return result;
  #else
      (void)__Pyx_GetBuiltinName; // only for early limited API
      iternextfunc iternext = __Pyx_PyObject_GetIterNextFunc(iterator);
      assert(iternext);
      return iternext(iterator);
  #endif
  }
  
/* ReturnWithStopIteration (used by CoroutineBase) */
  static void __Pyx__ReturnWithStopIteration(PyObject* value, int async);
  static CYTHON_INLINE void __Pyx_ReturnWithStopIteration(PyObject* value, int async, int iternext) {
      if (value == Py_None) {
          if (async || !iternext)
              PyErr_SetNone(async ? PyExc_StopAsyncIteration : PyExc_StopIteration);
          return;
      }
      __Pyx__ReturnWithStopIteration(value, async);
  }
  static void __Pyx__ReturnWithStopIteration(PyObject* value, int async) {
  #if CYTHON_COMPILING_IN_CPYTHON
      __Pyx_PyThreadState_declare
  #endif
      PyObject *exc;
      PyObject *exc_type = async ? PyExc_StopAsyncIteration : PyExc_StopIteration;
  #if CYTHON_COMPILING_IN_CPYTHON
      if ((PY_VERSION_HEX >= (0x030C00A6)) || unlikely(PyTuple_Check(value) || PyExceptionInstance_Check(value))) {
          if (PY_VERSION_HEX >= (0x030e00A1)) {
              exc = __Pyx_PyObject_CallOneArg(exc_type, value);
          } else {
              PyObject *args_tuple = PyTuple_New(1);
              if (unlikely(!args_tuple)) return;
              Py_INCREF(value);
              PyTuple_SET_ITEM(args_tuple, 0, value);
              exc = PyObject_Call(exc_type, args_tuple, NULL);
              Py_DECREF(args_tuple);
          }
          if (unlikely(!exc)) return;
      } else {
          Py_INCREF(value);
          exc = value;
      }
      #if CYTHON_FAST_THREAD_STATE
      __Pyx_PyThreadState_assign
      #if CYTHON_USE_EXC_INFO_STACK
      if (!__pyx_tstate->exc_info->exc_value)
      #else
      if (!__pyx_tstate->exc_type)
      #endif
      {
          Py_INCREF(exc_type);
          __Pyx_ErrRestore(exc_type, exc, NULL);
          return;
      }
      #endif
  #else
      exc = __Pyx_PyObject_CallOneArg(exc_type, value);
      if (unlikely(!exc)) return;
  #endif
      PyErr_SetObject(exc_type, exc);
      Py_DECREF(exc);
  }
  
/* CoroutineBase (used by Generator) */
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #include <frameobject.h>
  #if PY_VERSION_HEX >= 0x030b00a6 && !defined(PYPY_VERSION)
    #ifndef Py_BUILD_CORE
      #define Py_BUILD_CORE 1
    #endif
    #include "internal/pycore_frame.h"
  #endif
  #endif // CYTHON_COMPILING_IN_LIMITED_API
  static CYTHON_INLINE void
  __Pyx_Coroutine_Undelegate(__pyx_CoroutineObject *gen) {
  #if CYTHON_USE_AM_SEND
      gen->yieldfrom_am_send = NULL;
  #endif
      Py_CLEAR(gen->yieldfrom);
  }
  static int __Pyx_PyGen__FetchStopIterationValue(PyThreadState *__pyx_tstate, PyObject **pvalue) {
      PyObject *et, *ev, *tb;
      PyObject *value = NULL;
      CYTHON_UNUSED_VAR(__pyx_tstate);
      __Pyx_ErrFetch(&et, &ev, &tb);
      if (!et) {
          Py_XDECREF(tb);
          Py_XDECREF(ev);
          Py_INCREF(Py_None);
          *pvalue = Py_None;
          return 0;
      }
      if (likely(et == PyExc_StopIteration)) {
          if (!ev) {
              Py_INCREF(Py_None);
              value = Py_None;
          }
          else if (likely(__Pyx_IS_TYPE(ev, (PyTypeObject*)PyExc_StopIteration))) {
              #if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL
              value = PyObject_GetAttr(ev, __pyx_mstate_global->__pyx_n_u_value);
              if (unlikely(!value)) goto limited_api_failure;
              #else
              value = ((PyStopIterationObject *)ev)->value;
              Py_INCREF(value);
              #endif
              Py_DECREF(ev);
          }
          else if (unlikely(PyTuple_Check(ev))) {
              Py_ssize_t tuple_size = __Pyx_PyTuple_GET_SIZE(ev);
              #if !CYTHON_ASSUME_SAFE_SIZE
              if (unlikely(tuple_size < 0)) {
                  Py_XDECREF(tb);
                  Py_DECREF(ev);
                  Py_DECREF(et);
                  return -1;
              }
              #endif
              if (tuple_size >= 1) {
  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                  value = PyTuple_GET_ITEM(ev, 0);
                  Py_INCREF(value);
  #elif CYTHON_ASSUME_SAFE_MACROS
                  value = PySequence_ITEM(ev, 0);
  #else
                  value = PySequence_GetItem(ev, 0);
                  if (!value) goto limited_api_failure;
  #endif
              } else {
                  Py_INCREF(Py_None);
                  value = Py_None;
              }
              Py_DECREF(ev);
          }
          else if (!__Pyx_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration)) {
              value = ev;
          }
          if (likely(value)) {
              Py_XDECREF(tb);
              Py_DECREF(et);
              *pvalue = value;
              return 0;
          }
      } else if (!__Pyx_PyErr_GivenExceptionMatches(et, PyExc_StopIteration)) {
          __Pyx_ErrRestore(et, ev, tb);
          return -1;
      }
      PyErr_NormalizeException(&et, &ev, &tb);
      if (unlikely(!PyObject_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration))) {
          __Pyx_ErrRestore(et, ev, tb);
          return -1;
      }
      Py_XDECREF(tb);
      Py_DECREF(et);
  #if CYTHON_COMPILING_IN_LIMITED_API
      value = PyObject_GetAttr(ev, __pyx_mstate_global->__pyx_n_u_value);
  #else
      value = ((PyStopIterationObject *)ev)->value;
      Py_INCREF(value);
  #endif
      Py_DECREF(ev);
  #if CYTHON_COMPILING_IN_LIMITED_API
      if (unlikely(!value)) return -1;
  #endif
      *pvalue = value;
      return 0;
  #if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL || !CYTHON_ASSUME_SAFE_MACROS
    limited_api_failure:
      Py_XDECREF(et);
      Py_XDECREF(tb);
      Py_XDECREF(ev);
      return -1;
  #endif
  }
  static CYTHON_INLINE
  __Pyx_PySendResult __Pyx_Coroutine_status_from_result(PyObject **retval) {
      if (*retval) {
          return PYGEN_NEXT;
      } else if (likely(__Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, retval) == 0)) {
          return PYGEN_RETURN;
      } else {
          return PYGEN_ERROR;
      }
  }
  static CYTHON_INLINE
  void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *exc_state) {
  #if PY_VERSION_HEX >= 0x030B00a4
      Py_CLEAR(exc_state->exc_value);
  #else
      PyObject *t, *v, *tb;
      t = exc_state->exc_type;
      v = exc_state->exc_value;
      tb = exc_state->exc_traceback;
      exc_state->exc_type = NULL;
      exc_state->exc_value = NULL;
      exc_state->exc_traceback = NULL;
      Py_XDECREF(t);
      Py_XDECREF(v);
      Py_XDECREF(tb);
  #endif
  }
  #define __Pyx_Coroutine_AlreadyRunningError(gen)  (__Pyx__Coroutine_AlreadyRunningError(gen), (PyObject*)NULL)
  static void __Pyx__Coroutine_AlreadyRunningError(__pyx_CoroutineObject *gen) {
      const char *msg;
      CYTHON_MAYBE_UNUSED_VAR(gen);
      if ((0)) {
      #ifdef __Pyx_Coroutine_USED
      } else if (__Pyx_Coroutine_Check((PyObject*)gen)) {
          msg = "coroutine already executing";
      #endif
      #ifdef __Pyx_AsyncGen_USED
      } else if (__Pyx_AsyncGen_CheckExact((PyObject*)gen)) {
          msg = "async generator already executing";
      #endif
      } else {
          msg = "generator already executing";
      }
      PyErr_SetString(PyExc_ValueError, msg);
  }
  static void __Pyx_Coroutine_AlreadyTerminatedError(PyObject *gen, PyObject *value, int closing) {
      CYTHON_MAYBE_UNUSED_VAR(gen);
      CYTHON_MAYBE_UNUSED_VAR(closing);
      #ifdef __Pyx_Coroutine_USED
      if (!closing && __Pyx_Coroutine_Check(gen)) {
          PyErr_SetString(PyExc_RuntimeError, "cannot reuse already awaited coroutine");
      } else
      #endif
      if (value) {
          #ifdef __Pyx_AsyncGen_USED
          if (__Pyx_AsyncGen_CheckExact(gen))
              PyErr_SetNone(PyExc_StopAsyncIteration);
          else
          #endif
          PyErr_SetNone(PyExc_StopIteration);
      }
  }
  static
  __Pyx_PySendResult __Pyx_Coroutine_SendEx(__pyx_CoroutineObject *self, PyObject *value, PyObject **result, int closing) {
      __Pyx_PyThreadState_declare
      PyThreadState *tstate;
      __Pyx_ExcInfoStruct *exc_state;
      PyObject *retval;
      assert(__Pyx_Coroutine_get_is_running(self));  // Callers should ensure is_running
      if (unlikely(self->resume_label == -1)) {
          __Pyx_Coroutine_AlreadyTerminatedError((PyObject*)self, value, closing);
          return PYGEN_ERROR;
      }
  #if CYTHON_FAST_THREAD_STATE
      __Pyx_PyThreadState_assign
      tstate = __pyx_tstate;
  #else
      tstate = __Pyx_PyThreadState_Current;
  #endif
      exc_state = &self->gi_exc_state;
      if (exc_state->exc_value) {
          #if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY
          #else
          PyObject *exc_tb;
          #if PY_VERSION_HEX >= 0x030B00a4 && !CYTHON_COMPILING_IN_CPYTHON
          exc_tb = PyException_GetTraceback(exc_state->exc_value);
          #elif PY_VERSION_HEX >= 0x030B00a4
          exc_tb = ((PyBaseExceptionObject*) exc_state->exc_value)->traceback;
          #else
          exc_tb = exc_state->exc_traceback;
          #endif
          if (exc_tb) {
              PyTracebackObject *tb = (PyTracebackObject *) exc_tb;
              PyFrameObject *f = tb->tb_frame;
              assert(f->f_back == NULL);
              #if PY_VERSION_HEX >= 0x030B00A1
              f->f_back = PyThreadState_GetFrame(tstate);
              #else
              Py_XINCREF(tstate->frame);
              f->f_back = tstate->frame;
              #endif
              #if PY_VERSION_HEX >= 0x030B00a4 && !CYTHON_COMPILING_IN_CPYTHON
              Py_DECREF(exc_tb);
              #endif
          }
          #endif
      }
  #if CYTHON_USE_EXC_INFO_STACK
      exc_state->previous_item = tstate->exc_info;
      tstate->exc_info = exc_state;
  #else
      if (exc_state->exc_type) {
          __Pyx_ExceptionSwap(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback);
      } else {
          __Pyx_Coroutine_ExceptionClear(exc_state);
          __Pyx_ExceptionSave(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback);
      }
  #endif
      retval = self->body(self, tstate, value);
  #if CYTHON_USE_EXC_INFO_STACK
      exc_state = &self->gi_exc_state;
      tstate->exc_info = exc_state->previous_item;
      exc_state->previous_item = NULL;
      __Pyx_Coroutine_ResetFrameBackpointer(exc_state);
  #endif
      *result = retval;
      if (self->resume_label == -1) {
          return likely(retval) ? PYGEN_RETURN : PYGEN_ERROR;
      }
      return PYGEN_NEXT;
  }
  static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state) {
  #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API
      CYTHON_UNUSED_VAR(exc_state);
  #else
      PyObject *exc_tb;
      #if PY_VERSION_HEX >= 0x030B00a4
      if (!exc_state->exc_value) return;
      exc_tb = PyException_GetTraceback(exc_state->exc_value);
      #else
      exc_tb = exc_state->exc_traceback;
      #endif
      if (likely(exc_tb)) {
          PyTracebackObject *tb = (PyTracebackObject *) exc_tb;
          PyFrameObject *f = tb->tb_frame;
          Py_CLEAR(f->f_back);
          #if PY_VERSION_HEX >= 0x030B00a4
          Py_DECREF(exc_tb);
          #endif
      }
  #endif
  }
  #define __Pyx_Coroutine_MethodReturnFromResult(gen, result, retval, iternext)\
      ((result) == PYGEN_NEXT ? (retval) : __Pyx__Coroutine_MethodReturnFromResult(gen, result, retval, iternext))
  static PyObject *
  __Pyx__Coroutine_MethodReturnFromResult(PyObject* gen, __Pyx_PySendResult result, PyObject *retval, int iternext) {
      CYTHON_MAYBE_UNUSED_VAR(gen);
      if (likely(result == PYGEN_RETURN)) {
          int is_async = 0;
          #ifdef __Pyx_AsyncGen_USED
          is_async = __Pyx_AsyncGen_CheckExact(gen);
          #endif
          __Pyx_ReturnWithStopIteration(retval, is_async, iternext);
          Py_XDECREF(retval);
      }
      return NULL;
  }
  #if CYTHON_COMPILING_IN_CPYTHON
  static CYTHON_INLINE
  PyObject *__Pyx_PyGen_Send(PyGenObject *gen, PyObject *arg) {
  #if PY_VERSION_HEX <= 0x030A00A1
      return _PyGen_Send(gen, arg);
  #else
      PyObject *result;
      if (PyIter_Send((PyObject*)gen, arg ? arg : Py_None, &result) == PYGEN_RETURN) {
          if (PyAsyncGen_CheckExact(gen)) {
              assert(result == Py_None);
              PyErr_SetNone(PyExc_StopAsyncIteration);
          }
          else if (result == Py_None) {
              PyErr_SetNone(PyExc_StopIteration);
          }
          else {
  #if PY_VERSION_HEX < 0x030d00A1
              _PyGen_SetStopIterationValue(result);
  #else
              if (!PyTuple_Check(result) && !PyExceptionInstance_Check(result)) {
                  PyErr_SetObject(PyExc_StopIteration, result);
              } else {
                  PyObject *exc = __Pyx_PyObject_CallOneArg(PyExc_StopIteration, result);
                  if (likely(exc != NULL)) {
                      PyErr_SetObject(PyExc_StopIteration, exc);
                      Py_DECREF(exc);
                  }
              }
  #endif
          }
          Py_DECREF(result);
          result = NULL;
      }
      return result;
  #endif
  }
  #endif
  static CYTHON_INLINE __Pyx_PySendResult
  __Pyx_Coroutine_FinishDelegation(__pyx_CoroutineObject *gen, PyObject** retval) {
      __Pyx_PySendResult result;
      PyObject *val = NULL;
      assert(__Pyx_Coroutine_get_is_running(gen));
      __Pyx_Coroutine_Undelegate(gen);
      __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, &val);
      result = __Pyx_Coroutine_SendEx(gen, val, retval, 0);
      Py_XDECREF(val);
      return result;
  }
  #if CYTHON_USE_AM_SEND
  static __Pyx_PySendResult
  __Pyx_Coroutine_SendToDelegate(__pyx_CoroutineObject *gen, __Pyx_pyiter_sendfunc gen_am_send, PyObject *value, PyObject **retval) {
      PyObject *ret = NULL;
      __Pyx_PySendResult delegate_result, result;
      assert(__Pyx_Coroutine_get_is_running(gen));
      delegate_result = gen_am_send(gen->yieldfrom, value, &ret);
      if (delegate_result == PYGEN_NEXT) {
          assert (ret != NULL);
          *retval = ret;
          return PYGEN_NEXT;
      }
      assert (delegate_result != PYGEN_ERROR || ret == NULL);
      __Pyx_Coroutine_Undelegate(gen);
      result = __Pyx_Coroutine_SendEx(gen, ret, retval, 0);
      Py_XDECREF(ret);
      return result;
  }
  #endif
  static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value) {
      PyObject *retval = NULL;
      __Pyx_PySendResult result = __Pyx_Coroutine_AmSend(self, value, &retval);
      return __Pyx_Coroutine_MethodReturnFromResult(self, result, retval, 0);
  }
  static __Pyx_PySendResult
  __Pyx_Coroutine_AmSend(PyObject *self, PyObject *value, PyObject **retval) {
      __Pyx_PySendResult result;
      __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
      if (unlikely(__Pyx_Coroutine_test_and_set_is_running(gen))) {
          *retval = __Pyx_Coroutine_AlreadyRunningError(gen);
          return PYGEN_ERROR;
      }
      #if CYTHON_USE_AM_SEND
      if (gen->yieldfrom_am_send) {
          result = __Pyx_Coroutine_SendToDelegate(gen, gen->yieldfrom_am_send, value, retval);
      } else
      #endif
      if (gen->yieldfrom) {
          PyObject *yf = gen->yieldfrom;
          PyObject *ret;
        #if !CYTHON_USE_AM_SEND
          #ifdef __Pyx_Generator_USED
          if (__Pyx_Generator_CheckExact(yf)) {
              ret = __Pyx_Coroutine_Send(yf, value);
          } else
          #endif
          #ifdef __Pyx_Coroutine_USED
          if (__Pyx_Coroutine_Check(yf)) {
              ret = __Pyx_Coroutine_Send(yf, value);
          } else
          #endif
          #ifdef __Pyx_AsyncGen_USED
          if (__pyx_PyAsyncGenASend_CheckExact(yf)) {
              ret = __Pyx_async_gen_asend_send(yf, value);
          } else
          #endif
          #if CYTHON_COMPILING_IN_CPYTHON
          if (PyGen_CheckExact(yf)) {
              ret = __Pyx_PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
          } else
          if (PyCoro_CheckExact(yf)) {
              ret = __Pyx_PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
          } else
          #endif
        #endif
          {
              #if !CYTHON_COMPILING_IN_LIMITED_API || __PYX_LIMITED_VERSION_HEX >= 0x03080000
              if (value == Py_None && PyIter_Check(yf))
                  ret = __Pyx_PyIter_Next_Plain(yf);
              else
              #endif
                  ret = __Pyx_PyObject_CallMethod1(yf, __pyx_mstate_global->__pyx_n_u_send, value);
          }
          if (likely(ret)) {
              __Pyx_Coroutine_unset_is_running(gen);
              *retval = ret;
              return PYGEN_NEXT;
          }
          result = __Pyx_Coroutine_FinishDelegation(gen, retval);
      } else {
          result = __Pyx_Coroutine_SendEx(gen, value, retval, 0);
      }
      __Pyx_Coroutine_unset_is_running(gen);
      return result;
  }
  static int __Pyx_Coroutine_CloseIter(__pyx_CoroutineObject *gen, PyObject *yf) {
      __Pyx_PySendResult result;
      PyObject *retval = NULL;
      CYTHON_UNUSED_VAR(gen);
      assert(__Pyx_Coroutine_get_is_running(gen));
      #ifdef __Pyx_Generator_USED
      if (__Pyx_Generator_CheckExact(yf)) {
          result = __Pyx_Coroutine_Close(yf, &retval);
      } else
      #endif
      #ifdef __Pyx_Coroutine_USED
      if (__Pyx_Coroutine_Check(yf)) {
          result = __Pyx_Coroutine_Close(yf, &retval);
      } else
      if (__Pyx_CoroutineAwait_CheckExact(yf)) {
          result = __Pyx_CoroutineAwait_Close((__pyx_CoroutineAwaitObject*)yf);
      } else
      #endif
      #ifdef __Pyx_AsyncGen_USED
      if (__pyx_PyAsyncGenASend_CheckExact(yf)) {
          retval = __Pyx_async_gen_asend_close(yf, NULL);
          result = PYGEN_RETURN;
      } else
      if (__pyx_PyAsyncGenAThrow_CheckExact(yf)) {
          retval = __Pyx_async_gen_athrow_close(yf, NULL);
          result = PYGEN_RETURN;
      } else
      #endif
      {
          PyObject *meth;
          result = PYGEN_RETURN;
          meth = __Pyx_PyObject_GetAttrStrNoError(yf, __pyx_mstate_global->__pyx_n_u_close);
          if (unlikely(!meth)) {
              if (unlikely(PyErr_Occurred())) {
                  PyErr_WriteUnraisable(yf);
              }
          } else {
              retval = __Pyx_PyObject_CallNoArg(meth);
              Py_DECREF(meth);
              if (unlikely(!retval)) {
                  result = PYGEN_ERROR;
              }
          }
      }
      Py_XDECREF(retval);
      return result == PYGEN_ERROR ? -1 : 0;
  }
  static PyObject *__Pyx_Generator_Next(PyObject *self) {
      __Pyx_PySendResult result;
      PyObject *retval = NULL;
      __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
      if (unlikely(__Pyx_Coroutine_test_and_set_is_running(gen))) {
          return __Pyx_Coroutine_AlreadyRunningError(gen);
      }
      #if CYTHON_USE_AM_SEND
      if (gen->yieldfrom_am_send) {
          result = __Pyx_Coroutine_SendToDelegate(gen, gen->yieldfrom_am_send, Py_None, &retval);
      } else
      #endif
      if (gen->yieldfrom) {
          PyObject *yf = gen->yieldfrom;
          PyObject *ret;
          #ifdef __Pyx_Generator_USED
          if (__Pyx_Generator_CheckExact(yf)) {
              ret = __Pyx_Generator_Next(yf);
          } else
          #endif
          #ifdef __Pyx_Coroutine_USED
          if (__Pyx_Coroutine_CheckExact(yf)) {
              ret = __Pyx_Coroutine_Send(yf, Py_None);
          } else
          #endif
          #if CYTHON_COMPILING_IN_CPYTHON && (PY_VERSION_HEX < 0x030A00A3 || !CYTHON_USE_AM_SEND)
          if (PyGen_CheckExact(yf)) {
              ret = __Pyx_PyGen_Send((PyGenObject*)yf, NULL);
          } else
          #endif
              ret = __Pyx_PyIter_Next_Plain(yf);
          if (likely(ret)) {
              __Pyx_Coroutine_unset_is_running(gen);
              return ret;
          }
          result = __Pyx_Coroutine_FinishDelegation(gen, &retval);
      } else {
          result = __Pyx_Coroutine_SendEx(gen, Py_None, &retval, 0);
      }
      __Pyx_Coroutine_unset_is_running(gen);
      return __Pyx_Coroutine_MethodReturnFromResult(self, result, retval, 1);
  }
  static PyObject *__Pyx_Coroutine_Close_Method(PyObject *self, PyObject *arg) {
      PyObject *retval = NULL;
      __Pyx_PySendResult result;
      CYTHON_UNUSED_VAR(arg);
      result = __Pyx_Coroutine_Close(self, &retval);
      if (unlikely(result == PYGEN_ERROR))
          return NULL;
      Py_XDECREF(retval);
      Py_RETURN_NONE;
  }
  static __Pyx_PySendResult
  __Pyx_Coroutine_Close(PyObject *self, PyObject **retval) {
      __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
      __Pyx_PySendResult result;
      PyObject *yf;
      int err = 0;
      if (unlikely(__Pyx_Coroutine_test_and_set_is_running(gen))) {
          *retval = __Pyx_Coroutine_AlreadyRunningError(gen);
          return PYGEN_ERROR;
      }
      yf = gen->yieldfrom;
      if (yf) {
          Py_INCREF(yf);
          err = __Pyx_Coroutine_CloseIter(gen, yf);
          __Pyx_Coroutine_Undelegate(gen);
          Py_DECREF(yf);
      }
      if (err == 0)
          PyErr_SetNone(PyExc_GeneratorExit);
      result = __Pyx_Coroutine_SendEx(gen, NULL, retval, 1);
      if (result == PYGEN_ERROR) {
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __Pyx_Coroutine_unset_is_running(gen);
          if (!__Pyx_PyErr_Occurred()) {
              return PYGEN_RETURN;
          } else if (likely(__Pyx_PyErr_ExceptionMatches2(PyExc_GeneratorExit, PyExc_StopIteration))) {
              __Pyx_PyErr_Clear();
              return PYGEN_RETURN;
          }
          return PYGEN_ERROR;
      } else if (likely(result == PYGEN_RETURN && *retval == Py_None)) {
          __Pyx_Coroutine_unset_is_running(gen);
          return PYGEN_RETURN;
      } else {
          const char *msg;
          Py_DECREF(*retval);
          *retval = NULL;
          if ((0)) {
          #ifdef __Pyx_Coroutine_USED
          } else if (__Pyx_Coroutine_Check(self)) {
              msg = "coroutine ignored GeneratorExit";
          #endif
          #ifdef __Pyx_AsyncGen_USED
          } else if (__Pyx_AsyncGen_CheckExact(self)) {
              msg = "async generator ignored GeneratorExit";
          #endif
          } else {
              msg = "generator ignored GeneratorExit";
          }
          PyErr_SetString(PyExc_RuntimeError, msg);
          __Pyx_Coroutine_unset_is_running(gen);
          return PYGEN_ERROR;
      }
  }
  static PyObject *__Pyx__Coroutine_Throw(PyObject *self, PyObject *typ, PyObject *val, PyObject *tb,
                                          PyObject *args, int close_on_genexit) {
      __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
      PyObject *yf;
      if (unlikely(__Pyx_Coroutine_test_and_set_is_running(gen)))
          return __Pyx_Coroutine_AlreadyRunningError(gen);
      yf = gen->yieldfrom;
      if (yf) {
          __Pyx_PySendResult result;
          PyObject *ret;
          Py_INCREF(yf);
          if (__Pyx_PyErr_GivenExceptionMatches(typ, PyExc_GeneratorExit) && close_on_genexit) {
              int err = __Pyx_Coroutine_CloseIter(gen, yf);
              Py_DECREF(yf);
              __Pyx_Coroutine_Undelegate(gen);
              if (err < 0)
                  goto propagate_exception;
              goto throw_here;
          }
          if (0
          #ifdef __Pyx_Generator_USED
              || __Pyx_Generator_CheckExact(yf)
          #endif
          #ifdef __Pyx_Coroutine_USED
              || __Pyx_Coroutine_Check(yf)
          #endif
              ) {
              ret = __Pyx__Coroutine_Throw(yf, typ, val, tb, args, close_on_genexit);
          #ifdef __Pyx_Coroutine_USED
          } else if (__Pyx_CoroutineAwait_CheckExact(yf)) {
              ret = __Pyx__Coroutine_Throw(((__pyx_CoroutineAwaitObject*)yf)->coroutine, typ, val, tb, args, close_on_genexit);
          #endif
          } else {
              PyObject *meth = __Pyx_PyObject_GetAttrStrNoError(yf, __pyx_mstate_global->__pyx_n_u_throw);
              if (unlikely(!meth)) {
                  Py_DECREF(yf);
                  if (unlikely(PyErr_Occurred())) {
                      __Pyx_Coroutine_unset_is_running(gen);
                      return NULL;
                  }
                  __Pyx_Coroutine_Undelegate(gen);
                  goto throw_here;
              }
              if (likely(args)) {
                  ret = __Pyx_PyObject_Call(meth, args, NULL);
              } else {
                  PyObject *cargs[4] = {NULL, typ, val, tb};
                  size_t nargs = 1U + (val != NULL) + (tb != NULL);
                  ret = __Pyx_PyObject_FastCall(meth, cargs+1, nargs | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
              }
              Py_DECREF(meth);
          }
          Py_DECREF(yf);
          if (ret) {
              __Pyx_Coroutine_unset_is_running(gen);
              return ret;
          }
          result = __Pyx_Coroutine_FinishDelegation(gen, &ret);
          __Pyx_Coroutine_unset_is_running(gen);
          return __Pyx_Coroutine_MethodReturnFromResult(self, result, ret, 0);
      }
  throw_here:
      __Pyx_Raise(typ, val, tb, NULL);
  propagate_exception:
      {
          PyObject *retval = NULL;
          __Pyx_PySendResult result = __Pyx_Coroutine_SendEx(gen, NULL, &retval, 0);
          __Pyx_Coroutine_unset_is_running(gen);
          return __Pyx_Coroutine_MethodReturnFromResult(self, result, retval, 0);
      }
  }
  static PyObject *__Pyx_Coroutine_Throw(PyObject *self, PyObject *args) {
      PyObject *typ;
      PyObject *val = NULL;
      PyObject *tb = NULL;
      if (unlikely(!PyArg_UnpackTuple(args, "throw", 1, 3, &typ, &val, &tb)))
          return NULL;
      return __Pyx__Coroutine_Throw(self, typ, val, tb, args, 1);
  }
  static CYTHON_INLINE int __Pyx_Coroutine_traverse_excstate(__Pyx_ExcInfoStruct *exc_state, visitproc visit, void *arg) {
  #if PY_VERSION_HEX >= 0x030B00a4
      Py_VISIT(exc_state->exc_value);
  #else
      Py_VISIT(exc_state->exc_type);
      Py_VISIT(exc_state->exc_value);
      Py_VISIT(exc_state->exc_traceback);
  #endif
      return 0;
  }
  static int __Pyx_Coroutine_traverse(__pyx_CoroutineObject *gen, visitproc visit, void *arg) {
      {
          int e = __Pyx_call_type_traverse((PyObject*)gen, 1, visit, arg);
          if (e) return e;
      }
      Py_VISIT(gen->closure);
      Py_VISIT(gen->classobj);
      Py_VISIT(gen->yieldfrom);
      return __Pyx_Coroutine_traverse_excstate(&gen->gi_exc_state, visit, arg);
  }
  static int __Pyx_Coroutine_clear(PyObject *self) {
      __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
      Py_CLEAR(gen->closure);
      Py_CLEAR(gen->classobj);
      __Pyx_Coroutine_Undelegate(gen);
      __Pyx_Coroutine_ExceptionClear(&gen->gi_exc_state);
  #ifdef __Pyx_AsyncGen_USED
      if (__Pyx_AsyncGen_CheckExact(self)) {
          Py_CLEAR(((__pyx_PyAsyncGenObject*)gen)->ag_finalizer);
      }
  #endif
      Py_CLEAR(gen->gi_code);
      Py_CLEAR(gen->gi_frame);
      Py_CLEAR(gen->gi_name);
      Py_CLEAR(gen->gi_qualname);
      Py_CLEAR(gen->gi_modulename);
      return 0;
  }
  static void __Pyx_Coroutine_dealloc(PyObject *self) {
      __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
      PyObject_GC_UnTrack(gen);
      #if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
      if (gen->gi_weakreflist != NULL)
      #endif
          PyObject_ClearWeakRefs(self);
      if (gen->resume_label >= 0) {
          PyObject_GC_Track(self);
  #if CYTHON_USE_TP_FINALIZE
          if (unlikely(PyObject_CallFinalizerFromDealloc(self)))
  #else
          {
              destructor del = __Pyx_PyObject_GetSlot(gen, tp_del, destructor);
              if (del) del(self);
          }
          if (unlikely(Py_REFCNT(self) > 0))
  #endif
          {
              return;
          }
          PyObject_GC_UnTrack(self);
      }
  #ifdef __Pyx_AsyncGen_USED
      if (__Pyx_AsyncGen_CheckExact(self)) {
          /* We have to handle this case for asynchronous generators
             right here, because this code has to be between UNTRACK
             and GC_Del. */
          Py_CLEAR(((__pyx_PyAsyncGenObject*)self)->ag_finalizer);
      }
  #endif
      __Pyx_Coroutine_clear(self);
      __Pyx_PyHeapTypeObject_GC_Del(gen);
  }
  #if CYTHON_USE_TP_FINALIZE
  static void __Pyx_Coroutine_del(PyObject *self) {
      PyObject *error_type, *error_value, *error_traceback;
      __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
      __Pyx_PyThreadState_declare
      if (gen->resume_label < 0) {
          return;
      }
      __Pyx_PyThreadState_assign
      __Pyx_ErrFetch(&error_type, &error_value, &error_traceback);
  #ifdef __Pyx_AsyncGen_USED
      if (__Pyx_AsyncGen_CheckExact(self)) {
          __pyx_PyAsyncGenObject *agen = (__pyx_PyAsyncGenObject*)self;
          PyObject *finalizer = agen->ag_finalizer;
          if (finalizer && !agen->ag_closed) {
              PyObject *res = __Pyx_PyObject_CallOneArg(finalizer, self);
              if (unlikely(!res)) {
                  PyErr_WriteUnraisable(self);
              } else {
                  Py_DECREF(res);
              }
              __Pyx_ErrRestore(error_type, error_value, error_traceback);
              return;
          }
      }
  #endif
      if (unlikely(gen->resume_label == 0 && !error_value)) {
  #ifdef __Pyx_Coroutine_USED
  #ifdef __Pyx_Generator_USED
      if (!__Pyx_Generator_CheckExact(self))
  #endif
          {
          PyObject_GC_UnTrack(self);
          if (unlikely(PyErr_WarnFormat(PyExc_RuntimeWarning, 1, "coroutine '%.50S' was never awaited", gen->gi_qualname) < 0))
              PyErr_WriteUnraisable(self);
          PyObject_GC_Track(self);
          }
  #endif
      } else {
          PyObject *retval = NULL;
          __Pyx_PySendResult result = __Pyx_Coroutine_Close(self, &retval);
          if (result == PYGEN_ERROR) {
              PyErr_WriteUnraisable(self);
          } else {
              Py_XDECREF(retval);
          }
      }
      __Pyx_ErrRestore(error_type, error_value, error_traceback);
  }
  #endif
  static PyObject *
  __Pyx_Coroutine_get_name(__pyx_CoroutineObject *self, void *context)
  {
      PyObject *name = self->gi_name;
      CYTHON_UNUSED_VAR(context);
      if (unlikely(!name)) name = Py_None;
      Py_INCREF(name);
      return name;
  }
  static int
  __Pyx_Coroutine_set_name(__pyx_CoroutineObject *self, PyObject *value, void *context)
  {
      CYTHON_UNUSED_VAR(context);
      if (unlikely(value == NULL || !PyUnicode_Check(value))) {
          PyErr_SetString(PyExc_TypeError,
                          "__name__ must be set to a string object");
          return -1;
      }
      Py_INCREF(value);
      __Pyx_Py_XDECREF_SET(self->gi_name, value);
      return 0;
  }
  static PyObject *
  __Pyx_Coroutine_get_qualname(__pyx_CoroutineObject *self, void *context)
  {
      PyObject *name = self->gi_qualname;
      CYTHON_UNUSED_VAR(context);
      if (unlikely(!name)) name = Py_None;
      Py_INCREF(name);
      return name;
  }
  static int
  __Pyx_Coroutine_set_qualname(__pyx_CoroutineObject *self, PyObject *value, void *context)
  {
      CYTHON_UNUSED_VAR(context);
      if (unlikely(value == NULL || !PyUnicode_Check(value))) {
          PyErr_SetString(PyExc_TypeError,
                          "__qualname__ must be set to a string object");
          return -1;
      }
      Py_INCREF(value);
      __Pyx_Py_XDECREF_SET(self->gi_qualname, value);
      return 0;
  }
  #if !CYTHON_COMPILING_IN_LIMITED_API
  static PyObject *
  __Pyx__Coroutine_get_frame_locked(__pyx_CoroutineObject *self) {
      PyObject *frame;
      frame = self->gi_frame;
      if (!frame) {
          if (unlikely(!self->gi_code)) {
              Py_RETURN_NONE;
          }
          PyObject *globals = PyDict_New();
          if (unlikely(!globals)) return NULL;
          frame = (PyObject *) PyFrame_New(
              PyThreadState_Get(),            /*PyThreadState *tstate,*/
              (PyCodeObject*) self->gi_code,  /*PyCodeObject *code,*/
              globals,                        /*PyObject *globals,*/
              0                               /*PyObject *locals*/
          );
          Py_DECREF(globals);
          if (unlikely(!frame))
              return NULL;
          if (unlikely(self->gi_frame)) {
              Py_DECREF(frame);
              frame = self->gi_frame;
          } else {
              self->gi_frame = frame;
          }
      }
      Py_INCREF(frame);
      return frame;
  }
  #endif
  static PyObject *
  __Pyx__Coroutine_get_frame(__pyx_CoroutineObject *self)
  {
  #if !CYTHON_COMPILING_IN_LIMITED_API
      PyObject *frame;
      __Pyx_BEGIN_CRITICAL_SECTION((PyObject*)self);
      frame = __Pyx__Coroutine_get_frame_locked(self);
      __Pyx_END_CRITICAL_SECTION();
      return frame;
  #else
      CYTHON_UNUSED_VAR(self);
      Py_RETURN_NONE;
  #endif
  }
  static PyObject *
  __Pyx_Coroutine_get_frame(__pyx_CoroutineObject *self, void *context) {
      CYTHON_UNUSED_VAR(context);
      PyObject *frame = self->gi_frame;
      if (frame)
          return __Pyx_NewRef(frame);
      return __Pyx__Coroutine_get_frame(self);
  }
  static __pyx_CoroutineObject *__Pyx__Coroutine_New(
              PyTypeObject* type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
              PyObject *name, PyObject *qualname, PyObject *module_name) {
      __pyx_CoroutineObject *gen = PyObject_GC_New(__pyx_CoroutineObject, type);
      if (unlikely(!gen))
          return NULL;
      return __Pyx__Coroutine_NewInit(gen, body, code, closure, name, qualname, module_name);
  }
  static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit(
              __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
              PyObject *name, PyObject *qualname, PyObject *module_name) {
      gen->body = body;
      gen->closure = closure;
      Py_XINCREF(closure);
      gen->is_running = 0;
      gen->resume_label = 0;
      gen->classobj = NULL;
      gen->yieldfrom = NULL;
      gen->yieldfrom_am_send = NULL;
      #if PY_VERSION_HEX >= 0x030B00a4 && !CYTHON_COMPILING_IN_LIMITED_API
      gen->gi_exc_state.exc_value = NULL;
      #else
      gen->gi_exc_state.exc_type = NULL;
      gen->gi_exc_state.exc_value = NULL;
      gen->gi_exc_state.exc_traceback = NULL;
      #endif
  #if CYTHON_USE_EXC_INFO_STACK
      gen->gi_exc_state.previous_item = NULL;
  #endif
  #if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
      gen->gi_weakreflist = NULL;
  #endif
      Py_XINCREF(qualname);
      gen->gi_qualname = qualname;
      Py_XINCREF(name);
      gen->gi_name = name;
      Py_XINCREF(module_name);
      gen->gi_modulename = module_name;
      Py_XINCREF(code);
      gen->gi_code = code;
      gen->gi_frame = NULL;
      PyObject_GC_Track(gen);
      return gen;
  }
  static char __Pyx_Coroutine_test_and_set_is_running(__pyx_CoroutineObject *gen) {
      char result;
      __Pyx_BEGIN_CRITICAL_SECTION((PyObject*)gen);
      result = gen->is_running;
      gen->is_running = 1;
      __Pyx_END_CRITICAL_SECTION();
      return result;
  }
  static void __Pyx_Coroutine_unset_is_running(__pyx_CoroutineObject *gen) {
      __Pyx_BEGIN_CRITICAL_SECTION((PyObject*)gen);
      assert(gen->is_running);
      gen->is_running = 0;
      __Pyx_END_CRITICAL_SECTION();
  }
  static char __Pyx_Coroutine_get_is_running(__pyx_CoroutineObject *gen) {
      char result;
      __Pyx_BEGIN_CRITICAL_SECTION((PyObject*)gen);
      result = gen->is_running;
      __Pyx_END_CRITICAL_SECTION();
      return result;
  }
  static PyObject *__Pyx_Coroutine_get_is_running_getter(PyObject *gen, void *closure) {
      CYTHON_UNUSED_VAR(closure);
      char result = __Pyx_Coroutine_get_is_running((__pyx_CoroutineObject*)gen);
      if (result) Py_RETURN_TRUE;
      else Py_RETURN_FALSE;
  }
  #if __PYX_HAS_PY_AM_SEND == 2
  static void __Pyx_SetBackportTypeAmSend(PyTypeObject *type, __Pyx_PyAsyncMethodsStruct *static_amsend_methods, __Pyx_pyiter_sendfunc am_send) {
      Py_ssize_t ptr_offset = (char*)(type->tp_as_async) - (char*)type;
      if (ptr_offset < 0 || ptr_offset > type->tp_basicsize) {
          return;
      }
      memcpy((void*)static_amsend_methods, (void*)(type->tp_as_async), sizeof(*type->tp_as_async));
      static_amsend_methods->am_send = am_send;
      type->tp_as_async = __Pyx_SlotTpAsAsync(static_amsend_methods);
  }
  #endif
  static PyObject *__Pyx_Coroutine_fail_reduce_ex(PyObject *self, PyObject *arg) {
      CYTHON_UNUSED_VAR(arg);
      __Pyx_TypeName self_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE((PyObject*)self));
      PyErr_Format(PyExc_TypeError, "cannot pickle '" __Pyx_FMT_TYPENAME "' object",
                           self_type_name);
      __Pyx_DECREF_TypeName(self_type_name);
      return NULL;
  }
  
/* Generator */
  static PyMethodDef __pyx_Generator_methods[] = {
      {"send", (PyCFunction) __Pyx_Coroutine_Send, METH_O,
       PyDoc_STR("send(arg) -> send 'arg' into generator,\nreturn next yielded value or raise StopIteration.")},
      {"throw", (PyCFunction) __Pyx_Coroutine_Throw, METH_VARARGS,
       PyDoc_STR("throw(typ[,val[,tb]]) -> raise exception in generator,\nreturn next yielded value or raise StopIteration.")},
      {"close", (PyCFunction) __Pyx_Coroutine_Close_Method, METH_NOARGS,
       PyDoc_STR("close() -> raise GeneratorExit inside generator.")},
      {"__reduce_ex__", (PyCFunction) __Pyx_Coroutine_fail_reduce_ex, METH_O, 0},
      {"__reduce__", (PyCFunction) __Pyx_Coroutine_fail_reduce_ex, METH_NOARGS, 0},
      {0, 0, 0, 0}
  };
  static PyMemberDef __pyx_Generator_memberlist[] = {
      {"gi_yieldfrom", T_OBJECT, offsetof(__pyx_CoroutineObject, yieldfrom), READONLY,
       PyDoc_STR("object being iterated by 'yield from', or None")},
      {"gi_code", T_OBJECT, offsetof(__pyx_CoroutineObject, gi_code), READONLY, NULL},
      {"__module__", T_OBJECT, offsetof(__pyx_CoroutineObject, gi_modulename), 0, 0},
  #if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
      {"__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CoroutineObject, gi_weakreflist), READONLY, 0},
  #endif
      {0, 0, 0, 0, 0}
  };
  static PyGetSetDef __pyx_Generator_getsets[] = {
      {"__name__", (getter)__Pyx_Coroutine_get_name, (setter)__Pyx_Coroutine_set_name,
       PyDoc_STR("name of the generator"), 0},
      {"__qualname__", (getter)__Pyx_Coroutine_get_qualname, (setter)__Pyx_Coroutine_set_qualname,
       PyDoc_STR("qualified name of the generator"), 0},
      {"gi_frame", (getter)__Pyx_Coroutine_get_frame, NULL,
       PyDoc_STR("Frame of the generator"), 0},
      {"gi_running", __Pyx_Coroutine_get_is_running_getter, NULL, NULL, NULL},
      {0, 0, 0, 0, 0}
  };
  static PyType_Slot __pyx_GeneratorType_slots[] = {
      {Py_tp_dealloc, (void *)__Pyx_Coroutine_dealloc},
      {Py_tp_traverse, (void *)__Pyx_Coroutine_traverse},
      {Py_tp_iter, (void *)PyObject_SelfIter},
      {Py_tp_iternext, (void *)__Pyx_Generator_Next},
      {Py_tp_methods, (void *)__pyx_Generator_methods},
      {Py_tp_members, (void *)__pyx_Generator_memberlist},
      {Py_tp_getset, (void *)__pyx_Generator_getsets},
      {Py_tp_getattro, (void *) PyObject_GenericGetAttr},
  #if CYTHON_USE_TP_FINALIZE
      {Py_tp_finalize, (void *)__Pyx_Coroutine_del},
  #endif
  #if __PYX_HAS_PY_AM_SEND == 1
      {Py_am_send, (void *)__Pyx_Coroutine_AmSend},
  #endif
      {0, 0},
  };
  static PyType_Spec __pyx_GeneratorType_spec = {
      __PYX_TYPE_MODULE_PREFIX "generator",
      sizeof(__pyx_CoroutineObject),
      0,
  #if PY_VERSION_HEX >= 0x030C0000 && !CYTHON_COMPILING_IN_LIMITED_API
      Py_TPFLAGS_MANAGED_WEAKREF |
  #endif
      Py_TPFLAGS_IMMUTABLETYPE | Py_TPFLAGS_DISALLOW_INSTANTIATION |
      Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | __Pyx_TPFLAGS_HAVE_AM_SEND,
      __pyx_GeneratorType_slots
  };
  #if __PYX_HAS_PY_AM_SEND == 2
  static __Pyx_PyAsyncMethodsStruct __pyx_Generator_as_async;
  #endif
  static int __pyx_Generator_init(PyObject *module) {
      __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module);
      mstate->__pyx_GeneratorType = __Pyx_FetchCommonTypeFromSpec(
          mstate->__pyx_CommonTypesMetaclassType, module, &__pyx_GeneratorType_spec, NULL);
      if (unlikely(!mstate->__pyx_GeneratorType)) {
          return -1;
      }
  #if __PYX_HAS_PY_AM_SEND == 2
      __Pyx_SetBackportTypeAmSend(mstate->__pyx_GeneratorType, &__pyx_Generator_as_async, &__Pyx_Coroutine_AmSend);
  #endif
      return 0;
  }
  static PyObject *__Pyx_Generator_GetInlinedResult(PyObject *self) {
      __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
      PyObject *retval = NULL;
      if (unlikely(__Pyx_Coroutine_test_and_set_is_running(gen))) {
          return __Pyx_Coroutine_AlreadyRunningError(gen);
      }
      __Pyx_PySendResult result = __Pyx_Coroutine_SendEx(gen, Py_None, &retval, 0);
      __Pyx_Coroutine_unset_is_running(gen);
      (void) result;
      assert (result == PYGEN_RETURN || result == PYGEN_ERROR);
      assert ((result == PYGEN_RETURN && retval != NULL) || (result == PYGEN_ERROR && retval == NULL));
      return retval;
  }
  
/* CheckBinaryVersion */
  static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer) {
      const unsigned long MAJOR_MINOR = 0xFFFF0000UL;
      if ((rt_version & MAJOR_MINOR) == (ct_version & MAJOR_MINOR))
          return 0;
      if (likely(allow_newer && (rt_version & MAJOR_MINOR) > (ct_version & MAJOR_MINOR)))
          return 1;
      {
          char message[200];
          PyOS_snprintf(message, sizeof(message),
                        "compile time Python version %d.%d "
                        "of module '%.100s' "
                        "%s "
                        "runtime version %d.%d",
                         (int) (ct_version >> 24), (int) ((ct_version >> 16) & 0xFF),
                         __Pyx_MODULE_NAME,
                         (allow_newer) ? "was newer than" : "does not match",
                         (int) (rt_version >> 24), (int) ((rt_version >> 16) & 0xFF)
         );
          return PyErr_WarnEx(NULL, message, 1);
      }
  }
  
/* NewCodeObj */
  #if CYTHON_COMPILING_IN_LIMITED_API
      static PyObject* __Pyx__PyCode_New(int a, int p, int k, int l, int s, int f,
                                         PyObject *code, PyObject *c, PyObject* n, PyObject *v,
                                         PyObject *fv, PyObject *cell, PyObject* fn,
                                         PyObject *name, int fline, PyObject *lnos) {
          PyObject *exception_table = NULL;
          PyObject *types_module=NULL, *code_type=NULL, *result=NULL;
          #if __PYX_LIMITED_VERSION_HEX < 0x030b0000
          PyObject *version_info;
          PyObject *py_minor_version = NULL;
          #endif
          long minor_version = 0;
          PyObject *type, *value, *traceback;
          PyErr_Fetch(&type, &value, &traceback);
          #if __PYX_LIMITED_VERSION_HEX >= 0x030b0000
          minor_version = 11;
          #else
          if (!(version_info = PySys_GetObject("version_info"))) goto end;
          if (!(py_minor_version = PySequence_GetItem(version_info, 1))) goto end;
          minor_version = PyLong_AsLong(py_minor_version);
          Py_DECREF(py_minor_version);
          if (minor_version == -1 && PyErr_Occurred()) goto end;
          #endif
          if (!(types_module = PyImport_ImportModule("types"))) goto end;
          if (!(code_type = PyObject_GetAttrString(types_module, "CodeType"))) goto end;
          if (minor_version <= 7) {
              (void)p;
              result = PyObject_CallFunction(code_type, "iiiiiOOOOOOiOOO", a, k, l, s, f, code,
                            c, n, v, fn, name, fline, lnos, fv, cell);
          } else if (minor_version <= 10) {
              result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOiOOO", a,p, k, l, s, f, code,
                            c, n, v, fn, name, fline, lnos, fv, cell);
          } else {
              if (!(exception_table = PyBytes_FromStringAndSize(NULL, 0))) goto end;
              result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOOiOOOO", a,p, k, l, s, f, code,
                            c, n, v, fn, name, name, fline, lnos, exception_table, fv, cell);
          }
      end:
          Py_XDECREF(code_type);
          Py_XDECREF(exception_table);
          Py_XDECREF(types_module);
          if (type) {
              PyErr_Restore(type, value, traceback);
          }
          return result;
      }
  #elif PY_VERSION_HEX >= 0x030B0000
    static PyCodeObject* __Pyx__PyCode_New(int a, int p, int k, int l, int s, int f,
                                           PyObject *code, PyObject *c, PyObject* n, PyObject *v,
                                           PyObject *fv, PyObject *cell, PyObject* fn,
                                           PyObject *name, int fline, PyObject *lnos) {
      PyCodeObject *result;
      result =
        #if PY_VERSION_HEX >= 0x030C0000
          PyUnstable_Code_NewWithPosOnlyArgs
        #else
          PyCode_NewWithPosOnlyArgs
        #endif
          (a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, name, fline, lnos, __pyx_mstate_global->__pyx_empty_bytes);
      #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030c00A1
      if (likely(result))
          result->_co_firsttraceable = 0;
      #endif
      return result;
    }
  #elif !CYTHON_COMPILING_IN_PYPY
    #define __Pyx__PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
            PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
  #else
    #define __Pyx__PyCode_New(a, p, 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)
  #endif
  static PyObject* __Pyx_PyCode_New(
          const __Pyx_PyCode_New_function_description descr,
          PyObject * const *varnames,
          PyObject *filename,
          PyObject *funcname,
          PyObject *line_table,
          PyObject *tuple_dedup_map
  ) {
      PyObject *code_obj = NULL, *varnames_tuple_dedup = NULL, *code_bytes = NULL;
      Py_ssize_t var_count = (Py_ssize_t) descr.nlocals;
      PyObject *varnames_tuple = PyTuple_New(var_count);
      if (unlikely(!varnames_tuple)) return NULL;
      for (Py_ssize_t i=0; i < var_count; i++) {
          Py_INCREF(varnames[i]);
          if (__Pyx_PyTuple_SET_ITEM(varnames_tuple, i, varnames[i]) != (0)) goto done;
      }
      #if CYTHON_COMPILING_IN_LIMITED_API
      varnames_tuple_dedup = PyDict_GetItem(tuple_dedup_map, varnames_tuple);
      if (!varnames_tuple_dedup) {
          if (unlikely(PyDict_SetItem(tuple_dedup_map, varnames_tuple, varnames_tuple) < 0)) goto done;
          varnames_tuple_dedup = varnames_tuple;
      }
      #else
      varnames_tuple_dedup = PyDict_SetDefault(tuple_dedup_map, varnames_tuple, varnames_tuple);
      if (unlikely(!varnames_tuple_dedup)) goto done;
      #endif
      #if CYTHON_AVOID_BORROWED_REFS
      Py_INCREF(varnames_tuple_dedup);
      #endif
      if (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table != NULL && !CYTHON_COMPILING_IN_GRAAL) {
          Py_ssize_t line_table_length = __Pyx_PyBytes_GET_SIZE(line_table);
          #if !CYTHON_ASSUME_SAFE_SIZE
          if (unlikely(line_table_length == -1)) goto done;
          #endif
          Py_ssize_t code_len = (line_table_length * 2 + 4) & ~3LL;
          code_bytes = PyBytes_FromStringAndSize(NULL, code_len);
          if (unlikely(!code_bytes)) goto done;
          char* c_code_bytes = PyBytes_AsString(code_bytes);
          if (unlikely(!c_code_bytes)) goto done;
          memset(c_code_bytes, 0, (size_t) code_len);
      }
      code_obj = (PyObject*) __Pyx__PyCode_New(
          (int) descr.argcount,
          (int) descr.num_posonly_args,
          (int) descr.num_kwonly_args,
          (int) descr.nlocals,
          0,
          (int) descr.flags,
          code_bytes ? code_bytes : __pyx_mstate_global->__pyx_empty_bytes,
          __pyx_mstate_global->__pyx_empty_tuple,
          __pyx_mstate_global->__pyx_empty_tuple,
          varnames_tuple_dedup,
          __pyx_mstate_global->__pyx_empty_tuple,
          __pyx_mstate_global->__pyx_empty_tuple,
          filename,
          funcname,
          (int) descr.first_line,
          (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table) ? line_table : __pyx_mstate_global->__pyx_empty_bytes
      );
  done:
      Py_XDECREF(code_bytes);
      #if CYTHON_AVOID_BORROWED_REFS
      Py_XDECREF(varnames_tuple_dedup);
      #endif
      Py_DECREF(varnames_tuple);
      return code_obj;
  }
  
/* DecompressString */
  static PyObject *__Pyx_DecompressString(const char *s, Py_ssize_t length, int algo) {
      PyObject *module = NULL, *decompress, *compressed_bytes, *decompressed;
      const char* module_name = algo == 3 ? "compression.zstd" : algo == 2 ? "bz2" : "zlib";
      PyObject *methodname = PyUnicode_FromString("decompress");
      if (unlikely(!methodname)) return NULL;
      #if __PYX_LIMITED_VERSION_HEX >= 0x030e0000
      if (algo == 3) {
          PyObject *fromlist = Py_BuildValue("[O]", methodname);
          if (unlikely(!fromlist)) goto bad;
          module = PyImport_ImportModuleLevel("compression.zstd", NULL, NULL, fromlist, 0);
          Py_DECREF(fromlist);
      } else
      #endif
          module = PyImport_ImportModule(module_name);
      if (unlikely(!module)) goto import_failed;
      decompress = PyObject_GetAttr(module, methodname);
      if (unlikely(!decompress)) goto import_failed;
      {
          #ifdef __cplusplus
              char *memview_bytes = const_cast<char*>(s);
          #else
              #if defined(__clang__)
                #pragma clang diagnostic push
                #pragma clang diagnostic ignored "-Wcast-qual"
              #elif !defined(__INTEL_COMPILER) && defined(__GNUC__)
                #pragma GCC diagnostic push
                #pragma GCC diagnostic ignored "-Wcast-qual"
              #endif
              char *memview_bytes = (char*) s;
              #if defined(__clang__)
                #pragma clang diagnostic pop
              #elif !defined(__INTEL_COMPILER) && defined(__GNUC__)
                #pragma GCC diagnostic pop
              #endif
          #endif
          #if CYTHON_COMPILING_IN_LIMITED_API && !defined(PyBUF_READ)
          int memview_flags = 0x100;
          #else
          int memview_flags = PyBUF_READ;
          #endif
          compressed_bytes = PyMemoryView_FromMemory(memview_bytes, length, memview_flags);
      }
      if (unlikely(!compressed_bytes)) {
          Py_DECREF(decompress);
          goto bad;
      }
      decompressed = PyObject_CallFunctionObjArgs(decompress, compressed_bytes, NULL);
      Py_DECREF(compressed_bytes);
      Py_DECREF(decompress);
      Py_DECREF(module);
      Py_DECREF(methodname);
      return decompressed;
  import_failed:
      PyErr_Format(PyExc_ImportError,
          "Failed to import '%.20s.decompress' - cannot initialise module strings. "
          "String compression was configured with the C macro 'CYTHON_COMPRESS_STRINGS=%d'.",
          module_name, algo);
  bad:
      Py_XDECREF(module);
      Py_DECREF(methodname);
      return NULL;
  }
  
#include <string.h>
static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s) {
    size_t len = strlen(s);
    if (unlikely(len > (size_t) PY_SSIZE_T_MAX)) {
        PyErr_SetString(PyExc_OverflowError, "byte string is too long");
        return -1;
    }
    return (Py_ssize_t) len;
}
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
    Py_ssize_t len = __Pyx_ssize_strlen(c_str);
    if (unlikely(len < 0)) return NULL;
    return __Pyx_PyUnicode_FromStringAndSize(c_str, len);
}
static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char* c_str) {
    Py_ssize_t len = __Pyx_ssize_strlen(c_str);
    if (unlikely(len < 0)) return NULL;
    return PyByteArray_FromStringAndSize(c_str, len);
}
static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
    Py_ssize_t ignore;
    return __Pyx_PyObject_AsStringAndSize(o, &ignore);
}
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8
static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
    if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
#if CYTHON_COMPILING_IN_LIMITED_API
    {
        const char* result;
        Py_ssize_t unicode_length;
        CYTHON_MAYBE_UNUSED_VAR(unicode_length); // only for __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
        #if __PYX_LIMITED_VERSION_HEX < 0x030A0000
        if (unlikely(PyArg_Parse(o, "s#", &result, length) < 0)) return NULL;
        #else
        result = PyUnicode_AsUTF8AndSize(o, length);
        #endif
        #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
        unicode_length = PyUnicode_GetLength(o);
        if (unlikely(unicode_length < 0)) return NULL;
        if (unlikely(unicode_length != *length)) {
            PyUnicode_AsASCIIString(o);
            return NULL;
        }
        #endif
        return result;
    }
#else
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
    if (likely(PyUnicode_IS_ASCII(o))) {
        *length = PyUnicode_GET_LENGTH(o);
        return PyUnicode_AsUTF8(o);
    } else {
        PyUnicode_AsASCIIString(o);
        return NULL;
    }
#else
    return PyUnicode_AsUTF8AndSize(o, length);
#endif
#endif
}
#endif
static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8
    if (PyUnicode_Check(o)) {
        return __Pyx_PyUnicode_AsStringAndSize(o, length);
    } else
#endif
    if (PyByteArray_Check(o)) {
#if (CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS) || (CYTHON_COMPILING_IN_PYPY && (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE)))
        *length = PyByteArray_GET_SIZE(o);
        return PyByteArray_AS_STRING(o);
#else
        *length = PyByteArray_Size(o);
        if (*length == -1) return NULL;
        return PyByteArray_AsString(o);
#endif
    } else
    {
        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 int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
    int retval;
    if (unlikely(!x)) return -1;
    retval = __Pyx_PyObject_IsTrue(x);
    Py_DECREF(x);
    return retval;
}
static PyObject* __Pyx_PyNumber_LongWrongResultType(PyObject* result) {
    __Pyx_TypeName result_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(result));
    if (PyLong_Check(result)) {
        if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
                "__int__ returned non-int (type " __Pyx_FMT_TYPENAME ").  "
                "The ability to return an instance of a strict subclass of int is deprecated, "
                "and may be removed in a future version of Python.",
                result_type_name)) {
            __Pyx_DECREF_TypeName(result_type_name);
            Py_DECREF(result);
            return NULL;
        }
        __Pyx_DECREF_TypeName(result_type_name);
        return result;
    }
    PyErr_Format(PyExc_TypeError,
                 "__int__ returned non-int (type " __Pyx_FMT_TYPENAME ")",
                 result_type_name);
    __Pyx_DECREF_TypeName(result_type_name);
    Py_DECREF(result);
    return NULL;
}
static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x) {
#if CYTHON_USE_TYPE_SLOTS
  PyNumberMethods *m;
#endif
  PyObject *res = NULL;
  if (likely(PyLong_Check(x)))
      return __Pyx_NewRef(x);
#if CYTHON_USE_TYPE_SLOTS
  m = Py_TYPE(x)->tp_as_number;
  if (likely(m && m->nb_int)) {
      res = m->nb_int(x);
  }
#else
  if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
      res = PyNumber_Long(x);
  }
#endif
  if (likely(res)) {
      if (unlikely(!PyLong_CheckExact(res))) {
          return __Pyx_PyNumber_LongWrongResultType(res);
      }
  }
  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 (likely(PyLong_CheckExact(b))) {
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(__Pyx_PyLong_IsCompact(b))) {
        return __Pyx_PyLong_CompactValue(b);
    } else {
      const digit* digits = __Pyx_PyLong_Digits(b);
      const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(b);
      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 = PyLong_AsSsize_t(x);
  Py_DECREF(x);
  return ival;
}
static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) {
  if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) {
    return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o);
  } else {
    Py_ssize_t ival;
    PyObject *x;
    x = PyNumber_Index(o);
    if (!x) return -1;
    ival = PyLong_AsLong(x);
    Py_DECREF(x);
    return ival;
  }
}
static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b) {
    CYTHON_UNUSED_VAR(b);
    return __Pyx_NewRef(Py_None);
}
static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
  return __Pyx_NewRef(b ? Py_True: Py_False);
}
static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t ival) {
    return PyLong_FromSize_t(ival);
}


  /* MultiPhaseInitModuleState */
  #if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE
  #ifndef CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
  #if (CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX >= 0x030C0000)
    #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 1
  #else
    #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 0
  #endif
  #endif
  #if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE && !CYTHON_ATOMICS
  #error "Module state with PEP489 requires atomics. Currently that's one of\
   C11, C++11, gcc atomic intrinsics or MSVC atomic intrinsics"
  #endif
  #if !CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
  #define __Pyx_ModuleStateLookup_Lock()
  #define __Pyx_ModuleStateLookup_Unlock()
  #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000
  static PyMutex __Pyx_ModuleStateLookup_mutex = {0};
  #define __Pyx_ModuleStateLookup_Lock() PyMutex_Lock(&__Pyx_ModuleStateLookup_mutex)
  #define __Pyx_ModuleStateLookup_Unlock() PyMutex_Unlock(&__Pyx_ModuleStateLookup_mutex)
  #elif defined(__cplusplus) && __cplusplus >= 201103L
  #include <mutex>
  static std::mutex __Pyx_ModuleStateLookup_mutex;
  #define __Pyx_ModuleStateLookup_Lock() __Pyx_ModuleStateLookup_mutex.lock()
  #define __Pyx_ModuleStateLookup_Unlock() __Pyx_ModuleStateLookup_mutex.unlock()
  #elif defined(__STDC_VERSION__) && (__STDC_VERSION__ > 201112L) && !defined(__STDC_NO_THREADS__)
  #include <threads.h>
  static mtx_t __Pyx_ModuleStateLookup_mutex;
  static once_flag __Pyx_ModuleStateLookup_mutex_once_flag = ONCE_FLAG_INIT;
  static void __Pyx_ModuleStateLookup_initialize_mutex(void) {
      mtx_init(&__Pyx_ModuleStateLookup_mutex, mtx_plain);
  }
  #define __Pyx_ModuleStateLookup_Lock()\
    call_once(&__Pyx_ModuleStateLookup_mutex_once_flag, __Pyx_ModuleStateLookup_initialize_mutex);\
    mtx_lock(&__Pyx_ModuleStateLookup_mutex)
  #define __Pyx_ModuleStateLookup_Unlock() mtx_unlock(&__Pyx_ModuleStateLookup_mutex)
  #elif defined(HAVE_PTHREAD_H)
  #include <pthread.h>
  static pthread_mutex_t __Pyx_ModuleStateLookup_mutex = PTHREAD_MUTEX_INITIALIZER;
  #define __Pyx_ModuleStateLookup_Lock() pthread_mutex_lock(&__Pyx_ModuleStateLookup_mutex)
  #define __Pyx_ModuleStateLookup_Unlock() pthread_mutex_unlock(&__Pyx_ModuleStateLookup_mutex)
  #elif defined(_WIN32)
  #include <Windows.h>  // synchapi.h on its own doesn't work
  static SRWLOCK __Pyx_ModuleStateLookup_mutex = SRWLOCK_INIT;
  #define __Pyx_ModuleStateLookup_Lock() AcquireSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex)
  #define __Pyx_ModuleStateLookup_Unlock() ReleaseSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex)
  #else
  #error "No suitable lock available for CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE.\
   Requires C standard >= C11, or C++ standard >= C++11,\
   or pthreads, or the Windows 32 API, or Python >= 3.13."
  #endif
  typedef struct {
      int64_t id;
      PyObject *module;
  } __Pyx_InterpreterIdAndModule;
  typedef struct {
      char interpreter_id_as_index;
      Py_ssize_t count;
      Py_ssize_t allocated;
      __Pyx_InterpreterIdAndModule table[1];
  } __Pyx_ModuleStateLookupData;
  #define __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE 32
  #if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
  static __pyx_atomic_int_type __Pyx_ModuleStateLookup_read_counter = 0;
  #endif
  #if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
  static __pyx_atomic_ptr_type __Pyx_ModuleStateLookup_data = 0;
  #else
  static __Pyx_ModuleStateLookupData* __Pyx_ModuleStateLookup_data = NULL;
  #endif
  static __Pyx_InterpreterIdAndModule* __Pyx_State_FindModuleStateLookupTableLowerBound(
          __Pyx_InterpreterIdAndModule* table,
          Py_ssize_t count,
          int64_t interpreterId) {
      __Pyx_InterpreterIdAndModule* begin = table;
      __Pyx_InterpreterIdAndModule* end = begin + count;
      if (begin->id == interpreterId) {
          return begin;
      }
      while ((end - begin) > __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) {
          __Pyx_InterpreterIdAndModule* halfway = begin + (end - begin)/2;
          if (halfway->id == interpreterId) {
              return halfway;
          }
          if (halfway->id < interpreterId) {
              begin = halfway;
          } else {
              end = halfway;
          }
      }
      for (; begin < end; ++begin) {
          if (begin->id >= interpreterId) return begin;
      }
      return begin;
  }
  static PyObject *__Pyx_State_FindModule(CYTHON_UNUSED void* dummy) {
      int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get());
      if (interpreter_id == -1) return NULL;
  #if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
      __Pyx_ModuleStateLookupData* data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data);
      {
          __pyx_atomic_incr_acq_rel(&__Pyx_ModuleStateLookup_read_counter);
          if (likely(data)) {
              __Pyx_ModuleStateLookupData* new_data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_acquire(&__Pyx_ModuleStateLookup_data);
              if (likely(data == new_data)) {
                  goto read_finished;
              }
          }
          __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter);
          __Pyx_ModuleStateLookup_Lock();
          __pyx_atomic_incr_relaxed(&__Pyx_ModuleStateLookup_read_counter);
          data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data);
          __Pyx_ModuleStateLookup_Unlock();
      }
    read_finished:;
  #else
      __Pyx_ModuleStateLookupData* data = __Pyx_ModuleStateLookup_data;
  #endif
      __Pyx_InterpreterIdAndModule* found = NULL;
      if (unlikely(!data)) goto end;
      if (data->interpreter_id_as_index) {
          if (interpreter_id < data->count) {
              found = data->table+interpreter_id;
          }
      } else {
          found = __Pyx_State_FindModuleStateLookupTableLowerBound(
              data->table, data->count, interpreter_id);
      }
    end:
      {
          PyObject *result=NULL;
          if (found && found->id == interpreter_id) {
              result = found->module;
          }
  #if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
          __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter);
  #endif
          return result;
      }
  }
  #if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
  static void __Pyx_ModuleStateLookup_wait_until_no_readers(void) {
      while (__pyx_atomic_load(&__Pyx_ModuleStateLookup_read_counter) != 0);
  }
  #else
  #define __Pyx_ModuleStateLookup_wait_until_no_readers()
  #endif
  static int __Pyx_State_AddModuleInterpIdAsIndex(__Pyx_ModuleStateLookupData **old_data, PyObject* module, int64_t interpreter_id) {
      Py_ssize_t to_allocate = (*old_data)->allocated;
      while (to_allocate <= interpreter_id) {
          if (to_allocate == 0) to_allocate = 1;
          else to_allocate *= 2;
      }
      __Pyx_ModuleStateLookupData *new_data = *old_data;
      if (to_allocate != (*old_data)->allocated) {
           new_data = (__Pyx_ModuleStateLookupData *)realloc(
              *old_data,
              sizeof(__Pyx_ModuleStateLookupData)+(to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule));
          if (!new_data) {
              PyErr_NoMemory();
              return -1;
          }
          for (Py_ssize_t i = new_data->allocated; i < to_allocate; ++i) {
              new_data->table[i].id = i;
              new_data->table[i].module = NULL;
          }
          new_data->allocated = to_allocate;
      }
      new_data->table[interpreter_id].module = module;
      if (new_data->count < interpreter_id+1) {
          new_data->count = interpreter_id+1;
      }
      *old_data = new_data;
      return 0;
  }
  static void __Pyx_State_ConvertFromInterpIdAsIndex(__Pyx_ModuleStateLookupData *data) {
      __Pyx_InterpreterIdAndModule *read = data->table;
      __Pyx_InterpreterIdAndModule *write = data->table;
      __Pyx_InterpreterIdAndModule *end = read + data->count;
      for (; read<end; ++read) {
          if (read->module) {
              write->id = read->id;
              write->module = read->module;
              ++write;
          }
      }
      data->count = write - data->table;
      for (; write<end; ++write) {
          write->id = 0;
          write->module = NULL;
      }
      data->interpreter_id_as_index = 0;
  }
  static int __Pyx_State_AddModule(PyObject* module, CYTHON_UNUSED void* dummy) {
      int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get());
      if (interpreter_id == -1) return -1;
      int result = 0;
      __Pyx_ModuleStateLookup_Lock();
  #if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
      __Pyx_ModuleStateLookupData *old_data = (__Pyx_ModuleStateLookupData *)
              __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0);
  #else
      __Pyx_ModuleStateLookupData *old_data = __Pyx_ModuleStateLookup_data;
  #endif
      __Pyx_ModuleStateLookupData *new_data = old_data;
      if (!new_data) {
          new_data = (__Pyx_ModuleStateLookupData *)calloc(1, sizeof(__Pyx_ModuleStateLookupData));
          if (!new_data) {
              result = -1;
              PyErr_NoMemory();
              goto end;
          }
          new_data->allocated = 1;
          new_data->interpreter_id_as_index = 1;
      }
      __Pyx_ModuleStateLookup_wait_until_no_readers();
      if (new_data->interpreter_id_as_index) {
          if (interpreter_id < __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) {
              result = __Pyx_State_AddModuleInterpIdAsIndex(&new_data, module, interpreter_id);
              goto end;
          }
          __Pyx_State_ConvertFromInterpIdAsIndex(new_data);
      }
      {
          Py_ssize_t insert_at = 0;
          {
              __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound(
                  new_data->table, new_data->count, interpreter_id);
              assert(lower_bound);
              insert_at = lower_bound - new_data->table;
              if (unlikely(insert_at < new_data->count && lower_bound->id == interpreter_id)) {
                  lower_bound->module = module;
                  goto end;  // already in table, nothing more to do
              }
          }
          if (new_data->count+1 >= new_data->allocated) {
              Py_ssize_t to_allocate = (new_data->count+1)*2;
              new_data =
                  (__Pyx_ModuleStateLookupData*)realloc(
                      new_data,
                      sizeof(__Pyx_ModuleStateLookupData) +
                      (to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule));
              if (!new_data) {
                  result = -1;
                  new_data = old_data;
                  PyErr_NoMemory();
                  goto end;
              }
              new_data->allocated = to_allocate;
          }
          ++new_data->count;
          int64_t last_id = interpreter_id;
          PyObject *last_module = module;
          for (Py_ssize_t i=insert_at; i<new_data->count; ++i) {
              int64_t current_id = new_data->table[i].id;
              new_data->table[i].id = last_id;
              last_id = current_id;
              PyObject *current_module = new_data->table[i].module;
              new_data->table[i].module = last_module;
              last_module = current_module;
          }
      }
    end:
  #if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
      __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, new_data);
  #else
      __Pyx_ModuleStateLookup_data = new_data;
  #endif
      __Pyx_ModuleStateLookup_Unlock();
      return result;
  }
  static int __Pyx_State_RemoveModule(CYTHON_UNUSED void* dummy) {
      int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get());
      if (interpreter_id == -1) return -1;
      __Pyx_ModuleStateLookup_Lock();
  #if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
      __Pyx_ModuleStateLookupData *data = (__Pyx_ModuleStateLookupData *)
              __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0);
  #else
      __Pyx_ModuleStateLookupData *data = __Pyx_ModuleStateLookup_data;
  #endif
      if (data->interpreter_id_as_index) {
          if (interpreter_id < data->count) {
              data->table[interpreter_id].module = NULL;
          }
          goto done;
      }
      {
          __Pyx_ModuleStateLookup_wait_until_no_readers();
          __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound(
              data->table, data->count, interpreter_id);
          if (!lower_bound) goto done;
          if (lower_bound->id != interpreter_id) goto done;
          __Pyx_InterpreterIdAndModule *end = data->table+data->count;
          for (;lower_bound<end-1; ++lower_bound) {
              lower_bound->id = (lower_bound+1)->id;
              lower_bound->module = (lower_bound+1)->module;
          }
      }
      --data->count;
      if (data->count == 0) {
          free(data);
          data = NULL;
      }
    done:
  #if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
      __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, data);
  #else
      __Pyx_ModuleStateLookup_data = data;
  #endif
      __Pyx_ModuleStateLookup_Unlock();
      return 0;
  }
  #endif
  
/* #### Code section: utility_code_pragmas_end ### */
#ifdef _MSC_VER
#pragma warning( pop )
#endif



/* #### Code section: end ### */
#endif /* Py_PYTHON_H */
